0

Let $X,Y,Z$ be sets, let $f:X\to Y$, $g:Y \to Z$. If composition of $g\circ f$ is injective, the so is $f$.

This question has been asked many times: Show that if $g \circ f$ is injective, then so is $f$.

Composition of functions injective implies one of them is injective?

If g(f(x)) is one-to-one (injective) show f(x) is also one-to-one (given that...)

Every answer suggests a proof, where we argue by contrapostive and assume $x\neq x'$ is true and $f(x)=f(x')$ is true. Why is that so? I mean if the injectivity assumption is false, then we could also have the case where $x\neq x'$ is true but $f(x')$ is simply not defined. In this case the injectivity assumption is still false, just as the statement $x \neq x' \Rightarrow 3=5/0$ is false.

Asaf Karagila
  • 393,674
qarabala
  • 998

3 Answers3

2

If $f(x')$ is not defined, with $x'\in X$, then $f$ is not a function from $X$ to $Y$.

2

Just as a complement: most of these proofs are erroneously called ‘proofs by contradiction’.

Actually, they're proofs ‘by contrapositive’, which are much easier to understand for beginners: they prove that if $f$ is not injective, then $g\circ f$ can't be injective either.

Bernard
  • 175,478
1

A function $f:X\to Y$ is called injective if $f(x)=f(y)\implies x=y$. This is equivalent with showing that $f$ is injective if $x\neq y\implies f(x)\neq f(y)$. Of course, in your example we can not take $x'$ such that $f(x)$ is not defined. That is, if $X$ consists of more than two elements, we can Always pick $x'\in X$ with $x'\neq x$ such that $f(x')$ exists, since otherwise $f$ would not be a function (you can check this using the definition of function). If $X$ consists of only one element, the function is of course injective, so your argument does not break down the proof given in the other posts.