multiply 2 diagonal matrix I need to prove that if i multiply 2 diagonal matrixes i get a diagonal matrix.
I understand the logic behind it but find it difficult to prove on paper.
I started with saying that a diagonal matrix Aij = 0 when i != j.
Then I declared 2 diagonal matrixes A,B of size n*n.
       n           i - 1           n

(AB)ij = Σ (Aik * Bkj) = Σ (Aik * Bkj) + Σ (Aik * Bkj)
     k = 1         k = 1         k=j+1

so the first part equals zero because Aik will be 0 becasuse k is bigger than i.
im stuck on the second part, how to show that the second part is also equal to 0, meaning what ranges to use on the sums. 
thanks
 A: Let $A$ and $B$ the two diagonal matrices of size $n$.  $C$ is the product of the two
We have 
$$C_{i,j}=\sum_{k=0}^n{A_{i,k}B_{k,j}}$$
We know that $A_{i,k} =0$ if $i \ne k$, and $B_{k,j} =0$ if $j \ne k$
$$C_{i,j}=\sum_{k=1}^n{A_{i,k}B_{k,j}}=A_{i,i}B_{i,j}+A_{i,j}B_{j,j}$$
if $i \ne j$, $B_{i,j}=0$ and $A_{i,j}=0$
therefore $C_{i,j}=0$ 
A: Let $$C=AB$$ Where $A$ and $B$ are diagonal.  
That is $a_{i,j}=0$ if $i\ne j$ and $b_{j,k}=0$ if $j\ne k$
The terms of $C$ are simply $$ c_{i,k}=\sum a_{i,j}b_{j,k}$$ which is zero unless   $i=j=k$
Thus $c_{i,i}$ are the only possibly non- zero terms which means  $C$ is diagonal.
A: You can prove in a shorter way:
If $i\ne j$, as $C_{ij}=\sum_{k=1}^nA_{ik}B_{kj}$, each $k$ in this sum cannot be equal to both $i,j$, hence one (at least) of $A_{i,k}, B_{k,j}$ is $0$, and consequently all terms of this sum are $0$, which means $A_{ij}=0$ if $i\ne j$.
A: You can introduce the Kronecker symbol : $\delta_{ij} = 1$ if $i=j$, $0$ otherwise.
Then $(AB)_{ij} = \sum_{k=1}^n a_{ik}b_{kj} = \sum_{k=1}^n a_{ik}b_{kj}\delta_{ik}\delta_{kj}$
If $i\neq j$ then $\delta_{ik}\delta_{kj} = 0$ for all $k\in\{1,\dots,n\}$. So, if $i\neq j$,  $(AB)_{ij} = 0$. Therefore, $AB$ is a diagonal matrix.
