Example of a continuous function with a discontinuous inverse

What is an example of a function $f: \Bbb R^n \rightarrow \Bbb R^m$ such that $f$ is continuous and injective but that $f^{-1}$ is not continuous.

Our professor teased us with the notion but I haven't been able to think of such a function.

• Every bijective map $f: \Bbb R^n \rightarrow \Bbb R^m$ with $f(\mathbb R^m)$ compact cannot have a continuous inverse,so it's easy to construct such functions if $m>n$. – Matematleta Mar 30 '16 at 21:12
• Related post: Functions which are Continuous, but not Bicontinuous. Maybe also other posts linked there might be of interest. – Martin Sleziak Mar 31 '16 at 6:05
• For the case $m=n$ see here. For the case $m=n=1$ see here. (Although both questions are about bijective rather than injective functions.) – Martin Sleziak Mar 31 '16 at 6:10

Take $f:\mathbb{R} \rightarrow \mathbb{R}^2$ to be a function which performs an eight-shaped figure in the way described here (as $x \rightarrow -\infty$, it tends to the origin, and also as $x \rightarrow \infty$).

For topological reasons, the inverse cannot be continuous.

Note that if $n=m$, then the inverse must be continuous, and this is a result of the Invariance of Domain Theorem. (If $n=m=1$, a direct proof through methods of real analysis can be easily achieved)

The standard example (though not from $\mathbb R^n$ but rather a subset)

$f:[0,2\pi) \to S^1$, $f(x) = (\cos(x),\sin(x))$

$f^{-1}$ is not continuous at $(1,0)$.

• This is not a function $f:\mathbb{R}^n \rightarrow \mathbb{R}^m$. – Aloizio Macedo Mar 30 '16 at 20:55
• @AloizioMacedo You're right, I misinterpreted the question. – flawr Mar 30 '16 at 20:57
• @Winther No, because that way a point will be missing from the circle, and the inverse will be continuous (since a circle with a point missing is homeomorphic to the line). – Aloizio Macedo Mar 30 '16 at 21:03
• @AloizioMacedo Thanks for clearing that up. – Winther Mar 30 '16 at 21:04