Wolfram Alpha:

```Relationship Between Position and Momentum States
-------------------------------------------------

The |ψ> is an abstract object that represents a
quantum state (statevector).  By definition the actual
wavefunction is the projection of |ψ> onto the bra
basis in either position or momentum space.  The
projection is simply the inner product.  Thus,

ψ(x) = <x|ψ>  ... wave function in position basis.

φ(k) = <k|ψ>   ... wave function in momentum basis.

Momentum in the position basis:

pop|p> = p|p>

Therefore,

pop<x|p> = p<x|p>

-ih∂<x|p>/∂x = p<x|p>

With solution:

<x|p> = (1/√2π)exp(ipx/h)

Position in the momentum basis:

xop|x> = x|x>

Therefore,

xop<p|x> = x<p|x>

ih∂<p|x>/∂p = x<p|x>

With solution:

<p|x> ≡ <x|p>* = (1/√2π)exp(-ipx/h)

The justification for -ih∂/∂x <-> ih∂/∂p comes from
the Fourier transform (described next) that implies
that position space and momentum space can be switched
in any formula as long as you also take the complex
conjugate.  Therefore,

Momentum in position space:  <x|p|ψ> = -ih∂ψ(x)/∂x

Position in momentum space:  <p|x|ψ> = ih∂ψ(p)/∂p

The Fourier Transform
------------------

To recover the Fourier transform we use the
"Resolution of the Identity":

Σ|ei><ei| = I
i

or,

+∞
∫dx |ei><ei| = I
-∞

The dyadic product is the formal product between a
ket and a bra vector.  If |ψ> is built using a
complete orthonormal basis,

ψ> = |ei><ei|ψ>

When applied to an operator from the left and
right side we get:

1ψ1 = Σ|ei><ei|(ψΣ|ej><ej|
i          j

=  ΣΣψij|ei><ej|
ij

with the matrix elements:

ψij = <ei|ψ|ej>

We can make use of the dyad in the following
manner:

ψ(p) = <p|ψ>

= <p|x><x|ψ>

= <p|x>ψ(x)

= (1/√2π)∫exp(-ipx/h)ψ(x)dx

and,

ψ(x) = <x|ψ>

= <x|p><p|ψ>

= <x|p>ψ(p)

= (1/√2π)∫exp(ipx/h)ψ(p)dp

These are Fourier transform.  Therefore, the
position and momentum wavefunctions are Fourier
Transforms of each other.

Projection Operator
-------------------

The projection operator satisfies the operator
equation PP = P.  This means that acting twice
with a projection operator on a vector gives
the same result as acting once.

PP = P2

= (|ei><ei|)(|ei><ei|)

= |ei> (<ei|ei>) <ei|

= |ei> 1 <ei|

= |ei><ei|

If applied to a vector, it projects the vector
onto the state |β> and generates a new vector
in parallel to |α> with a magnitude equal to
the projection.

|α><β|ψ> = <β|ψ>|α>

Therefore,

P|ψ> = |ei><ei|ψ> = <ei|ψ>|ei>

Projects a given wavefunction |ψ> to a wavefunction
along |ei>.

We can define an operator that projects a
vector to a 2 dimensional subspace as:

P|ψ> = |ei><ei|ψ> + |ej><ej|ψ>   i ≠ j

For example, for the spin 1/2 system the unit
operator can be written as a sum of 2 terms
since the vector space is 2 dimensional.  Using
the orthonormal basis vectors |↑> and |↓> for
up and down spins along the z axis gives:

I = |↑><↑| + |↓><↓|

In general, we can define an operator that projects
a vector to an N dimensional subspace as:

P|ψ> = |ei><ei|ψ> + |ej><ej|ψ> + ... + |en><en|ψ>

As a matrix P is just the identity matrix.

Dirac Delta Function
--------------------

The Dirac δ function is the continuous analog
of the Kronecker δ for discrete values.  Just
as the Kronecker Delta usually appears inside
a sum, The Dirac Delta usually appears in an
integral.

Definitions:

δ(x) = {∞  x = 0
{0  x ≠ 0

∫δ(x)dx = 1
∞
f(a) = ∫f(a)δ(x - a) dx  ... 1.
-∞
As the limit of the Gaussian:

δa(x) = lim(1/σ√2π)exp(-x2/2σ2) as a -> 0
σ->0

ψ(x) = (1/√2π)∫exp(ipx/h)ψ(p)dp

and,

ψ(p) = (1/√2π)∫exp(-ipx/h)ψ(x)dx

ψ(x) = (1/√2π)∫dp exp(ipx/h) (1/√2π)∫dx exp(-ipx/h)ψ(x)

= (1/2π)∫dp exp(ipx/h)∫dx exp(-ipx/h)ψ(x)

= ∫dx'ψ(x') (1/2π)∫dp exp(ip(x - x')h)

= ∫dx'ψ(x') δ(x' - x)   using 1.

So an alternative definition of δ is:
∞
δ(x' - x) = (1/2π)∫dp exp(ip(x - x')h)
-∞

Orthogonality of Momentum and Position Eigenstates
--------------------------------------------------

<x'|x> = <x'|1|x>

= <x'|∫dp |p><p||x>

= ∫dp <x'|p><p|x>

= (1/2πh)∫dp exp(ipx'/h)exp(-ipx/h)

= (1/2πh)∫dp exp(ip(x' - x)/h)

= δ(x' - x)

Likewise,

<p'|p> = = δ(p - p')```