Discrete Fourier Transform — Definition, Formula & Examples
The Discrete Fourier Transform (DFT) is a mathematical operation that takes a finite sequence of equally spaced samples and converts it into a sequence of complex numbers representing the amplitude and phase of each frequency component.
Given a sequence of complex numbers , the Discrete Fourier Transform produces a new sequence defined by for . The inverse transform recovers the original sequence via .
Key Formula
Where:
- = The $n$-th sample of the input sequence
- = The $k$-th frequency-domain output coefficient
- = Total number of samples in the sequence
- = The imaginary unit, $i = \sqrt{-1}$
- = Frequency index
How It Works
Each output measures how much the input signal correlates with a complex exponential at frequency . The index gives the sum of all samples (the DC component), while higher values correspond to higher-frequency oscillations. You compute each by multiplying every input sample by a rotating complex exponential (a "twiddle factor") and summing the results. In practice, the Fast Fourier Transform (FFT) algorithm computes the DFT in operations instead of the naive .
Worked Example
Problem: Compute the DFT of the 4-point sequence .
Setup: Here , so the twiddle factor base is . We need .
Compute X_0: For , every power of is 1, so is the sum of all samples.
Compute X_1: Use , , , .
Compute X_2: Powers cycle: , , , .
Compute X_3: Powers: , , , .
Answer:
Why It Matters
The DFT is the computational backbone of signal processing, audio analysis, image compression (JPEG), and spectral methods for solving differential equations. Engineers and data scientists rely on FFT implementations of the DFT in nearly every domain that involves analyzing periodic or frequency-domain behavior.
Common Mistakes
Mistake: Confusing the sign convention in the exponent between the forward and inverse transforms.
Correction: The standard forward DFT uses (negative exponent). The inverse uses with a normalization factor. Some references swap this convention, so always check which definition your textbook or software uses.
