<s>[INST] Why doesn't the matrix $\begin{pmatrix} 10 & -20 & -20 \\ -20 & 40 & 40 \\ -20 & 40 & 40 \end{pmatrix}$ have an orthogonal set of eigenvectors? 
Why doesn't the matrix 
  $$\begin{pmatrix}
10 & -20 & -20 \\
-20 & 40 & 40 \\
-20 & 40 & 40
\end{pmatrix}$$ have an orthogonal set of eigenvectors?

I have used a matrix calculator to diagonalize the matrix but I see that the eigenvectors: 
$$\begin{pmatrix}
2 \\
1 \\
0
\end{pmatrix}, 
\begin{pmatrix}
2 \\
0 \\
1
\end{pmatrix}, 
\begin{pmatrix}
-1/2 \\
1 \\
1
\end{pmatrix}$$
are not orthogonal. According the spectral theorem, this matrix should have an orthogonal basis of eigenvectors. What is wrong?
 [/INST] You need to do Gram-Schmidt on the first two eigenvectors to get orthogonal vectors. $$ \begin{pmatrix}
2 \\
1 \\
0
\end{pmatrix}, 
\begin{pmatrix}
2 \\
0 \\
1
\end{pmatrix}, 
\begin{pmatrix}
-1/2 \\
1 \\
1
\end{pmatrix}$$
They are eigenvectors associated with the same eigenvalue  $\lambda =0$
</s>