How would you determine the diagonalizability and rank for $3\times 3$ matrix A based on the following assumption? How would you determine the diagonalizability and rank for $3\times 3$ matrix A based on the following assumption?

$\det(A)=0,\ \det(A+2I)=0,\ \det(A-3I)=0$.

I felt like it is possible for the rank of $A$ to be $1,\ 2$, or $3$ due to the variation of surrounding numbers. In addition, since the diagonalizability depends on the dimension of eigenvectors corresponding to multiplicity, how do you determine it?
 A: The equations in your top line tell you (respectively) that $A$ has eigenvalues $0$, $-2$ and $3$. Since it is a $3\times 3$ matrix with distinct eigenvalues, it is therefore diagonalizable. Thus similar to a diagonal matrix with $0,-2$ and $3$ on the diagonal. From this diagonalization, it is immediate that the rank must be $2$.
Longer form answer:
The equations in the top row tell you that the matrices $A$, $A+2I$ and $A-3I$ are all singular. This means that they each have non-trivial kernels. Since the kernels are non-trivial, they each contain non-zero vectors. Let $x,y,z$ be vectors in the respective kernels. Then we have the following:
$$
\begin{align*}
Ax & = 0 = 0x\\
\\
(A + 2I)y & = Ay + 2y = 0\\
\implies Ay & = -2y\\
\\
(A-3I)z & = Az - 3z = 0\\
\implies Az & = 3z
\end{align*}
$$
These equations show us that $x,y$ and $z$ are actually eigenvectors with respective eigenvalues $0, -2$ and $3$. Hence $E_x := \mbox{span}(x)$, $E_y := \mbox{span}(y)$ and $E_z:= \mbox{span}(z)$ are each 1-dimensional spaces that are carried to themselves by $A$. The equations above tell us that no two of them can be equal since no two of $x,y$ and $z$ can be equal. Hence, by a dimension count they are exactly the eigenspaces of $A$ which is diagonalizable since its eigenspaces span the entire domain ($\mathbb{R}^3$). $\{x,y,z\}$ is an eigenbasis for $A$ and the kernel of $A$ is exactly the span of $x$ which is thus 1-dimensional. By the rank-nullity theorem, this means that the rank of $A$ is 2.
