Convolution Calculator
Calculate discrete convolution of two sequences with step-by-step solutions
Calculate Discrete Convolution
First Sequence (a)
Current sequence: [1, 2, 3]
Second Sequence (b)
Current sequence: [4, 5, 6]
Convolution Results
Convolution: a * b
Step-by-Step Calculation
Convolution Formula
For each term cn, we sum products where the indices add up to n.
Worked Example
Problem
Calculate the convolution of sequences [1, 2, 3] and [4, 5, 6]
Given:
Sequence a = [1, 2, 3]
Sequence b = [4, 5, 6]
Solution
c₀: 1 × 4 = 4 = 4
c₁: 1 × 5 + 2 × 4 = 5 + 8 = 13 = 13
c₂: 1 × 6 + 2 × 5 + 3 × 4 = 6 + 10 + 12 = 28 = 28
c₃: 2 × 6 + 3 × 5 = 12 + 15 = 27 = 27
c₄: 3 × 6 = 18 = 18
Final Result: [4, 13, 28, 27, 18]
Quick Actions
Convolution Properties
Commutative
a * b = b * a
Associative
(a * b) * c = a * (b * c)
Distributive
a * (b + c) = a * b + a * c
Applications
Signal Processing
Filter design, audio processing
Probability Theory
Sum of random variables
Image Processing
Blurring, edge detection
Physics
Wave analysis, acoustics
Understanding Convolution
What is Convolution?
Convolution is a mathematical operation that combines two sequences to produce a third sequence. It's denoted by the star symbol (∗), so convolving sequences a and b is written as a∗b.
The Formula
To get the nth term of the convolution, we compute products of terms whose indices sum to n, then add them together.
Step-by-Step Process
- For c₀: multiply a₀ × b₀
- For c₁: compute a₀×b₁ + a₁×b₀
- For c₂: compute a₀×b₂ + a₁×b₁ + a₂×b₀
- Continue this pattern for all terms
Key Applications
Signal Processing
Used to apply filters to signals. If you know a system's impulse response, convolution predicts the output for any input.
Probability Theory
The probability density function of the sum of two independent random variables is the convolution of their individual PDFs.
Image Processing
Convolution with different kernels can blur, sharpen, or detect edges in images.
Unit Element
The unit element (identity) for convolution is [1, 0, 0, 0, ...]. Convolving any sequence with this returns the original sequence unchanged.
Convolution vs. Other Operations
Convolution (∗)
Combines sequences by shifting and multiplying
c[n] = Σ a[k]b[n-k]
Output length: len(a) + len(b) - 1
Element-wise Product
Multiplies corresponding elements
c[n] = a[n] × b[n]
Output length: min(len(a), len(b))
Dot Product
Single scalar result
result = Σ a[i] × b[i]
Output: single number
Mathematical Properties
Commutativity
The order doesn't matter:
Associativity
Grouping doesn't matter:
Distributivity
Convolution distributes over addition: