# Why do we need surjectivity of f to get injectivity of $f_*$?

If we have two topological spaces X,Y and a continuous function between f, and $f(a)=b$.

We get a function between the fundamental groups:

$f_*: \pi(X,a)\rightarrow\pi(Y,b)$, which is given by $f_*([g])=[f \circ g]$. But it is also so that f must be both surjective and injective for $f_*$ to be injective?

If you get have that $[f\circ g_1]=[f\circ g_2]$, can you please tell me why we do not get that $[g_1]=[g_2]$ if we only have that f is injective, we need surjectivity aswell?

PS: My question comes by wondering about the classical example from $S^1\rightarrow B^2$, if we just use the identity we get that f is injective, but not surjective, and it is proved that the fundamental group of the last one is trivial and the first one is not. So $f_*$ is not injective. But I do not understand where the details go wrong.

$f$ doesn't need to be neither surjective nor injective. Consider just $X:=\Bbb R^2\setminus \{0\}$ and $f: (X,1)\to (X,1)$ defined by $x\mapsto x/|x|$. This clearly induces the identity on fundamental groups.
• @user119615 Because any loop $l(s)$ and $l(s)/|l(s)|$ are homotopic in $X$ via the homotopy $l(s)/(t+(1-t)|l(s)|)$. You easily verify that this is a well defined homotopy in $X$. – Peter Franek Dec 23 '15 at 8:00
Consider the inclusion map $j\colon S^1 \to B^2$ defined by $j(x) = x$ for all $x \in S^1$, which is certainly continuous and injective. We claim that there exists no retraction map (that is, there is no continuous surjection) of the form $r\colon B^2 \to S^1$.
Suppose, towards a contradiction, that such a retraction $r$ did exist. Then since $r \circ j = \text{id}_{S^1}$, we know that $r$ is surjective and $j$ is injective. By using fundamental groups, we also know that $r_* \circ j_* = \text{id}_{\pi_1(S^1, s_0)}$ so that $r_*$ is surjective and $j_*$ is injective. But this is absurd, since $\pi_1(S^1, s_0)$ is nontrivial and $\pi_1(B^2, b_0)$ is trivial, so $j_*\colon \pi_1(S^1, s_0) \to \pi_1(B^2, b_0)$ is not injective. Hence, we conclude that no such retraction exists, as desired. $~~\blacksquare$