# Hermiticity of position operator

In order to prove that $$\hat{x}$$ is hermitian, it is enough to show that
$$$$\langle\psi|x|\phi\rangle = \langle\psi|x|\phi\rangle^*$$$$ Now, $$\begin{eqnarray} \langle\psi|\hat{x}|\phi\rangle &=& \int_{-\infty} ^{\infty} \psi(x)^*\hat{x}\phi(x) dx\\ \langle\psi|\hat{x}|\phi\rangle^* &=& \int_{-\infty} ^{\infty} (\phi(x)^*\hat{x}^*\psi(x))^* dx\\ &=& \int_{-\infty} ^{\infty} (\psi(x)^*\hat{x}^*\phi(x))^* dx \end{eqnarray}$$ Now both must be equal for $$\hat{x}$$ to be hermitian. But I don't understand why. $$\hat{x}^* = \hat{x}$$.
I read this post. One of the answer wrote that $$\hat{x}^* = \hat{x}$$ because eigenvalue of $$\hat{x}$$ is real and that is why $$\hat{x}^* = \hat{x}$$. But isn't that logic circular? because we know that hermitian operators have real eigenvalues. So using the fact that $$\hat{x}^* = \hat{x}$$ means we are already assuming $$\hat{x}$$ to be hermitian

Why do you still have a hat on your $$x$$ in the integral? Inside the intergral it's just the integration variable $$x$$, as in "$$dx$$", which is real number.
$$\langle x |\hat x|x'\rangle = x' \langle x |x'\rangle= x'\delta (x-x')$$ and te definition of the wavefunctions $$[\phi(x)]^* = \langle \phi|x\rangle, \quad \psi(x)= \langle x|\psi\rangle.$$ so that inserting two complete set of position eigenstates $$I = \int dx |x\rangle \langle x|, \quad I = \int dx' |x'\rangle \langle x'|,$$ we have $$\langle\psi|\hat x|\phi\rangle = \int dx dx' \langle\psi|x\rangle\langle x| \hat x'|x'\rangle\langle x'| \phi\rangle\\ = \int dx dx' \psi(x)^* x' \phi(x') \delta (x-x')\\ = \int dx \psi(x)^* x\phi(x).$$