A $3\times 3$ matrix $$A = \begin{pmatrix} 2 & -1 & 1\\ -2 & 3 & -2\\-1 & 1 & 0\end{pmatrix}$$
produces this characteristic equation: $\lambda^2 - 4\lambda + 3 = 0$, these eigenvalues: $\lambda_1 = 1$, $\lambda_2 = \frac{-1 + \sqrt{13}}{2}$, $\lambda_3 = \frac{-1 - \sqrt{13}}{2}$, and these eigenvectors:
- For $\lambda_1$, $\vec{x} = s\left<1,1,0\right> + t\left<-1,0,1\right>$ (or $\operatorname{span}\{\left<1,1,0\right>, \left<-1,0,1\right>\}$), $\vec{x}_1 = \left<1,1,0\right>$, $\vec{x}_2 = \left<-1,0,1\right>$
- For $\lambda_2$, $\vec{x}_3 = \left<0,0,0\right>$
- For $\lambda_3$, $\vec{x}_4 = \left<0,0,0\right>$
After normalizing the already orthogonal $\vec{x}_1$, I get $\operatorname{span}\{\left<\sqrt{2}/2, \sqrt{2}/2, 0\right>, \left< -\sqrt{2}/2, 0, \sqrt{2}/2\right>\}$.
Setting up my $P$ matrix for diagonalization, it appears to be a $3\times 4$ matrix that is singular: $\begin{pmatrix} \sqrt{2}/2 & -\sqrt{2}/2 & 0 & 0\\ \sqrt{2}/2 & 0 & 0 & 0\\0 & \sqrt{2}/2 & 0 & 0 \end{pmatrix}$
Questions: Why do I have four vectors, and why are two of them zero vectors? Symmetric matrices are always diagonalizable, where there's a $P$ such that $P^{-1} = P^T$.