Can someone give examples where a non monotonic function is invertible?

184 Views Asked by At

I tried to figure out about examples of non monotonic functions that are invertible but I only got to know that it should be discontinuous to be invertible but could not find any such examples.

2

There are 2 best solutions below

0
On

Consider $f: [0, 1] \mapsto [0, 1]$ given by

$$f(x) = \begin{cases} x & 0 \le x < \frac{1}{2} \\ \frac{3}{2} - x & \frac{1}{2} \le x \le 1 \end{cases}$$

0
On

Consider $f: \mathbb{R} \mapsto \mathbb{R}$ given by

$$f(x) = \begin{cases} x & x\in\mathbb{Q} \\ - x & x\in\mathbb{R}\setminus\mathbb{Q} \end{cases}$$