Symptom

Your dashboard shows CPU utilization averaging 40%, comfortably under budget. Users are reporting timeouts. You add more logging and the average stays at 40%.

Eventually someone captures a one-second trace and finds the truth: the service spikes to 100% for eight seconds out of every ninety, and your monitoring samples every sixty seconds. The spikes are real, periodic, and invisible.

Worse, when you plot the sampled series over an hour, you see a clean slow oscillation with a three-minute period that does not exist in the system at all. It is an artifact. Your team spends two days looking for a three-minute cycle in the workload.

Here is that number, because it is not intuitive. A 90-second-period signal sampled every 60 seconds appears at frequency $|1/90 - 1/60| = 1/180$ Hz, a 180-second period. The graph shows a real, smooth, persistent three-minute wave that corresponds to nothing.

Same phenomenon, other guises: wagon wheels turning backwards on film, moiré patterns on a photographed screen, jagged edges before antialiasing, a 15 kHz whine appearing in a downsampled audio file. These look like unrelated rendering bugs. They are one theorem.

Statement

A signal is bandlimited to $W$ hertz if its Fourier transform vanishes above $W$ — it contains no frequency component faster than $W$.

A signal bandlimited to $W$ hertz is completely determined by its samples taken at any rate $f_s > 2W$, and can be reconstructed exactly. Below that rate, information is destroyed and no reconstruction can recover it.

If $x(t)$ has $X(f) = 0$ for $|f| \ge W$, then

$$x(t) = \sum_{n=-\infty}^{\infty} x\!\left(\tfrac{n}{f_s}\right) \operatorname{sinc}\!\left(f_s t - n\right), \qquad f_s > 2W.$$

Two claims, and both are surprising in opposite directions.

The positive claim: countably many samples reconstruct a continuous function exactly. Not approximately. Every value between the samples is determined.

The negative claim: below $2W$, the loss is irreversible. High frequencies do not vanish, they fold down and masquerade as low ones. The corrupted component is indistinguishable from a genuine low-frequency signal, so no post-processing separates them.

The rate $2W$ is the Nyquist rate. Half the sampling rate, $f_s/2$, is the Nyquist frequency — the highest frequency you can represent. These get swapped constantly, so: CD audio samples at 44.1 kHz, giving a Nyquist frequency of 22.05 kHz, which covers human hearing to 20 kHz with a 2050 Hz guard band for the filter to roll off in.

Argument

Why sampling causes folding. Multiplying $x(t)$ by an impulse train of period $1/f_s$ is, in the frequency domain, convolution with an impulse train of spacing $f_s$. Convolving a spectrum with impulses at multiples of $f_s$ produces copies of the spectrum centred at every multiple of $f_s$:

$$X_s(f) = f_s \sum_{k=-\infty}^{\infty} X(f - k f_s).$$

That is the entire mechanism. Sampling in time replicates the spectrum in frequency.

Now the geometry. Each copy occupies a band of width $2W$ around its centre. If $f_s > 2W$, consecutive copies do not touch, and an ideal low-pass filter keeps the original and discards the rest, recovering $X(f)$ exactly. Take the inverse transform of that rectangular filter and you get the sinc function in the formula above.

If $f_s < 2W$, the copies overlap. In the overlap region the sampled spectrum is a sum of contributions from the original band and its neighbour, and addition is not invertible. Given the sum, no filter recovers the summands. That is aliasing, and its irreversibility is arithmetic rather than technological.

The folding formula. A component at $f_0 > f_s/2$ appears at $|f_0 - k f_s|$ for whichever integer $k$ lands it in $[0, f_s/2]$. Sampling at 44.1 kHz, a 30 kHz component appears at $|30000 - 44100| = 14.1$ kHz — squarely audible, and now permanently part of the signal. A 25 kHz component lands at 19.1 kHz. An ultrasonic component you never intended to record becomes a tone you cannot remove.

This is why every ADC has an anti-aliasing filter in front of it, in analog hardware, before the sampler. It must be analog and it must come first, because after sampling the damage is arithmetic. A digital filter applied afterwards removes the 14.1 kHz alias and the genuine 14.1 kHz content together, since by then they are the same numbers.

Counting, which is Shannon’s framing and the one worth keeping. A signal bandlimited to $W$ over $T$ seconds has about $2WT$ degrees of freedom. The theorem says a sample rate of $2W$ supplies exactly that many numbers per second: enough, and not more than enough. Sampling faster is redundancy; sampling slower loses dimensions. It is a dimension count, and the reason it connects to T018 is that both are statements about how many bits a signal actually contains as opposed to how many you chose to write down.

Forbids

Recovering detail above half your sampling rate. Not with a better algorithm, not with a neural network, not ever, because the information is not present in the samples.

Removing aliasing after the fact. Once folded, an aliased component is arithmetically identical to genuine content at that frequency.

Detecting events shorter than twice your monitoring interval. A 60-second scrape cannot see a 30-second outage. Not “might miss” — cannot see. This governs Prometheus scrape intervals, CloudWatch periods, and every APM sampling config, and it is why p99 latency computed from 1-minute aggregates is not the p99 your users experienced.

Perfect real-time reconstruction, since the sinc function has infinite support in both directions. Exact reconstruction requires all samples, including future ones. Every practical reconstructor is a finite approximation, and its error is the gap between the theorem and your hardware.

Does not forbid

It does not forbid sampling below $2W$ when the signal is sparse, and this is the misreading with the biggest modern consequences. Compressed sensing reconstructs signals from far fewer samples than Nyquist demands, provided the signal is sparse in some basis. This is not a violation: Nyquist assumes only bandlimiting, while compressed sensing assumes much more, and stronger assumptions buy stronger conclusions. MRI scanners ship this — modern scans are several times faster than Nyquist-rate acquisition would allow, and the reconstruction is a convex optimization rather than a sinc sum. The Event Horizon Telescope black hole image came from radically sub-Nyquist sampling plus sparsity priors.

It does not forbid undersampling on purpose. Bandpass sampling (or undersampling) deliberately aliases a high-frequency band down to baseband, using the fact that if you know which copy you are looking at, folding is invertible. Software-defined radios like the RTL-SDR and HackRF use this routinely to capture GHz signals with MHz-rate converters. The requirement is $f_s > 2B$ for bandwidth $B$, not $2f_{\max}$.

It does not mean higher sample rates sound better. 192 kHz audio captures frequencies to 96 kHz, which no human hears and most speakers cannot produce. The genuine arguments for high-rate audio are about filter design headroom and processing during production, not about the captured content. Nyquist says 44.1 kHz already covers human hearing exactly, and treating the theorem as approximate is where a lot of audiophile marketing lives.

It does not apply to non-bandlimited signals, which is every real signal, strictly speaking. A signal of finite duration cannot be perfectly bandlimited — the two are Fourier-incompatible. So all real sampling has some aliasing, kept below the noise floor by filtering rather than eliminated. The theorem describes an idealization you approach, not a state you reach.

It does not require uniform sampling. Non-uniform and randomized sampling schemes achieve the same reconstruction at the same average rate, and randomized sampling has the useful property of turning aliases into broadband noise rather than coherent phantom signals. This is a real fix for the monitoring case: jitter your scrape interval and the phantom three-minute wave becomes noise you can see through instead of a pattern you chase.

Boundary

The theorem’s assumptions are where all the engineering lives:

  • Perfect bandlimiting — impossible; approximated by analog anti-aliasing filters with finite roll-off, which is what the guard band is for.
  • Infinite samples — impossible; approximated by windowed sinc interpolation, and the window’s shape is the entire subject of filter design.
  • Exact sample values — impossible; quantization adds noise, and the $\approx 6.02b + 1.76$ dB signal-to-noise ratio for $b$ bits is the other half of digital audio’s design.
  • Uniform timing — approximated; clock jitter converts to noise proportional to signal frequency, which is why high-frequency ADCs care about clock quality far more than low-frequency ones do.

For monitoring specifically, the practical rule falls straight out: to detect an event of duration $d$, sample at least every $d/2$. To characterize its shape, much faster. And if you cannot sample that fast, do not interpolate the gaps — switch to event-based instrumentation, where the system reports occurrences rather than being asked. Counters and histograms are aliasing-immune because they are not samples of a continuous signal at all, and that is the real reason they are preferred over gauges for anything bursty.