Simultaneous orthogonal diagonalization of two matrices Let $A=\begin{pmatrix}
1 & -2\\ 
-2 & 5
\end{pmatrix}$ and $B=\begin{pmatrix}
-3 & 6\\ 
6 & -10
\end{pmatrix}$. Obviously $A$ is positive-definite and thus we can simultaneously diagonalize $A$ and $B$. It's easy to check that $P=\begin{pmatrix}
1 & 2\\ 
0 & 1
\end{pmatrix}$ is invertible and diagonalizes $A$ and $B$ such that $P^t A P=I$ and $P^t B P=\text{diag}(-3,2)$. But is there an orthogonal matrix $Q$ such that $Q^t A Q$ and $Q^t B Q$ are diagonal? How can I possibly determine whether such a matrix exists?
 A: Simultaneous congruence via an orthogonal matrix implies in particular simultaneous orthogonal diagonalization and in particular, simultaneous diagonalization. Assume that there exists an orthogonal matrix $Q$ such that $Q^tAQ = \mathrm{diag}(\lambda_1, \lambda_2)$ and $Q^tBQ = \mathrm{diag}(\mu_1, \mu_2)$. Since $Q^t = Q^{-1}$, we must have that $\lambda_1,\lambda_2$ are the eigenvalues of $A$ and the columns of $Q$ are an orthonormal basis of eigenvectors (with respect to the standard inner product on $\mathbb{R}^2$) of $A$ corresponding to $\lambda_i$. Similarly, $\mu_1,\mu_2$ are the eigenvalues of $B$ and the columns of $Q$ must form an orthonormal basis of eigenvectors of $B$ corresponding to $\mu_i$. The matrices $A$ and $B$ will be simultaneously congruent to diagonal matrices via an orthogonal matrix if and only if you can find an orthonormal basis of $\mathbb{R}^2$ that consists of eigenvectors both of $A$ and $B$.
The characteristic polynomial of $A$ is $\chi_A(t) = t^2 - 6t + 9$ and so $\{\lambda_1, \lambda_2 \} = \{3 - 2\sqrt{2}, 3 + 2\sqrt{2}\}$. The corresponding eigenspaces are
$$ V_{3 - 2\sqrt{2}} = \mathrm{span}\{(1 + \sqrt{2}, 1)^t\}, V_{3 + 2\sqrt{2}} = \mathrm{span}\{(1 - \sqrt{2}, 1)^t\}$$.
Since
$$ \begin{pmatrix}
-3 & 6\\ 
6 & -10
\end{pmatrix} \begin{pmatrix} 1 + \sqrt{2} \\ 1 \end{pmatrix} = \begin{pmatrix} 3 + 6\sqrt{2} \\ -4 + 6\sqrt{2} \end{pmatrix} \neq (-4 + 6\sqrt{2}) \begin{pmatrix} 1 + \sqrt{2} \\ 1 \end{pmatrix}$$
we see that an eigenvector of $A$ won't be an eigenvector of $B$ and thus simultaneous congurence via an orthogonal matrix is impossible.
Alternatively, you can prove that two symmetric real matrices are orthogonally diagonalizable simultaneously if and only if they commute. Since $AB \neq BA$, this shows that $A$ and $B$ can't be diagonalized simultaneously.
