Convolution Calculator

Calculate the discrete convolution of two sequences with step-by-step visualization

Home Categories Math Convolution Calculator

Discrete Convolution: (x * h)[n] = Σ x[k] · h[n - k]

Enter comma-separated values for each sequence. Output length = len(x) + len(h) - 1

Enter numbers separated by commas

Enter numbers separated by commas

Quick Examples

Convolution Result: x * h

y[n] =

Output Length:

Input Sequence x[n]

Length:

Kernel h[n]

Length:

Step-by-Step Calculation

Output Sequence Values

Index (n) y[n]

Convolution Properties

Property Formula
Commutativity x * h = h * x
Associativity (x * h) * g = x * (h * g)
Distributivity x * (h + g) = x * h + x * g
Identity x * δ = x

If you like this calculator

Please help us simply by sharing it. It will help us a lot!

Share this Calculator

About Convolution Calculator

What is Convolution?

Convolution is a mathematical operation that combines two sequences (or signals) to produce a third sequence. It's fundamental in signal processing, image processing, and probability theory.

The Convolution Formula

The discrete convolution of two sequences x[n] and h[n] is defined as:

(x * h)[n] = Σ x[k] · h[n-k]

Where:

  • x[n] is the input sequence
  • h[n] is the impulse response (kernel)
  • y[n] is the output sequence
  • The sum is computed over all valid indices k

How Convolution Works

  1. Flip one sequence (usually h[k])
  2. Shift the flipped sequence by n positions
  3. Multiply corresponding elements
  4. Sum all the products
  5. Repeat for each output position

Properties of Convolution

Commutativity

x * h = h * x

Associativity

(x * h) * g = x * (h * g)

Distributivity

x * (h + g) = x * h + x * g

Identity

x * δ = x (where δ is the unit impulse)

Output Length

For two sequences of length M and N, the convolution result has length: Length = M + N - 1

Applications

  • Signal Processing: Filtering, system analysis
  • Image Processing: Edge detection, blurring, sharpening
  • Probability: Sum of independent random variables
  • Neural Networks: Convolutional layers in CNNs
  • Audio Processing: Reverb, echo effects

Example

For x = [1, 2, 3] and h = [1, 0, 1]:

  • y[0] = 1×1 = 1
  • y[1] = 1×0 + 2×1 = 2
  • y[2] = 1×1 + 2×0 + 3×1 = 4
  • y[3] = 2×1 + 3×0 = 2
  • y[4] = 3×1 = 3

Result: y = [1, 2, 4, 2, 3]