Let $A \in \mathbb C^{n \times n}$. Prove that $\operatorname{rank} A = \operatorname{rank} A^2$ if and only if $\displaystyle\lim_{\lambda \to 0} (A+\lambda I)^{-1}A$ exists.
I am stuck on this problem, I don't understand what the limit is supposed to mean. I would guess that if the limit exists, it should be $I$ since the invertible matrices are dense. But how can I relate this to the rank?
Let $V=\mathbb C^n$. Since $A^2V=A(AV)\subseteq A(V)=AV$, if $\operatorname{rank} A=\operatorname{rank} A^2$, we must have $A^2V=AV$. Hence $AV$ is an invariant subspace on which $A$ is nonsingular. In turn, $\lim_{\lambda\to0}(A+\lambda I)^{-1}A=I$ on $AV$. Yet, we also have $(A+\lambda I)^{-1}A=0$ on $\ker A$ for every sufficiently small $\lambda\ne0$. Therefore $\lim_{\lambda\to0}(A+\lambda I)^{-1}A$ exists on $AV+\ker A$. This sum of subspaces must be equal to $V$, because $AV\cap\ker A=0$ (as $A^2V=AV$) and $\dim(AV)+\dim(\ker A)=\dim(V)$ (rank-nullity theorem). Thus $\lim_{\lambda\to0}(A+\lambda I)^{-1}A$ exists on $V$.
Conversely, observe that $W=\ker A^2$ is an invariant subspace of $A$ and \begin{aligned} &(A+\lambda I)^{-1}A=\frac{A}{\lambda}\left(I+\frac{A}{\lambda}\right)^{-1} =\frac{A}{\lambda}\left[I+\left(\frac{-A}{\lambda}\right)+\left(\frac{-A}{\lambda}\right)^2+\cdots\right] =\frac{A}{\lambda} \end{aligned} on $W$. So, if $\lim_{\lambda\to0}(A+\lambda I)^{-1}A$ exists, we must have $A=0$ on $W$, meaning that $A^2x=0\Rightarrow Ax=0$ for every vector $x$. But then $A^2V=AV$ and $\operatorname{rank} A=\operatorname{rank} A^2$.