# Wanted: a function relating two metric spaces that is open but not continuous

It is known that the notion of a function from spaces $R$ to space $D$ being open (set $x$ open in $R$ implies image $f(x)$ is open in $D$) is independent from the notion of a function being continuous (for any set $x$, if $f(x)$ is open in $D$, then $x$ is open in $R$). And this statement applies even if $R$ and $D$ are metric spaces.

Can you give me an understandable example of a function on metric spaces that is open but not continuous? (Obviously, then, the inverse is continuous but not open.)

I would prefer $f:\Bbb{R} \mapsto \Bbb{R}$ or if not, $f:\Bbb{R}^n \mapsto \Bbb{R}^m$ but iwll settle for any example if those don't exist.

• on $\mathbb{R}$: when $f$ is open and well defined on whole $\mathbb{R}$ (edit: with images in $\mathbb{R}$ and with standard topology!) then $f$ must be strictlymonotonic and the function graph must be connected. thus it is continous. – Max Jan 11 '17 at 19:35
• I can't think of one of the form $f: \mathbb{R}^n \to \mathbb{R}^m$ right now, but the floor function $\lfloor \cdot \rfloor : \mathbb{R} \to \mathbb{Z}$ is open but not continuous, since $\mathbb{Z}$ is discrete – Hayden Jan 11 '17 at 19:35
• @Hayden why the floor function is open, could u explain please? – user426277 Jun 4 '17 at 14:58
• @Idonotknow Because $\mathbb{Z}$ has the discrete topology, every subset is open, hence any map into $\mathbb{Z}$ is automatically open. – Hayden Jun 4 '17 at 15:21

Here, then, is my go-to example: consider $S^1 \subset \Bbb R^2$, and the map $$f:S^1 \subset \Bbb R^2 \to (-\pi,\pi]\\ (\cos( x), \sin(x)) \mapsto x$$ If we extend this example to the whole plane, we get something classic: the map $z \in \Bbb C \mapsto \ln(z)$ (with the usual branch cut) is open, but not continuous.
Or, if you prefer, take $z \in \Bbb C \mapsto \text{Arg}(z) \in \Bbb R$. This gives us an $\Bbb R^2 \to \Bbb R$ example, which I think is as low as we can go for $\Bbb R^n \to \Bbb R^m$.
It may be useful to note that for any open $f:X \to Y$: if $f$ is injective, $X$ is Hausdorff, and $f(X)$ is compact, then the map is necessarily continuous.