The idea: a system is a box that turns one sequence into another

A discrete-time signal x[n] is a list of numbers, one for each integer n. A system T takes the whole input sequence and gives an output sequence y[n] = T{x}[n]. The page draws signals as stems: one vertical line per sample, with a dot at its value. Stems that are not drawn are 0, and every system starts at rest (all zero before the input arrives).

Four questions sort systems into useful groups: is it linear, time-invariant, causal, stable? When the first two answers are yes, the system is LTI, and then one output says everything: the reply to a single impulse.

Top: the impulse delta[n] goes into an LTI system T and h[n] comes out. Bottom: x = [1, 2, 3] goes into the same system and y = x * h = [1, 3, 6, 5, 3] comes out, for h = [1, 1, 1].
Measure the reply to one impulse, h[n], once; the reply to any input is then x * h.

Linear: the scale test

A system is linear when scaling and adding inputs scales and adds the outputs: T{a·x₁ + b·x₂} = a·T{x₁} + b·T{x₂}. The page checks the scaling half with two paths from the same x = [1, 2, 1]. Path 1 doubles x and then runs the system; path 2 runs the system and then doubles the output. A linear system gives the same stems either way.

For y[n] = x²[n] (Demo 1), path 1 gives T{2x} = [4, 16, 4] and path 2 gives 2·T{x} = [2, 8, 2]. Doubling the input made the output 4 times as big, so it is not linear. One failed case is enough to say no; passing the scale test alone does not prove linearity, because the adding half (superposition) must hold too. For the other four systems of the page both halves hold.

Time-invariant: the shift test

A system is time-invariant when a delayed input gives the same output, only delayed: if x[n] → y[n], then x[n−2] → y[n−2]. Path 1 delays x by 2 and runs the system; path 2 runs the system and delays the output.

y[n] = n·x[n] fails (Demo 2): path 1 gives n·x[n−2] = [2, 6, 4] at n = 2…4, path 2 gives y[n−2] = (n−2)·x[n−2] = [0, 2, 2]. The factor n is a clock built into the system, so the same input sample is multiplied by a different number depending on when it arrives.

Causal and BIBO stable

A system is causal when y[n] uses only x[k] with k ≤ n: the present and the past. y[n] = x[n+1] needs the next sample (Demo 3): at n = 1 it must output x[2], which has not arrived. Such a system is fine for stored data such as an image or a recorded file, but cannot run live.

A system is BIBO stable (bounded input, bounded output) when every input with |x[n]| ≤ M for all n gives an output with |y[n]| ≤ B for all n. One bad input is enough to fail. The unit step u[n] has |x| ≤ 1, yet y[n] = n·x[n] turns it into y[n] = n (Demo 4): 9 at n = 9, 1000 at n = 1000.

systemlineartime-invariantcausalBIBO stable
y[n] = 2x[n]✓✓✓✓, |y| ≤ 2
y[n] = x²[n]✗✓✓✓, |y| ≤ 1
y[n] = x[n−1]✓✓✓✓, |y| ≤ 1
y[n] = n·x[n]✓✗✓✗
y[n] = x[n+1]✓✓✗✓, |y| ≤ 1

The pure delay y[n] = x[n−1] passes all four tests (Demo 5). The property table on the canvas fills in as you run tests.

Impulse response and the convolution sum

The unit impulse δ[n] is 1 at n = 0 and 0 everywhere else. Its output h[n] = T{δ} is the impulse response. Any input is a sum of shifted, scaled impulses: x[n] = Σₖ x[k]·δ[n−k]. Time invariance turns each δ[n−k] into h[n−k], and linearity adds the scaled copies, so

y[n] = Σₖ x[k]·h[n−k] = (x * h)[n], the convolution sum.

To compute one y[n] by hand: flip h to h[−k], slide it n steps to the right to get h[n−k], multiply it with x[k] wherever both are nonzero, and add (Demo 6). With x = [1, 2, 3] and h = [1, 1, 1]: y[0] = 1·1 = 1, y[1] = 1·1 + 2·1 = 3, y[2] = 1 + 2 + 3 = 6, y[3] = 2 + 3 = 5, y[4] = 3. A length-3 input and a length-3 h give 3 + 3 − 1 = 5 samples, and Σy = Σx · Σh = 6 · 3 = 18 is a quick check.

Five rows for n = 0 to 4. Each row shows x[k] = 1, 2, 3 at k = 0, 1, 2 and the flipped h[n − k] slid to n, the overlapping samples, and the sum: 1, 3, 6, 5, 3.
Each output sample is one position of the flipped h: overlap, multiply, add.

The other choices of h show what a kernel does. h = [1, −1] gives the change since the last sample, [1, 1, 1, −3]. h = δ[n−2] gives x delayed by 2, [0, 0, 1, 2, 3]: convolving with a shifted impulse only shifts. The same flip-multiply-add on a 2-D grid of pixels is image filtering; see 2-D convolution with image kernels.

Difference equations: FIR and IIR

Most LTI systems in practice are written as a difference equation and solved one sample at a time, from rest. Feed in δ[n] and the output is h[n].

  • The 3-point moving average y[n] = (x[n] + x[n−1] + x[n−2]) / 3 uses only inputs. The impulse leaves its window after 3 samples, so h = [1/3, 1/3, 1/3] and then 0 forever: a finite impulse response (FIR) (Demo 7). Its coefficients are h itself. [1, 2, 3] * h = [1/3, 1, 2, 5/3, 1]: the edges ramp, the middle is the local average.
  • The feedback system y[n] = 0.5·y[n−1] + x[n] reuses its own last output. y[0] = 1, y[1] = 0.5, y[2] = 0.25, …, h[n] = 0.5ⁿ: it shrinks but never reaches 0, an infinite impulse response (IIR) (Demo 8). One multiply and one add per sample make an endless h.
Left: the moving average impulse response, three stems of 1/3 at n = 0, 1, 2, then zeros. Right: the feedback impulse response 0.5 to the n, stems 1, 0.5, 0.25, 0.125 and smaller, never zero.
No feedback: h stops after 3 samples (FIR). Feedback: h halves forever (IIR).

For an LTI system, BIBO stability has a simple test on h: Σ|h[n]| must be finite. The moving average has Σ|h| = 1; the feedback system has 1 + 0.5 + 0.25 + … = 2, so both are stable. With 2·y[n−1] instead, h = 2ⁿ grows and the system is unstable. Causality is just as easy: h[n] = 0 for n < 0.

Where this leads

The z-transform turns convolution into multiplication, Y(z) = X(z)·H(z), and reads stability off the poles of H(z); see z-transform, poles and zeros. Choosing h on purpose to keep some frequencies and remove others is filter design; see FIR and IIR filters. Where the samples come from, and what goes wrong when they are taken too slowly, is on sampling and aliasing. In the frequency domain convolution becomes a product of spectra, which is how the FFT computes long convolutions fast.

See also fast convolution with the DFT: circular vs linear convolution and overlap-add in blocks.

See also FIR and IIR filters, which runs a moving average and a feedback filter on a noisy sine and compares what they do to each frequency.

What the page leaves out

Only finite, real-valued signals between n = −3 and n = 9 are drawn; the endless step and 0.5ⁿ are cut at the edge. The linearity test checks scaling by 2 only, not the adding half or other factors. The page does not prove the stability rule Σ|h| < ∞, does not cover continuous-time systems and the convolution integral, initial conditions other than rest, circular convolution, or fast convolution with the FFT.

On the mind map

Open the Geometric Algorithms mind mapGeometricAlgorithmsTransform matrices: multiply each vertex by a matrixTransform matricesCoordinate frames: same point, different framesCoordinate framesHulls and curves: cross products and lerpsHulls and curvesRendering: which pixel shows whatRenderingFourier and DCT: a signal as a sum of wavesFourier and DCTTriangulations: mesh a point setTriangulationsSegments and polygons: lines, crossings, regionsSegments and polygonsFourier series and FFTFourier series and FFTcircles add up; FFT is O(n log n)Z-Transform Poles and ZerosZ-Transform Poles and ZerosStable: every pole inside the unit circleFIR and IIR filtersFIR and IIR filtersFIR: taps, linear phase; IIR: feedback, poleDiscrete LTI systemsy = x * h: flip, slide, multiply, addDFT Leakage and WindowsDFT Leakage and WindowsWhole cycles: one bin; else leakageJPEG DCTJPEG DCTcosine coefficients, round most to zeroSampling and aliasingSampling and aliasingabove fs/2 a wave folds into a slower aliasOpen the Geometric Algorithms mind mapGeometric Algorithmsa signal as a sum of wavesFourier and DCTFourier series and FFTFourier series and FFTcircles add up; FFT is O(n log n)Z-Transform Poles and ZerosZ-Transform Poles and ZerosStable: every pole inside the unit circleFIR and IIR filtersFIR and IIR filtersFIR: taps, linear phase; IIR: feedback, poleDiscrete LTI systemsy = x * h: flip, slide, multiply, addDFT Leakage and WindowsDFT Leakage and WindowsWhole cycles: one bin; else leakageJPEG DCTJPEG DCTcosine coefficients, round most to zeroSampling and aliasingSampling and aliasingabove fs/2 a wave folds into a slower alias
This page on the Geometric Algorithms mind map · 32 pages in 7 branches · open it to see the whole map and test yourself in recall mode.