How to use the Discrete Convolution Calculator
- 1. Enter x[n]Comma separated. Mark n = 0 with ↑ or ^, or give the start index.
- 2. Enter h[n]For example 1, 2^, 1, −1.
- 3. ConvolveSee each y[n], the length rule, a sum check and the plots.
How discrete convolution works
The output of an LTI system is y[n] = Σ x[k]·h[n − k]. Flip h, slide it along x, multiply the overlapping samples and add. If x has L samples and h has M samples, y has L + M − 1 samples and starts at the sum of the two start indices. A quick check is Σy = Σx × Σh. Circular convolution of length N wraps the indices modulo N. It equals linear convolution only when N ≥ L + M − 1, and otherwise the tail folds back (time aliasing).
Worked example (Proakis): x[n] = {1↑, 2, 3, 1} and h[n] = {1, 2↑, 1, −1}. y starts at n = −1 and has 7 samples: y = {1, 4↑, 8, 8, 3, −2, −1}. For example y[0] = x[0]h[0] + x[1]h[−1] = 2 + 2 = 4. The sums check out: 21 = 7 × 3. The 4-point circular convolution of {2, 1, 2, 1} and {1, 2, 3, 4} is {14, 16, 14, 16}.
Exam tips
- Track the n = 0 marker carefully. Most mistakes are off by one.
- The tabular (multiplication) method is fast for short sequences: multiply like long multiplication without carrying.
- For circular convolution, use the matrix method: a circulant matrix of h times the x column.
- To get linear convolution from the DFT, zero-pad both sequences to at least L + M − 1.
Frequently asked questions
How do I mark the n = 0 sample?
Add ↑ or ^ after that number, for example 1, 2^, 3. You can also set the start index of each sequence.
What is the difference between linear and circular convolution?
Linear convolution gives L + M − 1 samples. Circular convolution keeps N samples and wraps the overflow back to the start. They match when N ≥ L + M − 1.
How many samples can I enter?
Up to 64 for each sequence. The working lists each y[n] for the first 40 outputs.
Is this tool free?
Yes. You fill in a short form once to see your result, and the other Uncodemy tools then open without it. All the maths runs in your browser.