For each of the following real symmetric matrices \(A\), find a real orthogonal matrix \(P\) such that \(P^tAP\) is diagonal. \[ \begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix}, \qquad \begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}, \qquad \begin{bmatrix} \cos\theta & \sin\theta \\ \sin\theta & -\cos\theta \end{bmatrix} \]
Solution
1. Diagonalize the first matrix.
Let \[ A_1=\begin{pmatrix}1&1\\1&1\end{pmatrix}. \] The orthonormal vectors \[ u_1=\frac1{\sqrt2}\binom11, \qquad u_2=\frac1{\sqrt2}\binom1{-1} \] satisfy \[ A_1u_1=2u_1, \qquad A_1u_2=0. \] Thus with \[ P_1=\frac1{\sqrt2} \begin{pmatrix}1&1\\1&-1\end{pmatrix}, \] we have \(P_1^tP_1=I\) and \[ \boxed{P_1^tA_1P_1=\begin{pmatrix}2&0\\0&0\end{pmatrix}.} \]
2. The same orthogonal matrix diagonalizes the second matrix.
For \[ A_2=\begin{pmatrix}1&2\\2&1\end{pmatrix}, \] the same two vectors satisfy \[ A_2u_1=3u_1, \qquad A_2u_2=-u_2. \] Hence \[ \boxed{P_1^tA_2P_1=\begin{pmatrix}3&0\\0&-1\end{pmatrix}.} \]
3. Diagonalize the parameterized matrix by a half-angle rotation.
Write \[ A_3= \begin{pmatrix} \cos\theta&\sin\theta\\ \sin\theta&-\cos\theta \end{pmatrix}. \] Set \[ v_+=\binom{\cos(\theta/2)}{\sin(\theta/2)}, \qquad v_-=\binom{-\sin(\theta/2)}{\cos(\theta/2)}. \] These vectors are orthonormal. The angle-difference identities give \[ A_3v_+=v_+, \qquad A_3v_-=-v_-. \] Therefore, for \[ P_3= \begin{pmatrix} \cos(\theta/2)&-\sin(\theta/2)\\ \sin(\theta/2)&\cos(\theta/2) \end{pmatrix}, \] we have \(P_3^tP_3=I\) and \[ \boxed{P_3^tA_3P_3=\begin{pmatrix}1&0\\0&-1\end{pmatrix}.} \]