1. Shannon Sampling Theory

Painting detail by Louis Peyré (1923–2012). About the paintings.
Digital measurements retain only samples of a continuous signal, so reconstruction depends on what information sampling preserves. Understanding these limits guides the choice of sampling rate and the filtering applied before acquisition. Starting from continuous and discrete signal models, we use Fourier analysis to prove a sampling theorem, explain aliasing, and distinguish exact interpolation from the additional error introduced by quantization.
Shannon’s foundational work of 1948–1949 addresses three closely related topics:
Sampling determines when a continuous signal can be recovered from discrete measurements. Quantization then replaces the measured values by symbols from a finite alphabet.
Source coding uses symbol probabilities to represent a sequence of symbols compactly as a binary string.
Channel coding adds redundancy to protect the coded sequence against transmission errors, such as flipped bits. It is also known as error-correcting coding.
Chapter 3 develops source coding theory. We do not cover channel coding.
The main reference for this chapter is [23].
1.1 Continuous and Discrete Signals¶
To analyze signal-processing methods, we often begin with a continuous model of the physical input to a sensor.
Examples include microphones, digital cameras, and medical imaging devices.
For example, a one-dimensional signal can be modeled by , where is the acquisition interval, often representing time. A grayscale image can be modeled by on the unit square.
Although sound and natural images provide many of our examples, most of the methods extend to multidimensional data. After normalizing the signal values, these data can be represented by mappings
Here is the dimension of the acquisition domain and is the number of channels. Grayscale images have , grayscale videos have , and RGB color images have . Multispectral images have and many channels, each recording a different wavelength range. Figures 1.1 and 1.2 illustrate these types of data.
Figure 1.1. Examples of sound (), an image (), and a video ().
Figure 1.2. A color flower image and a synthetic multispectral image with 32 channels, with an example spectrum.
1.1.1 Acquisition and Sampling¶
Signal acquisition maps a continuous signal to a finite-dimensional vector of measurements. A microphone records samples along a time axis, whereas a digital camera records samples on a two-dimensional pixel grid. Abstractly, an acquisition operator maps
Figure 1.3. Spatial and temporal detail: a flower image with a pixelated crop, and a recorded birdsong waveform with a short-time enlargement. Matching red boxes identify the spatial crop.
Figure 1.3 shows examples of discretized signals.
1.1.2 Linear Translation-Invariant Sampling¶
To model translation-invariant sampling, extend the signal outside its acquisition domain according to the chosen boundary convention, convolve it with a fixed impulse response , and sample the result:
The impulse response depends on the device. It is typically a smooth low-pass kernel concentrated near . Its effective width controls spatial resolution: a wide kernel blurs the signal, whereas a narrow kernel may fail to suppress frequencies that cause aliasing. A width of order balances these effects at the sampling scale.
Section 1.2 explains when a bandlimited signal can be reconstructed from its samples. Smoothness alone does not guarantee exact recovery.
1.2 Shannon Sampling Theorem¶
The Fourier transform.
For , its Fourier transform is defined as
For , Plancherel’s identity gives . The map therefore extends continuously to . This extension is the limit, as , of the truncated integrals .
When , Fourier inversion gives
where the equality holds almost everywhere. The right-hand side defines the continuous representative of , which vanishes at . We use this representative whenever pointwise values are needed.
The Fourier transform exchanges regularity and decay. For an integer , if , then so that .
Conversely,
For example, the decay estimate for implies .
A related measure of smoothness is the squared Sobolev norm , where is the weak derivative. Sobolev spaces provide a natural setting for weak solutions of PDEs. Later chapters use Sobolev regularity to control approximation and denoising errors.
Fourier series.
Let denote the circle of length .
A function is identified with a -periodic function on . Its Fourier coefficients are
Equivalently, , where and .
The functions form an orthonormal basis for this inner product, giving the expansion
which means for .
For a differentiable function, the series (1.5) converges pointwise at every . If is of class on , then , which gives normal convergence and hence uniform convergence.
For a piecewise function, the Fourier series converges at a jump to the average of the one-sided limits. Gibbs oscillations prevent uniform convergence across the jump.
Poisson formula.
The Poisson formula relates sampling in the signal domain to periodization in the Fourier domain.
For a function on , define its periodization by
If , the series converges absolutely almost everywhere and , with equality for nonnegative functions. Here the norm on uses unnormalized Lebesgue measure over one period. Indeed,
For , Proposition 1.1 states that the following diagram
is commutative. The minus sign in is opposite to the sign in Fourier series synthesis; this accounts for the index reversal in the proof below.
Shannon’s sampling theorem.
Shannon’s sampling theorem gives a sufficient condition for reconstructing a signal from the samples at spacing .
The bandlimiting condition is . By Fourier inversion (1.3), such a signal is and has an entire extension to the complex plane.
Shannon’s 1949 paper placed the sampling theorem at the heart of communication theory, while acknowledging earlier interpolation results and Nyquist’s work on transmission rates.
Figure 1.4 illustrates the reconstruction argument and the aliasing that occurs when spectral replicas overlap; see also Figure 1.7.
Figure 1.4. Sampling and Shannon interpolation in the frequency and time domains, with unit sample spacing. Left: the bandlimiting condition of Theorem 1.2 holds. Right: overlapping spectral replicas cause aliasing; the reconstructed signal still passes through every sample. The rows show the original signal, sampling, the interpolation kernel, and reconstruction.
Figure 1.5. The sinc interpolation kernel.
The sinc kernel decays slowly and oscillates, making it inconvenient for local interpolation. Oversampling gives more flexibility: if with , the spectrum occupies a strict subinterval of the Nyquist interval. One can then choose a reconstruction kernel with a smooth, compactly supported Fourier transform. The resulting kernel decays faster than every inverse power of time. Smooth compact spectral support does not, in general, imply exponential decay.
For local interpolation, cardinal B-splines offer another useful family of kernels. Define and . The function is piecewise polynomial of degree , with support . For , it belongs to and has a bounded weak derivative of order . The reconstruction takes the form , with . The interpolation conditions define a linear system for the coefficients in terms of the samples . For general sample data, the identity holds only for , corresponding to piecewise constant and piecewise affine interpolation.
A common choice is cubic spline interpolation, which corresponds to .
Associated code: test_sampling.m
Figure 1.6. Cardinal splines as basis functions for interpolation.
When the spectral replicas overlap, sampling creates aliasing: high-frequency components become indistinguishable from lower-frequency components. A low-pass filter applied before sampling attenuates frequencies beyond the Nyquist interval . This reduces aliasing at the cost of losing high-frequency information; see Figure 1.7.
Figure 1.7. Aliasing of a sine wave. This periodic example is interpreted through its discrete spectral lines rather than as an signal.
Quantization.
To store or transmit a sampled signal digitally, one quantizes its values to finite precision.
Section 6.1 develops transform coding, in which an invertible linear transform, usually orthogonal, is applied before quantization. Transforming the data can make the coefficients easier to compress. Directly quantizing the sampled values is a simpler alternative.
For example, a step size gives the finite vector . This records only finitely many samples, which do not determine a general bandlimited signal. Exact recovery from these data requires additional assumptions, such as a specified finite-dimensional signal model.
Figure 1.8. A uniform scalar quantizer.
For a quantization step , the quantizer records the index of the nearest multiple of , i.e.
as illustrated by the quantizer diagram. Dequantization replaces each index by the cell midpoint , which minimizes the worst-case error within that cell. The resulting error is bounded by : .
Quantization introduces the loss relative to the sampled vector. Source coding and decoding then preserve the quantized symbols exactly.
Figure 1.9. Quantizing an image with gray levels. The normalized intensities lie in ; finite-level quantizers also specify clipping or endpoint conventions.