Proof of Sum, Difference, Scalar Multiple of Diagonal Matrices Assumming A and B are diagonal matrices of the same size, please prove that the following are diagonal matrices as well.
a) $A+B$
b) $A-B$
c) $kA$ , for a scalar $k$
It's not homework- just a problem I didn't know how to do in my textbook.
Thanks in advance!!
 A: Simplest approach: write down your square matrices. When is a matrix diagonal? When the off-diagonal coefficients are all zero. This leaves only the diagonal coefficients which are possibly nonzero. Then do the algebra: $A+B$, $A-B$, $kA$ coefficientwise. You'll see that the off-diagonal coefficients are remain null. The only little problem is that you need dots if you do that with a $n\times n$ matrices. But this proof is good enough in my opinion.
More formal approach: when is a square matrix $A=(a_{ij})$ diagonal? Exactly when $a_{ij}=0$ for all $1\leq i\neq j\leq n$. So taking $A,B$ two diagonal $n\times n$ matrices, we have, coefficientwise,
$$
(A+B)_{ij}=a_{ij}+b_{ij}=0+0=0\quad (A-B)_{ij}=a_{ij}-b_{ij}=0 \quad\forall 1\leq i\neq j\leq n.
$$
This proves that $A+B$ and $A-B$ are both diagonal. I let you do $kA$.
There is more: also $AB=BA$, $A^T$ (the transpose) and $A^*$ (the transconjugate in $M_n(\mathbb{C}$)) are diagonal. Again, this is obvious if you write them down with $0$'s and dots. But it can also be done more formally. For the first one, we have indeed
$$
(AB)_{ij}=\sum_{k=1}^na_{ik}b_{kj}.
$$
So when $i\neq j$ and $k$ runs from $1$ to $n$, we can never have simultaneously $i=k$ and $k=j$. Hence in each product $a_{ik}b_{kj}$, either $i\neq k$ or $k\neq j$, thus $a_{ik}=0$ or $b_{kj}=0$. Therefore $(AB)_{ij}=0$ for all $i\neq j$, i.e. $AB$ is diagonal. The same argument shows that $BA$ is diagonal. And looking at the diagonal coefficients, we find $(AB)_{ii}=a_{ii}b_{ii}=b_{ii}a_{ii}=(BA)_{ii}$. Whence $AB=BA$. The cases $A^T$ and $A^*$ are easier, I let you do them.
More interesting: denoting $D_n$ the set of all diagonal matrices in $M_n(K)$, we have just seen that we have a commutative $K$-algebra stable under the transpose. In the case $K=\mathbb{C}$, it is also stable under the adjoint=transconjugate. That's what is called a $*$-algebra in operator algebras. And since we are in finite-dimension, it is closed for all the usual topologies (which actually coincide), in particular the so-called weak-operator topology. So that's a von Neumann algebra. And its fundamental property is that 
$$
D_n=D_n'=\{A\in M_n(\mathbb{C})\,;\,AD=DA \quad\forall D\in D_n\}.
$$
That is $D_n$ is equal to its own commutant. The fact that $D_n\subseteq D_n'$ simply means that $D_n$ is commutative, which is quite obvious. The other inclusion is less trivial. It can be checked coefficientwise by loooking at the commutation relations with the $D_i$ with $1$ in $i$ poisition on the diagonal and $0$ elsewhere. Or, more interestingly, it can be seen by diagonalization. For instance, if $A$ commutes with every $D$ in $D_n$, it commutes in particular with $D=\mbox{diag}(1,2,\ldots,n)$. So it leaves the eigenspaces of the latter invariant. Since they are all one-dimensional, $A$ must be diagonal in the same basis, that is a diagonal matrix. 
The same is true with the same argument for $D$ the diagonal operators with respect to a given orthonormal basis in $B(H)$, the bounded linear operators on a Hilbert space $H$. So we get $D=D'$ as well, and clearly $D$ is stable under the adjoint. So automatically, $D'$ which is a commutant of a self-adjoint set, must be a von Neumann algebra. So $D=D'$ is a von Neumann algebra sitting in $B(H)$, with the key property that $D=D'$. That's called a masa (maximal Abelian subalgebra), and masas are very important in the general theory of von Neumann algebras. The case $D\subseteq B(H)$ is the typical example.
