For which values can the matrix be diagonalized? 
Let $$A=\begin{pmatrix} 
1 & a &1 \\
0 & 1 &b\\
0 &0& c\end{pmatrix}$$ For which $a,b,c$ can the matrix be diagonalized?

I know that a matrix can be diagonalized if the algebraic multiply is equal to the geometric multiply.
Looking at $|A-\lambda*I|$ gives $(c-\lambda)(1-\lambda)^2$ so if $c=1$ we know that that the minimal polynomial should be $(x-\lambda)$ so $(A-\lambda)=0$
How should I approach this?
 A: If $c\not=1$ then there are two eigenvalues: $1$ and $c$. The algebraic multiplicity of $1$ is 2 and the algebraic multiplicity of $c$ is 1.
The geometric multiplicity of $c$ is $3-\mbox{rank}(A-cI)=3-2=1$.
Since $\mbox{rank}(A-I)=2$ for $a\not=0$, and $\mbox{rank}(A-I)=1$ for $a=0$, then the geometric multiplicity of $1$ is $1$ for $a\not=0$ and $2$ for $a=0$. Hence if $c\not=1$ then $A$ is diagonizable iff $a=0$.
If $c=1$ then there is only one eigenvalue: $1$. The algebraic multiplicity of $1$ is 3. Since $\mbox{rank}(A-I)=2$ for $a\cdot b\not=0$ and $\mbox{rank}(A-I)=1$ otherwise, it follows that the geometric multiplicity of $1$ is always less than 3 and $A$ is not diagonizable.
Therefore  $A$ is diagonizable iff $c\not=1$ and $a=0$.
P.S. Remember that the geometric multiplicity of the eigenvalue $\lambda$ of a $n\times n$ matrix $A$ is equal to $n-\mbox{rank }(A−\lambda I)$.
A: A matrix is diagonalizable if and only if each eigenvalue has the same algebraic and geometric multiplicity.
The geometric multiplicity of the eigenvalue $\lambda$ is the dimension of the null space of $A-\lambda I$, which can be computed as the order of the matrix (in this case $3$) minus the rank of $A-\lambda I$.
If an eigenvalue has algebraic multiplicity $1$, then its geometric multiplicity is $1$, so only multiple eigenvalues need to be considered. The only multiple eigenvalue is $\lambda=1$.
If $c=1$, the rank of $A-I$ should be …
If $c\ne1$, the rank of $A-I$ should be …
