Assume a knowledge of Fourier series. Note e^iw = cosw + i sinw. Formally:

e^(im$\displaystyle \pi$x/T) is orthogonal over -T $\displaystyle \leq$ x $\displaystyle \leq $ T

$\displaystyle \int_{-T}^{+T}$e^(im$\displaystyle \pi$x/T) e^(-in$\displaystyle \pi$x/T) dx = 0, m $\displaystyle \neq$ n, 2T m = n

Let T -> $\displaystyle \infty$

m$\displaystyle \pi$/T -> w, m = 1,2,3, ....

Then e^iwx is orthogonal over $\displaystyle -\infty$ $\displaystyle \leq$ x $\displaystyle \leq \infty $. Note that T shows up in the transition to Fourier transform as you go from a periodic to aperiodic function.