Convolution: Continuous and Discrete With easy examples.
Convolution is the mathematical operation that computes the output of an LTI system from any input. The idea: any input can be seen as a chain of tiny impulses, each impulse produces a scaled, shifted copy of the system's impulse response, and the output is the sum of all those copies. The continuous-time form is an integral; the discrete-time form is a sum.
Convolution matters because it is the universal input-output law for LTI systems. Filters filter by convolution, reverberation is convolution of sound with a room's impulse response, and the probability distribution of a sum of random variables is the convolution of their distributions. Once you can convolve, you can predict any LTI system's behavior for any input.
Key Concepts
- Impulse response h: the system's output for a unit impulse input; the "fingerprint" used in every convolution.
- Continuous convolution: y(t) = integral over all tau of x(tau) x h(t - tau) d(tau) — flip h, shift by t, multiply with x, integrate.
- Discrete convolution: y[n] = sum over k of x[k] x h[n - k] — the same idea with sums instead of integrals.
- Graphical steps: flip one sequence, slide it past the other one step at a time, multiply overlapping samples and add.
- Properties: commutative (x * h = h * x), associative, distributive over addition. Convolution with the unit impulse returns the signal itself: x * delta = x.
- Length rule (discrete): convolving a length-M sequence with a length-N sequence gives length M + N - 1.
Formulas
- Continuous: y(t) = integral from -infinity to infinity of x(tau) h(t - tau) d(tau).
- Discrete: y[n] = sum from k = -infinity to infinity of x[k] h[n - k]. For causal finite sequences starting at 0: y[n] = sum from k = 0 to n of x[k] h[n - k].
- Unit impulse sifting: x(t) * delta(t) = x(t); x[n] * delta[n] = x[n].
- Differentiation property: d/dt (x * h) = (dx/dt) * h = x * (dh/dt) — derivatives can hop onto either factor.
Worked Example
Convolve the discrete sequences x = [1, 2, 3] and h = [1, 1] using the flip-shift-multiply-add method.
- Length check: 3 + 2 - 1 = 4 output samples, y[0] through y[3].
- y[0] = x[0] x h[0] = 1 x 1 = 1.
- y[1] = x[0] x h[1] + x[1] x h[0] = 1x1 + 2x1 = 3.
- y[2] = x[1] x h[1] + x[2] x h[0] = 2x1 + 3x1 = 5.
- y[3] = x[2] x h[1] = 3 x 1 = 3.
Result: y = [1, 3, 5, 3]. Each output sample is a weighted sum of input samples — here h = [1, 1] acts as a 2-point moving averager (up to scaling), smoothing the input [1, 2, 3] into [1, 3, 5, 3].
Common Misconceptions
- "Convolution is just multiplication." No — it is a flip, shift, multiply and sum/integrate operation. Multiplication happens in the frequency domain: convolution in time equals multiplication of transforms.
- "The order matters." Convolution commutes, so x * h = h * x always. The flip step looks asymmetric, but the result is symmetric.
- "Convolution only applies to signals." It appears wherever independent contributions add up: probability (sums of random variables), optics (image blurring), and even polynomial multiplication (coefficients convolve).
Real-World Applications
- Digital filters: FIR filters literally compute a convolution sum in real time.
- Audio effects: reverb plugins convolve dry audio with measured room impulse responses.
- Image processing: blur, sharpen and edge-detection kernels are 2-D convolutions.
- Communications: the received signal is the transmitted signal convolved with the channel impulse response.
- Machine learning: convolutional neural networks are named after this exact operation applied to images.
Convolution answers one question: given the system's impulse response, what comes out for any input? Flip, shift, multiply and accumulate — in an integral for continuous time, in a sum for discrete time. It is commutative, associative, and it is the reason LTI systems are completely described by a single impulse response.
Related blogs
- Signal classification: continuous/discrete,
- LTI Systems: Properties and Analysis With easy examples.
- Fourier Series and Fourier Transform With easy examples.
- Laplace Transform and Applications With easy examples.
- Z-Transform and Applications: Complete Beginner's Guide
- Sampling Theorem and Aliasing: Complete Beginner's Guide