So I do know how to compute the eigenvalues of a matrix. At least, that's what I thought. I got the matrix
A = \begin{bmatrix}1&-2&0\\-2&0&2\\0&2&-1\end{bmatrix}
My approach is by finding the determinant: \begin{equation} \text{det}\left(A-\lambda In\right) = 0 \end{equation}
so it becomes $$ \text{det}\left( \begin{bmatrix}1-\lambda&-2&0\\-2&0&2\\0&2&-1-\lambda\end{bmatrix} \right) = 0. $$ But this gave me 8 lambda
According to calculators, it should give me -3, 3 and 0 What did I miss?
Probably You have some othe mistake in the calculus of determinat.
Hint:
$$ \text{det}\left( \begin{bmatrix}1-\lambda&-2&0\\-2&-\lambda&2\\0&2&-1-\lambda\end{bmatrix} \right) = $$ $$ (1-\lambda) \text{det}\left( \begin{bmatrix}-\lambda&2\\2&-1-\lambda\end{bmatrix} \right) +2 \text{det}\left( \begin{bmatrix}-2&2\\0&-1-\lambda\end{bmatrix} \right)= $$ $$ =(1-\lambda)(\lambda + \lambda^2-4)+2(2+\lambda) $$ ......