How can Shazam figure out the name of a song played in a noisy bar? What makes it possible for Spotify to save so much bandwidth while still streaming high-quality audio? How can a JPEG file be so small and still capable of storing a complex photo?

These kinds of technologically ‘magical’ feats are not attributable to newfangled AI, at least not entirely. On the contrary, the main ‘magic’ behind them is a stunning, two-century old mathematical concept by Joseph Fourier. Fourier realized that one of the most fundamental things that can be done to any data is: to break down any complex signal, ranging from a musical chord to a radio wave, into a series of the simplest sine waves.

This method of decomposition is called Fourier analysis and can be compared to using a prism to analyze light but instead of breaking light down into its colors, it breaks a signal down into its basic component’s frequencies. Digital technology cannot be understood without grasping this concept.

We are today exploring the “Fourier Quartet” the four indispensable instruments that operate the whole machinery, that are the Fourier transforms. Poking around behind the scenes, that is what we are doing.

The First Two Members: Dealing with the Real-World Waves

Signals were smooth, continuous waves before the advent of computers. The first two Fourier instruments were created to comprehend such waves.

The Fourier Series (FS): The Recipe for Repetition

Visualize a violinist holding a bow on a single string and producing a perfect, sustained note. The wave of sound coming off the violin would be one that repeats in a regular pattern. The Fourier Series (FS) is the instrument that can dissect such a signal, i.e. one that is continuous and periodic, into its components.

It makes the complex sound of a violin be represented in very simple terms:

  • The fundamental frequency, which corresponds to the pitch that the human ear can identify.
  • A chain of harmonics (or overtones), where one is dealing with waves that are at integer multiples (2x, 3x, 4x…) of the fundamental frequency.

The violin receives its richness and is distinctly different from the other musical instrument’s timbre basically by the different harmonics of the flute playing the same note. The Fourier series shows us the exact mixture for that sound. The mathematics is as follows:

Here the coefficients ​ are the most significant part - they indicate the amplitude and the phase of each harmonic. In fact, they combine to represent the signal’s frequency domain. In the case of a periodic signal, this domain is discrete which means that it is only a few points or spikes at the frequencies of the harmonics.

The Fourier Transform (FT): Freezing Time

Then, what about sounds that don’t repeat, like a single hand clap, a spoken word, or a crash of lightning? Those signals are still continuous, but they are aperiodic, they happen once and then they’re gone.

That’s where Fourier Transform (FT) comes into play. It’s a brilliant extension of the Series. Think of making the period of our repeating violin notes longer and longer until it is infinitely long. At that point, the note doesn’t seem to be repeating anymore. In the frequency domain, something quite wonderful occurs: the discrete, separated harmonic peaks merge together to create a continuous spectrum.

FT can give us the full recipe for every frequency that is there in that very short time. This is the transformation pair that defines it:

This formula looks at a time signal and yields its continuous frequency spectrum . Fourier Transform is a model of physics and engineering, but it is still a totally theoretical tool for continuous, infinite signals. We need to digitize the power if we want to use it on our computers.

Entering the Digital World

Computers cannot follow smooth, continuous waves. They are only able to see a series of snapshots, or samples. The next two characters of our quartet are:

The Discrete-Time Fourier Transform (DTFT): The All-Important Bridge

When you record audio on your phone, an analog-to-digital converter samples the sound wave thousands of times per second, turning it into a sequence of numbers. The Discrete-Time Fourier Transform (DTFT) is the tool for understanding the frequency content of these discrete signals.

But sampling has a strange side effect. In the frequency domain, the original spectrum gets copied and repeated infinitely. Imagine it as a hall of mirrors. This is the reason why the Nyquist theorem is very essential: if the sampling isn’t done fast enough, these spectral copies can overlap, thus causing aliasing. Aliasing is like seeing a car’s wheels spinning backward in a movie, an illusion created by the camera’s frame rate (its sampling rate) being too slow.

The DFT is the ideal theoretical tool for digital signal processing. However, it still can’t be executed by a computer as it yields a continuous, repeating spectrum. So, we need to make one final step for that.

The Discrete Fourier Transform (DFT): The Workhorse We All Use

This is the hero of our story. The Discrete Fourier Transform (DFT) is the only member of the quartet that works on signals that are both discrete and finite- the exact kind of data our computers handle.

The DFT is a result of merely taking samples from the continuous spectrum of the DTFT. What is the outcome? The transformation of a finite set of time-domain samples into a finite set of frequency-domain components. This is the tool which makes possible Shazam, the audio equalizer in your phone, and JPEG compression.

Its formula is:

Computers are undoubtedly lazy (but in a clever way). Direct DFT calculation is slow. Therefore, in the 1960s, a group of mathematicians came up with a set of extremely efficient algorithms to calculate the DFT, which they called the Fast Fourier Transform (FFT). The FFT is not a new transform - it is just a very fast way to accomplish the DFT. In fact, it is the core that made real-time digital signal processing feasible.

Putting It All Together: The Big Picture

One might feel that it is too much to keep track of the four transforms, however, they are remarkably interconnected through a simple duality: what is periodic in one domain is discrete in the other, and the other way around.

This convenient table summarizes everything:

Signal in Time DomainAperiodic (Non-repeating)Periodic (Repeating)
ContinuousFourier Transform (FT)Fourier Series (FS)
DiscreteDiscrete-Time Fourier Transform (DTFT)Discrete Fourier Transform (DFT)

See the pattern? Start with the FT. Make the signal repeat in time, and its spectrum becomes discrete spikes (the FS). Go back to the FT and sample it in time, and its spectrum starts repeating (the DTFT). Do both, and you get the practical DFT, which is discrete and repeating in both domains!

Fourier in the Wild: Mind-Blowing Applications

Let’s take a step back and look at the example of Shazam once more. The method it really functions is:

  1. A short sample of a song is recorded by your phone’s microphone, a complex time-domain waveform.
  2. The noise is changed into a series of digital samples by the phone.
  3. The app performs an FFT algorithm to the DFT of that sample.
  4. The result is a frequency spectrum. The app no longer must deal with the complicated wave but has a very simple “fingerprint” of the songs common frequencies at the time—the notes and chords.
  5. This simple fingerprint is sent to a server, which compares it with a large database of song fingerprints. It’s done!

However, it is not that only. Fourier analysis is…

Medical Imaging (MRI): An MRI machine doesn’t take a “picture.” Instead, it gathers data in the frequency domain! Using magnetic fields, the machine gets signals from the atoms in your body and then applies a 2D Fourier transform to reconstruct the image from the frequency data.

JPEG Image Compression: The process of saving a JPEG involves the algorithm chopping the picture into small pieces. After that, it applies a Fourier-related transformation (the DCT) for each fragment, thus changing the pixel values to frequencies. Next, it is removing the high-frequency components that the human eye is less sensitive to, thus achieving a great saving of space for almost no loss of quality.

Astronomy: An astronomer might receive light data from a far-off star in the form of a complex function, then utilize a Fourier transform to derive its frequency components. The astronomers then analyze the spectrum to understand the phenomena. The different colors of that spectrum tell the elements that make up the star, the speed of its rotation, and if it is coming towards or going away from us.

Why It All Comes to Matter

The Fourier quartet is not just a set of four mathematically related but somewhat forgotten theories. It’s a fundamental way of understanding the world. It teaches us that beneath the chaotic surface of signals, there is an underlying order composed of simple, pure frequencies.

By figuring out how to convert information from the time domain to frequency domain and vice versa, people have been able to:

  • Remove noise from audio and pictures.
  • Reduce the size of data for both the purpose of storing and the way of sending it.
  • Find out what’s going on under the skin of a person without opening it.
  • Discover how the universe is made up.

Thus, until you listen to a song, or look at a digital photo, or just hear a sound, think about the world of frequencies that Fourier revealed to us all. It’s the gorgeous, invisible language that forms the basis of our present world.