# Can I replace eigenvalue of $p$ operator with position space representation of $p$ operator?

\begin{aligned} \langle x|\hat{p}|\psi\rangle &= \int dp\ \langle x|\hat{p}|p\rangle \langle p|\psi\rangle\\ &=\int dp\ p\langle x|p\rangle \langle p|\psi\rangle \\ &=\int dp \ \left(-i\hbar \frac{\partial}{\partial x}\right) \langle x|p\rangle \langle p|\psi\rangle \end{aligned}

Please explain how we can go from second step to third step? In the second step, the $p$ is an eigenvalue which has been replaced by position representation of the momentum operator in the third step. How can we replace a number by an operator?

• You don't go from the second line to the third. You go from the first to the second, and, independently from the first to the third, using standard rules . – Cosmas Zachos Nov 27 '17 at 19:44

Hint: The object $\langle \boldsymbol x|\boldsymbol p\rangle$ is proportional to $\mathrm e^{\frac{i}{\hbar}\boldsymbol x\cdot\boldsymbol p}$, and therefore it satisfies the PDE $$\boldsymbol p\,\langle \boldsymbol x|\boldsymbol p\rangle=-i\hbar\,\partial_{\boldsymbol x} \langle \boldsymbol x|\boldsymbol p\rangle$$
Alternatively, and as noted by C. Zachos, you may let $\hat{\boldsymbol p}$ act to the left instead of letting it act on the right: $$\left(-i\hbar \partial_{\boldsymbol x} \langle \boldsymbol x|\right)|\boldsymbol p\rangle\overset{\mathrm{left}}= \langle\boldsymbol x|\hat{\boldsymbol p}|\boldsymbol p\rangle\overset{\mathrm{right}}=\boldsymbol p\, \langle\boldsymbol x|\boldsymbol p\rangle$$