For which values of $a$ does the matrix can be diagnolized? Given $$A=\begin{pmatrix}
2 & 0 & 0\\ 
a &  2& 0\\ 
a+3 & a &-1 
\end{pmatrix}$$
For which values of $a$ can $A$ be diagonal?
I found that $p_A(x)=(x-2)^2(x+1)$ and tried to find the eigen subspace of 2, to see if the geomtric multiplicity of the eigenvalue $2$ is $2$.
I got a set of equations:$$2x=2x ; ax+2y=2y ; (a+3)x+ay-z=2z$$
But I could not understand how to extract the relevant information from it.
 A: Assuming you got the correct set of equations, from the first equation we get $x$ can be anything, the second equation gives, $y$ can be anything but $ax=0$. From here either we have $a=0$ or $x=0$. 
If $a=0$, then the third equation gives $z=0$. But since $x$ and $y$ have no restrictions, therefore you can generate two independent eigen vectors by choosing $x=1, y=0$ and $x=0,y=1$. Hence diagonalizable.
If $a \neq 0$, then $x$ has to be $0$, $y$ can still be anything and from the third equation we get $ay+3z=0$. Now ask can you generate two independent vectors in this case?
A: You'll get for $a \neq 0$, that the nullspace of $A-2I$ is less than $2$. To see why, you have that 
\begin{align*} A - 2I = \left(\begin{matrix}  0 & 0 & 0 \\ a & 0 & 0 \\ a+3 & a & - 3 \end{matrix}\right) \end{align*}
is row equivalent to 
\begin{align*}\left(\begin{matrix}  0 & 0 & 0 \\ 1 & 0 & 0 \\ a+3 & a & - 3 \end{matrix}\right) \end{align*}
since $a \neq 0$. This is row equivalent to 
\begin{align*}\left(\begin{matrix}  0 & 0 & 0 \\ 1 & 0 & 0 \\ 0 & a & -3 \end{matrix}\right)\end{align*}
regardless if $a = -3$ or not. So that this is row equivalent to
\begin{align*}\left(\begin{matrix}  0 & 0 & 0 \\ 1 & 0 & 0 \\ 0 & 1 & -\frac{3}{a} \end{matrix}\right)\end{align*}
since $a \neq 0$. I think you can extract the relevent information from there.
A: Since $A-2I=\begin{pmatrix}0&0&0\\a&0&0\\a+3&a&1\end{pmatrix}$, $\;\;\text{nullity}(A-2I)=2\iff \text{rank}(A-2I)=1 \iff a=0$,
so A is diagonalizable $\iff a=0$.
