Fast Fourier Transform


Fast Fourier Transform

Michael
Corey, you know how we use the internet, watch videos, and process signals all the time? Well, there's one algorithm that makes all of that possible, and it's called the Fast Fourier Transform, or FFT.

Corey
I've heard of it, but I didn't realize it was that important. Where did it come from?

Michael
Believe it or not, it came from the effort to detect secret nuclear tests. After WWII, the US proposed the Baruch Plan to give up nukes if everyone else would, but the Soviets rejected it, and the arms race began.

Corey
So countries started testing nukes in remote places, often with terrible consequences. I remember the Castle Bravo test that went way bigger than expected and caused radiation sickness.

Michael
Exactly. That led to public outcry and calls for a test ban. But the big problem was how to verify that no one was testing underground. You can't see it from satellites, and the Soviets wouldn't allow on-site inspections.

Corey
So they turned to seismometers to detect the ground vibrations from explosions. But how do you tell a nuke from an earthquake?

Michael
That's where the Fourier transform comes in. A Fourier transform breaks a signal into its component sine waves, each with its own frequency and amplitude. The idea is that every signal is a sum of pure sine waves.

Corey
Okay, but how do you find out which sine waves are in a signal?

Michael
You multiply the signal by a candidate sine wave and add up the area under the curve. If the frequency matches a component, you get a non-zero result; otherwise it's zero. For each frequency, you also need a cosine wave to capture phase.

Corey
That makes sense. But we're not dealing with infinite signals—we have finite samples from a seismometer.

Michael
Right, so we use the Discrete Fourier Transform, or DFT. For N samples, you get N frequency bins. The lowest frequency has one period over the signal length, and the others are multiples. But the problem is it's incredibly slow.

Corey
How slow?

Michael
A million samples would require a trillion calculations. In the 1960s, that would take over three years for a single transform. That's not practical for monitoring hundreds of seismometers daily.

Corey
So they needed a faster way. That's where the Fast Fourier Transform comes in, right?

Michael
Exactly. In 1963, at a meeting of the President's Science Advisory Committee, mathematician John Tukey was doodling and came up with a clever shortcut. Physicist Richard Garwin later asked him about it and realized it was huge.

Corey
What was the trick?

Michael
Tukey realized that due to the periodic nature of sine waves, many calculations are redundant. By splitting the data into even and odd indices, you can reuse results for different frequencies. Then you split again and again, and each time you halve the work.

Corey
So instead of N^2 operations, you get N log₂ N. For a million samples, that's about 20 million operations instead of a trillion. That's huge.

Michael
Yes, and it made the DFT practical. Garwin had an IBM researcher, James Cooley, program it, and they published the algorithm with Tukey in 1965. But by then it was too late to secure a comprehensive test ban.

Corey
Why too late?

Michael
Because the partial test ban of 1963 only stopped atmospheric and underwater tests. Underground testing continued, and the arms race actually intensified—over 1,500 more tests were conducted. If the FFT had been available earlier, they could have verified a full ban and maybe stopped the race.

Corey
That's a crazy what-if. But I heard Gauss actually discovered the same algorithm in 1805?

Michael
Yes! Carl Friedrich Gauss was working out orbits of asteroids and jotted down exactly the same FFT method. But he never published it, and it only appeared in his collected works after his death, written in Latin with weird notation. So it was forgotten for 150 years.

Corey
That's a missed opportunity. But today the FFT is everywhere—not just for verification, but for image compression, radar, WiFi, you name it.

Michael
Right. For example, an image can be compressed by taking a 2D FFT and throwing away the tiny high-frequency components. That's how JPEG works. So every time you watch a video or make a phone call, you're using the FFT.

Corey
It really is the most important algorithm of our time. And it all started with a doodle during a boring meeting about nuclear fallout.

Michael
Exactly. It shows how a brilliant insight can change the world—even if it takes a century and a half to catch on.

Ask anything
We've read this whole study set, so questions about it get the best answers.