Finding an orthogonal and diagonal matrix given eigenvalues/vectors

34 Views Asked by At

So for a symmetric matrix A I am given the eigenvalues $\lambda_1=3$ and $\lambda_2=-1$ where {[1 2 -1],[0 1 1]} is a basis for $E_3$ and {[-3 1 -1]} is a basis for $E_{-1}$.

I have the diagonal matrix D: $$ \begin{bmatrix} 3 & 0 & 0 \\ 0 & 3 & 0 \\ 0 & 0 & -1 \end{bmatrix} $$

and from using the Gram-Schmidt method for the eigenvectors given I received the matrix Q $$ \begin{bmatrix} 1\over \sqrt6 & -1\over \sqrt66 & -3\over \sqrt11 \\ \sqrt{2\over3} & 2\sqrt2\over\sqrt33 & 1\over \sqrt11 \\ -1\over \sqrt6 & 7\over\sqrt66 & -1\over \sqrt11 \\ \end{bmatrix} $$

I believe I have done all of my math correctly however when trying to solve for A using QDQ^T=A while I get a symmetric matrix with the correct eigenvalues I don't get the same eigenvectors I started with instead I get [$-1\over3 $ 0 1], [$1\over3$ 1 0], [3 -1 1]