[Math] Hermitian matrices that commute

eigenvalues-eigenvectorslinear algebramatricesmultilinear-algebra

My question is:

If $A$ and $B$ are two Hermitian matrices, and $AB$ is also a Hermitian matrix, then how do prove that both $A$ and $B$ are diagonalizable through the same unitary matrix (i.e the unitary matrix that diagonalizes $A$, diagonalizes $B$ as well).

It is obvious that in order for $AB$ to be Hermitian, $A$ and $B$ have to commute, i.e: $AB=BA$. Can anyone tell me how to prove that the same unitary matrix that diagonalizes $A$, diagonalizes $B$ as well?

Best Answer

The orthogonal projections on eigenspaces of $A$ and of $B$ can be written as polynomials in $A$ and $B$ respectively, so they commute with each other and with $A$ and $B$. The nonzero products of an orthogonal eigenspace projection for $A$ and an eigenspace projection for $B$ are orthogonal projections on subspaces of ${\mathbb C}^n$ where $A$ and $B$ both act as multiples of the identity matrix. Take an orthonormal basis whose members are all in those subspaces, and the matrices for $A$ and $B$ in that basis will both be diagonal.