# Symmetric matrices and orthogonal diagonalization.

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:

1. 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>$
2. For $\lambda_2$, $\vec{x}_3 = \left<0,0,0\right>$
3. 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$.

-
Are you sure your characteristic equation is correct? I think its $-x^3+5 x^2-7 x+3 = 0$. – Pratik Deoghare Aug 5 '10 at 13:18
Please input {{2, -1, 1}, {-2, 3, -2}, {-1, 1, 0}} at wolframalpha.com and verify information you supported. – Pratik Deoghare Aug 5 '10 at 13:20
@TheMachineCharmer: isn't wolfram alpha a bit much, considering that the problem is that the polynomial has the wrong degree? Also, to Gentry...symmetric: I do not think it means what you think it means. That matrix is not symmetric, so why did you mention symmetric matrices at the end? – Charles Siegel Aug 5 '10 at 13:30
Characteristic equation incorrect, matrix not symmetric. Back to the drawing board. =) Thanks guys! – Gentry Aug 5 '10 at 14:00
Yes. The characteristic polynomial (if you define it by $\det(\lambda I-A)$, which is just $(-1)^n$ times the other definition) is always monic. By the usual def, the lead coefficient is $(-1)^n$ where $n$ is the size of the matrix. – Charles Siegel Aug 5 '10 at 14:17
show 1 more comment

Well, first off, a vector isn't orthogonal, a set of vectors is. Remember that for two vectors to be orthogonal, it means that they are at right angles to each other, and orthonormal means that plus they're unit vectors.

Now, if I had to say where I think your first error is, you took a 3 x 3 matrix and got a quadratic equation somehow, but you should have a cubic. And also, as for your eigenvectors, where did $\lambda_4$ come from? What is it? The symbol just appears from nowhere. Perhaps you have typos and it's $\lambda_2,\lambda_3$ rather than 3 and 4, and each of them must have a nonzero eigenvector, because they are eigenvalues of multiplicity 1 (though with the equation error, they might not be eigenvalues), and so you would have to be incorrect about having a two dimensional eigenspace in the first place.

However, both of the eigenvectors for 1 check out, which means that you've incorrectly calculated the eigenvalues.

(instead of just an answer, I put in all the thinking I did to get there, because I thought it might help clarify how to check your work in the future)

-
show 1 more comment

Your characteristic polynomial is incorrect. Go to wolframalpha.com and enter: {{2, -1, 1},{-2, 3, 2}, {-1, 1, 0}}

www.wolframalpha.com/input/?i={{2,+-1,+1},{-2,+3,+2},+{-1,+1,+0}}

You will see that the characteristic polynomial is of 3rd degree. It must be of 3rd degree because your matrix is 3x3. Here is what you'll get:

p(x)=-x^3+5 x^2-3 x-1
lambda_1 = 4.23607
lambda_2 = 1
lambda_3 = -0.236068

And you will also get 3 eigenvectors. (Never 4 for a 3x3 matrix).

-
 You input the matrix incorrectly, there's no +2 in the second row, and all three eigenvalues are integral, and all three eigenvectors are defined over the integers. – Charles Siegel Aug 5 '10 at 14:19