The Fourier Transform

A Fourier series describes a periodic function — a wave that repeats itself forever. But most signals worth listening to or looking at are not periodic at all. A spoken sentence never repeats exactly. A single flash of lightning happens once and is gone. A heartbeat drifts and changes from beat to beat. None of these have a period 2L to plug into the series formula — so does Fourier's idea simply stop working for them?

It does not — it generalises beautifully. Imagine taking a periodic signal and slowly stretching its period 2L longer and longer, out towards infinity. In the limit, a single non-repeating pulse is just a "periodic" signal whose neighbouring copies have been pushed infinitely far away, so they never come back to interfere. Let L \to \infty in the complex Fourier series, and the spacing \pi/L between allowed frequencies shrinks to zero. The sum over discrete n melts into an integral over a continuous frequency k. That limit is the Fourier transform — the same idea as the series, generalised to work on absolutely any signal, periodic or not.

\hat{f}(k) = \int_{-\infty}^{\infty} f(x)\, e^{-ikx}\,dx, \qquad f(x) = \frac{1}{2\pi}\int_{-\infty}^{\infty} \hat{f}(k)\, e^{ikx}\,dk.

The first integral analyses f into its frequency content \hat{f}(k); the second synthesises f back out of it, exactly the way the series rebuilds a periodic wave from its coefficients. The discrete coefficients c_n have become a continuous spectrum — instead of a strength attached to each whole-number frequency n, every real frequency k gets its own (typically infinitesimal) share.

It is tempting to picture the transform as a Fourier series with infinitely many terms, but that is not quite right — a series with infinitely many discrete frequencies still only "sees" those whole-number multiples of the fundamental. What actually happens as L \to \infty is that the fundamental frequency \pi/L itself shrinks to zero, so the gaps between the allowed frequencies close up completely and every real number becomes a frequency the signal can use. A sum over a comb of dots becomes an integral over a solid line — that is the real difference between a spectrum with isolated lines and a genuinely continuous spectrum.

The hallmark: narrow in one domain, wide in the other

The Fourier transform trades localisation between the two domains, and this trade-off is the single most important fact about it. Think of a sustained, nearly pure musical note — a flute holding one steady pitch. Stretched out broadly in time, that signal needs barely any frequencies to build: its transform is a sharp, narrow spike sitting right at that one pitch. Now think of the opposite: a single sharp click, like a snapped finger or a drumstick tapping a rim. It is concentrated into a tiny sliver of time — and to build something that abrupt out of smooth waves, you need a huge range of frequencies all added together, cancelling everywhere except that one instant. Its transform is spread thin across almost every frequency at once.

A broad, gentle pulse (like the note) needs only a few low frequencies, so its transform is narrow; a sharply concentrated pulse (like the click) needs many, so its transform is spread out. This reciprocity — the foundation of the Heisenberg uncertainty principle in quantum mechanics — is cleanest to see for the Gaussian bump, which happens to be its own transform shape:

Push the "sustained note" idea to its absolute limit: a tone that has been playing forever, f(x) = e^{ik_0 x}, one single frequency k_0 and nothing else, stretching infinitely far in both directions of time. Its transform is, quite literally, zero everywhere except at the one point k = k_0, where it is infinitely tall and infinitesimally thin — a genuine spike, formally written using the Dirac delta, \hat f(k) = 2\pi\,\delta(k-k_0). That is the idealised endpoint the Gaussian below is edging towards as its pulse widens: an infinitely patient note collapses onto one exact frequency, while a signal squeezed into an instant does the opposite and spreads across every frequency there is. Real tones and clicks sit somewhere between these two extremes, but the two limits show you exactly which way each knob turns.

f(x) = e^{-a x^2} \;\Longrightarrow\; \hat{f}(k) = \sqrt{\tfrac{\pi}{a}}\; e^{-k^2 / (4a)}.

A wide bump in x (small a, like the sustained note) becomes a narrow bump in k; a narrow bump in x (large a, like the click) becomes a wide one in k.

Try it: from a "note" to a "click"

The pulse is on the left, its transform on the right. Slide the width parameter a down towards its minimum and the pulse spreads out like a long, held musical note — watch its transform collapse into a tall, narrow spike at k=0, a single dominant frequency. Now slide a up towards its maximum: the pulse squeezes into a sharp, click-like spike — and its transform spreads out flat and wide, using a broad range of frequencies almost equally. The two widths always move in opposite directions: you can never make both narrow at once, no matter how you choose a.

Where this actually shows up

This is not an abstract curiosity — reaching for the frequency content of a signal, instead of its raw up-and-down wiggle over time, is what makes a whole family of everyday devices work:

It is easy to think of the time/frequency trade-off you just saw with the Gaussian as some practical limitation — a fuzziness caused by cheap equipment, a sloppy algorithm, or noisy measurements that a better microphone or a smarter piece of software could someday fix around. It cannot be fixed, by any device or any algorithm, ever. A signal that is sharply localised in time is, as a matter of pure mathematics, necessarily spread out in frequency — and a signal concentrated in one narrow band of frequency is necessarily spread out over time. You cannot design a signal, however cleverly, that is perfectly narrow in both domains at once. This is exactly the same mathematics behind the Heisenberg uncertainty principle in physics, where position and momentum play the roles of time and frequency — it is a genuine property of waves themselves, not a shortcoming of any particular technology.

Computing a Fourier transform directly, term by term, is expensive: doubling how finely you sample a signal roughly quadruples the work. In 1965, James Cooley and John Tukey published the Fast Fourier Transform (FFT), a way to compute exactly the same answer using dramatically fewer operations — turning an N^2 calculation into one that scales like N\log N. That change of scaling is why your phone can equalise, compress, or analyse audio in real time at all, and it sits quietly underneath the MP3 and JPEG formats, digital television, and pretty much every piece of audio or image software you've ever used. It is routinely ranked among the most important algorithms of the twentieth century — a purely mathematical idea about sines and cosines that ended up reshaping consumer electronics.

See it explained