0
$\begingroup$

Let $f: X \rightarrow Y$ and $g: Y \rightarrow X$

If $f \circ g = id_y$, is $f$ injective?

$f \circ g = id_y$

$\equiv g^{-1} \circ g = id_y \Rightarrow $g is leftinverse and by definition injective

$f \circ g = id_y$

$\equiv f \circ f^{-1}=id_y \Rightarrow$ f is rightinverse and by definition surjective

So $f$ is surjective and not injective

Question: Is that or do I miss something here?

  • 0
    This statement is impossible to prove because it is false. Consider $f = g = \operatorname{id}_X$, $X=Y$. $f$ is injective.2017-02-20
  • 0
    I am a bit confused here as to what the actual question is. The way it is written seems to be: Assume that there are two functions $f$ and $g$ such that $f\circ g=id_Y$. Prove that $f$ cannot be injective. This statement is however clearly false, see previous comment by Alexey. Is the question maybe to show that $f$ does not have to be injective?2017-02-20
  • 0
    @Alexey, why is $f = g$ ? Shouldn't one of them be the inverse of the other one? And why is $f$ injective ? My solution sheet says no2017-02-20
  • 0
    @Shinja, you are right. I will correct it2017-02-20
  • 0
    In this situation $g$ **by definition** has a left-inverse $f$. It can be **proved** that any left-inverse is surjective (not injective) so that fact is not a part of the definition of left-inverse.2017-02-20
  • 0
    @jubikon, you can easily check that $f\circ g =\operatorname{id}_X\circ\operatorname{id}_X=\operatorname{id}_X=\operatorname{id}_Y$ in my case. Obviously, $\operatorname{id}_X$ is injective.2017-02-20
  • 0
    @jublikon, basically, under your assumptions, it is impossible to prove that $f$ is not injective (i gave an example where it is).2017-02-20

3 Answers 3

1

Let $X=\{1,2\}$ and $Y=\{0\}$. Let $g:Y\rightarrow X$, $g(0)=1$ and $f:X\rightarrow Y$, $f(x)=0$ for $x=1,2$. Note that $f$ is not injective. Now we have

$$f\circ g(0)=0$$

and since $0$ is the only element of $Y$ we have $f\circ g= id_Y$.

This is an example of two functions $f$ and $g$ where $f$ is not injective but nontheless $f\circ g=id_Y$.

Your proof was not correct. You proved that $f$ had to be surjective (which is correct), but that was not the question The question was "does it have to be injective?" The answer is no and the easiest way to show that is to just give a counterexample.

  • 0
    I understand that is the easiest way. Last try for the general way: Is it okay to say because $f^{-1} \circ f \neq id_y$ the function $f$ is not leftinverse thus it cannot be injective?2017-02-20
  • 0
    @jublikon What is your definition of $f^{-1}$ here? You can only work with inverses if it is known allready that $f$ is a bijection.2017-02-20
1

Another counterexample. Consider $f:\mathbb{N}\to\mathbb{N}$ such that $$ \forall n\in\mathbb{N},\; f(n)= \begin{cases} 0&if\,n=0\\ n-1&otherwise. \end{cases} $$ And $g:\mathbb{N}\to\mathbb{N}$ such that $g(n)=n+1$ for all $n\in\mathbb{N}$.

Then $f\circ g=id$ but $f$ is not injective.

1

Let it be that $f:X\to Y$ and $g:Y\to X$ are functions.

If $f\circ g=1_Y$ then we can prove that $f$ is surjective and $g$ is injective.

  • For $y\in Y$ we find $y=1_Y(y)=f(g(y))$ showing that $f$ is surjective.
  • If $g(a)=g(b)$ then $a=1_Y(a)=f(g(a))=f(g(b))=1_Y(b)=b$ showing that $g$ is injective.

These facts can also be stated as: "left-inverses are surjective and right-inverses are injective".

It cannot be proved in general that $f$ is injective and also it cannot be proved that $g$ is surjective. As a counterexample let $Y$ be a singleton and let $X$ be a set that has more than one element. Then a (unique) function $f:X\to Y$ exists and is not injective and functions $g:Y\to X$ exist and are all non-surjective. In all these cases we have: $f\circ g=1_Y$.