Fourier transform
Any signal — a voice, a heartbeat, a square wave — is just a sum of sine waves. Draw a waveform and watch it decompose. Build one from harmonics and hear it sing. The Fourier transform, made visceral.
f(t) = ∑ Aₙ sin(2πn·f₀·t + φₙ) → time domain ↔ frequency domain
What the Fourier transform is and why it matters
In 1807, Joseph Fourier made a claim so radical that the mathematician Lagrange publicly objected: any function, no matter how jagged or discontinuous, can be expressed as a sum of smooth sine waves. This sounded absurd — how could a sharp corner be built from curves? — but Fourier was right. His insight became one of the most consequential ideas in the history of science. Today, the Fourier transform is the backbone of signal processing, telecommunications, medical imaging, audio compression, quantum mechanics, and any field that needs to understand the frequency content hidden inside a signal.
The key insight: any periodic signal is a sum of sines
Consider a square wave — that abrupt alternation between high and low. It looks nothing like a sine wave. But add up sine waves at odd multiples of the fundamental frequency (the 1st, 3rd, 5th, 7th harmonics...), each with amplitude inversely proportional to its frequency number, and the sum converges toward a perfect square wave. With just a handful of harmonics, you can see the shape emerge. With dozens, only the sharp corners resist. This is the “aha moment” of Fourier analysis: complexity in one domain is simplicity in another. A complicated waveform in time is just a list of frequencies and amplitudes.
How the DFT works
The Discrete Fourier Transform takes a sampled signal and asks a simple question at each frequency: how much of this frequency is present? It does this by correlating the signal with a test sine wave. Multiply the signal by a sine at frequency k, add up the products. If the signal contains that frequency, the products reinforce and produce a large sum. If it doesn’t, the positive and negative products cancel to near zero. Repeat for every frequency, and you have the spectrum. The math is elegant — complex exponentials rotating in the unit circle — but the intuition is just correlation: pattern matching between the signal and each candidate frequency.
The Gibbs phenomenon
Load the square wave preset and slowly increase the number of harmonics. You will notice something stubborn: near every sharp transition, the Fourier approximation overshoots by about 9%, producing little ripples that never go away no matter how many harmonics you add. This is the Gibbs phenomenon, discovered by J. Willard Gibbs in 1899. It arises because a finite sum of smooth functions cannot perfectly reproduce a discontinuity. The overshoot converges to a fixed percentage, not to zero. Sharp corners demand infinite bandwidth — which is why real-world square waves always have slightly rounded edges, and why your speakers can never perfectly reproduce a click.
The missing fundamental
There is a deep connection between this experiment and another one in the lab. When you hear a complex tone made of harmonics at 200, 300, 400, and 500 Hz, your brain perceives a pitch of 100 Hz — even though no energy exists at that frequency. Your auditory system infers the fundamental from the harmonic pattern. This is not an illusion; it is sophisticated neural computation. You can explore this phenomenon directly in the missing fundamental experiment.
Fourier’s radical claim and Lagrange’s objection
Fourier was studying heat conduction, not acoustics. He needed to solve the heat equation, and he discovered that expressing the initial temperature distribution as a sum of sines made the solution tractable. When he presented his results to the French Academy, Lagrange — one of the greatest mathematicians alive — objected on the grounds that a sum of smooth functions could not represent a function with corners. Lagrange was wrong, but his objection was not foolish. It took another century for mathematicians to work out the precise conditions under which Fourier series converge (pointwise, uniformly, in L²). The Gibbs phenomenon is a reminder that Lagrange’s intuition was partly correct: convergence near discontinuities is subtle and never uniform.
Where Fourier analysis appears
The MP3 format works by computing the frequency spectrum of short audio segments and discarding frequencies your ear cannot hear — lossy compression made possible by the Fourier transform. MRI machines measure radio-frequency signals emitted by hydrogen atoms in a magnetic field; the image is reconstructed by inverse Fourier transform from the frequency data. Voice recognition systems decompose speech into spectrograms — frequency content over time. Seismologists use Fourier analysis to distinguish earthquake types by their frequency signatures. JPEG compression applies a variant (the Discrete Cosine Transform) to blocks of pixels. Crystallographers determine molecular structures by diffracting X-rays and inverting the resulting frequency pattern. Anywhere a signal exists, the Fourier transform reveals what it is made of.