The question gave the hint that :For any invertible matrix B,rank(AB)=rank(A)and rank(BA)=rank(A).
I was thinking to prove that λI−A is invertible, hence by the property of the rank of matrices given, rank(λI−A)=rank((λI−A)^2).
However I realized that since λ is an eigenvalue of A, the det(λI−A) is zero hence is not invertible. Is there anyway to prove this?
It suffices to show the dimension of the null space is the same for both. I.e. eigenvectors and some generalized eigenvectors.
And for diagonalizable matrices there is a basis for $\mathbb R^n$ consisting of just eigenvectors. So all generalized eigenvectors are eigenvectors.