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.