In my quantum mechanics lectures it says that the relation between the basis $|x\rangle$ and $|p\rangle$ is given by:
$\langle p | x \rangle = \Large \frac{e^{-ip x/ \hbar}}{\sqrt{2\pi \hbar}} \, .$
However, i'm not sure how to go about proving this relation. My idea was that the eigenstates of momentum can be written as below:
$\phi(x,p) = \Large \frac{1}{\sqrt{2\pi \hbar}} e^{ipx/\hbar},$
which form an orthogonal basis.
But, we can expand any state, $|\text{state}\rangle$, in terms of the othorgonal basis right?
$|x\rangle = \int_{-\infty}^{+\infty} \phi(p', x) |p'\rangle dp'$
If it were correct then the following would also be correct?
Using the fact that $\langle p | p' \rangle = \delta(p - p')$, $\langle p | x \rangle$ can be computed:
\begin{align} \langle p | x \rangle =& \int_{-\infty}^{+\infty} \phi(p', x) \langle p | p' \rangle dp' \\ =& \int_{-\infty}^{+\infty} \phi(p', x) \delta(p - p') dp' \\ =& \phi(p, x) \\ =& \Large \frac{e^{ip x/ \hbar}}{\sqrt{2\pi \hbar}} \end{align} as required.
I.e. Clearly the exponent here does not have a minus sign where as in the lecture notes, it does. Where am I making a mistake?
EDIT:
Someone flagged as a duplicate so I couldn't provide answer.
The statement that: $|x\rangle = \int_{-\infty}^{+\infty} \phi(p', x) |p'\rangle dp'$ is wrong.
In order to expand in another basis, you should have essentially up with an integral of the basis states multiplied by some factor that tells you how much that state contributes to the end result i.e. an overlap. You can prove that the expansion of states is actually written:
$|p\rangle = \int \langle x | p \rangle | x \rangle dx$ which leads to the required results.