Values of $\theta$ for a rotation matrix Suppose we are given a symmetric $2\times 2$ matrix $M=\begin{pmatrix} a & b \\b & c \end{pmatrix}$ and let $R$ be a rotation matrix. If we are given that $B=RMR^{\text{T}}$ is diagonal, then what are the possible angles of rotation?
So far I have that $R$ must take the form $$R=\begin{pmatrix}\cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{pmatrix}$$ for some value of $\theta$. I also know that we can show that the columns of $R$ must be the eigenvectors of $M$ with the eigenvalues being the corresponding diagonal elements of $B$. However, the "obvious" way to find the possible values of $\theta$ seem to involve very messy computations, like writing out $RMR^{\text{T}}$ explicitly and trying to equate certain entries of the matrix to $0$. Is there a clean way of doing this?

There is no restriction on $\theta$!
Indeed, let $B=\begin{pmatrix}\lambda_1&0\\0&\lambda_2\end{pmatrix}$, then \begin{eqnarray}
R^TBR&=&\begin{pmatrix}\lambda_1\cos^2(\theta)+\lambda_2\sin^2(\theta) & -\lambda_1\sin(\theta)\cos(\theta)+\lambda_2\sin(\theta)\cos(\theta)\\-\lambda_1\sin(\theta)\cos(\theta)+\lambda_2\sin(\theta)\cos(\theta) & \lambda_1\sin^2(\theta)+\lambda_2\cos^2(\theta)\end{pmatrix}\\ &=& \begin{pmatrix}(\lambda_2-\lambda_1)\sin^2(\theta)+\lambda_1 & \frac{\lambda_2-\lambda_1}{2}\sin(2\theta)\\\frac{\lambda_2-\lambda_1}{2}\sin(2\theta) & (\lambda_2-\lambda_1)\cos^2(\theta)+\lambda_1 \end{pmatrix}.\end{eqnarray}
For any value of $\theta$ and $\lambda_1$ and $\lambda_2$ you plug in, $M=R^TBR$ is indeed a symmetric matrix.
