---
title: "Graphical convolution of two rectangles"
subject: "Digital Signal Analysis and Processing"
chapter: 1
key: "semester_7/digital_signal_analysis_and_processing:convolution-graphical-rect"
source: https://www.bctengineer.com/q/semester_7/digital_signal_analysis_and_processing/convolution-graphical-rect
site: BCT Engineering
---

# Graphical convolution of two rectangles

Digital Signal Analysis and Processing · Chapter 1: Discrete Time Signals and Systems

- Asked in: 2071 Shrawan, 5 marks
- Video: [Convolution in 5 Easy Steps](https://www.youtube.com/watch?v=aMaw4EumwyE) — Iain Explains Signals, Systems, and Digital Comms
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/digital_signal_analysis_and_processing/convolution-graphical-rect
- Whole chapter: https://www.bctengineer.com/md/semester_7/digital_signal_analysis_and_processing/chapter-1

## Question

A discrete time LTI system has input signal x[n] = 1 for −1 ≤ n ≤ 1 (0 elsewhere) and impulse response h[n] = 1 for −1 ≤ n ≤ 1 (0 elsewhere). Find the output of the system using the graphical method.

## Short answer

Graphical convolution of two length-3 pulses (from −1 to 1) gives a triangular output: y[n] = {1,2,3,2,1} for n=−2,…,2. The sum of products of overlapped samples yields maximum 3 at n=0.

## Answer

The output is the convolution sum y[n] = Σ x[k] h[n − k].

**Signals:** x[k] = 1 for k = −1, 0, 1; h[k] = 1 for k = −1, 0, 1.

**Graphical method:**
1. Plot x[k] and h[k] against k.
2. Fold h[k] about k = 0 to get h[−k] (here it is symmetric, so it is unchanged).
3. Shift it by n to get h[n − k].
4. Multiply x[k] · h[n − k] point by point and add all the products. This sum is y[n].
5. Slide (change n) and repeat.

h[n − k] is non-zero for k = n − 1, n, n + 1. Overlap with x[k] (k = −1 … 1):

| n | Non-zero h[n−k] at k | Overlap with x | y[n] |
|---|---|---|---|
| ≤ −3 | n−1 … n+1 | none | 0 |
| −2 | −3, −2, −1 | k = −1 | 1 |
| −1 | −2, −1, 0 | k = −1, 0 | 2 |
| 0 | −1, 0, 1 | k = −1, 0, 1 | 3 |
| 1 | 0, 1, 2 | k = 0, 1 | 2 |
| 2 | 1, 2, 3 | k = 1 | 1 |
| ≥ 3 | – | none | 0 |

```text
 y[n]
  3 |          o
  2 |       o  |  o
  1 |    o  |  |  |  o
  0 +-o--+--+--+--+--+--o-- n
     -3 -2 -1  0  1  2  3
```
**Answer:** y[n] = {1, 2, **3**, 2, 1} for n = −2 … 2 (the bold centre sample 3 is at n = 0).

**Check:** Σy = 9 = (Σx)(Σh) = 3 × 3. The output length is 3 + 3 − 1 = 5.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. The output of an LTI system is
   A. y[n] = x[n] h[n]
   B. y[n] = x[n] + h[n]
   C. y[n] = sum of x[k] h[n-k]
   D. y[n] = sum of x[k] h[k]
   Answer: C. The convolution sum folds and shifts h, multiplies by x and adds. (Key point: Convolution sum)

2. The correct order of the graphical method is
   A. Shift h, multiply, fold, add
   B. Fold h[k] to get h[-k], shift by n, multiply with x[k], add
   C. Add x and h, then fold
   D. Multiply x and h, then shift the result
   Answer: B. Fold, shift by n, multiply point by point, sum, then slide. (Key point: Graphical steps)

3. What is y[0] for two 3-sample rectangles of ones?
   A. 3
   B. 1
   C. 2
   D. 9
   Answer: A. At n = 0 all three samples overlap, giving 1+1+1 = 3. (Key point: Peak value)

4. The output y[n] is
   A. {1, 1, 1} for n = -1 ... 1
   B. {1, 2, 3, 3, 2, 1} for n = -2 ... 3
   C. {3, 3, 3} for n = -1 ... 1
   D. {1, 2, 3, 2, 1} for n = -2 ... 2
   Answer: D. Length 3+3-1 = 5, symmetric triangle centred at n = 0, sum 9 = 3 x 3. (Key point: Final result)

## Related in Digital Signal Analysis and Processing

- [LTI output for 2δ(n) − δ(n−1) input](https://www.bctengineer.com/question.md?key=semester_7%2Fdigital_signal_analysis_and_processing%3Alti-output-impulse-input) — Digital Signal Analysis and Processing, chapter 1
- [LTI output, h[n]=(1/2)^n window](https://www.bctengineer.com/question.md?key=semester_7%2Fdigital_signal_analysis_and_processing%3Alti-output-exp-window-1) — Digital Signal Analysis and Processing, chapter 1, asked 4×
- [LTI output, h[n]=(1/3)^n window](https://www.bctengineer.com/question.md?key=semester_7%2Fdigital_signal_analysis_and_processing%3Alti-output-exp-window-2) — Digital Signal Analysis and Processing, chapter 1, asked 4×
- [LTI output with sparse samples, verify](https://www.bctengineer.com/question.md?key=semester_7%2Fdigital_signal_analysis_and_processing%3Alti-output-sparse-samples) — Digital Signal Analysis and Processing, chapter 1, asked 4×
- [LTI output for h=2u[n]−2u[n−4]](https://www.bctengineer.com/question.md?key=semester_7%2Fdigital_signal_analysis_and_processing%3Alti-output-step-difference) — Digital Signal Analysis and Processing, chapter 1, asked 4×
- [Output for 5e^(jπn/3) input](https://www.bctengineer.com/question.md?key=semester_7%2Fdigital_signal_analysis_and_processing%3Alti-output-exp-pi3) — Digital Signal Analysis and Processing, chapter 3, asked 2×

## Related in other subjects

- [Define LTI system and impulse response](https://www.bctengineer.com/question.md?key=semester_5%2Fdata_communication%3Alti-impulse-response-define) — Data Communication, chapter 2, asked 2×
- [Periodic and non-periodic signals; LTI output is convolution](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Aperiodic-nonperiodic-convolution) — Communication Systems, chapter 1
- [LTI output for h(t)=e^(-2t), rectangular input](https://www.bctengineer.com/question.md?key=semester_5%2Fdata_communication%3Alti-output-rect-input) — Data Communication, chapter 2, asked 3×
- [LTI system output in time domain](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Alti-output-time-domain) — Communication Systems, chapter 1
