Product of two polynomials formula proof I have recently learnt the formula for the product of two polynomals, which is as follow:
$\Bigg{(}\sum_{i=0}^{n} a_i x^i\Bigg{)}\cdot \Bigg{(}\sum_{j=0}^{m} b_j x^j\Bigg{)} = \sum_{r=0}^{n+m} \Bigg{(} \sum_{k=0}^r a_k b_{r-k} \Bigg{)} x^r$
However, I don't quite understand the proof behind it.
Let $S$ be:
$S = \Bigg{(}\sum_{i=0}^{n} a_i x^i\Bigg{)}\cdot \Bigg{(}\sum_{j=0}^{m} b_j x^j\Bigg{)}$
First, we have:
$S = \sum_{i=0}^n \sum_{j=0}^m a_i b_j x^{i+j}$
Assuming $\delta$ returns $1$ when its argument is $0$, and $0$ otherwise, we get:
$S = \sum_{k=0}^{n+m}\sum_{i=0}^n \sum_{j=0}^m a_i b_j x^{i+j}\delta(k - (i+j))$
(It's the first thing I don't understand, why is it true ?)
Next, we rearrange the terms:
$S = \sum_{k=0}^{n+m}\sum_{i=0}^n a_i \sum_{j=0}^m  b_j x^{i+j}\delta(j - (k-i))$
We notice that:
$\sum_{j=0}^m  b_j x^{i+j}\delta(j - (k-i)) = b_{k-i} x^k$
So:
$S = \sum_{k=0}^{n+m}\sum_{i=0}^n a_i b_{k-i} x^k$
And I am stuck at this point. Could you help me finishing the proof?
 A: Here is an additional step:
$$\sum_{i=0}^n \sum_{j=0}^m a_i b_j x^{i+j} \cdot 1 = \sum_{i=0}^n \sum_{j=0}^m a_i b_j x^{i+j} \sum_{k=0}^{m+n} \delta(k-(i+j)) = \sum_{k=0}^{m+n} \sum_{i=0}^n \sum_{j=0}^m a_i b_j x^{i+j} \delta(k-(i+j))$$ 
Because $\sum_{k=0}^{m+n} \delta(k-(i+j)) = 1$ for every $i,j$ with $0\leq i+j \leq m+n$ (all terms are zero but one). 
Now for
$$ \sum_{j=0}^m b_j x^{i+j} \delta(j-(k-i))$$
only the terms with $j=k-i$ survive, all others vanish, and thus you can set $j=k-i$ and drop the summation sign.
Also there is a more intuitive way to "proof" (or rather see) this, which is maybe easier to remember:
This formula is a special case of the "Cauchy-Product" formula, which holds for absolute convergent power series (in fact it is sufficient that one of the series is absolutely convergent), this is a sum of the form $\sum_{k=0}^{\infty} a_i x^i $. If you set $a_k=0$ for $k>n$ you get a ordinary polynomial $\sum_{i=0}^n a_i x^i$. In this case the product formula can nicely be visualized. Maybe you noticed that the product is a sum consisting of a all combinations of the coefficients i.e. $$(\sum_{i=0}^{\infty} a_i x^i)(\sum_{j=0}^{\infty} b_j x^j)=\sum_{i=0}^{\infty} (\sum_{j=0}^{\infty} a_i b_j x^{i+j})$$
If you now look at
$$ \begin{array}{ccccc}
a_0 b_0 x^0& a_1b_0 x^1& a_2b_0 x^2 & a_3b_0 x^3 & \cdots \\
a_0b_1 x^1& a_1b_1 x^2& a_2b_1 x^3 & a_3b_1 x^4 & \cdots  \\ 
a_0b_2 x^2& a_1b_2 x^3& a_2b_2 x^4& a_3b_2 x^5& \cdots  \\ 
a_0b_3 x^3& a_1b_1 x^4& a_2b_1 x^5& a_3b_1 x^6& \cdots  \\ 
\vdots &\vdots &\vdots &\vdots & \ddots
\end{array}$$
you can see that the above sum is the sum of all columns. Another way to sum these elements is to collect all the terms with the same powers of $x$, these are the diagonals in the diagramm. For $x^k$ there are the coefficients $a_0b_k+a_1b_{k-1}+ \dots + a_k b_0 = \sum_{i=0}^{k} a_i b_{k-i}$. Multiplying with $x^k$ and summing over $k$ gets you the formula. 
A: Let write $$\sum_{i=0}^na_ix^i=\sum_{i=0}^\infty a_ix^i$$
and $$\sum_{j=0}^mb_jx^j=\sum_{j=0}^\infty b_jx^j,$$
where $a_i=0$ if $i>n$ and $b_j=0$ if $j>m$. To work with infinite sum will allow us to avoid the problem to split the sums when we permute the two sums in the 4th equality below.
Then, 
\begin{align*}
\left(\sum_{i=0}^n a_ix^i\right)\left(\sum_{j=0}^m b_jx^j\right)&=\sum_{i=0}^n \sum_{j=0}^ma_ib_jx^{i+j}\\
&=\sum_{i=0}^\infty \sum_{j=0}^\infty a_ib_jx^{i+j}\\
&\underset{k=i+j}{=}\sum_{i=0}^\infty \sum_{k=i}^\infty a_ib_{k-i}x^k\\
&=\sum_{k=0}^\infty \left(\sum_{i=0}^k a_ib_{k-i}\right)x^k\\
&=\sum_{k=0}^{m+n}\left(\sum_{i=0}^k a_ib_{k-i}\right)x^k,
\end{align*}
where the last equality come from the fact that the product has degree at most $m+n$ (or exactely $m+n$ is you supposed that $a_n,b_m\neq 0$).
