# Calculating $\langle x | \hat{x} | p \rangle$ in $p$ basis

I am trying to calculate $\langle x\ |\ \hat{x}\ |\ p\rangle$. I can work in the $x$-basis like so:

$$\langle x\ |\ \hat{x}\ |\ p\rangle=\int dx'\langle x\ |\ \hat{x}\ |\ x'\rangle\langle x'\ |\ p\rangle=\int dx'x'\langle x\ |\ x'\rangle\langle x'\ |\ p\rangle=x\langle x\ |\ p\rangle=\frac{xe^{ipx/\hbar}}{\sqrt{2\pi\hbar}}.$$

Which steps of this derivation are not correct, if any?

Second, if I try to do the same thing by using the $p$-basis representation of $\hat{x}$, I get into more trouble:

$$\langle x\ |\ \hat{x}\ |\ p\rangle=\int dp'\langle x\ |\ \hat{x}\ |\ p'\rangle\langle p'\ |\ p\rangle=\int dp'i\hbar\frac{\partial}{\partial p'}\langle x\ |\ p'\rangle\langle p'\ |\ p\rangle$$ $$=\int dp' (-\frac{xe^{ip'x/\hbar}}{\sqrt{2\pi\hbar}})\delta(p-p')=-\frac{xe^{ipx/\hbar}}{\sqrt{2\pi\hbar}}.$$

Hmmm - that doesn't look right - shouldn't the result be the same, no matter which basis or representation I use for $\hat{x}$? Where are the mistakes? Also, I'm not too confident with my own usage of the primes ' all over. Am I using those correctly?

• @Frank: You're right, I seem to have forgotten how to integrate and have deleted my unhelpful earlier comment. That leaves an obviously incorrect negative sign to be explained. Just how did you get a different sign for $\langle x|p \rangle$ in the first calculation compared to $\langle x|p^\prime \rangle$ in the second one? – pyramids Mar 23 '15 at 22:38
• That is the question! It's wrong in at least one place, and probably several, and I can't seem to figure the wrong step(s) :-) – Frank Mar 23 '15 at 22:39
• The one before last step in the first derivation probably cannot be correct, because it is integrating over $p'$, but ignores the $p'$ before $\langle x\ |\ p'\rangle$. – Frank Mar 23 '15 at 22:55

This question (v6) [concerning the overall minus sign in OP's calculation] is essentially a Fourier transformed version of e.g. this Phys.SE post, see Emilio Pisanty's answer and my answer.

The main point is again that the derivative in the momentum Schrödinger representation $$\hat{x}~=~i\hbar\frac{\partial}{\partial p}, \qquad \hat{p}~=~p,$$ acts on the bra (rather than the ket):

$$\langle p | \hat{x}~=~i\hbar\frac{\partial\langle p |}{\partial p} ,\qquad \langle p | \hat{p}~=~p\langle p |.$$

If one insists to act on kets (as opposed to bras), then the momentum Schrödinger representation comes with the opposite sign:

$$\hat{x}|p\rangle~=~-i\hbar\frac{\partial|p\rangle}{\partial p} ,\qquad \hat{p}|p\rangle~=~|p\rangle p.$$

The overlap is given as $$\langle p | x\rangle~=~\frac{e^{px/i\hbar}}{\sqrt{2\pi\hbar}}.$$

• QMechanic - I can see what you are saying, and you are probably right, but I can't seem to be able to use it to fix my derivations above. In particular, there is still a minus sign coming down from the exponential when applying $\hat{x}$ in differential form in the $p$-basis - unless I'm missing something? – Frank Mar 24 '15 at 1:38
• Hint: Complex conjugate your expression $\langle x | \hat{x} | p^{\prime}\rangle=\overline{\langle p^{\prime}| \hat{x} | x\rangle}$ before going to the Schrödinger representation, so that $\langle p^{\prime}|$ is a bra. Or alternatively, use an extra minus in the mom. Schr. repr. when working with the ket $| p^{\prime}\rangle$. – Qmechanic Mar 24 '15 at 1:43
• AhA! But then - just to be absolutely clear, what do you mean by "act on the bras rather than the kets"? Or rather, it doesn't seem to bring in anything decisive: you can remove $|x\rangle$ on both sides of the $\langle p|\hat{x}|x\rangle$ equation, but nothing is really gained that I can tell of, since we have a good definition for $\langle p|x\rangle$ that is easy to differentiate anyway. – Frank Mar 24 '15 at 1:49
• Oops - sorry! Let me take that back! I had missed that you put $i$ under in the expression for $\langle p|x\rangle$ :-) My excuse is that the characters are really small. – Frank Mar 24 '15 at 1:50
• QMechanic - don't you think the first derivation I showed at the top, in the position basis, is bogus? The step one before last remove the integration on $dx'$ ignoring $x'$ in the integrand, for example. That can't be right, can it? – Frank Mar 24 '15 at 2:02

You want to use $$\hat x= i\hbar\frac{\partial}{\partial p}$$ in the momentum basis. This means that $$<p|\hat x|\psi>= i\hbar\frac{\partial}{\partial p} <p|\psi>$$ Thus, by hermiticity of $\hat x$, we evaluate
$$<x|\hat x|p> = (<p|\hat x|x>)^*$$ $$=(i\hbar\frac{\partial}{\partial p} <p|x>)^*$$ $$=(i\hbar\frac{\partial}{\partial p} e^{-ipx/\hbar})^*$$ $$xe^{ipx/\hbar}$$ which is what you want.

• I don't see what this answer adds over those already present. – ACuriousMind Nov 5 '15 at 16:23
• I suppose I think that the more ways of seeing something the better.... – mike stone Nov 5 '15 at 17:34

I think you have the answer for your second question. For your first question let me clarify:

$$\langle x\ |\ \hat{x}\ |\ p\rangle \overset{(1)}{=} \int dx'\langle x\ |\ \hat{x}\ |\ x'\rangle\langle x'\ |\ p\rangle \overset{(2)}{=} \int dx'x'\langle x\ |\ x'\rangle\langle x'\ |\ p\rangle \overset{(3)}{=} x\langle x\ |\ p\rangle =\frac{xe^{ipx/\hbar}}{\sqrt{2\pi\hbar}}$$

In the first equality you use the fact that $|x \rangle$, where $x \in \mathbb{R}$ is complete. That is $\int dx' |\ x'\rangle\langle x'| = \mathbb{1}$ In the second equality you just act on the ket. In the third equality you use the fact that $|x \rangle$ is orthonormal ie $\langle x\ |\ x'\rangle = \delta(x-x')$, which leaves you with the following:

$$\int \mathrm{d}x'\delta(x-x') \cdot x' \langle x'\ |\ p\rangle = x\langle x\ |\ p\rangle = \frac{xe^{ipx/\hbar}}{\sqrt{2\pi\hbar}}$$

So what you have done is not bogus at all.

Second, if I try to do the same thing by using the $p$-basis representation of $\hat{x}$, I get into more trouble:

$$\langle x\ |\ \hat{x}\ |\ p\rangle=\int dp'\langle x\ |\ \hat{x}\ |\ p'\rangle\langle p'\ |\ p\rangle=\int dp'i\hbar\frac{\partial}{\partial p'}\langle x\ |\ p'\rangle\langle p'\ |\ p\rangle$$ $$=\int dp' (-\frac{xe^{ip'x/\hbar}}{\sqrt{2\pi\hbar}})\delta(p-p')=-\frac{xe^{ipx/\hbar}}{\sqrt{2\pi\hbar}}.$$

This is wrong. You "moved" the partial derivative to the left through the bra-ket, which is not allowed. You should have "moved" the partial derivative to the right, and then integrated by parts like this:

$$\langle x\ |\ \hat{x}\ |\ p\rangle=\int dp'\langle x\ |\ \hat{x}\ |\ p'\rangle\langle p'\ |\ p\rangle=\int dp'\langle x\ |\ p'\rangle i\hbar\frac{\partial}{\partial p'} \langle p'\ |\ p\rangle$$ $$=\int dp' (\frac{e^{ip'x/\hbar}}{\sqrt{2\pi\hbar}})i\hbar\frac{\partial}{\partial p'}\delta(p-p') =-\int dp' \delta(p-p')i\hbar\frac{\partial}{\partial p'}(\frac{e^{ip'x/\hbar}}{\sqrt{2\pi\hbar}}) =+\frac{xe^{ipx/\hbar}}{\sqrt{2\pi\hbar}}.$$

• Can you justify this? It may very well be, but it is rather surprising. It requires some explanation. – Frank Mar 24 '15 at 13:01
• Justification comes from the fact that the answer ends up being correct. It's not clear to me why you want to insert an extra set of |p'><p'| states anyways. You can just jump to the final result by using the fact that $\langle x|\hat x=x\langle x|$. – hft Mar 24 '15 at 15:09