Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


  • $f:A\rightarrow B$
  • $g: B \rightarrow C$
  • $g \circ f$ is one-to-one

Why must $f$ be one-to-one, but not $g$? (Does $g$ have to be onto?)

Thanks in advance.

share|cite|improve this question
up vote 3 down vote accepted

If $f$ isn't one-to-one, $f(a) = f(b)$ with $a\ne b$, say, then $gf(a) = gf(b)$, contradicting the one-to-one-ness of $g\circ f$. To see $g$ needn't be one-to-one or onto, consider $A = \{0\}$, $B = C= \{0,1\}$. $f(0) = 0$, $g(0) = g(1) = 0$. Then $g\circ f\colon A \to C$ is the one-to-one, but $g$ isn't one-to-one or onto.

share|cite|improve this answer

Recall that $g\circ f$ means taking $a\in A$ then passing it through $f$ into $B$ and then through $g$ into $C$.

Essentially what $g$ does to elements in $B\setminus\operatorname{Rng}(f)$ is of no interest to the composition, and it is exactly the possible case that $g$ is not being injective over those elements. It is essential that between $u,v\in\operatorname{Rng}(f)$ we have $g(u)=g(v)\iff u=v$. Namely $g$ restricted to $\operatorname{Rng}(f)$ is injective, but $g$ itself may be very different.

If $f$ is onto $B$ then indeed $g$ itself has to be injective as well, but other than that surjectivity does not play an important role in this specific problem.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.