# Show that a matrix is diagonal [duplicate]

My task given by my professor was the following:

$$Let \,\, A, \,\, B \in \mathbb{C}^{n\times n}$$ be selfadjoint and such that $$[A, B] := AB-BA=0.$$ Show that $$C:= A+iB$$ is normal. Show further that there is a unitary $$U \in \mathbb{C}^{n\times n} \; \text{such that} \; U^*AU \; \text{and} \; U^*BU$$ are both diagonal.

I have proven that $$C$$ is normal but I'm having problems with proving that the terms are both diagonal matricies.

Hint: If $$U^* C U = D$$ is diagonal, $$U^* C^* U = (U^* C U)^* = D^*$$ which is also diagonal. Now what are $$(C + C^*)/2$$ and $$(C - C^*)/(2i)$$?