<s>[INST] 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.
 [/INST] 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.
</s>