Fourier transform

Level AdvancedDifficulty ★★★★★Concept⌖ Open in the map

What is it?

The continuous version for non-periodic signals: f^(ξ)=∫f(t) e−2πiξt dt\hat f(\xi) = \int f(t)\,e^{-2\pi i\xi t}\,\dd t gives the amount of each frequency ξ\xi. It turns convolution into multiplication and differentiation into multiplication by 2πiξ2\pi i\xi — which is why filtering, compression and solving linear PDEs are easier in frequency space.

Why does it exist?

Linear, time-invariant systems — filters, lenses, rooms, transmission lines, the heat equation — do not mix frequencies: a sinusoid goes in, the same sinusoid comes out, scaled and shifted. In the frequency domain such a system is just a multiplication, so the Fourier transform diagonalizes it.

Intuition

Wind the signal around a circle at frequency ξ\xi (multiply by e−2πiξte^{-2\pi i\xi t}) and compute the centre of mass. If the signal has a component at ξ\xi, the winding piles it up on one side and the centre moves away from zero; otherwise everything averages out. f^(ξ)\hat f(\xi) is that centre of mass. A narrow signal needs many frequencies (wide spectrum); a pure tone has a single spike — the time–frequency uncertainty principle.

Formal definition

f^(ξ)=∫−∞∞f(t) e−2πiξt dt,f(t)=∫−∞∞f^(ξ) e2πiξt dξ.\hat f(\xi) = \int_{-\infty}^{\infty} f(t)\,e^{-2\pi i\xi t}\,\dd t, \qquad f(t) = \int_{-\infty}^{\infty}\hat f(\xi)\,e^{2\pi i\xi t}\,\dd\xi.

Key properties: f∗g^=f^ g^\widehat{f * g} = \hat f\,\hat g (convolution theorem), f′^(ξ)=2πiξ f^(ξ)\widehat{f'}(\xi) = 2\pi i\xi\,\hat f(\xi), ∫∣f∣2=∫∣f^∣2\int|f|^2 = \int|\hat f|^2 (Plancherel). The discrete Fourier transform of NN samples, Xk=∑n=0N−1xne−2πikn/NX_k = \sum_{n=0}^{N-1} x_n e^{-2\pi i kn/N}, is computed in O(Nlog⁡N)O(N\log N) by the FFT.

Formulas

f^(ξ)=∫−∞∞f(t) e−2πiξt dt\hat f(\xi) = \int_{-\infty}^{\infty} f(t)\,e^{-2\pi i\xi t}\,\dd t
f∗g^=f^⋅g^\widehat{f * g} = \hat f\cdot\hat g
convolution theorem
Xk=∑n=0N−1xn e−2πikn/NX_k = \sum_{n=0}^{N-1} x_n\,e^{-2\pi i k n/N}
discrete Fourier transform (DFT)
e−πt2^=e−πξ2\widehat{e^{-\pi t^2}} = e^{-\pi\xi^2}
the Gaussian is its own transform

Example

A 3-second recording of A440 plus a little noise: its DFT shows a sharp peak at 440 Hz (and 880, 1320… if the instrument has harmonics). A guitar tuner is literally this computation followed by argmax.

Why does it matter?

Audio codecs, image compression, Wi-Fi and 4G/5G (OFDM), MRI reconstruction, radar, spectroscopy, fast polynomial and integer multiplication, large convolutions — all run on Fourier transforms computed by the FFT, one of the most important algorithms ever written.

Where it shows up in computing

  • Signal processing★★★★★fundamentalSignals, media and vision

    Spectral analysis, filtering and modulation are defined in the frequency domain.

  • Fast Fourier transform (FFT)★★★★★fundamentalSignals, media and vision

    The FFT computes the DFT in O(Nlog⁡N)O(N\log N) instead of O(N2)O(N^2).

  • Sampling theorem (Nyquist–Shannon)★★★★★fundamentalSignals, media and vision

    Sampling replicates the spectrum; Nyquist's condition keeps the copies from overlapping.

  • Telecommunications (modulation, OFDM)★★★★★fundamentalSignals, media and vision

    OFDM (Wi-Fi, 4G/5G, DSL) sends data on many orthogonal subcarriers using inverse FFT and FFT.

  • Uncertainty principle★★★★★fundamentalQuantum computing and physics

    Position and momentum wave functions are Fourier pairs; the uncertainty principle is a Fourier inequality.

  • Image processing and computer vision★★★★★frequentSignals, media and vision

    Frequency-domain filtering, deblurring and image registration (phase correlation).

Where it shows up in AI

  • Convolutional networks (CNNs)★★★★★advancedAI and machine learning

    Large convolutions can be computed by FFT; Fourier neural operators learn directly in frequency space.

Where is it used?

Computing topics reachable from here, through the chain of ideas that leads to them:

What depends on it

Exercises

1Computing

Convolving two signals of length N=106N = 10^6 directly costs ≈N2\approx N^2 operations. Estimate the cost via FFT.

Solution

Three FFTs of size ~2N2N plus a pointwise product: about 3⋅2Nlog⁡2(2N)≈1.3⋅1083\cdot 2N\log_2(2N) \approx 1.3\cdot10^8 vs 101210^{12} — roughly 8000 times faster.

2Graphical

A signal is a short click (a narrow pulse). What does its spectrum look like? And a long pure tone?

Solution

A narrow pulse has a very wide, flat spectrum (all frequencies); a long pure tone has a narrow peak. Time width × frequency width is bounded below.

↑ ↓ to navigate · ↵ · Esc