What Is a Fast Fourier Transform (FFT)?

A fast Fourier transform, or FFT, is a shortcut for splitting a signal, like a recording of a chord, into the separate frequencies it contains. That speedup is what turned frequency analysis into something your phone does constantly without you noticing.

What a Fourier Transform Does to a Signal

A microphone records sound as a long list of loudness readings taken at even moments in time. A Fourier transform rewrites that list as how much of each frequency (how fast something repeats) is present. A single note shows up as one tall spike, while a chord shows several spikes. That frequency picture is called a spectrum, and it holds the same information as the original recording, just arranged differently. Because nothing is lost, you can go back from the spectrum to the recording, which is called the inverse transform.

A spectrum is usually drawn with frequency running left to right, low pitches on the left and high pitches on the right, and strength running up the page. A taller spike means that frequency contributes more to the recording. It tells you how much of that frequency is present, not when it happens. A real instrument’s note usually shows a main spike plus smaller spikes at higher frequencies, and those extras are part of what makes a violin sound different from a flute playing the same note.

This view is useful because many problems are obvious in it. A hum or a tuning error stands out as a single spike, while a patch of noise shows up as a broad raised area. Many guitar tuner apps work by finding the main frequency spike, though the strongest spike is not always the note’s true pitch. Changing one frequency is easy in the spectrum but hard in the raw readings, which is how the equalizers on phones and car stereos adjust bass and treble.

Images can be broken into frequencies too. Smooth areas are low frequency, while fine detail and grain are high frequency. Removing the high frequencies smooths an image and reduces noise, but it also blurs fine detail.1GeeksforGeeks. Fast Fourier Transform in Image Processing

Why the Fast Version Matters

Computing the frequency breakdown directly takes roughly n × n steps for n measurements.2bookdown.org. 3.6 The Fast Fourier Transform (FFT) | A Very Short Course on Time Series Analysis Doubling the length of a recording therefore makes it four times slower, and ten times more data means about a hundred times more work. Long recordings get out of hand quickly.

The FFT cuts the work to roughly n times log n.2bookdown.org. 3.6 The Fast Fourier Transform (FFT) | A Very Short Course on Time Series Analysis That grows only a little faster than the data itself, so ten times more data means a bit more than ten times the work. For a million samples, the FFT needs on the order of 20 million steps instead of a trillion, tens of thousands of times fewer. The gap keeps widening as files get bigger.

Live tasks like streaming audio or video calls need the answer many times a second. Without the shortcut they would lag or drain batteries far faster.

People sometimes assume the FFT is an approximation that trades accuracy for speed. It isn’t. It gives the same result as the direct calculation, only reorganized to avoid repeated work.3dsprelated.com. How the Cooley-Tukey FFT Algorithm Works | Part 2 – Divide & Conquer

The one difference is rounding. Computers round numbers slightly, and these tiny rounding errors build up through the FFT’s steps in ways that are well understood and can be bounded.4Journal of the ACM. Accumulation of Round-Off Error in Fast Fourier Transforms For everyday uses the error is far too small to notice.

How the FFT Splits the Problem in Half

The most common FFT, named after Cooley and Tukey, separates the measurements into those in even positions and those in odd positions.5Wikipedia. Cooley–Tukey FFT algorithm3dsprelated.com. How the Cooley-Tukey FFT Algorithm Works | Part 2 – Divide & Conquer It then splits each half again, and again, until only pairs of measurements remain.3dsprelated.com. How the Cooley-Tukey FFT Algorithm Works | Part 2 – Divide & Conquer Each pair gets a trivial two-point calculation: add the two values, and subtract them.6dsprelated.com. How the Cooley-Tukey FFT Algorithm Works | Part 3 – The Inner Butterfly Those small results are combined, level by level, into the answer for the whole recording.3dsprelated.com. How the Cooley-Tukey FFT Algorithm Works | Part 2 – Divide & Conquer Each halving adds only one more level of combining, which is where the log n in the cost comes from.

Taking every other measurement is a clever split because it gives two shorter recordings that each look like the original sampled at half the rate. The frequency breakdown of each half is a smaller version of the same problem, so the same trick can be applied again. The full answer can then be rebuilt from the two half answers with a modest amount of extra arithmetic, which is why splitting pays off.

This simplest version needs the data length to be a power of two, like 1,024 or 4,096.5Wikipedia. Cooley–Tukey FFT algorithm Other versions handle lengths built from small factors such as 2, 3 and 5.7OSTI. Parallel fast Fourier transforms for non power of two data That’s why analysis apps often offer sizes like 512 or 1,024 as settings, and why picking a nearby power of two, with the data padded to fit, is a common practical choice.

Where You Meet FFTs Every Day

Wi-Fi and 4G and 5G mobile data use a scheme called OFDM that sends data on many closely spaced frequencies at once. The transmitter uses an inverse FFT to turn those frequency channels into one radio wave.8NXG Connect. Understanding FFT and IFFT in OFDM Your phone’s receiver runs an FFT to separate the channels again and recover the data.8NXG Connect. Understanding FFT and IFFT in OFDM Fast FFTs are what make this reliable high-speed transmission practical.9Patsnap Eureka. What Is a Fast Fourier Transform (FFT)?

Using many channels pays off because each narrow channel carries a slow, sturdy stream. Slow streams are less easily garbled by echoes bouncing off walls, a common problem in homes and offices. The channels must be packed closely together without interfering, and the transform separates them cleanly.

A spectrogram is a picture of sound showing which frequencies are present and how loud, moment by moment.10IEEE Spectrum. Speech spectrograms using the fast Fourier transform It’s built by running an FFT on many short, overlapping slices of a recording.11MATLAB Documentation. spectrogram That lets speech analysis, music apps and bird-song identifiers show it live.10IEEE Spectrum. Speech spectrograms using the fast Fourier transform Time runs along the horizontal axis, frequency up the vertical axis, and color or brightness shows loudness. A steady note appears as a horizontal line, while a rising whistle slants upward. Different vowels leave distinct bright bands, which is part of what speech software uses to tell sounds apart. Overlapping the slices keeps the picture smooth instead of jumpy where slices meet.

Frequency-based compression, such as JPEG, shrinks image files by dropping less important frequency components.1GeeksforGeeks. Fast Fourier Transform in Image Processing Most of what you notice in a photo sits in the low frequencies, so fine high-frequency detail can often be dropped with little visible change. Drop too much and you get blur or blocky artifacts.

Science leans on it too. In NMR and infrared spectroscopy, Fourier methods gather data orders of magnitude faster than older approaches.12PubMed. Fourier transform spectroscopy And the fastest known way to multiply enormous numbers, published in 2019, is built on FFTs.13courses.grainger.illinois.edu. Fast Fourier Transforms

Special Versions for Real-World Data

Everyday signals like audio are plain real numbers, while the general FFT expects complex numbers, where each measurement has a real part and an imaginary part. Feeding in audio means the second part is filled with zeros, which are then processed anyway. An FFT designed for real data halves both the computing and the memory needed.14Communications of the ACM. Numerical Analysis: A fast fourier transform algorithm for real-valued series The spectrum of real data is also redundant, since its high half is a mirror image of the low half, so a real-data FFT skips computing the mirror.

If the data is also symmetric, the work drops to a quarter of the general FFT.15IEEE Transactions on Audio and Electroacoustics. A fast Fourier transform algorithm for symmetric real-valued series Some physical measurements and some image-processing steps naturally produce this pattern.

For someone using software, audio and science libraries usually offer a separate real-data FFT function. Choosing it gives the same answer in about half the time, and only half the output is needed because the rest mirrors it.

Some measurements are not taken at evenly spaced times, which the standard FFT assumes. Nonuniform FFTs convert the uneven data into an even problem the FFT can then solve.16Wikipedia. Non-uniform discrete Fourier transform They keep roughly the same n log n speed.17SIAM Journal on Scientific Computing. The Regular Fourier Matrices and Nonuniform Fast Fourier Transforms

Common Pitfalls When Reading FFT Results

If a signal contains frequencies too fast for the sampling rate, they show up as fake lower frequencies, an effect called aliasing.18PubMed Central. Nonuniform Sampling and Spectral Aliasing A high tone can appear in the spectrum as a lower one that is not really there. Uneven sampling does not remove these fakes so much as push them to much higher frequencies.19Concepts in Magnetic Resonance Part A. Nonuniform sampling: Bandwidth and aliasing The safe rule is to sample at more than twice the highest frequency you care about.

The reason is that capturing a wave takes more than two measurements per cycle. With fewer, the measurements fit a slower wave just as well, so the FFT reports the slower one. Recording equipment usually filters out very high frequencies before sampling so that they cannot sneak in as fakes. The wagon-wheel effect in films, where spinning wheels seem to turn backward, is the same aliasing seen visually.

An FFT treats a slice of signal as if it repeats endlessly, so an abrupt cut at the edges smears energy into neighbouring frequencies. On screen, a single tone looks like a wide hump with skirts. A window function gently fades the slice to near zero at both ends before the FFT.20brianmcfee.net. Spectral leakage and windowing Energy far from the true frequency then drops sharply while the true peak is kept.20brianmcfee.net. Spectral leakage and windowing Analyzer apps often default to a named shape such as Hann.

Adding zeros to the end of a signal before the FFT, called zero padding, gives a smoother-looking spectrum.21jackschaedler.github.io. Circles Sines and Signals But it adds no new information and does not improve the ability to separate close frequencies.21jackschaedler.github.io. Circles Sines and Signals Two tones closer than the recording length allows stay merged however many zeros you add,22BitWeenie. FFT Zero Padding so two notes still look like one on a smoother curve. Heavy padding can even make a peak’s exact position slightly less accurate.23Applied Spectroscopy. Effects of Noise, Time-Domain Damping, Zero-Filling and the FFT Algorithm on the “Exact” Interpolation of Fast Fourier Transform Spectra To separate close frequencies, record longer rather than pad.

Slice length matters in a related way. Longer FFT sizes give finer frequency detail but react more slowly, while shorter sizes follow changes quickly but blur close frequencies.

What Comes After the Classic FFT

A sparse signal has only a handful of strong frequencies while everything else is close to silence. A single musical note or a few radio carriers are examples, whereas crowd noise or a full orchestra is not sparse. When a signal is sparse, sparse Fourier methods can find the strong frequencies without processing every point,242019 IEEE International Conference on Big Data (Big Data). GPU-SFFT: A GPU based parallel algorithm for computing the Sparse Fast Fourier Transform (SFFT) of k-sparse signals so they can beat the regular FFT for such signals.25Proceedings of the Twenty-Third Annual ACM-SIAM Symposium on Discrete Algorithms. Simple and Practical Algorithm for Sparse Fourier Transform One graphics-card version ran 5 times faster than NVIDIA’s standard FFT library on such signals.242019 IEEE International Conference on Big Data (Big Data). GPU-SFFT: A GPU based parallel algorithm for computing the Sparse Fast Fourier Transform (SFFT) of k-sparse signals

FFTs tuned to specific processors gain more modest speedups, often 10 to 30 percent over popular libraries.26Proceedings of the 52nd International Conference on Parallel Processing. GFFT: a Task Graph Based Fast Fourier Transform Optimization Framework The FFT’s steps are already nearly the minimum, so the remaining gains come from how the work is arranged on a specific chip. Tuning can improve how data is held in fast memory and how the processor’s special instructions are used.

The quantum Fourier transform is the quantum computing version and is central to Shor’s method for breaking large numbers into factors.27Quantum Information Processing. A review on quantum Fourier transform Real quantum hardware still struggles with precision and losing its quantum state.27Quantum Information Processing. A review on quantum Fourier transform Ideas from it have also inspired ordinary-computer methods that can be a few orders of magnitude faster than the FFT for certain very large, simple data sets.28PRX Quantum. Quantum Fourier Transform Has Small Entanglement