Discrete Fourier Transform (DFT)

The discrete Fourier transform decomposes a finite-length time series into a sum of complex sinusoids at equally spaced frequencies. Each coefficient in the decomposition tells how strongly the data oscillates at the corresponding frequency, and is computed as the inner product of the data with the sinusoid:

The frequencies are called the Fourier frequencies: they are the only frequencies the DFT can resolve from equally spaced samples. Using Euler’s formula , the same coefficient splits into a real and imaginary part:

so each encodes both the amplitude (through its modulus ) and the phase (through its argument ) of the frequency- component. The squared modulus keeps only the amplitude information and gives the periodogram.

For real-valued data, the coefficients satisfy the symmetry , so and only the frequencies carry independent information; values above are mirror images of values below. The transform is also fully invertible: recovers the original data exactly, so no information is lost in passing to the frequency domain.

Intuition

The DFT projects a finite time series onto a basis of complex sinusoids and reads off how much of each one is present. Each coefficient answers two questions about the frequency at once: how much of the data oscillates at this rate (the magnitude), and how the oscillations are aligned in time (the phase). Two signals that differ only by a time shift have identical magnitudes at every frequency but different phases, which is why the periodogram, built from magnitudes alone, suffices for power-spectrum analysis but not for reconstruction.

The restriction to the Fourier grid is a finite-sample artifact. With samples, the lowest non-zero frequency the DFT can see is (one full cycle across the entire record), and the highest is (alternating values , the Nyquist limit). Frequencies between Fourier grid points are not directly observed and bleed into neighboring bins, the phenomenon known as spectral leakage. A pure sinusoid whose frequency happens to coincide with a Fourier grid point produces a single clean spike; one that falls between points spreads its energy across nearby bins instead.

Properties

(Linearity) The DFT distributes over linear combinations.

For any series and scalars , the DFT satisfies . This follows directly from the linearity of the sum that defines and means that decomposing a signal into a known component plus a residual decomposes the DFT additively. The same property is the technical reason behind tools like periodogram regression and the additive time-frequency decomposition.

(Parseval’s Identity) Total energy is preserved between the time and frequency domains.

Squaring and summing on either side gives

the discrete analogue of Plancherel’s theorem. The total variance of the data equals the sum of squared moduli across all Fourier frequencies, which justifies interpreting as the contribution of frequency to total power. The periodogram is just a rescaled version of this energy decomposition.

(Orthogonality of Sinusoids) Cosines and sines at distinct Fourier frequencies are orthogonal under the discrete inner product.

For in ,

and the cross-terms vanish for all . The orthogonality is what makes the DFT coefficients independent: estimating the amplitude at one Fourier frequency does not affect the estimates at the others, mirroring the behavior of an orthogonal regression design with sinusoidal predictors.

(Computational Cost) The naive DFT is ; the FFT brings it down to .

A direct computation of at all Fourier frequencies requires complex multiplications. The Fast Fourier Transform (FFT) algorithm exploits redundancies in the sinusoidal basis to compute the same set of coefficients in when is a power of two (and in close to that for general ). The speedup is what makes spectral analysis practical on long records: without it, a length- series would require multiplications instead of about . All standard implementations (NumPy fft.fft, R fft, MATLAB fft) use FFT internally.

Examples

DFT of a length-4 series

Compute for .

DFT of a pure cosine

For with on the Fourier grid, where does the energy concentrate?