# Proving commutativity of convolution $(f \ast g)(x) = (g \ast f)(x)$

From any textbook on fourier analysis:

"It is easily shown that for $f$ and $g$, both $2 \pi$-periodic functions on $[-\pi,\pi]$, we have $$(f \ast g)(x) = \int_{-\pi}^{\pi}f(x-y)g(y)\;dy = \int_{-\pi}^{\pi}f(z)g(x-z)\;dz = (g \ast f)(x),$$ by using the substitution $z = x-y.$"

I don't doubt that this is true, but I cannot figure out what happened to the negative sign coming from $dy = -dz\;$ after the change of variable $z = x - y$. In particular, after the change of variable $z = x-y,\;$ I am coming up with $-\int_{-\pi}^{\pi}f(z)g(x-z)\;dz$. What am I missing here?
• You should be coming up with $-\int_\pi^{-\pi}f(z)g(x-z)dz$. :-) – Robin Chapman Sep 11 '10 at 22:08

You need to check the bounds on your integral. since $y$ ranges from $-\pi$ to $\pi$, you'll have $z = x-y$ ranging from $x+\pi$ to $x-\pi$. Therefore: $$\int_{-\pi}^{\pi}f(x-y)g(y)dy = -\int_{x+\pi}^{x-\pi}f(z)g(x-z)dz = \int_{x-\pi}^{x+\pi}f(z)g(x-z)dz = \int_{-\pi}^{\pi}f(z)g(x-z)dz$$ in the second-last step, I swapped the two bounds on the integral (this changes the sign). In the final step, I shifted both bounds on the integral by $-x$, which does not change the value because we are integrating over an interval of length $2\pi$ and the function is $2\pi$-periodic.
Here is something I've sometimes wondered about. If $f,g$ are both nonnegative proving commutativity of convolution can be done without a tedious change of variable.
Indeed, let $X$ be a random variable with density $f$ and let $Y$ be a random variable with density $g$. Its easy to see that $f$ convolved with $g$ is the density of $X+Y$ (or in your case $X+Y ~{\rm mod} ~2 \pi$). By commutativity of addition, the density of $X+Y$ is the same as the density of $Y+X$ and we are done!