- Introduced by
- James Cooley & John Tukey (FFT)
- Year
- 1965
- Type
- Frequency-domain decomposition algorithm
- Family
- Spectral analysis
What does it do?
The Fourier Transform decomposes a time-domain signal into the sinusoidal frequencies it contains, showing which frequencies dominate and how strong they are.
Joseph Fourier's 1822 work on heat conduction showed that periodic functions can be written as sums of sinusoids, but the practical tool for computing this on digital data is the Fast Fourier Transform (FFT), published by James Cooley and John Tukey in 1965. Their algorithm reduced the cost of evaluating the discrete transform from O(N²) to O(N log N), which made spectral analysis of large datasets practical.
The intuition behind the method
Imagine a chord struck on a piano: your ear instantly separates the sound into individual notes — C, E, and G — even though the air vibrates as a single mixed wave. The Fourier Transform does the same thing mathematically. It takes any complicated signal and asks: 'Which pure sine waves, at which frequencies and amplitudes, would I have to mix together to reconstruct this signal exactly?' The answer is the frequency spectrum.
History
Joseph Fourier's 1822 Théorie Analytique de la Chaleur argued that periodic functions can be represented as sums of sinusoids. Direct evaluation of the discrete transform costs O(N²) operations, which limited its use on large records. The FFT as used today stems from the 1965 paper by Cooley and Tukey in Mathematics of Computation. That paper built on earlier factorization methods: its abstract credits Yates's method for 2^m factorial experiments, the generalization to 3^m by Box et al., and Good's methods, which Cooley and Tukey apply to the calculation of complex Fourier series. The 1965 paper describes a divide-and-conquer method for composite data lengths, and it gives power-of-two lengths particular advantage on a binary computer.
When to use it
Use the FFT when your data are sampled at equal intervals in time (or space) and you want to find dominant frequencies, locate periodicity, filter, or compress the signal. The method assumes that the frequency content is roughly stationary over the record, so that one average spectrum describes the whole signal. Do not rely on a single FFT when the spectrum changes over time; in that case, consider the Short-Time Fourier Transform (STFT), the Wavelet Transform, or the Hilbert-Huang Transform. Use of the radix-2 form requires a power-of-two record length; mixed-radix implementations accept other lengths at some cost in speed. Before transforming, remove the mean (DC offset) and any linear trend, since otherwise the DC component and trend leakage dominate the low-frequency bins. Choose the sampling rate so that the Nyquist limit (half the sampling rate) lies above the highest frequency of interest. Zero-padding interpolates the spectrum onto a finer grid of bins but does not improve true frequency resolution, which remains 1/(N·Δt) for the original record.
Limitations and considerations
- Stationarity assumption: frequency estimates are averages over the whole record and do not show when a frequency occurs.
- Spectral leakage: when the record does not contain an integer number of periods of a component, its energy spreads into neighbouring frequency bins unless a window function is applied.
- Uniform sampling requirement: irregularly sampled data must be resampled or analysed with a Non-Uniform DFT (NUDFT) approach.
- Resolution trade-off: frequency spacing is 1/(N·Δt), so finer frequency resolution requires a longer time record.
- Noise and peak significance: noise spreads energy across bins, and the FFT gives no uncertainty for estimated peaks. A spectral peak should be compared with a noise floor or tested for significance before it is read as real periodicity.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Computational cost: the O(N log N) algorithm makes spectral analysis of long records feasible on ordinary hardware.
- Invertibility: the IFFT recovers the original samples from the coefficients, up to floating-point rounding, because the forward and inverse transforms are exact counterparts.
- Common implementations: the FFT is provided by NumPy, SciPy, MATLAB, and R, so results can be reproduced across these environments.
- Extension to higher dimensions: the same approach applies to 2D data such as images (2D-FFT) by transforming along each axis in turn.
Applications
- Audio processing: pitch detection, equalization, and frequency-domain analysis of recordings. MP3 coding relies on a filterbank built around the modified discrete cosine transform (MDCT), which is closely related to the Fourier transform but is not a direct FFT.
- Telecommunications: OFDM modulation used in Wi-Fi, LTE, and 5G systems uses FFT and IFFT operations to generate and decode multicarrier signals.
- Medical imaging: MRI scanners acquire data in k-space, the Fourier domain, and reconstruct images with a 2D inverse FFT.
- Vibration analysis and structural health monitoring: identifying resonant frequencies in mechanical systems to help detect faults or fatigue.
- Time-series analysis: locating cyclical patterns and dominant periods in economic or other sampled data, provided the stationarity assumption is reasonable.
How it works
How it works
The Discrete Fourier Transform (DFT) maps N equally spaced time samples x[n] to N complex frequency coefficients X[k]. Each coefficient measures how strongly the signal correlates with a complex sinusoid at frequency k/N cycles per sample. The magnitude |X[k]| is proportional to the amplitude at that frequency, and the argument gives the phase. Peak amplitude is recovered only after dividing by N (or by N/2 for a one-sided spectrum of a real signal) and correcting for the window's coherent gain. Without this scaling, report relative magnitudes only.
Formula
X[k] = \sum_{n=0}^{N-1} x[n]\, e^{-i 2\pi k n / N}, \quad k = 0, 1, \ldots, N-1In the radix-2 form, which applies to power-of-two lengths, the FFT reorders the input samples by reversing the bits of their indices. This ordering places the even- and odd-indexed subsequences needed at each recursion level into positions that allow the butterfly stages to be computed in place, without a separate output array.
Formula
x[n] \xrightarrow{\text{bit-reverse}} x[\text{rev}(n)]A butterfly is the basic building block of the FFT. It combines the results of two half-length DFTs, one over even-indexed samples X_e and one over odd-indexed samples X_o, using the twiddle factor W_N^k = e^{-i2πk/N}. For k = 0, …, N/2−1 the two outputs are X[k] = X_e[k] + W_N^k X_o[k] and X[k+N/2] = X_e[k] − W_N^k X_o[k], because W_N^{k+N/2} = −W_N^k. Each butterfly needs one complex multiplication and two additions to produce two outputs. Because the split is repeated through the recursion, the total work grows as O(N log N) rather than O(N²).
Formula
\begin{cases} X_e[k] + W_N^k \, X_o[k] \\ X_e[k] - W_N^k \, X_o[k] \end{cases} \quad W_N = e^{-i2\pi/N}The Inverse FFT (IFFT) recovers the time-domain signal x[n] from the coefficients X[k] by summing the complex sinusoidal components and dividing by N. It has the same structure as the forward transform, differing in the sign of the exponent and the 1/N factor, so the same butterfly algorithm can be reused with that change.
Formula
x[n] = \frac{1}{N} \sum_{k=0}^{N-1} X[k]\, e^{i 2\pi k n / N}Common pitfalls
- Aliasing: components above half the sampling rate (the Nyquist limit) fold back into lower bins, and this distortion cannot be undone after sampling.
- Omitting windowing: applying the FFT to a finite record without a window implies a rectangular window, whose leakage can mask weaker components close in frequency to stronger ones.
- Misreading one-sided spectra: for real signals the FFT output is symmetric about the Nyquist frequency, so plotting both halves double-counts energy unless the one-sided power spectral density is normalized correctly.
- Discarding phase: plotting only |X[k]| removes the information needed to reconstruct the signal and can hide timing relationships between components.
Frequently asked questions
What is the difference between the DFT and the FFT?
The DFT and FFT produce the same N complex frequency coefficients from N time samples. The FFT is a family of algorithms that compute the DFT more efficiently by exploiting the symmetry and periodicity of the complex exponentials, reducing the cost from O(N²) to O(N log N). The 1965 paper by Cooley and Tukey presents a divide-and-conquer factorization for composite record lengths. The power-of-two (radix-2) case is the one it treats with particular advantage.
How do I choose the right window function?
The choice trades frequency resolution against sidelobe suppression. The rectangular window gives the narrowest main lobe but causes severe leakage. Hann and Hamming windows give moderate leakage control for general use. Blackman and flat-top windows suppress sidelobes more strongly but have wider main lobes. For overlapping short-time analyses, the Hann window is a common default.
Can the FFT handle non-stationary signals?
The standard FFT treats the whole record as stationary and reports one average spectrum. For signals whose frequency content changes over time, use the Short-Time Fourier Transform (STFT), which applies the FFT to successive windowed segments, or the Wavelet Transform, which gives adaptive time-frequency resolution. The Hilbert-Huang Transform is another data-adaptive option for nonlinear, non-stationary data.
Related methods
Sources
Cooley, J. W., & Tukey, J. W. (1965). An algorithm for the machine calculation of complex Fourier series. Mathematics of Computation, 19(90), 297–301.
Open DOI reference