Introduction to Discrete Convolution
Discrete convolution can look abstract until you picture the overlap: one finite sequence is shifted across another, the matching terms are multiplied, and those products are added to produce a single output sample. That simple sum-of-products rule appears in digital filtering, system response modeling, and the distribution of sums of independent discrete outcomes. This calculator is aimed at the moments when you want the answer for a short pair of sequences without working through every shift by hand.
This page treats the first number you enter as index 0 in a finite sequence, then computes the linear convolution of Sequence A and Sequence B exactly as written. The explanation below stays close to the calculator’s behavior so you can read the output in context: what each input list means, why the result has length N + M − 1, how leading zeros represent delays, and how to translate the result into either signal-processing or probability language.
What Discrete Convolution Means Here
In discrete convolution, the same pair of sequences are combined repeatedly while one is shifted through every overlap position. In signal processing that operation is often called discrete-time convolution, and in probability it is the tool for combining independent distributions. When Sequence A and Sequence B are finite lists, the convolution output captures how every possible overlap contributes to the final sequence.
On this page the calculator performs the full discrete convolution for you, then prints the output values in order. That makes it useful both as a check on hand work and as a way to see which pairings of entries are responsible for each output sample.
Discrete Convolution Formula and Notation
We will use standard bracket notation for finite sequences in the discrete-convolution calculator. Let a[n] be Sequence A, b[n] be Sequence B, and y[n] be the output sequence produced by their convolution.
The discrete convolution of two sequences is defined by
To compute one output sample y[n], the calculator adds every product a[k] · b[n − k] for which both indices refer to values inside the entered lists. Outside the typed range, the sequences are treated as zero, which is why the operation is often described as a slide-and-overlap calculation. Each shift changes the aligned terms and therefore changes the sum.
A helpful way to picture the formula is to imagine Sequence B being reversed and moved across Sequence A one position at a time. The earliest output samples use only a small overlap, the middle samples usually combine the most terms, and the last samples taper down again. For short sequences, that pattern is easy to verify manually, and the calculator mirrors the same direct time-domain arithmetic.
If Sequence A has length N and Sequence B has length M, the convolution result always has length N + M − 1. The first output corresponds to n = 0, and the last output corresponds to n = N + M − 2. That length rule is a quick way to check that the output has the expected number of samples.
How to Use This Discrete Convolution Calculator
The discrete convolution calculator is built for short numeric lists that you would normally inspect by hand. It is especially handy when you want an exact answer quickly while still seeing how the overlap produces it.
Enter Sequence A as a list such as 1, 2, 3, then enter Sequence B as another list such as 4, 5. After you click the button, the tool computes the linear convolution and displays the samples from index 0 onward. Each value in the result is one output sample y[n].
Convolution is commutative in the numerical sense, so a * b and b * a produce the same values, but the physical meaning can differ. In a signal-processing problem, Sequence A may be the input and Sequence B the filter or impulse response. In a probability problem, the two lists may be probability mass functions whose sum distribution you want to inspect. Using the fields consistently keeps the answer meaningful.
Input Format for Sequence A and Sequence B
The calculator accepts straightforward numeric input for discrete convolution. Commas work well, spaces work too, and the parser accepts integers, decimals, and negative values, so entries such as 1, -2.5, 3 or 0 1 0 1 are valid. Anything you type is treated as the nonzero portion of a finite sequence, with every index outside the entered list implicitly set to zero.
The indexing convention is important for interpreting Sequence A and Sequence B. The first value in each list is treated as index 0, the next value as index 1, and so on. That is why the output begins at n = 0. If you need a delayed sequence or a shift that starts later, insert leading zeros before the first nonzero term.
All entries must be numeric. If a token cannot be read as a number, the calculator returns an error instead of a convolution result. That rule keeps the sum-of-products calculation unambiguous.
Worked Example: Step-by-Step Convolution
The discrete convolution example below uses short lists so you can follow every overlap step.
a[n] = [1, 2, 3]b[n] = [4, 5]
Here, N = 3 and M = 2, so the result will have length 3 + 2 − 1 = 4. We compute y[n] = (a * b)[n] for n = 0, 1, 2, 3.
For n = 0, only the first entries overlap, so y[0] = 1 · 4 = 4. For n = 1, there are two overlapping products: 1 · 5 + 2 · 4 = 13. For n = 2, the overlap shifts again, giving 2 · 5 + 3 · 4 = 22. Finally, for n = 3, only the last entries overlap, so y[3] = 3 · 5 = 15.
The final convolution result is therefore y[n] = [4, 13, 22, 15]. If you type 1, 2, 3 into Sequence A and 4, 5 into Sequence B, the calculator will display those same four output values. This is a good example of how the overlap grows, reaches a fuller middle region, and then tapers off at the end.
How to Interpret the Discrete Convolution Result
The values shown in the result area are the output samples of the discrete convolution, listed in index order. The first value is y[0], the second is y[1], and so on. If you are using the calculator for signal processing, each entry is a sample of the filtered output. If you are using it for probability, each entry is the probability assigned to the corresponding summed outcome, assuming the inputs are valid probability mass functions.
A quick sanity check is to compare the shape of the output with the shapes of the inputs. Nonnegative inputs should produce nonnegative outputs. If one sequence contains negative values, some output samples can shrink through cancellation or even change sign. Reading the result this way helps you catch input mistakes and understand which overlaps are contributing most.
Applications of Discrete Convolution in Signal Processing and Probability
Discrete convolution is useful because the same sum-of-products formula explains both filtering and the addition of discrete random variables. The calculator above lets you see that shared structure in a small, inspectable example.
Digital Signal Processing
In digital signal processing, discrete convolution models the output of a linear time-invariant system when a finite input sequence passes through a finite impulse response. Sequence A can represent an input signal, Sequence B can represent a finite impulse response or filter kernel, and the result is the filtered output. A short moving-average filter, for instance, smooths sudden variations because each output sample blends nearby input samples according to the filter coefficients.
This is one reason discrete convolution appears so often in introductory signals courses. It links a compact system description, the impulse response, to a concrete output sequence. Even when software does the arithmetic, understanding the direct convolution sum helps you reason about delay, smoothing, accumulation, and the effect of coefficient signs.
Discrete Probability
In probability, the same discrete-convolution formula combines the mass functions of independent random variables. If a[n] and b[n] are PMFs, then their convolution gives the PMF of the sum of those variables. For example, if you convolve the PMFs for two small dice-like experiments, the output tells you how likely each summed result is.
The same formula is doing the work in both contexts. The difference is interpretation. In one case you are adding weighted signal contributions over time. In the other, you are adding probabilities for combinations of independent outcomes that lead to the same sum.
Comparison: Signal-Processing vs Probability Interpretations
How the same discrete convolution formula is interpreted in two common settings| Aspect | Signal Processing View | Probability View |
|---|
| Sequences | a[n] is an input signal and b[n] is an impulse response or filter. | a[n] and b[n] are probability mass functions. |
Meaning of y[n] | Output signal of an LTI system at time index n. | Probability that the sum of two independent variables equals the outcome indexed by n. |
| Typical values | Any real numbers, including negatives and decimals. | Usually nonnegative values that sum to 1 when the PMFs are normalized. |
| What convolution models | How a system filters or shapes an input sequence. | How independent random variables add together. |
| When this calculator helps | Checking hand calculations for small FIR filters or studying discrete-time convolution directly. | Computing distributions of sums for small discrete random variables. |
Limitations of This Discrete Convolution Calculator
This discrete convolution calculator is deliberately focused on clarity and short finite sequences. It handles one-dimensional numeric lists only, so it does not support symbolic expressions, complex numbers, infinite sequences, or multidimensional convolution. Very large inputs are also outside its intended use because the results are easiest to inspect when the lists are short enough to read at a glance.
The method used here is direct linear convolution in the time domain. For long real-world signals, fast Fourier transform methods are often used for speed, but the mathematical meaning of the result is the same. When you use the calculator for probability, remember that it does not normalize the entries for you, so the numbers should already represent valid probability mass functions if that matters in your problem.
Frequently Asked Questions About Discrete Convolution
What does discrete convolution mean in this calculator?
Discrete convolution combines two finite sequences by multiplying overlapping terms and adding those products for each shift. In this calculator, Sequence A and Sequence B are treated as zero outside the values you type, so the output is the full linear convolution of the lists you entered.
How is discrete convolution different from continuous convolution?
Discrete convolution uses integer-indexed sequences and sums, while continuous convolution uses functions of a real variable and integrals. This page handles only discrete convolution of finite sequences.
What is the output length?
If Sequence A has length N and Sequence B has length M, the output has length N + M − 1. The indices run from 0 through N + M − 2.
How do I represent a shift or negative index?
The first entered value is treated as index 0. To model a delayed sequence or a later starting point, add leading zeros before the first nonzero value. That preserves the indexing convention while still letting you represent shifts.
When is this calculator useful?
Use this calculator when you need a quick, accurate discrete convolution for short lists and want to see how each overlap contributes. It is useful for homework checks, small filter examples, and combining discrete probability distributions.