I am trying to come up with an example of a vector space $V$ and a linear map $f\in \textrm{Hom}\,\left ( V,V \right )$ such that $\textrm{Im}\,f = \ker f$. Any help please?

* Also, it is asked that if such a linear map $f$ is defined as above on a vector space $V$, what can we say about $\dim V$? My answer for this second part is: it is known that $\dim V = \dim \ker f + \dim (\textrm{Im}\, f)=2\cdot\dim \ker f=2\cdot\dim (\textrm{Im}\, f)$. Is that what it is meant by the question?