# $f$ nilpotent and $\dim \ker f^k = \dim \ker f^{k+1}$ then $f^k=0$

Let $f:\mathbb R^n\rightarrow \mathbb R^n$ a linear nilpotent operator with $\dim \ker f^k = \dim \ker f^{k+1}$ for $k\in \mathbb N$. How can I prove that $f^k=0$?

I tried to show that because $f$ is nilpotent, there exists $i \in \mathbb N$ with $f^i=0$. and we know that as we go further to $i$ the kernel of $f$ gets smaller and smaller. but It seems that something is missing here, I think that might be a much easier solution.

Notice that $\ker f^k\subset \ker f^{k+1}$. So, if $\dim\ker f^k=\dim\ker f^{k+1}$, than $\ker f^k= \ker f^{k+1}$.

Finally, for the sake of contradiction, assume there exists some $v$ such that $f^k(v)\neq0$ $$f^k(v)\neq0\rightarrow f^{k+1}(v)\neq0\rightarrow f^k(f(v))\neq0\rightarrow f^{k+1}(f(v))\neq0\rightarrow f^{k+2}(v)\neq0\dotsb$$ Hence, for every $n \in \mathbb{N}$, $f^n(v)\neq0$.

Hint. Consider the Jordan decomposition. It contains Jordan blocks of different size. The degree of $f$ is the larger size of Jordan block. Say it is $k$. The dimensional of the kernel of each block is equal to one, and hence the dimension of the kernel of $f$ is equal to the number of Jordan blocks. The dimension of the kernel of $f^2$ increases by the number of blocks of dimension at least 2. The dimension of the kernel of $f^3$ increases by the number of blocks of dimension at least 3, etc. It does not increase after $k$, as the $k$-th powers of all Jordan blocks vanish.

Since $\ker f^{k}\subseteq\ker f^{k+1}$, the given equality says that $\ker f^k=\ker f^{k+1}$.

Prove by induction, $\ker f^{k+r}=\ker f^k$, for every $r\ge0$.

Since $\operatorname{im}f^{k+r}\subseteq\operatorname{im}f^{k}$, the rank-nullity theorem implies that $\operatorname{im}f^{k+r}=\operatorname{im}f^{k}$.

By restriction $f$ defines a linear map $\def\im{\operatorname{im}}\im(f^k)\to\im(f^{k+1})$ which by definition is surjective. But from $\dim \ker(f^k) = \dim \ker(f^{k+1})$ and rank nullity it follows that $\dim\im(f^k)=\dim\im(f^{k+1})$, and from rank nullity again the mentioned restriction has trivial kernel, so it is an isomorphism. But like $f$, the restriction is also nilpotent, which can only mean that $\dim\im(f^k)=0$, and so $f^k=0$.