Example of Left and Right Inverse Functions
Solution 1:
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.
Solution 2:
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.