Skip to content

The Fourier Transform: Unweaving the Spectrum of Sound, Light, and Data

What do MP3 audio files, JPEG images, MRI brain scans, 5G wireless networks, and noise-canceling headphones have in common? They all run on the Fourier Transform.

4 min readQuick readInteractive

In 1807, French mathematician Joseph Fourier proposed a radical mathematical theorem that shocked his contemporaries: any complex, messy, repeating wave signal—no matter how jagged or intricate—can be created by adding together a series of simple sine waves. Conversely, any complex signal can be "unwoven" back into its individual component frequencies. This mathematical prism is called the Fourier Transform.

Try it: a real spectrum analyzer
Three sine waves are added together into one signal (top). The bottom chart is not drawn by hand: it is a discrete Fourier transform computed from the combined signal's 256 samples, so it has to find the ingredients on its own. Change each wave's frequency and strength, give two waves the same frequency, or bury everything in noise, and see what the transform recovers.

1. The combined signal over one second (time domain)

0 s1 s

2. Its Fourier transform: how much of each frequency is in it (frequency domain)

05101520Hz

Figure: waves of 2 Hz (strength 1.0), 5 Hz (0.7) and 12 Hz (0.4) sum to the jagged signal on top. The transform of that signal shows exactly three spikes — at 2, 5 and 12 Hz, with heights 1.0, 0.7 and 0.4 — and nothing anywhere else.

Peaks found: 2 Hz (1.00), 5 Hz (0.70), 12 Hz (0.40)

The Smoothie Metaphor: Deconstructing the Recipe

Imagine pouring a strawberry-banana-spinach smoothie into a magical machine, and having the machine instantly tell you: "This contains exactly 3 strawberries, 1 banana, and a handful of spinach." That is precisely what the Fourier Transform does for sound, light, and data. It takes a complex combined wave and extracts the exact "recipe" of individual frequencies that built it.

Try it: build a square wave out of smooth sine waves
Fourier's boldest claim was that even a wave with sharp corners is a sum of smooth sines. A square wave needs sines at 1, 3, 5, 7… times its base frequency, with strengths 1, 1/3, 1/5, 1/7… Add them one at a time.

Figure: the dashed square wave and the sum of its first 4 sine ingredients (1, 3, 5 and 7 times the base frequency). The sum already has flat tops; every extra sine sharpens the corners. A small overshoot at each corner never quite goes away — the Gibbs phenomenon.

Using 1, 3, 5, 7 × the base frequency

Real-World Powers of the Fourier Transform

1. Audio Compression (MP3): When you listen to an MP3, a Fourier-family transform (strictly, a cousin called the modified discrete cosine transform) breaks the music into frequencies. The encoder then drops detail your ears won't notice — quiet sounds masked by louder ones at nearby frequencies, and extreme highs — shrinking file sizes by around 90% with little audible loss.

2. Noise-Canceling Headphones: Headphones listen to ambient background noise (like airplane engines) with a microphone, and generate an inverted "anti-wave" that cancels the rumble. That cancelling happens fast, in the time domain, using adaptive filters; frequency analysis explains why it works best on steady, low-pitched drones like an engine and much less well on sudden, high-pitched sounds like voices.

3. Medical MRI Scans: MRI machines do not take photographs. They measure radio-frequency signals emitted by hydrogen atoms in your body. An algorithm applies a 3D Fast Fourier Transform (FFT) to convert those raw frequency waves into crystal-clear cross-sectional images of your brain and organs.

Quick check

1. A sound is made of a 300 Hz tone and a quieter 700 Hz tone. What does its spectrum look like?

  • One wide hump between 300 and 700 Hz
  • A tall spike at 300 Hz and a shorter spike at 700 Hz
  • A single spike at 500 Hz, the average

Answer: two spikes. The transform reports each ingredient separately, at its own frequency, with a height that matches its strength.

2. Which ingredients does a wave with sharp corners need more of?

  • High-frequency sine waves
  • Low-frequency sine waves
  • None — sharp corners can't be built from sines

Answer: high frequencies. Smooth, slow waves can only make gentle curves; the corners come from the fast, high-frequency terms. That's why low-quality audio sounds dull — the highs are the first thing cut.

3. Your audio file is too big. In the frequency domain, what can an MP3 encoder safely throw away?

  • Every frequency below 1,000 Hz
  • Every other sample of the waveform
  • Frequency components your ear won't notice, such as quiet ones masked by louder neighbours

Answer: the inaudible ones. Once sound is split into frequencies, the encoder can spend its bits only where your hearing will notice them.

Takeaways

The Fourier Transform is the mathematical bridge between time and frequency. It proves that any complex wave can be synthesized from or decomposed into simple sine waves. By allowing computers to filter, compress, and analyze frequencies, the Fast Fourier Transform (FFT) powers modern digital communication, medical imaging, audio processing, and signal processing.

Action step: Drag the frequency sliders above and notice how the computed spectrum puts a sharp spike at the exact frequency of each active sine wave — then switch on the noise and see that the spikes survive.

Sources: Steven Smith's The Scientist and Engineer's Guide to Digital Signal Processing. 3Blue1Brown Fourier Transform analysis.

Go Deeper:
📘 The Scientist & Engineer's Guide to Digital Signal Processing — Steven W. Smith
🌐 3Blue1Brown — But what is the Fourier Transform? (Interactive Video)