# Confused about defining $\psi(x)=\langle x|\psi\rangle$ in Dirac notation

I'm reading Shankar QM and in chapter 11.2 Eq. 11.2.7, he uses the projection operator (summed over infinity) to project the $$|\psi\rangle$$ state in the $$x$$-basis as follows:

$$\int |x\rangle \langle x|\psi\rangle dx\,.$$

My confusion is perhaps from my misuse of the Dirac notation in the following assumptions:

On one hand the

$$\int |x\rangle \langle x|\psi\rangle dx = I |\psi\rangle = |\psi\rangle\,,\tag{1}\label{1}$$

if we integrate over $$dx$$ first. But I think that this leaves ambiguity in the basis of $$|\psi\rangle$$ because the integral can also be reduced as:

$$\int |x\rangle \langle x|\psi\rangle dx = \int \psi(x)|x\rangle dx\,,\tag{2}\label{2}$$

which leaves an integral over $$dx$$ basis vectors with coefficients of $$\psi(x)$$. I interpret this as $$\psi(x)$$ as well but that disagrees with Shankar's definition.

So, my question is: If $$\langle x|\psi\rangle$$ is $$\psi(x)$$, then what is $$|x\rangle \langle x|\psi\rangle$$? What is wrong with the assumptions/thinkings \eqref{1} and \eqref{2}?

• Hi MannyC: I salvaged your rejected suggested edit. Commented Apr 12, 2019 at 3:01
• Ah thanks. What did you change? It looks exactly as I intended it...Well doesn't matter anyway :) Commented Apr 12, 2019 at 3:05
• I interpret this as $\psi(x)$ as well... But why? That is incorrect, and you haven't explained at all why you think this should be the case. 1 and 2 are correct Commented Apr 12, 2019 at 3:45
• I just remembered: related. Commented Apr 12, 2019 at 4:04
• @MannyC: Your suggested edit was rejected by the system because it was submitted simultaneously with another edit. Commented Apr 12, 2019 at 6:39

Let me offer an analogy with a simple example: consider a vector in three dimensions, $$\vec{v} = v_x \hat x + v_y \hat y + v_z \hat z$$. $$\vec{v}$$ analogous to the abstract state $$|\psi\rangle$$, while writing the vector $$\vec v$$ in coordinate basis is analogous to writing $$|\psi\rangle = \int dx \langle x|\psi\rangle |x\rangle.$$ Now suppose I ask you what is the $$x$$-component of the vector $$\vec{v}$$? That is $$v_x$$! Similarly, $$\langle x|\psi\rangle \equiv \psi(x)$$ is the component of $$|\psi\rangle$$ in the $$|x\rangle$$ 'direction'.

Now if I asked you to project $$\vec v$$ in $$z$$-direction then you will drop the $$x$$ and $$y$$ components and give me a vector $$v_z \hat z$$. That is precisely analogous to writing $$\langle x|\psi\rangle |x\rangle$$.

For someone new it might be hard to fathom a delta function normalized basis of $$|x\rangle$$, and as @MannyC pointed out, one can use any basis of $$L^2(\mathbb R)$$ functions. I hope this example makes things slightly clearer to the OP, who I gain is beginning to learn the subject.

The results $$(1)$$ and $$(2)$$ of OP(v3) are identical. Namely $$|\psi\rangle = \int dx\,\psi(x)|x\rangle\,.\tag{3}\label{3}$$ This can be seen by projecting over an arbitrary vector, which can be chosen to be drawn from the basis $$|x\rangle$$ as well. $$\langle x' | \psi\rangle = \int dx\,\psi(x)\,\langle x'| x\rangle\,.$$ And this holds because $$\langle x' | \psi\rangle = \psi(x')\,,\qquad \langle x' | x\rangle = \delta(x-x')\,.$$ Recall that indeed the states $$|x\rangle$$ are delta-function normalized. If you are unhappy with this definition it's also possible to pick an arbitrary $$L^2(\mathbb{R})$$ function as a state: $$|\chi\rangle$$ and then check that \eqref{3} projected on $$\langle\chi|$$ is consistent: $$\langle \chi | \psi \rangle = \int dx\,\psi(x) \langle\chi|x\rangle = \int dx\,\psi(x) \,\chi^*(x)\,,$$ which is the definition of the $$L^2(\mathbb{R})$$ inner product, so \eqref{3} holds for all states.

Both (1) and (2) are fine. The problem comes when you say

[...] I interpret this as 𝜓(𝑥) as well

You're claiming that

$$\int\psi(x) | x\rangle dx = \psi(x)$$

which doesn't make sense. Firstly, an integral over $$x$$ doesn't subsequently depend on $$x$$. $$x$$ is a dummy variable, so this expression makes precisely as much sense as $$\sum_{n=1}^3 n^2 = 5n$$ where the left hand side is simply a number ($$1^2+2^2+3^2=14$$) while the right hand side is a function of some variable $$n$$, so the symbol $$n$$ has been used to mean two different things on either side of the equals sign.

Furthermore, inasamuch as $$|x\rangle$$ is a basis vector of the Hilbert space, the object on the left is a linear combination of Hilbert space vectors, and is therefore a Hilbert space vector itself. On the other hand, the right hand side is just a complex number.

It is always worth remembering that in a strict sense, $$|x\rangle$$ is not a "real" basis for the Hilbert space (because $$|x\rangle$$ is not a normalizable state) and the expression $$\int \psi(x) |x\rangle dx$$ only makes sense when you insert it into an inner product. However, I didn't judge this to be the most important issue in your question, so I'm just mentioning it as a side note to be addressed when you're comfortable with everything else.