How to prove that an application is invertible

31 Views Asked by At

Given the application $f: \mathbb{Z} \mapsto \mathbb{N_0} $

$f(x) = \begin{cases} 2x, & \mbox{if } x\mbox{≥0} \\ -(2x+1), & \mbox{if } x\mbox{<0} \end{cases}$

How can I prove that $f$ is invertible?

2

There are 2 best solutions below

2
On

Guide:

  • Method $1$: by constructing the inverse explicitly and show that it is indeed the inverse.

  • Method $2$: Show that it is both injective and surjective.

Injective means$x,y \in \mathbb{Z}, f(x)=f(y) \implies x=y$ and

surjective means $\forall y \in \mathbb{N}_0, \exists x \in \mathbb{Z}, f(x)=y$.

0
On

Construct the inverse function $f^{-1}(x)$ obtaining $x$ from $f(x)$ expression, i.e. $y=2x$ so you get $x=\frac{y}{2}$ and so on, then with abuse of notation you can replace $y$ with $x$

$f^{-1}(x)=\begin{cases} \frac{1}{2}x, & \mbox{if } x\mbox{≥0} \\ -\frac{x+1}{2}, & \mbox{if } x\mbox{<0} \end{cases}$

Finally you can check if you've done it right calculating $f(f^{-1}(x))$, it must be the identity function $Id:x\mapsto x$

$f(f^{-1}(x))=\begin{cases} 2(\frac{1}{2}x) = x, & \mbox{if } x\mbox{≥0} \\ -(2(-\frac{x+1}{2})+1) = x, & \mbox{if } x\mbox{<0} \end{cases}$