The Sampling Theorem
Sample fast enough to rebuild the signal
The gold curve is the continuous signal; the bright dots are samples taken at regular intervals. When the sampling rate fs is slower than twice the signal frequency (Nyquist), a red impostor of lower frequency appears passing through the very same dots. From the samples alone you cannot tell the two apart, so the original is lost. Raise fs to pack the samples closer until the red impostor vanishes. Below is the same story seen on the frequency axis.
Sample faster than twice
The sampling theorem says: if a signal’s frequency content all lies below fmax (band-limited), then when the sampling rate fs is faster than 2·fmax, the samples alone let you rebuild the original continuous signal with no error. 2·fmax is called the Nyquist rate. The intuition is simple: to follow one oscillation you must catch a crest and a trough, that is at least two points per cycle, before the samples can track that wiggle. With fewer than two, a fast oscillation slips by unseen between the samples.
Too slow, and frequencies fold
Sampling makes the signal’s spectrum repeat identically at every integer multiple of the sampling rate fs. If the original content sits at ±fmax, copies appear in a row centered at ±fs, ±2fs, and so on. When fs is larger than 2·fmax there is a gap between these copies, and the original content can be picked out cleanly. But once fs drops below 2·fmax, a neighboring copy overlaps the original. Then any content above fs/2 (the folding frequency) folds down below it, and an oscillation at fmax masquerades as a lower frequency like |fmax − fs|. This is aliasing, and the red impostor on the first screen is exactly that folded frequency.
Reconstruction and the anti-alias filter
If you sampled while honoring the Nyquist condition, reconstruction is finished by spreading each sample into a sinc shape and adding them all up. This is the same as an ideal low-pass filter cutting away the copies above fs/2 and keeping only the original band. The trouble comes when a real signal is not perfectly band-limited, or noise adds content above fs/2. Sampling it as is folds that high content down and corrupts the signal for good. So before sampling, an anti-aliasing filter trims away everything above fs/2 in advance. Aliasing once folded cannot be undone after sampling, so the prevention must always come before the samples are taken.
Back to the first screen
With the sampling rate fs slow, fewer than two samples landed in each cycle, and a red impostor appeared passing through the same dots. From the samples alone the original could not be told from the impostor. Raising fs above twice the signal frequency put more than two samples in each cycle, and the copies on the frequency axis pulled apart so the red impostor vanished. The band-limited signal through the samples was pinned to the single original. Whether the sampling rate clears twice the signal’s highest frequency was what split losing the signal from rebuilding it.
You saw that when the sampling rate falls short, a high frequency folds down into a low one. The next unit, aliasing, looks at this fold more closely. Video where a wheel seems to spin backward, the moiré patterns in digital photos, a sound that drifts off pitch — all are the same fold wearing different faces. Taking the folding frequency fs/2 as a mirror, we watch how frequencies bounce back in, and what an anti-aliasing filter does in front of that mirror.