Let $V$ a vector space with $\operatorname{dim}V <\infty$ and $f\in L(V,V)$ with $\operatorname {kernel}(f)=\operatorname {kernel}(f^2)$.
Show that $V=\operatorname{kernel}(f)\oplus\operatorname{im}(f)$ and show that this statement does not hold without $\operatorname {kernel}(f)=\operatorname {kernel}(f^2)$.
I tried to show that $f$ is injective and use the dimension formula.
Let $\dim V=n$ and let $v\in \operatorname {kernel}(f)$, i.e. $f(v)=0$, then by assumption $f(f(v))=0$, plugging in we get $f(0)=0$, i.e. $f$ is injective. Therefore $\dim(V)=\dim im(f)+\dim ker(f)=\dim im(f)+0=\dim im(f)$.
Does this already show $V=\operatorname{kernel}(f)\oplus\operatorname{im}(f)$?
I think yes, because since $f$ is injective and surjective $im(f)=V$ and $im(f)\cap ker(f)=\{0\}$.
For the second part my idea is that $f$ has not to be injective and then is the kernel not trivial. So we can find some $f$ with non trivial kernel, for example with $\dim ker(f)=1$ and with $\dim im(f)=n-1$ and then we would get $\dim V=\dim \operatorname{im}(f)+\dim \operatorname {ker}(f)$, but $ \operatorname {ker}(f)\cap \operatorname{im}(f)\ne \emptyset$.
But I can not find such an example. Does someone know one?
It is not true that if $\ker f=\ker f^2$ then $f$ is injective. The equality $f(0)=0$ holds for any linear map, regardless of injectivity. For an extreme example, if $f=0$, then $\ker f=\ker f^2=V$.
To prove your first statement, note that if $v\in \ker f\cap \operatorname{Im f}$, then $v=f(w)$, and $f(v)=0$, so $f^2(w)=0$; that is, $w\in \ker f^2=\ker f$, and then $v=f(w)=0$. Thus $\ker f\cap \operatorname{Im} f=0$. Then using the rank-nullity theorem, $$ \dim (\ker f+ \operatorname{Im} f)=\dim\ker f+\dim\operatorname{Im}f=\dim V. $$ Then $V=\ker f+ \operatorname{Im} f$ and the sum is direct because the intersection of the two subspaces is zero.
For an example, let us take $f$ with $\ker f\subsetneq\ker f^2$. For instance, $V=\mathbb R^2$, $$ f=\begin{bmatrix} 0 &1\\0&0\end{bmatrix}. $$ Then $\ker f=\operatorname{Im} f=\mathbb R\oplus0$.