Discrete Fourier transform and FFT

Database › Mathematics › Mathematical physics › Fourier analysis

FOUR-0005FormulaUndergraduate

The discrete Fourier transform maps N samples to N frequency components; the fast Fourier transform computes it in O(N log N) operations instead of O(N²), and circular convolution becomes multiplication.

$$X_k=\sum_{n=0}^{N-1}x_ne^{-2\pi ikn/N},\qquad x_n=\frac1N\sum_{k=0}^{N-1}X_ke^{2\pi ikn/N},\qquad\sum|x_n|^2=\frac1N\sum|X_k|^2$$

Explanation

The DFT treats the data as one period of a periodic sequence. Real input gives $X_{N-k}=X_k^*$. The Cooley–Tukey FFT splits even and odd samples recursively ($N=2^m$), reducing the cost from $N^2$ to $\frac N2\log_2N$ complex multiplications.

Frequency resolution is $1/(N\Delta t)$; truncating a non-periodic signal causes spectral leakage, reduced by window functions. FFTs underlie spectral PDE solvers, crystallography and signal processing.

Example 1

Compute the DFT of $(1,2,3,4)$.

Solution

$X_0=10$, $X_1=-2+2i$, $X_2=-2$, $X_3=-2-2i$ (note $X_3=X_1^*$); Parseval: $30=\frac14(100+8+4+8)$.

Example 2

How much faster is an FFT than direct evaluation for $N=1024$?

Solution

$N^2\approx1.05\times10^6$ versus $\frac N2\log_2N=5120$ multiplications: about 200 times fewer.

Related entries