The Fourier Transform

Context

Suppose we have a series of complex numbers

Let these numbers represent a “signal” we’re receiving. Now suppose that given this signal, I wanted to find the original frequencies making up this signal. How can I do this?

This signal could be an audio file, and by finding the frequencies, I’m finding the pitches in the audio file.

Introducing, the Fourier Transform. This is a mathematical operation that can transform our signal into a series of complex-valued frequencies making up the original signal.

In other words, the transform can decompose our signal into a series of sine functions (described by the frequencies) that together, can reconstruct our signal. There also exists an Inverse Fourier Transform that gives us back our original signal.

What makes Fourier Transform useful is the fact that it establishes a bijection between our signal and the resulting frequencies. This allows for many use cases, such as:

  • Decomposing an image and blurring it by removing high frequencies
  • Decomposing an audio signal to see what pitches (frequencies) it’s composed of- Creating wave simulations using a real-world frequency data

Discrete Transform

The Fourier Transform has continuous and discrete variants. For our case, it’s more common to use the discrete transform.

The Discrete Fourier Transform (DFT) is defined as

In other words, for the frequency, we need to compute this sum. The definition looks scary, so let’s break it down.

  • represents our input data points.
  • The exponent represents a rotation in the complex plane. Recall that for varying theta creates a circle in the complex plane.

What we’re doing is using to set how fast rotates along the complex plane. This represents a sine wave with a set frequency, and we use each input data point, we’re augmenting the magnitude of the wave at that location. Summing each of these samples gives us our result.

Euler's Formula:

The complex exponential is defined as follows. For real number ,

We can also find the in matrix form as follows:

For . Note that .

Fast Fourier Transform

Simply performing the multiplication and summing as above takes time. We can do better than this! By grouping terms in the summation together, we can reuse repeated computations.

The derivation is as follows. For discrete Fourier Transform , separate our transform into an even and odd case.

  • When (even),