Convolution Visualizer, Step by Step
Enter x[n] and h[n], then move the slider. Each step shows h[n − k] under x[k], the products that overlap, and the output sample they add up to.
y[2] = 2 × 1 + 3 × 1 = 5
y = [1, 3, 5, 3], length 3 + 2 − 1 = 4.
The formulas
For each n, flip h, shift it by n, multiply sample by sample with x, and add.
Both sequences start at n = 0 here, so y does too.
Worked example: [1, 2, 3] convolved with [1, 1]
- y[0] = 1 × 1 = 1 (only x[0] overlaps h[0]).
- y[1] = 1 × 1 + 2 × 1 = 3.
- y[2] = 2 × 1 + 3 × 1 = 5.
- y[3] = 3 × 1 = 3, so y = [1, 3, 5, 3], with length 3 + 2 − 1 = 4.
- h = [1, 1] adds each sample to the one before it: a two-point moving sum.
- Convolution is commutative: swapping x and h gives the same y.
- Convolving with a shifted impulse [0, 0, 1] just delays x by two samples.