# The Fourier Transform

## Overview

The Fourier Transform is important for two key reasons:

1. Sine waves are easy to work with mathematically, and
2. Sine waves form a basis over the space of functions. That is, just like you can express any point in a 2D plane as a sum of an ${\displaystyle {\hat {x}}}$ component and a ${\displaystyle {\hat {y}}}$ component, with an appropriate coefficient multiplying each unit vector, you can express any function as a sum of a bunch (perhaps an infinite number) of sine waves. Moreover, just as ${\displaystyle {\hat {x}}}$ and ${\displaystyle {\hat {y}}}$ are orthogonal to one another (which is nice, because then the coefficients you derive for ${\displaystyle {\hat {x}}}$ and ${\displaystyle {\hat {y}}}$ have nothing to do with one another), sine waves are orthogonal with one another, as judged by integrating their product over the interval in question.

Fourier analysis is a whole field; we’ll only have time to touch on some of the important practical aspects.

## Definition

First, we should begin by clarifying that when we say "sine wave", we really mean both sine and cosine waves. Both are necessary to be able to express arbitrary functions (for starters, you need a cosine wave in order for ${\displaystyle f(0)\neq 0}$). And when we say "function", we mean complex functions that satisfy various mathy requirements. Since we are interested in complex functions (which includes real-valued functions), and we need both sine and cosine waves, we’ll make use of a handy identity:

${\displaystyle e^{i\omega t}=\cos(\omega t)+i\sin(\omega t).\,\!}$

So instead of carrying sine and cosine waves around separately, we’ll carry them together as one frequency, ${\displaystyle \omega }$, and our coefficients will be complex.

Here are the definitions we will use for the forward (${\displaystyle {\mathcal {F}}}$) and inverse (${\displaystyle {\mathcal {F}}^{-1}}$) Fourier transforms:

{\displaystyle {\begin{aligned}f(t)&={\mathcal {F}}({\hat {f}}(\omega ))={\frac {1}{2\pi }}\int {{\hat {f}}(\omega )e^{i\omega t}d\omega }\\{\hat {f}}(\omega )&={\mathcal {F}}^{-1}(f(t))=\int {f(t)e^{-i\omega t}dt}\end{aligned}}\,\!}

where ${\displaystyle \omega \equiv 2\pi \nu }$ is the angular frequency coordinate that is the Fourier complement of time ${\displaystyle t}$, a hat is generally used to denote Fourier-domain quantities, and integrals are from ${\displaystyle -\infty }$ to ${\displaystyle \infty }$ unless otherwise noted. There are other Fourier transform conventions out there, differing usually by the normalization used in front of the forward and inverse Fourier transforms.

## Orthogonality

As mentioned above, sine waves at different frequencies are orthogonal. This means that

${\displaystyle \int {e^{i\omega _{1}t}e^{-i\omega _{2}t}dt}=0\,\!}$

for ${\displaystyle \omega _{1}\neq \omega _{2}}$. The shorthand we use for this is ${\displaystyle \delta (\omega _{1}-\omega 2)}$, where ${\displaystyle \delta }$ is a function called the Dirac delta function, and has the properties that it is infinite when its argument is 0, it is equal to zero everywhere else, and the integral of a Dirac delta function is unity.

## Positive and Negative Frequencies

The concept of a “negative” frequency can sometimes trip people up at first. We think of frequencies as a number of oscillations per second. How can there be a negative number of oscillations?

In fact, negative frequencies oscillate just the same way (and the same number of times) as positive frequencies. The only difference is that

{\displaystyle {\begin{aligned}\sin(-\omega t)&=-\sin(\omega t),\\\cos(-\omega t)&=\cos(\omega t).\\\end{aligned}}\,\!}

So from a practical standpoint, a negative frequency is just the same as a positive frequency, except that instead of the cosine leading the sine by ${\displaystyle \pi /2}$, it trails by ${\displaystyle \pi /2}$. It turns out that for real-valued functions, positive and negative frequencies contain essentially the same information (the coefficient for ${\displaystyle e^{i\omega t}}$ is the complex conjugate of the coefficient for ${\displaystyle e^{-i\omega t}}$). For complex-valued functions, positive and negative frequencies contain independent information.

## Parseval’s Theorem

Parseval’s Theorem proves a very important property of Fourier transforms: they preserve power. More specifically, the average variance of a signal in one domain is equal to the average variance of a signal in its Fourier complement, up to a normalization factor:

${\displaystyle \langle \sigma _{t}^{2}\rangle =\langle \sigma _{\omega }^{2}\rangle ,\,\!}$

or alternately:

${\displaystyle \int {|f(t)|^{2}~dt}=\int {|{\hat {f}}(\omega )|^{2}~d\omega }\,\!}$

## Implementation

One other reason why the Fourier transform is so powerful is because there are very efficient algorithms for computing them for finite intervals with discretely sampled data points. These algorithms are generally called Fast Fourier Transforms, and scale as ${\displaystyle {\mathcal {O}}(n\log n)}$ with the number of data points, ${\displaystyle n}$. This is significantly better than what you’d do naively by integrating ${\displaystyle n}$ different sine/cosine waves against ${\displaystyle n}$ different time-domain samples, which would be ${\displaystyle {\mathcal {O}}(n^{2})}$.

There are a few Fourier transforms that are good to just know.

1. Gaussians — the Fourier transform of a Gaussian (${\displaystyle e^{-{\frac {x^{2}}{2}}}}$) is a Gaussian. The width of the Fourier-transformed Gaussian is the inverse of the width of the original Gaussian.
2. Dirac Delta Functions — As we kind of saw above, the Fourier transform of an infinite sine wave is a Dirac Delta Function (and, of course, the Fourier transform of a Dirac Delta function is an infinite sine wave).
3. Top Hat — A top-hat function (which is zero everywhere, except over an interval where it is one) Fourier transforms into ${\displaystyle \sin(x)/x}$, which is otherwise known as a “sinc" function. As you might guess, the width of the sinc function is inversely proportional to the width of the top-hat.

That’s about it. A good general principle is that the sharper the features in the function being Fourier transformed, the more power there will be at higher Fourier modes. Hence, narrow functions have wide Fourier transforms, and vice versa.

## Telescopes as Fourier Transforms

Example of an high-quality astronomical image exhbiting an Airy disk (diffraction pattern) around the star (on the right; the left half is the same star at lower quality). (Credit: Palomar Observatory / NASA-JPL)

sinc(x), sinc^(x), and top hat functions. (Credit: Abdullah A. Mohammed, https://www.researchgate.net/figure/The-sinc-function-sinc-function-squared-and-rect-energy-of-sinc-90-of-energy_fig1_276411404)

A very interesting real-application of Fourier transforms is the telescope, which acts as a single-slit diffraction experiment in action. Because light either enters the telescope or doesn’t, the shape of the efficiency function of a telescope is a top hat (see the previous section). As light enters the telescope it diffracts and the resulting pattern is the Fourier transform of the top hat function: the sinc function. This is why the best optical telescopes (those in space or equiped with adaptive optics systems) collect images of stars that aren’t perfect points. Instead, the stars in ultra high quality astronomical images have distinctive diffraction patterns that look like a sinc function (radially, at least). This two-dimensional, radial sinc function is called an Airy disk.