Proving the convolution theorem for discrete signals
Sources: Here for the proof and this mathworks page for the destinction between linear and circular convolutions.
Assume that the signals and have lengths and , respectively, and are non-periodic. Then you typically define a linear convolution as
Some of the indices run out of bounds in this sum, so we'll tacitly assume that anything out of bounds is zero. Note that can run from 0 to ! In other words, a (non-trivial) linear convolution has a longer output than the input. Our definition nicely describes a tapped delay line. The extra samples are the input and output transients.
For periodic signals, you typically switch to a seperate definition of a convolution. Assume that and are of the same length and periodic. Then in the following definition for the circular convolution nothing can run out of bounds (everything is periodic!), and the output will have the same period as the input.
No matter if we are working with periodic signals or non-periodic signals, the discrete Fourier transform and its inverse are always defined as
So, let's get to work and prove the convolution theorem for periodic signals. We'll start with the definition of the circular convolution
and replace and with the inverse Fourier transform of and . Note that we need the periodicity here - otherwise we'd have to ensure that out-of-bound indexes lead to 0! (We'll get to that case in a bit.)
Next, we rearrange the sums such that the sum over is the innermost sum.
We can pull out the part of the exponential that does not depend on .
If , then the inner sum evaluates to . For all other cases, you can apply the formula of a geometric series and quickly convince yourself that the result is 0 (the numerator in that formula is alwasy 0 due to the 's). Thus
And this is just the inverse Fourier transform of the function . In other words, we just proved that the convolution can be expressed as the inverse Fourier transform of the product of the individual spectra.
With care, we can also apply this to the linear convolution. By appropriately 0-padding both signals, such that they both have a length of , we can treat them as periodic functions! The periodicity just doesn't matter, because the ends never meet (there is just enough zeros between them.) We can then apply the convolution theorem and see that it mostly works as expected.
But there is an important side-effect: We cannot apply a pure sine frequency at the input anymore. For any non-trivial filter, the signal has to be 0-padded at the end! So you never get a pure spectrum out - this is because the input and output transients are usually not sinusoid.