Convolution

Flip one function, slide it, and measure how it overlaps the other. Overlapping two indicator blocks gives an overlap length that traces a tent curve. Convolving with a smooth kernel softens even a sharp step function. The narrower the kernel, the closer the softened function sits to the original. For example, it is the blur effect in a πŸ“· photo, replacing each pixel by a weighted average of its neighbors. The center pixel gets the largest weight.

(fβˆ—g)(x)=βˆ«βˆ’βˆžβˆžf(t) g(xβˆ’t) dt(f * g)(x) = \int_{-\infty}^{\infty} f(t)\, g(x - t)\, dt
(fβˆ—Ο†Ξ΅)(x)β†’f(x)Β asΒ Ξ΅β†’0+Β atΒ continuityΒ pointsΒ x(f * \varphi_{\varepsilon})(x) \to f(x) \text{ as } \varepsilon \to 0^+ \text{ at continuity points } x

Examples & Exercises

Prove that convolution commutes: for integrable f,gf, g, (fβˆ—g)(x)=(gβˆ—f)(x)(f * g)(x) = (g * f)(x) for every xx. Use the substitution u=xβˆ’tu = x - t, making the limit-flip step and the sign cancellation explicit.

(fβˆ—g)(x)=βˆ«βˆ’βˆžβˆžf(t) g(xβˆ’t) dt(f * g)(x) = \int_{-\infty}^{\infty} f(t)\, g(x - t)\, dt
f,g∈L1(R),βˆ«βˆ’βˆžβˆžβˆ£f(t) g(xβˆ’t)βˆ£β€‰dt<∞f, g \in L^1(\mathbb{R}), \qquad \int_{-\infty}^{\infty} |f(t)\, g(x - t)|\, dt < \infty
Tent mode, x=0.7x = 0.7: (fβˆ—g)(0.7)=0.7(f * g)(0.7) = 0.7 -- here f=gf = g makes commutativity look trivial, but the proof below works for every integrable pair.
Show proof
  1. Hypothesis: f,g∈L1(R)f, g \in L^1(\mathbb{R}), and for the fixed xx the product integral converges absolutely (second display line). Under this condition the substitution below is legitimate. Start from the definition: (fβˆ—g)(x)=βˆ«βˆ’βˆžβˆžf(t) g(xβˆ’t) dt(f * g)(x) = \int_{-\infty}^{\infty} f(t)\, g(x - t)\, dt.
  2. Apply the substitution u=xβˆ’tu = x - t. Then t=xβˆ’ut = x - u and dt=βˆ’dudt = -du. The endpoints map as uβ†’+∞u \to +\infty when tβ†’βˆ’βˆžt \to -\infty and uβ†’βˆ’βˆžu \to -\infty when tβ†’+∞t \to +\infty -- that is, t:βˆ’βˆžβ†’βˆžt: -\infty \to \infty corresponds to u:βˆžβ†’βˆ’βˆžu: \infty \to -\infty. Substituting gives (fβˆ—g)(x)=∫+βˆžβˆ’βˆžf(xβˆ’u) g(u) (βˆ’du)(f * g)(x) = \int_{+\infty}^{-\infty} f(x - u)\, g(u)\, (-du).
  3. Now the two signs cancel: the factor βˆ’1-1 in βˆ’du-du pairs exactly with flipping the limits (∫+βˆžβˆ’βˆž=βˆ’βˆ«βˆ’βˆž+∞\int_{+\infty}^{-\infty} = -\int_{-\infty}^{+\infty}). Hence (fβˆ—g)(x)=βˆ«βˆ’βˆžβˆžf(xβˆ’u) g(u) du(f * g)(x) = \int_{-\infty}^{\infty} f(x - u)\, g(u)\, du.
  4. The right side is, by definition, (gβˆ—f)(x)=βˆ«βˆ’βˆžβˆžg(u) f(xβˆ’u) du(g * f)(x) = \int_{-\infty}^{\infty} g(u)\, f(x - u)\, du (the dummy variable is just named uu). Hence (fβˆ—g)(x)=(gβˆ—f)(x)(f * g)(x) = (g * f)(x), and xx was arbitrary, so fβˆ—g=gβˆ—ff * g = g * f.

For f=g=1[0,1]f = g = \mathbf{1}_{[0,1]}, compute (fβˆ—g)(x)(f * g)(x) for every real xx. The answer must be the tent function: xx on [0,1][0,1], 2βˆ’x2 - x on [1,2][1,2], and 00 elsewhere -- matching the trace in the scene.

(fβˆ—g)(x)=βˆ«βˆ’βˆžβˆž1[0,1](t) 1[0,1](xβˆ’t) dt=lengthΒ ofΒ [0,1]∩[xβˆ’1,x](f * g)(x) = \int_{-\infty}^{\infty} \mathbf{1}_{[0,1]}(t)\, \mathbf{1}_{[0,1]}(x - t)\, dt = \text{length of } [0,1] \cap [x-1, x]
Tent mode, x=1.4x = 1.4: the overlap is [0.4,1][0.4, 1] and (fβˆ—g)(1.4)=2βˆ’1.4=0.6(f * g)(1.4) = 2 - 1.4 = 0.6 -- the falling case of the case split below.
Show proof
  1. The product 1[0,1](t) 1[0,1](xβˆ’t)\mathbf{1}_{[0,1]}(t)\, \mathbf{1}_{[0,1]}(x - t) equals 11 exactly when both conditions hold: 0≀t≀10 \le t \le 1 and 0≀xβˆ’t≀10 \le x - t \le 1. The second condition is equivalent to xβˆ’1≀t≀xx - 1 \le t \le x. Hence the integral is the length of {t:0≀t≀1,Β xβˆ’1≀t≀x}=[0,1]∩[xβˆ’1,x]\{t : 0 \le t \le 1,\ x - 1 \le t \le x\} = [0,1] \cap [x-1, x].
  2. The endpoints of the intersection are max⁑(0,xβˆ’1)\max(0, x-1) and min⁑(1,x)\min(1, x). The comparisons split at xβˆ’1≀0β€…β€ŠβŸΊβ€…β€Šx≀1x - 1 \le 0 \iff x \le 1 and at x≀1x \le 1 itself: if x≀1x \le 1 then max⁑(0,xβˆ’1)=0\max(0, x-1) = 0 and min⁑(1,x)=x\min(1, x) = x (for xβ‰₯0x \ge 0), while if xβ‰₯1x \ge 1 then max⁑(0,xβˆ’1)=xβˆ’1\max(0, x-1) = x-1 and min⁑(1,x)=1\min(1, x) = 1. These comparisons justify the case split below.
  3. Case 1, x<0x < 0 or x>2x > 2: if x<0x < 0 then min⁑(1,x)=x<0≀max⁑(0,xβˆ’1)\min(1, x) = x < 0 \le \max(0, x-1), so the intersection is empty; if x>2x > 2 then max⁑(0,xβˆ’1)=xβˆ’1>1β‰₯min⁑(1,x)\max(0, x-1) = x - 1 > 1 \ge \min(1, x), again empty. In both cases (fβˆ—g)(x)=0(f * g)(x) = 0. Case 2, 0≀x≀10 \le x \le 1: the intersection is [0,x][0, x], of length xx.
  4. Case 3, 1≀x≀21 \le x \le 2: the intersection is [xβˆ’1,1][x-1, 1], of length 1βˆ’(xβˆ’1)=2βˆ’x1 - (x - 1) = 2 - x. In summary (fβˆ—g)(x)(f * g)(x) is the tent function 00 (outside), xx (on [0,1][0,1]), 2βˆ’x2 - x (on [1,2][1,2]), with peak value 11 at x=1x = 1 -- exactly the trace drawn in the scene.

Let Ο†β‰₯0\varphi \ge 0, suppβ‘Ο†βŠ†[βˆ’1,1]\operatorname{supp} \varphi \subseteq [-1,1], βˆ«Ο†=1\int \varphi = 1, and φΡ(t)=1Ρφ(t/Ξ΅)\varphi_{\varepsilon}(t) = \frac{1}{\varepsilon} \varphi(t/\varepsilon). If ff is bounded (βˆ₯fβˆ₯∞=M\|f\|_{\infty} = M) and continuous at x0x_0, prove (fβˆ—Ο†Ξ΅)(x0)β†’f(x0)(f * \varphi_{\varepsilon})(x_0) \to f(x_0) as Ξ΅β†’0+\varepsilon \to 0^+. Start by checking that the scene's tent kernel Ο†(t)=max⁑(0,1βˆ’βˆ£t∣)\varphi(t) = \max(0, 1 - |t|) meets the hypotheses.

φΡ(t)=1Ρφ(t/Ξ΅),βˆ«βˆ’βˆžβˆžΟ†Ξ΅=1,suppβ‘Ο†Ξ΅βŠ†[βˆ’Ξ΅,Ξ΅]\varphi_{\varepsilon}(t) = \frac{1}{\varepsilon} \varphi(t/\varepsilon), \qquad \int_{-\infty}^{\infty} \varphi_{\varepsilon} = 1, \qquad \operatorname{supp} \varphi_{\varepsilon} \subseteq [-\varepsilon, \varepsilon]
(fβˆ—Ο†Ξ΅)(x0)βˆ’f(x0)=βˆ«βˆ’βˆžβˆž[f(x0βˆ’t)βˆ’f(x0)] φΡ(t) dt(f * \varphi_{\varepsilon})(x_0) - f(x_0) = \int_{-\infty}^{\infty} [f(x_0 - t) - f(x_0)]\, \varphi_{\varepsilon}(t)\, dt
Smooth mode, x=0.05x = 0.05, Ξ΅=0.1\varepsilon = 0.1: v=x/Ξ΅=0.5v = x/\varepsilon = 0.5, so (fβˆ—Ο†Ξ΅)(0.05)=1βˆ’(1βˆ’0.5)2/2=0.875(f * \varphi_{\varepsilon})(0.05) = 1 - (1 - 0.5)^2/2 = 0.875 -- approaching f(0.05)=1f(0.05) = 1 as Ξ΅β†’0\varepsilon \to 0.
Show proof
  1. Checking the tent kernel: Ο†(t)=max⁑(0,1βˆ’βˆ£t∣)\varphi(t) = \max(0, 1 - |t|) is nonnegative, vanishes outside [βˆ’1,1][-1,1], and βˆ«Ο†\int \varphi is the area of a triangle of base 22 and height 11, namely 12β‹…2β‹…1=1\frac{1}{2} \cdot 2 \cdot 1 = 1. So the tent kernel satisfies Ο†β‰₯0\varphi \ge 0, suppβ‘Ο†βŠ†[βˆ’1,1]\operatorname{supp} \varphi \subseteq [-1,1], and βˆ«Ο†=1\int \varphi = 1.
  2. Scaling keeps the mass: βˆ«Ο†Ξ΅=1\int \varphi_{\varepsilon} = 1. With the substitution s=t/Ξ΅s = t/\varepsilon (dt=Ρ dsdt = \varepsilon\, ds), ∫1Ρφ(t/Ξ΅) dt=βˆ«Ο†(s) ds=1\int \frac{1}{\varepsilon} \varphi(t/\varepsilon)\, dt = \int \varphi(s)\, ds = 1. The same substitution gives suppβ‘Ο†Ξ΅βŠ†[βˆ’Ξ΅,Ξ΅]\operatorname{supp} \varphi_{\varepsilon} \subseteq [-\varepsilon, \varepsilon]: φΡ(t)β‰ 0\varphi_{\varepsilon}(t) \ne 0 requires ∣t/Ξ΅βˆ£β‰€1|t/\varepsilon| \le 1, i.e. ∣tβˆ£β‰€Ξ΅|t| \le \varepsilon. Also ∣fβˆ£β‰€M|f| \le M with Ο†Ξ΅βˆˆL1\varphi_{\varepsilon} \in L^1 makes the convolution well defined.
  3. The error identity: since f(x0)=∫f(x0) φΡ(t) dtf(x_0) = \int f(x_0)\, \varphi_{\varepsilon}(t)\, dt (the mass is 11, so this is f(x0)β‹…1f(x_0) \cdot 1), subtracting gives (fβˆ—Ο†Ξ΅)(x0)βˆ’f(x0)=∫[f(x0βˆ’t)βˆ’f(x0)] φΡ(t) dt(f * \varphi_{\varepsilon})(x_0) - f(x_0) = \int [f(x_0 - t) - f(x_0)]\, \varphi_{\varepsilon}(t)\, dt. Moving the absolute value inside and using φΡβ‰₯0\varphi_{\varepsilon} \ge 0 gives ∣(fβˆ—Ο†Ξ΅)(x0)βˆ’f(x0)βˆ£β‰€βˆ«βˆ£f(x0βˆ’t)βˆ’f(x0)βˆ£β€‰Ο†Ξ΅(t) dt|(f * \varphi_{\varepsilon})(x_0) - f(x_0)| \le \int |f(x_0 - t) - f(x_0)|\, \varphi_{\varepsilon}(t)\, dt.
  4. Let Ξ·>0\eta > 0 be given. By continuity of ff at x0x_0 there is Ξ΄>0\delta > 0 with ∣f(x0βˆ’t)βˆ’f(x0)∣<Ξ·/2|f(x_0 - t) - f(x_0)| < \eta/2 whenever ∣t∣<Ξ΄|t| < \delta. Now take any Ξ΅<Ξ΄\varepsilon < \delta.
  5. Finish: since suppβ‘Ο†Ξ΅βŠ†[βˆ’Ξ΅,Ξ΅]βŠ†[βˆ’Ξ΄,Ξ΄]\operatorname{supp} \varphi_{\varepsilon} \subseteq [-\varepsilon, \varepsilon] \subseteq [-\delta, \delta], the whole error integral lives on ∣t∣<Ξ΄|t| < \delta, where the factor ∣f(x0βˆ’t)βˆ’f(x0)∣|f(x_0 - t) - f(x_0)| is below Ξ·/2\eta/2. Hence the error is at most (Ξ·/2)βˆ«Ο†Ξ΅=Ξ·/2<Ξ·(\eta/2) \int \varphi_{\varepsilon} = \eta/2 < \eta. As Ξ·\eta was arbitrary, (fβˆ—Ο†Ξ΅)(x0)β†’f(x0)(f * \varphi_{\varepsilon})(x_0) \to f(x_0) as Ξ΅β†’0+\varepsilon \to 0^+. Unlike a general approximate identity there is no tail term, because the support shrinks to [βˆ’Ξ΅,Ξ΅][-\varepsilon, \varepsilon].

11. Integration