Maths Formulae Transforms Convolutions

Convolutions – Integral Transform Techniques

Understand convolution in the context of Fourier and Laplace transforms for analyzing signal interactions.
🔑

Definition of Convolution

Convolution is the fundamental mathematical operation that describes how the shape of one function is modified by another. It represents the process of 'sliding' one function over another, calculating the integral of their product at each position. In signal processing and systems analysis, convolution describes how the present output of a system depends on the entire history of its inputs, weighted by the system's own characteristic 'impulse response'.

SymbolDescription
`f(t), g(t)`The two input functions being convolved.
`(f * g)(t)`The convolution result, which is a new function of `t`.
`τ`The dummy variable of integration, representing the 'slide'.
`h(t)`The Impulse Response of a system, defining its characteristic behavior.
`x(t)`The input signal to a system.
`y(t)`The output signal from a system, given by `x(t) * h(t)`.
📏

Key Convolution Formulas

\[ (f * g)(t) = \int_{-\infty}^{\infty} f(\tau) g(t - \tau) d\tau \]
Continuous Convolution
\[ (f * g)[n] = \sum_{k=-\infty}^{\infty} f[k] g[n - k] \]
Discrete Convolution
\[ y(t) = x(t) * h(t) = \int_{-\infty}^{\infty} x(\tau) h(t - \tau) d\tau \]
Linear System Output
🎨

Visualizing Convolution

f(τ) g(τ) = h(t) (f ⊛ g)(t) = ∫ f(τ) g(t−τ) dτ Rect ⊛ Rect → Triangle
Fourier Convolution: convolving two rectangular pulses produces a triangular waveform

Convolution is best understood visually as a 'flip, slide, multiply, and integrate' process. To compute `(f * g)(t)`:

  1. Keep one function fixed: Place `f(τ)` on an axis.
  2. Flip the second function: Take `g(τ)` and reflect it across the vertical axis to get `g(-τ)`.
  3. Slide: Shift the flipped function by an amount `t` along the axis, resulting in `g(t - τ)`.
  4. Multiply and Integrate: For that specific value of `t`, multiply the two functions `f(τ)` and `g(t - τ)` together at every point `τ`. The result of the convolution for that `t` is the total area under this product curve. Repeat for all possible values of `t` to generate the output function.

Properties of Convolution

PropertyDescriptionFormula
CommutativeThe order of the functions does not matter.`f * g = g * f`
AssociativeThe grouping of functions in a series of convolutions does not matter.`(f * g) * h = f * (g * h)`
DistributiveConvolution distributes over addition.`f * (g + h) = (f * g) + (f * h)`
LinearityConvolution is a linear operator.`(a f + b g) * h = a(f * h) + b(g * h)`
Shift InvarianceShifting one of the functions shifts the output by the same amount.If `y(t) = f(t) * g(t)`, then `f(t-T) * g(t) = y(t-T)`
🧐

Proof of Commutativity

We can prove that convolution is commutative, meaning `(f * g)(t) = (g * f)(t)`. We start with the definition of convolution.

\[ (f * g)(t) = \int_{-\infty}^{\infty} f(\tau) g(t - \tau) d\tau \]

We perform a change of variables. Let `u = t - \tau`. This implies that `\tau = t - u`, and the differential `d\tau = -du`. As `\tau \to \infty`, `u \to -\infty`, and as `\tau \to -\infty`, `u \to \infty`.

\[ (f * g)(t) = \int_{\infty}^{-\infty} f(t - u) g(u) (-du) = - \int_{\infty}^{-\infty} g(u) f(t - u) du \]

Using the property of definite integrals that `\int_{b}^{a} f(x) dx = -\int_{a}^{b} f(x) dx`, we can flip the limits of integration and remove the negative sign.

\[ (f * g)(t) = \int_{-\infty}^{\infty} g(u) f(t - u) du \]

This final expression is, by definition, the convolution `(g * f)(t)`, with `u` being a dummy integration variable. Thus, `(f * g)(t) = (g * f)(t)`.

🔢

Worked Example

Given two identical rectangular pulse functions, `f(t) = g(t) = 1` for `0 ≤ t ≤ 1` and `0` otherwise. Find their convolution `y(t) = (f * g)(t)`.
  1. Write the convolution integral: `y(t) = ∫ f(τ) g(t - τ) dτ`.
  2. Graph `f(τ)` (a box from 0 to 1) and `g(t - τ)` (a flipped box, `g(-τ)`, shifted by `t`). The non-zero region for `g(t - τ)` is where `0 ≤ t - τ ≤ 1`, which means `t-1 ≤ τ ≤ t`.
  3. Analyze the overlap between `f(τ)` (non-zero for `[0, 1]`) and `g(t - τ)` (non-zero for `[t-1, t]`).
  4. Case 1: `t < 0`. There is no overlap between the two pulses. The integral is `0`.
  5. Case 2: `0 ≤ t < 1`. The pulses overlap from `τ = 0` to `τ = t`. The integral is `∫₀ᵗ 1 · 1 dτ = [τ]₀ᵗ = t`.
  6. Case 3: `1 ≤ t < 2`. The pulses overlap from `τ = t-1` to `τ = 1`. The integral is `∫ₜ₋₁¹ 1 · 1 dτ = [τ]ₜ₋₁¹ = 1 - (t-1) = 2 - t`.
  7. Case 4: `t ≥ 2`. There is no overlap. The integral is `0`.
The result is a triangular pulse function: `y(t) = t` for `0 ≤ t < 1`, `y(t) = 2 - t` for `1 ≤ t < 2`, and `0` otherwise.
🏗️

Applications

📷 Image Processing & Computer Vision

In image processing, convolving an image with a small matrix called a kernel can achieve effects like blurring, sharpening, and edge detection. This is the core operation in Convolutional Neural Networks (CNNs) for feature extraction.

🎵 Audio Processing & Acoustics

Convolution is used to create reverb effects by convolving a dry audio signal with the impulse response of a room. It's also fundamental in designing audio filters (equalizers) to shape the frequency content of sound.

⚡ Electronics & Circuit Analysis

For any Linear Time-Invariant (LTI) system, the output signal is the convolution of the input signal with the system's impulse response. This allows engineers to predict a circuit's behavior for any given input.

📈 Statistics and Probability Theory

The probability distribution of the sum of two independent random variables is the convolution of their individual distributions. This is crucial for modeling cumulative effects.

🌍

Real-World Examples

A digital photo is being blurred with a simple 3-pixel averaging filter, whose kernel is `K = [1/3, 1/3, 1/3]`. If a row of pixels has brightness values `[..., 60, 90, 150, ...]`, what is the blurred value of the pixel that was originally 90?
  1. The new pixel value is the discrete convolution of the image section with the kernel.
  2. Center the kernel on the target pixel (value 90). Multiply corresponding values and sum them up.
  3. Calculation: `(60 * 1/3) + (90 * 1/3) + (150 * 1/3)`.
  4. Simplify: `(60 + 90 + 150) / 3 = 300 / 3`.
The blurred pixel value is 100.
An investor wants to calculate a 3-day simple moving average for a stock price. The prices for the last 5 days were `P = [100, 102, 105, 103, 106]`. What is the moving average for day 3 (price 105)?
  1. A simple moving average is a convolution with a rectangular window kernel. For a 3-day average, the kernel is `K = [1/3, 1/3, 1/3]`.
  2. Apply the kernel to the prices centered on day 3: `[100, 102, 105]`.
  3. Calculate the weighted sum: `(100 * 1/3) + (102 * 1/3) + (105 * 1/3)`.
  4. Simplify: `(100 + 102 + 105) / 3 = 307 / 3`.
The 3-day simple moving average for day 3 is approximately 102.33.
🏞️

Real-World Scenarios

h(t) = room impulse resp.
Concert Hall Acoustics
Acoustic reverb is modelled as convolution of a dry sound with the room's impulse response. Audio engineers convolve studio recordings with measured hall responses to add authentic venue acoustics.
blurred ⊛ kernel sharpened 2D image convolution
Image Sharpening/Blurring
Image blur, sharpen, and edge-detection are all 2D convolutions — sliding a kernel over every pixel. GPU-accelerated FFT convolution makes real-time photo and video processing possible.
input (noisy) LPF ⊛ output (smooth)
Digital Signal Filtering
Low-pass filters remove noise by convolving with a smooth kernel. The Convolution Theorem (f⊛h = ℱ⁻¹(F·H)) makes it efficient to implement as frequency-domain multiplication instead of direct convolution.
Concert Hall Acoustics. A sound engineer uses convolution with a concert hall's measured impulse response to add realistic reverb to a dry studio recording. This process simulates how the sound waves from instruments would reflect off the walls, ceiling, and floor to create the rich, immersive sound experienced by a live audience.
Medical Image Sharpening. In an MRI scan, patient movement can cause slight blurring. A radiologist applies a sharpening kernel to the digital image. Convolving the blurred image with this kernel enhances edges and details, making it easier to spot anomalies or diagnose conditions.
Smartphone Photography. When you use 'Portrait Mode' on a smartphone, the camera's software identifies the subject and the background. It then applies a blur filter to the background to simulate the shallow depth-of-field effect of a professional DSLR camera. This blur is achieved by convolving the background pixels with a blur kernel.
📚

Types and Classifications

TypeDescriptionTypical Application
Continuous ConvolutionDefined for functions of a continuous variable (e.g., time). Uses an integral.Analog signal processing, physics, probability theory
Discrete ConvolutionDefined for sequences of numbers (e.g., digital samples). Uses a summation.Digital signal processing, image filters, finance
1D ConvolutionOne-dimensional convolution, typically over time or a single spatial dimension.Audio processing, time-series analysis
2D ConvolutionTwo-dimensional convolution, used for functions of two variables (e.g., images).Image processing, computer vision (CNNs)
Circular ConvolutionA form of discrete convolution where the function is treated as periodic. Related to the Discrete Fourier Transform (DFT).Fast convolution algorithms using FFT
⚠️

Common Mistakes

⚠️ Forgetting to Flip: A common error is performing `∫ f(τ)g(t+τ)dτ` instead of `∫ f(τ)g(t-τ)dτ`. The `g(t-τ)` term represents a flip (`g(-τ)`) followed by a shift (`g(t-τ)`). Always remember the 'flip and slide' mnemonic.
⚠️ Incorrect Integration Limits: When convolving functions with finite support (like rectangular pulses), the limits of integration change with `t`. It's crucial to correctly identify the regions of overlap and set the integral bounds accordingly for each case. Drawing the functions helps avoid this mistake.
💡 Confusing `t` and `τ`: The integration is performed with respect to `τ`, treating `t` as a constant parameter. The final result must be a function of `t` only, with `τ` integrated out.
🚀

Study Strategy

1 🧠 Grasp the Core Concept
  • Review the formal integral definition `(f * g)(t) = ∫ f(τ)g(t-τ) dτ` and its discrete counterpart.
  • Focus on the 'flip and slide' intuition using the 'Visualizing Convolution' section.
  • Clarify the distinct roles of the stationary function `f(τ)` and the moving function `g(t-τ)`.
  • Internalize that convolution is a mathematical operator that expresses the amount of overlap of one function as it is shifted over another.
2 ✍️ Internalize Key Formulas & Properties
  • Write out the continuous and discrete convolution formulas from memory until perfect.
  • Memorize the Convolution Theorem for both Fourier and Laplace transforms, e.g., `F{f*g} = F(k)G(k)`.
  • Actively recall the main properties: commutativity, associativity, and distributivity.
  • Create flashcards for key transform pairs involving convolution, such as the transform of a convolved signal.
3 🧮 Execute with Worked Examples
  • Re-solve the provided 'Worked Example' without looking at the solution, then compare your steps.
  • Practice convolving basic functions like two rectangular pulses or an exponential with a step function.
  • Solve problems both by direct integration and by using the Convolution Theorem in the frequency domain.
  • Analyze the 'Common Mistakes' section and attempt problems specifically designed to test those pitfalls, like incorrect integration limits.
4 🌐 Connect to Real-World Applications
  • Select an application like image blurring or audio echo from the 'Real-World Examples' and explain how convolution models it.
  • Relate the mathematical properties to physical meanings, e.g., how commutativity means the filter and signal can be swapped.
  • Attempt to set up the convolution integral for a simplified problem described in the 'Real-World Scenarios' section.
  • Explain the concept of a system's impulse response and how convolving it with an input signal yields the output.
By systematically building from the foundational definition to practical applications, you can master convolution and unlock its power in solving complex problems.

Frequently Asked Questions

×

×