[Math] Invertibility of a function and left/right inverses

elementary-set-theoryfunctionsproof-writing

I am new to writing proofs, as a result even when i may know an answer i sometimes doubt if i know how to write the proof. So here is the problem which should be an easy one. In fact i think the proof is harder to write because it is too simple.

Let $f$ be a function. If there exists a function $g$ such that $g \circ f = \text{Id}_{\text{Dom}(f)}$ then $f$ is invertible and $f^{-1} = g$ restricted to $\text{range}(f)$. If there exists a function $h$ such that
$f \circ h = \text{Id}_{\text{Range}(f)}$ then $f$ may fail to be invertible.

Some scratch work

Clearly in the left inverse case we start from our function $f$'s domain go to $f$'s range and then using the g restricted to range of $f$ get back to $f$'s domain. Hence we can see a one-to-one correspondance.

In case of the right inverse we start from domain of some function $h$ and end up with range of $h$ which also happens to restrict f's domain, using f we get to range of $f$. In this case we have only observed for each x in domain of f there exists a $y$ in range of $f$, but we haven't seen that for each $y$ there exists a unique $x$ to establish the one-to-one correspondence needed for invertibility.

My Proof attempt

g o f = Id(dom f) the f is invertible and $f^{-1} = g$ restricted to $\text{Range}(f)$. If $g \circ f = \text{Id}_{\text{Dom}(f)}$ then $g(f(x)) = \text{Id}_{\text{Dom}(f)}$.

So for all $x$ such that $x$ belongs to $\text{Dom}(f)$ there exists a $y$ such that y belong to $\text{Range}(f)$ and by definition of function composition $y$ also belongs to domain of $g$ and $g(y) = x$.
Hence $g$ restricted to range of $f = f^{-1}$ and $f$ is invertible.

Not so sure how to write the proof of the right inverse case.

Any help would be highly appreciated.

Best Answer

First of all, I think we need to get some definitions straight. If $f: X \to Y$ is a function (with $X$ and $Y$ sets), then $f$ is said to be invertible if there exists a function $g: Y \to X$ such that $g \circ f = \operatorname{id}_{X}$ and $f \circ g = \operatorname{id}_{Y}$. If the first identity is satisfied, $f$ is said to be left invertible, and if the other one is satisfied $f$ is right invertible.

I have never heard of left invertible functions being referred to as invertible, and there are easy counterexamples: let $X = \{1\}, Y = \{1,2\}$ and define $f: X \to Y$ by $f(1) = 1$. Then the function $g: Y \to X$ defined by $g(1) = g(2) = 1$ is a left inverse of $f$, since $g(f(1)) = 1$. But $f(g(2)) = 1 \neq 2$, so $g$ is not a right inverse (and it is easy to see that no such function can exist, since the range of $f$ is a one point set, while $Y$ is a two-point set, so any left inverse must necessarily identify two points). Also note that $g$ is a right invertible function without a left inverse for the same reasons.

You can, however (as you appear to say), make a left invertible function invertible by restricting the range. In other words, if $f: X \to Y$ is left invertible with left inverse $g$, then writing $Z = f(X)$ (i.e. $Z$ is the range or image of $f$),we have that $f: X \to Z$ is invertible. This is easy to show; we already have left invertibility, so all we need to show is that $f \circ g|_{Z} = \operatorname{id}_{Z}$. Consider $z \in Z$. Then $z = f(x)$ for some (in fact, a unique) $x \in X$, so we have $$ f \circ g|_{Z}(z) = (f \circ g) (f(x)) = f ( g\circ f(x) ) = f(x) = z,$$ since $g \circ f = \operatorname{id}_{X}$ (left invertibility). Hence $f: X \to Z$ is invertible.

For the other question, let $f: X \to Y$ again be an arbitrary function, and suppose there exists an $h: Y \to X$ such that $f \circ h = \operatorname{id}_{Y}$ (I'm unsure if you mean codomain or range in this case, so I'll do both). Here we get an inverse by restricting $f$ to $h(Y)$; the proof is the same as above - we may as well consider the problem of making a given left inverse of $h$, namely $f$, into a right inverse by restricting the range of $h$. You can do something similar if we only have $f \circ h = \operatorname{id}_{f(X)}$, first by restricting the codomain of $f$ to the range of $f$, and proceeding as above.

Related Question