# Simultaneous orthogonal diagonalization

Statement

Let $A, B \in M_{n\times{}n}(\mathbb{R})$ be symmetric and commutative such that $AB=BA$. Then $A$ and $B$ are simultaneously orthonormally diagonalizable. i.e. there is $Q \in O(n)$ such that $Q^{T}AQ$ and $Q^{T}BQ$ are diagonal.

Attempted proof

Using the fact that symmetric matrices are orthonormally diagonizable in respect of the standard-scalar product we know that both $A$ and $B$ are diagonizable. It can be shown (that shouldn't be the problem in this question) that each eigenspace $E_{\lambda,A}$ of a eigenvalue $\lambda$ of $A$ has a basis $\mathcal{B}_{\lambda}$ consisting of eigenvectors of $B$. Because the eigenspaces of $B$ are orthogonal to each other this basis can be orthonormalized using Gram-Schmidt.

That implies that every eigenspace of $A$ has an orthonormal basis consisting of eigenvectors of $B$. Because all eigenspaces of $A$ are orthogonal we can unite all bases and we get an orthonormal basis $\mathcal{C}$ consisting of eigenvectors of $A$ and $B$.

Let $Q\in M_{n\times{}n}(\mathbb{R})$ be the matrix with those orthonormal vectors as columns. Because $Q^{-1}=Q^{T}$ we get that both $Q^{T}AQ$ and $Q^{T}BQ$ are diagonal.

Question

Does this prove the statement? / Is my statement wrong? The step I am not sure about is is the last sentence in the first paragraph.

• just a gentle suggestion for the readability. Write it in two sections, namely question followed by your attempt to answer the question. – user550103 Jun 17 '18 at 14:14
• @user550103 thanks for the hint, I adjusted it. – Flowrian Jun 17 '18 at 16:51