Finding the rank of an non-invertible matrix I have a $3\times3$ matrix with three different eigenvalues $0,1, 2$. 
The question is: what is the rank of this matrix? If the matrix was invertible, I could say that the rank was equal to $n=3$. But as zero is an eigenvalue of this matrix, this matrix does not satisfy the Invertible Matrix Theorem. 
How should I determine the rank? Thanks in advance. 

By the rank-nullity theorem, the rank is always $n$ (the size of the matrix) minus the nullity. The nullity is always the geometric multiplicity (number of associated linearly independent eigenvectors) of the eigenvalue $0$.
In your case, the nullity has to be $1$, which means that the rank is $2$.
