The Fast Fourier Transform & Spectral Methods

the sampling theorem

It feels like magic that a continuous sound — a smooth, unbroken wave in the air — can be stored as a finite list of numbers on a CD and played back with no audible loss. How can a handful of dots possibly recapture a curve that has infinitely many points? The sampling theorem is the precise statement that says exactly when this magic is allowed, and it is the theoretical bedrock of all digital audio, video, and communications.

The theorem, due to Nyquist and Shannon, states: if a signal contains no frequencies above some limit B (it is band-limited to B), then it is COMPLETELY and EXACTLY determined by its samples taken at any rate strictly greater than 2B. Not approximately — exactly. The continuous signal can be reconstructed perfectly from the discrete samples by a specific interpolation: replace each sample with a sinc function (sin(pi*t)/(pi*t), scaled) centred at that sample and add them all up; the sincs interlock so their wiggles cancel everywhere except where each sample sits. The threshold rate 2B is the Nyquist rate, and the slogan is simply 'sample faster than twice the highest frequency'.

The two hypotheses are where honesty lives. First, band-limitedness is an idealization: no real signal is perfectly band-limited (a finite recording cannot be), so in practice you apply an anti-aliasing low-pass filter to FORCE the signal below B before sampling, accepting that you discard the genuinely-too-fast content. Second, sampling exactly AT 2B is not enough — you need strictly above, with margin — and reconstruction with the ideal sinc requires infinitely many samples, so real systems use practical approximate filters. Within those caveats the theorem is exact and astonishing: a properly band-limited signal loses nothing when digitized.

Human hearing tops out near 20 kHz, so band-limit speech and music to 20 kHz and the theorem says any rate above 40 kHz reconstructs them perfectly. CDs use 44.1 kHz, leaving a 4.1 kHz guard band for the anti-aliasing filter to roll off in — which is why a CD sounds, to the ear, identical to the original analog source.

Band-limit, sample above twice the limit, and the original is recoverable exactly.

The theorem's promise holds ONLY if the signal is truly band-limited; real signals never are, so the anti-aliasing filter is not optional. Skip it and high frequencies alias down and corrupt the band you care about, with no possible repair afterward.

Also called
Nyquist-Shannon sampling theoremShannon sampling theorem奈奎斯特-香農取樣定理香農取樣定理