= Left inverse
{title2=$g\circ f=\operatorname{id}_X$}
A <left inverse> of a <function> $f:X\to Y$ is a <function> $g:Y\to X$ satisfying
$$
g\circ f=\operatorname{id}_X.
$$
It forces <injectivity>: if $f(x)=f(x')$, applying $g$ gives $x=x'$. For example, $f(n)=2n$ on the <natural numbers> has <left inverse> $g(m)=\lfloor m/2\rfloor$. The reverse <function composition> is not the identity at odd inputs.
Conversely, an <injective function> with nonempty $X$ has a <left inverse>. On the <image of a function> $f(X)$, send each value to its unique preimage; outside the image, send every point to one fixed $x_0\in X$. The nonempty-domain qualification matters: the unique <empty function> from $\varnothing$ to a nonempty $Y$ is <injective>, but no <function> $Y\to\varnothing$ exists.
Back to article page