# Diagonalize a matrix

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

How do you 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. – J. M. 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

$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$..

-
Still not working :\ – Some1 Feb 4 '12 at 15:01
But if you built the orthonormal basis of eigenvectors of A , and used it as the columns of P it must work. – alpha.Debi Feb 4 '12 at 15:45
I'm still learning this, I guess I have a mistake somewhere because your answer seems right... can anyone please show me how its done so ill know for other similar questions? – Some1 Feb 4 '12 at 15:49
My answer is a method used in linear algebra to diagonalize symetric matrices by an ortogonal matrix P,that is P^T=P^-1 – alpha.Debi Feb 4 '12 at 16:08
Some1, you're not helping. Can you find the eigenvalues? Can you find a basis for each eigenspace? Can you use Gram-Schmidt to get an orthonormal basis for each eigenspace? Can you make a matrix whose columns are the eigenvectors? It's not enough to say you don't understand - you have to show us what you do understand, and then we can help you over the rough spots. – Gerry Myerson Feb 4 '12 at 23:43