= Nyquist–Shannon sampling theorem
{c}
{title2=$f_s\geq2B,\quad T=1/f_s$}
{wiki}
The <Nyquist–Shannon sampling theorem> says that a <bandlimited function> can be recovered exactly from equally spaced samples, provided the sampling rate is high enough. It is the bridge between a continuous waveform and a sequence of numbers: the missing values between samples are determined by the restriction on its <frequencies>.
Here is a precise finite-energy version. Let $f\in L^2(\mathbb R)$, meaning $\int_{\mathbb R}|f(t)|^2\,dt<\infty$, and suppose its <Fourier transform>, defined through the <Plancherel theorem>, is zero outside $[-2\pi B,2\pi B]$. Thus $B>0$ is the largest allowed ordinary <frequency>, in cycles per second, rather than an <angular frequency>. Set $T=1/f_s$, where $f_s$ is the number of samples per second. If $f_s\geq2B$, the continuous representative of $f$ is recovered by
$$
f(t)=\sum_{n\in\mathbb Z}f(nT)\,\frac{\sin\bigl(\pi(t/T-n)\bigr)}{\pi(t/T-n)}.
$$
The quotient is the normalized <sinc function>, with value one when its argument is zero. Each shifted <sinc function> is one at its own sampling time and zero at every other sampling time. Its coefficient is therefore exactly the required sample value. For this <L2 space> formulation, the reconstruction converges in the <L2 space> norm and uniformly in $t$. The critical rate $f_s=2B$ is allowed for this class; choosing $f_s>2B$ leaves a gap between the occupied <frequencies> and the sampling boundary.
For a numerical example, a <bandlimited function> with no <frequencies> above $3$ cycles per second can be reconstructed from its samples every $0.1$ seconds: $f_s=10>6$. Exact reconstruction uses the whole sequence indexed by $\mathbb Z$. A finite recording and a finite sum of <sinc functions> introduce truncation error; joining adjacent samples by straight lines is generally a different reconstruction.
The obstruction is <aliasing>. At sampling rate $f_s=10$, the two distinct waveforms
$$
f_2(t)=\cos(2\pi\cdot2t),\qquad f_8(t)=\cos(2\pi\cdot8t)
$$
have identical samples at $t=n/10$, because
$$
\cos(2\pi\cdot8n/10)=\cos(2\pi n-2\pi\cdot2n/10)=\cos(2\pi\cdot2n/10).
$$
The samples alone cannot tell whether the waveform oscillates twice or eight times per second. If we know in advance that all <frequencies> are below $5$, the $8$-cycle waveform is excluded and the ambiguity disappears. These pure <cosines> are an illustrative <aliasing> example, rather than members of the finite-energy <L2 space> class in the stated theorem.
\Image[/sampling-aliasing.png]
{title=Two and eight cycles per second are distinguishable at twenty samples per second but alias at ten}
Exactly at a sampling boundary, the function class matters. At rate $f_s$, the <sine> $\sin(2\pi(f_s/2)t)$ has zero values at every $n/f_s$. It is a nonzero waveform indistinguishable from zero on that grid, but has infinite energy and is excluded by the finite-energy hypothesis above. This explains why a rule intended to cover arbitrary pure <sinusoids> should demand a strict inequality. For spatial data, replace seconds by distance: the <Nyquist spatial frequency> is $1/(2p)$ for sample pitch $p$.
The proof idea is short: the samples are <Fourier coefficients> of the <Fourier transform> restricted to a sampling-sized <frequency> interval. Because a <bandlimited function> has no contribution outside that interval, its <Fourier series> determines the whole <Fourier transform>; <Fourier inversion> then gives the <sinc function> expansion. See <sampling expansion by periodic Fourier projection> for this connection.
Claude E. Shannon's \i[Communication in the Presence of Noise] (1949), Section II, Theorem 1 and equation (7), gives the sampling statement and reconstruction using shifted <sinc functions> in a communication setting. Shannon explicitly notes earlier mathematical forms and credits Nyquist with emphasizing the sampling interval in telegraphy.https://fab.cba.mit.edu/classes/S62.12/docs/Shannon_noise.pdf[Shannon 1949, Proceedings of the IRE 37(1), pp. 10–21; sampling theorem on pp. 11–12]{ref}
Back to article page