Celeb Glow
general | April 06, 2026

Example of Left and Right Inverse Functions

$\begingroup$

I am independently studying abstract algebra and came across left and right inverses. I was hoping for an example by anyone since I am very unconvinced that $f(g(a))=a$ and the same for right inverses. I don't want to take it on faith because I will forget it if I do but my text does not have any examples.

$\endgroup$ 3

4 Answers

$\begingroup$

I'm afraid the answers we give won't be so pleasant.

If we think of $\mathbb R^\infty$ as infinite sequences, the function $f\colon\mathbb R^\infty\to\mathbb R^\infty$ defined by $f(x_1,x_2,x_3,\dots) = (x_2,x_3,\dots)$ ("right shift") has a right inverse, but no left inverse. A possible right inverse is $h(x_1,x_2,x_3,\dots) = (0,x_1,x_2,x_3,\dots)$. That is, $(f\circ h)(x_1,x_2,x_3,\dots) = (x_1,x_2,x_3,\dots)$. But there is no left inverse. Similarly, the function $f(x_1,x_2,x_3,\dots) = (0,x_1,x_2,x_3,\dots)$ has a left inverse, but no right inverse.

Another example would be functions $f,g\colon \mathbb R\to\mathbb R$, \begin{align*} f(x) &= \dfrac{x}{1+|x|} \\ g(x) &= \begin{cases} \frac{x}{1-|x|}\, & |x|<1 \\ 0 & |x|\ge 1 \end{cases}\,. \end{align*} Then $g$ is a left inverse of $f$, but $f\circ g$ is not the identity function.

$\endgroup$ $\begingroup$

Define $f:\{a,b,c\} \rightarrow \{a,b\}$, by sending $a,b$ to themselves and $c$ to $b$. Then the map is surjective. A map is surjective iff it has a right inverse.

Proof: Let $f:X \rightarrow Y. \ $ $f$ is surjective iff, by definition, for all $y\in Y$ there exists $x_y \in X$ such that $f(x_y) = y$, then we can define a function $g(y) = x_y. \ $ Now $f\circ g (y) = y$. Conversely if $f$ has a right inverse $g$, then clearly it's surjective.

A similar proof will show that $f$ is injective iff it has a left inverse.

To come of with more meaningful examples, search for surjections to find functions with right inverses.

$\endgroup$ 1 $\begingroup$

Define

  • $f:\{0\}\rightarrow \{1,2\}$ by $f(0)=1$; and
  • $g:\{1,2\} \rightarrow \{0\}$ by $g(1)=g(2)=0$.

Then $g\circ f = I_{\{0\}}$, so that

  • $g$ is a left inverse for $f$; and
  • $f$ is a right inverse for $g$.

(Note that $f$ is injective but not surjective, while $g$ is surjective but not injective.)


Definitions used:

Definition 1. Suppose $S$ is a set. Then the identity function on $S$ is the function $I_S: S \rightarrow S$ defined by $I_S(x)=x$.

Definition 2. Suppose $f:A\rightarrow B$ is a function. Then $g$ is a left inverse for $f$ if $g \circ f=I_A$; and $h$ is a right inverse for $f$ if $f\circ h=I_B$.

$\endgroup$ $\begingroup$

Let $X$ and $Y$ be arbitrary sets.

Suppose $f: X \to Y$ is surjective (onto).

Let function $g: Y \to \mathcal{P}(X)$ be such that, for all $t\in Y$, we have $g(t) =\{u\in X : f(u)=t\}$.

Let $Z=g(Y)$, the range of $g$.

We can prove that every element of $Z$ is a non-empty subset of $X$. Therefore, by the Axiom Choice, there exists a choice function $C: Z \to X$.

Let $h: Y \to X$ be such that, for all $w\in Y$, we have $h(w)=C(g(w))$. We can prove that function $h$ is injective.

$\endgroup$

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy