[Math] Discontinuous function with continuous inverse

real-analysis

Here is something that is confusing me.

The function $\begin{equation}
f(x)=\begin{cases}
x, & \text{if $x \in[-1,0]$}\\
x+1, & \text{if $x \in (0,1]$}
\end{cases}
\end{equation}$

Is clearly discontinuous at $x=0$ yet its inverse

$\begin{equation}
f^{-1}(x)=\begin{cases}
x, & \text{if $x \in[-1,0]$}\\
x-1, & \text{if $x \in (1,2]$}
\end{cases}
\end{equation}$

is continuous on the separate counterparts. Now, clearly $f(x)$ doesn't output any values in the range $0 < p \leq 1$ so I don't know if the fact $f^{-1}(x)$ isn't defined in the interval $(0,1]$ is enough to say it's discontinuous or not, because clearly these values aren't of interest for $f(x)$ either. Any clarification would be greatly appreciated!

Thanks

Best Answer

You must think in terms of intervals.

If f is continuous and injective on an interval, then it has an inverse which is continuous also.

Indeed, if $f$ is continuous and injective on an interval, then it is monotonic and its image is an interval. So the inverse is monotonic on an interval and its image is an interval. Hence it is continuous.

In your case, $f$ is continuous and injective on $[-1,0]$ and on $(0,1]$.

So $f^{-1}$ is continuous on $f([-1,0])=[-1,0]$ and on $f((0,1])=(1,2]$.

The fact that the initial intervals $[-1,0]$ and $(0,1]$ had a common point in their closures does not mean that their images under $f$ have the same property. As your example shows.

The discontinuity of $f$ at $0$ is reflected by a gap in the domain of $f^{-1}$.