Skip to main content

Convolve {1, 2, 0, −1} and {2, 0, 2}

Short answer

Assuming both sequences start at n=0, convolution yields y[n] = {2, 4, 2, 2, 0, −2} for n = 0 to 5, obtained by tabular or direct summation.

Perform convolution sum of signal x[n] = {1, 2, 0, −1} and h[n] = {2, 0, 2}

No origin is marked, so take the first sample of each sequence at n=0n = 0: x[n]={1↑,2,0,−1}x[n] = \{\underset{\uparrow}{1}, 2, 0, -1\} for 0≤n≤30 \le n \le 3 and h[n]={2↑,0,2}h[n] = \{\underset{\uparrow}{2}, 0, 2\} for 0≤n≤20 \le n \le 2.

Convolution sum:

y[n]=∑kx[k] h[n−k]y[n] = \sum_{k} x[k]\,h[n-k]

Output range: starts at 0+0=00 + 0 = 0; length =4+3−1=6= 4 + 3 - 1 = 6, so 0≤n≤50 \le n \le 5.

Tabular method

Each row is one input sample times the shifted h[n]h[n]; add the columns:

Rown=0n=0n=1n=1n=2n=2n=3n=3n=4n=4n=5n=5
x[0] h[n]x[0]\,h[n]202
x[1] h[n−1]x[1]\,h[n-1]404
x[2] h[n−2]x[2]\,h[n-2]000
x[3] h[n−3]x[3]\,h[n-3]-20-2
y[n]y[n]24220-2

Check by direct calculation

  • y[0]=x[0]h[0]=1×2=2y[0] = x[0]h[0] = 1\times2 = 2
  • y[1]=x[0]h[1]+x[1]h[0]=0+4=4y[1] = x[0]h[1] + x[1]h[0] = 0 + 4 = 4
  • y[2]=x[0]h[2]+x[1]h[1]+x[2]h[0]=2+0+0=2y[2] = x[0]h[2] + x[1]h[1] + x[2]h[0] = 2 + 0 + 0 = 2
  • y[3]=x[1]h[2]+x[2]h[1]+x[3]h[0]=4+0−2=2y[3] = x[1]h[2] + x[2]h[1] + x[3]h[0] = 4 + 0 - 2 = 2
  • y[4]=x[2]h[2]+x[3]h[1]=0+0=0y[4] = x[2]h[2] + x[3]h[1] = 0 + 0 = 0
  • y[5]=x[3]h[2]=−1×2=−2y[5] = x[3]h[2] = -1\times2 = -2

Sum check: ∑y=(∑x)(∑h)=2×4=8\sum y = (\sum x)(\sum h) = 2 \times 4 = 8, and 2+4+2+2+0−2=82 + 4 + 2 + 2 + 0 - 2 = 8.

Answer:

y[n]={2↑, 4, 2, 2, 0, −2}y[n] = \{\underset{\uparrow}{2},\ 4,\ 2,\ 2,\ 0,\ -2\}

i.e. y[n]=2δ[n]+4δ[n−1]+2δ[n−2]+2δ[n−3]−2δ[n−5]y[n] = 2\delta[n] + 4\delta[n-1] + 2\delta[n-2] + 2\delta[n-3] - 2\delta[n-5].

(If xx and hh had different origins, the values stay the same and only the starting index shifts: start of yy = start of xx + start of hh.)

✓ Answer checked by Claude Opus 5.5 (high effort)

All Signals and Systems chapter 6 questions →