Let $f:X\to Y$.
A left inverse to $f$ is a function $g:Y\to X$ such that $g\circ f={\mathrm{id}}_{X}$.
A right inverse to $f$ is a function $h:Y\to X$ such that $f\circ h={\mathrm{id}}_{Y}$.
An inverse (or a two sided inverse) to $f$ is a function $k:Y\to X$ which is a left and a right inverse to $f$.
We say $f$ is invertible if it has a two sided inverse.
Notice that if $g$ is left inverse to $f$ then $f$ is right inverse to $g$. A function can have more than one left inverse, or more than one right inverse: you will investigate this further in the problem sets.
The idea is that a left inverse “undoes” its right inverse, in the sense that if you have a function $f$ with a left inverse $g$, and you start with $x\in X$ and apply $f$ to get to $f(x)\in Y$, then doing $g$ gets you back to where you started because $g(f(x))=x$.
$f:\mathbb{R}\to [0,\mathrm{\infty}),f(x)={x}^{2}$ has a right inverse $g:[0,\mathrm{\infty})\to \mathbb{R},g(x)=\sqrt{x}$. $f(g(x))=x$ for all $x\in [0,\mathrm{\infty})$. It is not the case that $g$ is a left inverse to $f$ because $g(f(-1))\ne -1$.
This function $f$ does not have a left inverse. Suppose $h$ is left inverse to $f$, so that $hf=i{d}_{\mathbb{R}}$. Then $h(f(-1))=-1$, so $h(1)=-1$. Similarly $h(f(1))=1$, so $h(1)=1$. Impossible! (The problem, as we will see in the next section, is that $f$ isn’t one-to-one.)
The function $g$ has a left inverse, $f$. But it does not have a right inverse. If $g\circ h=i{d}_{\mathbb{R}}$ then $g(h(-1))=-1$ so $g(h(-1))=-1$. But there’s no element of $[0,\mathrm{\infty})$ that $g$ takes to $-1$. (This time the problem is that $g$ isn’t onto.)