Why this matrix is not diagonalizable? [closed]

Let be $A$ a $n\times n$ matrix such that, rank($A)=n-1$ and rank($A^2)=n-2$. ¿Why a matrix like that is not diagonalizable?


Solution 1:

Assuming $A$ is diagonalizable, it's not restrictive to assume that $A$ is diagonal. How many diagonal entries are equal to $0$?

What about $A^2$?