# Operators in QM acting on kets [duplicate]

I know that operators in quantum mechanics act on states (kets, assumed to be normalized), and return another state. So, an operator such as $$\hat{p}$$ when acted on a ket $$|\psi\rangle$$ will give me another ket $$|\phi\rangle$$. Thus, $$\hat{p}|\psi\rangle = |\phi\rangle.\tag{1}\label1$$ Also, $$\langle x|\psi\rangle =\psi(x)$$ if $$x$$ is the position. Now, since $$\psi(x)$$ is a complex number, what I don't understand is how can the operator $$\hat{p}$$ cat on $$\psi(x)$$? How does the expression $$\hat{p}\psi(x)$$ make sense if $$\psi(x)$$ does not lie in the domain of the operator/function $$\hat{p}$$? And how does $$\hat{p}\psi(x) =\langle x|\hat{p}|\psi\rangle$$?

• $\hat p\psi(x):= \langle x\vert \hat p\vert \psi\rangle$ is a definition. – ZeroTheHero Jul 31 '20 at 16:26
• You might have it easier if you see $\hat{p}\psi(x)$ as $(\hat{p}\psi)(x)$. – ɪdɪət strəʊlə Jul 31 '20 at 17:01