Linear transformation/ Image equals kernel

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?
-
Specifically, you can say that the dimension of $V$ must be either infinite or finite and even. – Arturo Magidin Jan 19 '12 at 5:31

Yes, if the dimension of $V$ is finite it must be $0$ or an even number $N$. Then taking a basis $B$ of $V$ you can define $T$ for the $N/2$ first vectors of $V$ as $0$ and each of the rest you can send one one to the first $N/2$ vectors of $B$. Then, taking away the zero vectors you got a generator (and basis) of $\operatorname{Im}(T)$ with $N/2$ vectors, that is also a basis of $\operatorname{Ker}(T)$.
Let $V = \mathbb{R}^2$ and define $f$ by its action on the basis vectors: $$i \mapsto j$$ $$j \mapsto 0$$
Then $\operatorname{Im}(f) = \operatorname{Ker}(f)$.