Let $$A = \begin{bmatrix} a^2 & 0 & a \\ 0 & 2a & 0 \\ 0 & 0 & a+2 \end{bmatrix}$$ For each value of $a \in \mathbb R$, find the eigenvalues of $A$.
I thought it should be whenever $\ a$ makes the determinant of $A$ zero so it should be $\ 0, -2, $ but apparently the answers are $\ -1,0,2 $ which I don't understand why?
$\ a = -1 , 2, \ \det (A) \not = 0 $
If the question is
then the answer is $a^2, 2a, a+2$ since $A$ is triangular.
If the answer is
then the question is "find for which value of $a$ the matrix $A$ has repeated eigenvalues."