# Problem with matrices in Dirac notation

Let $$|q\rangle$$ be the eigenvectors of the position operator, let $$|\psi\rangle$$ be a state and let $$\hat{p}$$ be the momentum operator. In my book it's stated that i can interprete the quantity: $$\langle q|\hat{p}|\psi \rangle$$ as the elements of matrix of the momentum operator in the base made by the eigenvectors of the position operator. I don't understand why this is true; I get that the quantity: $$\langle e_i|A|e_j \rangle$$ is the $$ij^{\text{th}}$$ element of the operator A in the base formed by the vectors $$|e_i\rangle$$. But I can't see why this should implies that the upper proposition is true. Furthermore in another section of my book it's said that the quantity: $$\langle \psi|A|\psi\rangle$$ is, and i quote: "the element of the matrix of the operator A in the state $$|\psi \rangle$$". But which element of the matrix? Surely the matrix has more than one element! This "more than one element" problem applies also in the upper part of this question. And what should be the meaning of the "in the state psi" part? I think that this incomprehension has to do with my lack of knowledge in representation of matrix in various basis using Dirac Notation. I would like a refreshment regarding this concepts of linear algebra.

• Could you provide more detailed context or a quote from your textbook? It looks like either the book is wrong or you are misinterpreting what is written there (see my answer) Jun 2 '20 at 15:06
• Jun 2 '20 at 15:08

If your book says what you describe, it's a very confusing way to represent the subject, and the statement regarding $$\langle q\vert\hat{p}\vert \psi\rangle$$ is simply wrong.

• $$\langle e_i \vert \hat{A} \vert e_j \rangle$$ is the $$ij$$th matrix element of the operator $$\hat{A}$$, say $$A_{ij}$$, in the (orthonormal complete) basis spanned by $$\{\vert e_i\rangle \}$$ which means that the full operator is $$\hat A= \sum_{ij}A_{ij} \vert e_i\rangle\langle e_j\vert$$.

• $$\langle q \vert \hat p \vert \psi \rangle$$ is not the matrix element of the momentum operator in the position basis, unless $$\psi$$ happens to be a position eigenstate $$\vert \tilde{q}\rangle$$ in which case $$\langle q \vert \hat p \vert \psi \rangle$$ would be the $$q\tilde{q}$$th element of the matrix representation of the momentum operator in the position basis.

• However, what you can say is that $$\langle q \vert\hat p \vert \psi \rangle$$ "represents the action of the momentum operator in the position basis" in the following sense: $$\langle q \vert \hat p \vert \psi \rangle= \int d\tilde{q} ~ \langle q \vert\hat p \vert \tilde{q} \rangle \langle \tilde{q} \vert \psi \rangle = \int d\tilde{q} ~ i\hbar \partial_{\tilde{q}} \delta (q-\tilde{q} ) \psi(\tilde{q} )= -i\hbar \partial_q \psi(q)$$So, $$\langle q \vert \hat p \vert \psi \rangle$$ describes the action of the momentum operator on a generic state $$\psi$$ in the position basis. This is why $$-i\hbar \partial_q$$ is often said to be the momentum operator in the position basis. This doesn't mean that it's the matrix element of the momentum operator in the position basis, that would be $$\langle q \vert\hat p \vert \tilde{q} \rangle = i\hbar \partial_{\tilde{q}} \delta (q-\tilde{q} )$$ (a fact that we used in the above calculation).

• Finally, saying that $$\langle \psi \vert \hat A\vert \psi \rangle$$ is the matrix element of the operator $$\hat A$$ in $$\psi$$ is a weirdly worded statement, to say the least, but it can be made more precise and correct. If $$\psi$$ is a normalized state vector then you can always find a Hermitian operator $$\hat O$$ such that $$\psi$$ is one of its eigenstates. Then you can interpret $$\langle \psi \vert \hat A\vert \psi \rangle$$ as the $$\psi\psi$$th element of the matrix representation of the operator $$\hat A$$ in the basis spanned by the eigenstates of the operator $$\hat O$$. However, generally, such an operator may or may not be of direct physical significance and thus, saying that $$\langle \psi \vert \hat A \vert \psi \rangle$$ is a matrix element of $$\hat A$$ in the basis spanned by such an operator is not very useful. A more directly physical and basis independent meaning of $$\langle \psi \vert \hat A \vert \psi \rangle$$ is that it's the expectation value of the operator $$\hat A$$ over the state $$\psi$$.

$$\langle q|\hat{p}|\psi\rangle$$ can be interpreted (purely formally!) as the element with label $$q$$ of a "continuous" column matrix representing the ket $$\hat{p}|\psi\rangle$$ in the basis $$\{|q\rangle\}$$: $$\hat{p}|\psi\rangle\overset{\{|q\rangle\}}{\longleftrightarrow}\begin{pmatrix}\vdots\\\langle q|\hat{p}|\psi\rangle\\\langle q'|\hat{p}|\psi\rangle\\\langle q''|\hat{p}|\psi\rangle\\\vdots\end{pmatrix}.$$ This is analogous to $$\langle e_i|\hat{p}|\psi\rangle$$ being the $$i$$-th element of the column matrix representing the state $$\hat{p}|\psi\rangle$$ in a finite or countably infinite ordered basis $$\{|e_i\rangle\}$$.

The element with label $$(q,q')$$ of the "continuous" matrix of the momentum operator in the basis $$\{|q\rangle\}$$ would, correspondingly, be given by $$\langle q|\hat{p}| q'\rangle$$, in analogy with $$\langle e_i|\hat{p}|e_j\rangle$$ being the $$(i,j)$$-th element of the matrix of $$\hat{p}$$ in the basis $$\{|e_i\rangle\}$$: $$\hat{p}\overset{\{|q\rangle\}}{\longleftrightarrow}\begin{pmatrix} \ddots&&&&\\ &\ddots&&&\\ \cdots&\cdots&\langle q|\hat{p}| q\rangle&\langle q|\hat{p}| q'\rangle&\cdots\\ &&&\ddots\\ &&&&\ddots\end{pmatrix}.$$

As for the last part of your question, I think that's just a bit of informal terminology of the book you're quoting. A matrix element $$\langle q|\hat{p}| q'\rangle$$ is often said to "overlap" between the states $$|q\rangle$$ and $$|q'\rangle$$, while $$\langle q|\hat{p}|q\rangle$$ would be called "the" matrix element of $$\hat{p}$$ in the single state $$|q\rangle$$ (this is a "diagonal" element of the above matrix). Correspondingly, for any state $$|\psi\rangle$$ you could call $$\langle\psi|\hat{A}|\psi\rangle$$ the matrix element of $$\hat{A}$$ in the single state $$|\psi\rangle$$.

The matrix of a hermitian operator must be hermitian, i.e. satisfy $$\langle \psi |\hat{O}|\phi\rangle^* = \langle \phi |\hat{O}|\psi\rangle.$$ Thus, your reasoning is correct: $$\langle q|\hat{p}|\psi\rangle$$ cannot be 'the elements of matrix of the momentum operator in the base made by the eigenvectors of the position operator."