Let $A \in M_{3 \times 3} \mathbb{R}$ and $a \in \mathbb{R}$ such that: $$A= \begin{pmatrix} 1 & a & a\\ -1 & 1 & -1\\ 1 & 0 & 2 \end{pmatrix}$$ Determine for what values of $a$ the matrix is diagonalizable. For those values, find a matrix $Q$ such that $Q^{-1}AQ$ is diagonal.
So first I find the characteristic polynomial to find its roots, but it is $\lambda ^{3}-4 \lambda^{2}+5\lambda -2a-2$ and I absolutely get stuck there. I can't get any roots from that polynomial.
Actually, the characteristic polynomial of $A$ is $\lambda ^3-4\lambda ^2+5\lambda-2$, whose roots are $1$ and $2$ (and $2$ is a simple root). So, all that is left is to find the dimension of the eigenspace corresponding to the eigenvalue $1$. Can you take it from here?