Signals & Systems

Convolution

Use this for “Convolve x[n] = {1, 2, 3} with h[n] = {1, 1, 2}.”

Diagram

x[k]−2−101234h[2 − k], flipped and shifted−2−101234x[k] h[2 − k]: add to 7−2−101234y[n] = Σ x[k] h[n − k]−2−101234
y[2] = 1 × 2 + 2 × 1 + 3 × 1 = 7
This is an example. Type your own values to start a new problem.
x[0]
Input at 0
example
x[1]
Input at 1
example
x[2]
Input at 2
example
h[0]
Impulse response at 0
example
h[1]
Impulse response at 1
example
h[2]
Impulse response at 2
example
y[0]
Output at 0
calculated
y[1]
Output at 1
calculated
y[2]
Output at 2
calculated
y[3]
Output at 3
calculated
y[4]
Output at 4
calculated
n
Output index shown
example

Formulas

y[0] = x[0] × h[0]
1 = 1 × 1
y[1] = x[0] × h[1] + x[1] × h[0]
3 = 1 × 1 + 2 × 1
y[2] = x[0] × h[2] + x[1] × h[1] + x[2] × h[0]
7 = 1 × 2 + 2 × 1 + 3 × 1
y[3] = x[1] × h[2] + x[2] × h[1]
7 = 2 × 2 + 3 × 1
y[4] = x[2] × h[2]
6 = 3 × 2

Assumptions

•
Both sequences are 0 outside n = 0, 1, 2, so y has 3 + 3 − 1 = 5 samples, at n = 0 to 4.
•
To find y[n], flip h, slide it n places to the right, multiply the samples that line up and add.
•
Check: the five output samples add to the sum of x times the sum of h.

Step-by-step

WE KNOW
x[0] = 1, x[1] = 2, x[2] = 3, h[0] = 1, h[1] = 1, h[2] = 2, n = 2
FIND
output at 0 (y[0]), output at 1 (y[1]), output at 2 (y[2]), output at 3 (y[3]), output at 4 (y[4])
Step 1 · Find output at 0 (y[0])
Use y[0] = x[0] × h[0]
Flip
h
and
slide
it
to
n
=
0:
only
one
pair
of
samples
lines
up,
so
y[0]
is
its
product.
y[0] = 1 × 1
y[0] = 1
Step 2 · Find output at 1 (y[1])
Use y[1] = x[0] × h[1] + x[1] × h[0]
Flip
h
and
slide
it
to
n
=
1:
multiply
the
two
pairs
of
samples
that
line
up,
then
add.
y[1] = 1 × 1 + 2 × 1
y[1] = 3
Step 3 · Find output at 2 (y[2])
Use y[2] = x[0] × h[2] + x[1] × h[1] + x[2] × h[0]
Flip
h
and
slide
it
to
n
=
2:
multiply
the
three
pairs
of
samples
that
line
up,
then
add.
y[2] = 1 × 2 + 2 × 1 + 3 × 1
y[2] = 4 + 3
y[2] = 7
Step 4 · Find output at 3 (y[3])
Use y[3] = x[1] × h[2] + x[2] × h[1]
Flip
h
and
slide
it
to
n
=
3:
multiply
the
two
pairs
of
samples
that
line
up,
then
add.
y[3] = 2 × 2 + 3 × 1
y[3] = 4 + 3
y[3] = 7
Step 5 · Find output at 4 (y[4])
Use y[4] = x[2] × h[2]
Flip
h
and
slide
it
to
n
=
4:
only
one
pair
of
samples
lines
up,
so
y[4]
is
its
product.
y[4] = 3 × 2
y[4] = 6
Check
Put the numbers back in. Both sides should match.
1 = 1 × 1 ✓
3 = 1 × 1 + 2 × 1 ✓
7 = 1 × 2 + 2 × 1 + 3 × 1 ✓
7 = 2 × 2 + 3 × 1 ✓
6 = 3 × 2 ✓
Topic check
See what you know: 5 questions on this topic
New questions each time. Pass to mark it complete.

More problem types

© 2026 SME. All rights reserved.