# Diagonalize a matrix

Ok, so i have this question i cant solve i hope someone can help, there you go:

we have matrix $A = \left( \begin{array}{ccc} 0 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 0 \\ \end{array} \right)$.

we need to find a diagonal matrix $D$ and an orthogonal matrix $P$ so that:

$D=P^tAP$

-
Which theory do you have a avaliable? Do you know about eigenvalues and how to find eigenvectors? –  Henning Makholm Feb 4 '12 at 14:18
Yeah, i tried it but it always gets wrong somewhere in the middle –  Some1 Feb 4 '12 at 14:23
You should show what you've tried and what you're saying goes wrong with your attempt, you know... that would make it more interesting for the rest of us. –  Ｊ. Ｍ. Feb 4 '12 at 14:25
I've tried to find the eigenvalues using $tI-A=0$ so it's: $\left( \begin{array}{ccc} (-t) & 1 & 1 \\ 1 & (-t) & 1 \\ 1 & 1 & (-t) \\ \end{array} \right)=0$. I get t=2,-1,1 im kind of stucked here... –  Some1 Feb 4 '12 at 14:29
I think the solution is -1 and 2 only. –  alpha.Debi Feb 4 '12 at 14:36
show 1 more comment

$A = \left( \begin{array}{ccc} 0 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 0 \\ \end{array} \right)$.

You know $D = \left( \begin{array}{ccc} 2 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & -1 \\ \end{array} \right)$.

Now, $Ax = \lambda x$

x = 2 (Case 1) $$Ax = 2x$$ $$Ax - 2x = 0$$ $$(A - 2I)x = 0$$ $$A -2I= \left( \begin{array}{ccc} -2 & 1 & 1 \\ 1 & -2 & 1 \\ 1 & 1 & -2 \\ \end{array} \right)$$ $$\left( \begin{array}{ccc} -2 & 1 & 1 \\ 1 & -2 & 1 \\ 1 & 1 & -2 \\ \end{array} \right)x=0$$ Take it to echelon form you get

$$\left( \begin{array}{ccc} 1 & 0 & -1 \\ 0 & 1 & -1 \\ 0 & 0 & 0 \\ \end{array} \right)x=0$$ Thus, if x = (a b c)'

a = b = c Similarly, do for the rest.

-
$A$ is symmetric, then you can find an orthonormal basis of ${\bf R}^3$ with eigenvectors. Solve $\det(A-tI)=0$, find the proper values, and for each one the eigenspace. If one of the spaces has dimension 2 you have to apply Gram-Schmidt to get an orthonormal basis, and the other basis will have one vector that you can normalize. Then the union of the two bases is an orthonormal basis (eigenvectors of a symmetric matrix corresponding to different eigenvalues are orthogonal). Put this basis as columns of $P$..