Give an example of sets $X,Y$ and functions $f:X→Y$ and $g:Y →X$ such that $g \circ f = id_X$

268 Views Asked by At

Give an example of sets $X,Y$ and functions $f:X→Y$ and $g:Y →X$ such that $g \circ f = id_X$ but $f$ is not invertible, and $id_X$ is the identity function of $x$.

I am not sure how to even start this problem, because I do not know how to make up two function $f$ and $g$ such that $g \circ f = id_X$. Is there a key to creating functions such that this would be true?

1

There are 1 best solutions below

0
On

The conditions require $f$ to be one-to-one, an injection $X \to Y$. Let $X = Y = \mathbb{N}$, and $f(n) = n + 1$ for all $n \in \mathbb{N}$. Now define $g(m) = m - 1$ if $m > 0$, and $g(0) = 0$.