Convolution blends two sequences: it multiplies polynomials, smooths signals with moving averages, blurs and sharpens images, gives the distribution of the sum of two dice and is the core operation of convolutional neural networks.
How to use the Convolution Calculator
- Sequence a (comma-separated)
- Sequence b (comma-separated)
Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.
How it works
Enter both sequences as comma-separated numbers. Each output term is the sum of the products of terms whose indices add up to n.
Tips
- Write out the first few terms to check the pattern before using a formula.
- Decide whether the sequence starts at term 0 or term 1 – formulas differ by one place.
- Arithmetic sequences add a constant; geometric sequences multiply by one.
- An infinite geometric series only has a sum when |r| < 1.
Common mistakes to avoid
- Off-by-one errors in the term number.
- Using the arithmetic sum formula for a geometric sequence.
- Ignoring the sign of a negative ratio or difference.
Formula
cₙ = Σₖ aₖ·bₙ₋ₖ, length = len(a) + len(b) − 1Worked example
Inputs — Sequence a (comma-separated): 1, 2, 3; Sequence b (comma-separated): 0, 1, 0.5.
Results — a ∗ b = 0, 1, 2.5, 4, 1.5; Length = 5; Terms = c₀ = 1·0 = 0
c₁ = 1·1 + 2·0 = 1
c₂ = 1·0.5 + 2·1 + 3·0 = 2.5
c₃ = 2·0.5 + 3·1 = 4
c₄ = 3·0.5 = 1.5.
Key terms
- Convolution
- A sum of products with reversed indices.
Frequently asked questions
How is convolution related to polynomial multiplication?
Multiplying polynomials convolves their coefficient lists.
Is convolution commutative?
Yes, a ∗ b = b ∗ a.
What is the convolution of two dice distributions?
The distribution of their sum.
What is the length of the result?
len(a) + len(b) − 1.
What formula does the Convolution Calculator use?
cₙ = Σₖ aₖ·bₙ₋ₖ, length = len(a) + len(b) − 1.