Signal Analysis
Every sound, image, and signal is secretly a sum of pure sine waves. The Fourier transform finds those ingredients — and in doing so, reveals a deeper structure of reality.
01 — The Fundamental Question
Imagine you're listening to a piano chord — three keys pressed simultaneously. The sound reaching your ear is one continuous pressure wave, yet your brain effortlessly hears three distinct notes. How?
Your cochlea is performing a physical Fourier transform: tiny hairs tuned to different frequencies vibrate selectively, decomposing the sound into its components. Fourier analysis is what the ear does naturally — we just found the math to do it computationally.
The time domain shows how a signal varies over time — the raw waveform. The frequency domain shows which frequencies are present and how strong each is. These are two equally valid descriptions of exactly the same signal. The Fourier transform moves between them.
Think of it this way: a recipe and the finished dish are the same thing, described differently. Time domain is the dish. Frequency domain is the recipe.
02 — The Atoms of Signals
A sine wave is the simplest oscillation imaginable — a single frequency, repeating forever. It has exactly three parameters:
Joseph Fourier's insight (1822) was breathtaking in its ambition: any periodic function — no matter how jagged, complicated, or strange — can be perfectly reconstructed as a sum of sines and cosines. This was considered outrageous at the time. Lagrange publicly doubted it. Fourier was right.
03 — Interactive Demo
Add up to three sine waves and watch the composite signal form in real time. The lower plot shows the frequency spectrum — the "recipe" of your signal.
Each bar = one frequency component. Height = amplitude. This is the Fourier transform of the signal above.
04 — Under the Hood
The continuous Fourier transform is defined as:
The term e^(-2πiωt) is a complex exponential — it traces a circle in the complex plane at frequency ω. Multiplying the signal by this and integrating is like wrapping the signal around a circle and finding its center of mass.
This is the deep geometric intuition: the Fourier transform is a resonance detector. It asks, for each candidate frequency: "how much does this signal resonate with a pure tone at this frequency?"
05 — Fourier Series in Action
The Fourier series for a square wave uses only odd harmonics (1st, 3rd, 5th, ...), each weaker than the last. Watch what happens as you add more:
Notice the overshoot at the jump discontinuities when you add many harmonics? That spike never disappears — it stays at about 9% above the ideal height no matter how many terms you add. This is the Gibbs phenomenon, discovered in 1898. It reveals a fundamental truth: you need infinitely many frequencies to represent a perfect sharp edge.
This matters in practice: JPEG image compression discards high-frequency components to save space. The "ringing" you see around sharp edges in heavily compressed images is the Gibbs phenomenon.
06 — The Practical Algorithm
Real-world signals are discrete — sampled at regular intervals, not continuous. The Discrete Fourier Transform (DFT) handles this:
The naive DFT on N samples requires N² operations. For audio at 44,100 samples/second, that's 1.9 billion operations per second just for a 1-second analysis. Hopelessly slow.
The FFT is arguably the most consequential numerical algorithm ever discovered. It runs inside virtually every piece of technology that processes signals.
07 — Where It Lives
MP3 uses a modified DCT (cousin of FFT) to discard frequencies human ears can't detect. Shazam identifies songs by fingerprinting their FFT spectrum. Equalizers boost/cut specific frequency bands.
JPEG transforms 8x8 pixel blocks with a DCT, keeps low-frequency components (broad shapes), discards high-frequency ones (fine details). The compression ratio is controlled by how aggressively high frequencies are cut.
MRI scanners natively acquire data in "k-space" — the Fourier transform of the image. Reconstruction is literally an inverse FFT. The image you see is the frequency-domain data, transformed back.
WiFi, 4G/5G, and cable TV use OFDM (Orthogonal Frequency Division Multiplexing) — data encoded across thousands of carrier frequencies simultaneously, using the FFT to encode and decode each frame.
LIGO detects gravitational waves by looking for specific frequency "chirp" patterns in incredibly noisy data. FFT-based matched filtering pulls the signal out of noise that dwarfs it by a factor of 10²⁰.
Momentum is the Fourier transform of position in quantum mechanics. A narrow wave packet in position space has a broad momentum spectrum — and vice versa. This directly produces the Heisenberg Uncertainty Principle.