= Convolution
{title2=$(f*g)(x)=\int_{\mathbb R}f(y)g(x-y)\,dy$}
{wiki}
Convolution combines two <functions> by adding their products over all ways of splitting an argument. For <Lebesgue integrable functions> $f,g$ on the <real line>, their convolution is
$$
(f*g)(x)=\int_{\mathbb R}f(y)g(x-y)\,dy.
$$
The arguments $y$ and $x-y$ always add to $x$. For $f,g$ in the <L1 space>, the <integral> exists <almost everywhere> and defines another element of the <L1 space>, with $\|f*g\|_1\leq\|f\|_1\|g\|_1$ by <Young's convolution inequality>. Particular examples below have a value at every $x$.
To see what the <integral> counts, take the <indicator function> $q=\mathbf1_{[0,1]}$. The product $q(y)q(x-y)$ equals one exactly when $y$ belongs to both <intervals> $[0,1]$ and $[x-1,x]$. Its <integral> is their overlap <length>, so
$$
(q*q)(x)=\begin{cases}
x,&0\leq x\leq1,\\
2-x,&1<x\leq2,\\
0,&\text{otherwise}.
\end{cases}
$$
At $x=1/2$, the overlap is $[0,1/2]$ and the output is $1/2$; at $x=1$, the two <intervals> coincide and the output is one. The result is the shifted <triangular function> $\operatorname{tri}(x-1)$. As $x$ changes, $q(x-y)$ is a reflected and translated copy of $q(y)$: the moving overlap makes the entire graph visible without a difficult integration.
\Image[/convolution-overlap-triangle.png]
{title=Convolving two interval indicators measures their moving overlap and produces a triangular function}
The same calculation gives the <probability distribution> of a sum of two <independent random variables>. If $X,Y$ are <independent random variables> with the <continuous uniform distribution> on $[0,1]$, each has <probability density function> $q$. Their sum has <probability density function> $q*q$ by <convolution of probability densities>. The <probability density function> at one is larger than near zero or two because there are more combinations of the two inputs giving that sum. Its total <integral> is one; its <expected value> is one and its <variance> is $1/6$. These follow equally from integrating the <triangular function> or from <linearity of expectation> and <variance additivity for independent random variables>.
Convolution also gives a useful averaging operation. For $\varepsilon>0$, let $k_\varepsilon(y)=\mathbf1_{[-\varepsilon,\varepsilon]}(y)/(2\varepsilon)$. Then
$$
(f*k_\varepsilon)(x)=\frac1{2\varepsilon}\int_{x-\varepsilon}^{x+\varepsilon}f(u)\,du,
$$
the mean of $f$ in a neighborhood of $x$. A smaller $\varepsilon$ examines a smaller neighborhood. For a <continuous function> $f$, this mean tends to $f(x)$ as $\varepsilon\to0$, an example of an <approximate identity>. Integrating a sharp input against a distributed <convolution kernel> can produce a smoother output; the triangular example turns two discontinuous inputs into a continuous output.
In <signal processing>, a <linear time-invariant system> combines shifted copies of its <impulse response> by the same rule. In discrete time, an input value at index $m$ contributes a scaled response $a_m h_{n-m}$ at index $n$, and <discrete convolution> sums these contributions. This is the superposition interpretation developed in https://ocw.mit.edu/courses/res-6-007-signals-and-systems-spring-2011/0400ba59406d52d94c079d99928156ee_MITRES_6_007S11_lec04.pdf[Oppenheim, MIT Signals and Systems, Lecture 4, convolution sums and integrals]. The <convolution theorem> then gives another description: transform both inputs with a <Fourier transform> and multiply their transforms. Combining shifts, combining independent quantities and multiplying frequency descriptions are three faces of the same operation.
Back to article page