[Math] How to find the right inverse of a function and show that a left one doesn’t exist

inverse function

Let $f:\mathbb{R} \rightarrow [0,\infty)$ be a mapping with $f(x)=x^2$ Show that $f$ has a right inverse, $h$, but not a left inverse and find h(0) and h(1)..

So from looking at this function, I know it's not injective because suppose $f(a) = f(b)$

So $a^2 = b^2$, then we have $\pm a = \pm b$. It's surjective because for $x = \pm y$, $f(x) = y$

My idea of an inverse function would be:

let $h: [0,\infty) \rightarrow \mathbb{R}$ be a mapping with $h(x) = x^{\frac{1}{2}}$

With this I can see that $f \circ h = f(x^{\frac{1}{2}}) = x^{{(\frac{1}{2})}^{2}} = x$ so there is a right inverse but I can also see that

$h \circ f = h(x^2) = (x^2)^{\frac{1}{2}} = x$ which would mean it is a left inverse as well.

So what is wrong with my inverse function and how can I show that a right inverse exists but not a left one?

Best Answer

$h(f(x))=(x^{2})^{\frac 1 2}=x$ if $x\geq 0$ and $-x$ if $x<0$.

Related Question