TITLE: examples of linear map $f:V \rightarrow V$, which is injective but not surjective
QUESTION [5 upvotes]: I am trying to find a linear map $f:V \rightarrow V$, which is injective but not surjective. 
I always thought that if the dimension of the domain and codomain are equal and the map is injective it implies that a map is surjective. Maybe we need an infinite basis of the vector space $V$? What can be an example of that?
Thank you!

REPLY [7 votes]: Yes, we need an infinite-dimensional vector space. An interesting example is: $V$ the space of continuous functions $[0,1]\to\mathbb R$ and $f$ integration $f(g)(x)=\int_0^xg(t)\,\mathrm dt$. This is not surjective because $f(g)(0)=0$ for all $g$

REPLY [5 votes]: In finite dimensions we have that bijectivity $\Leftrightarrow$ injectivity $\Leftrightarrow$ surjectivity. Hence we have to come up with an infinite-dimensional example. The idea is to pick a basis $v_i, i\in \mathbb N$, and shift every basis vector $v_i \mapsto v_{i+1}$. We can do that not hitting the first basis vector only because we have infinitely many elements.