Give examples of functions $f\colon X\to Y$ and $g\colon Y\to X$ such that $g\circ f=id_X$ but where $f$ is not invertible. At first I thought I could simply make $f(x)=x^2$ and $g(x)=\sqrt{x}$ but then I realized that their composition would yield $+x$ and $-x$, not simply $x$. I'm not sure I really understand what it's asking anymore.
Give examples of functions $f\colon X\to Y$ and $g\colon Y\to X$ such that $g\circ f=id_X$ but where $f$ is not invertible.
2
$\begingroup$
functions