This Demonstration shows the effect of filtering followed by downsampling (sometimes also called subsampling or decimation), on a discrete-time sequence and its discrete-time Fourier transform (DTFT) spectrum. Downsampling by a factor of removes every sample from a discrete-time sequence. This contraction in time results in an expansion in frequency, necessitating filtering prior to downsampling.
The three sets of controls let you vary the the path of the input sequence. If neither the filter nor the downsampler is chosen, the sequence goes through the system unchanged. Choosing "filter" shows the effect of filtering on the input sequence. Choosing "downsampler" shows the effect of downsampling on the input sequence. Choosing both filter and the downsampler shows the effect of downsampling a filtered input sequence (this is done only for ). The input sequence/spectrum is shown in black, the output sequence/spectrum in red. The top two graphics show the selected half-band filter in purple (low-pass/high-pass and the choice of Haar, Daubechies 4, Daubechies 6, or a simple symmetric pair) and its magnitude response. Turning on "envelope" shows the envelopes of the sequences.
The bottom left graphic shows the input sequence (black stems) and the output sequence (red stems). Changing the period or support changes the sequence. As the downsampling factor increases, the length of the downsampled sequence decreases. An interesting case is a period of 2 because the sequence is then the highest-frequency discrete-time sequence (alternating ones and minus ones). Downsampling by 2 changes the nature of the sequence as it removes all minus ones, leaving the lowest-frequency discrete-time sequence.
The bottom right graphic shows the magnitudes of the DTFT spectra of the input (black plot) and output (red plot) sequences. As the downsampling factor increases, the support of the downsampled sequence spectrum increases. Because downsampling contracts any variations in the original sequence, in general, the spectrum of the downsampled sequence contains higher frequencies than the spectrum of the original sequence.
Multirate signal processing is at the heart of most modern compression systems and standards, including JPEG, MPEG, and so on. Multirate refers to the fact that different sequences may have different time scales. One of the basic operations in multirate signal processing is downsampling.
Given a sequence , its downsampled-by- version is
Downsampling is only periodically shift invariant, since shifting the sequence by will not necessarily lead to the downsampled output shifted by .
If is the DTFT spectrum of , then
is the DTFT spectrum of . The shifted versions of present in the output spectrum, , are called "aliased" versions (ghost images). The shifting of the input spectrum as well as stretching of frequencies can create frequency content not present in the original spectrum. Filtering prior to downsampling ensures that filtered part of the input spectrum is preserved after downsampling.
 M. Vetterli, J. Kovačević, and V. K. Goyal, Signal Processing: Foundations, Cambridge: Cambridge University Press, forthcoming. www.fourierandwavelets.org.