TITLE: Does continuous injective functions preserve disconnectedness?
QUESTION [7 upvotes]: It is well known result that continuous functions send connected spaces to connected spaces. It is also known that if $f:\mathbb{R}^n\rightarrow\mathbb{R}^n$ is continuous and injective, then if $A\subset\mathbb{R}^n$ is open, so it is $f(A)$. And it is also known that a continuous bijective function between topological spaces doesn't necessarily have to be an open function.  
So, what if we give a little twist to all these results?

Let $f:\mathbb{R}^n\rightarrow\mathbb{R}^m$ be a continuous injective function and let $A\subset\mathbb{R}^n$ be an open and disconnected set. Does $f(A)$ need to be open or disconnected?

I already know that $f(A)$ isn't necessarily open, since you can consider inclusion $i: \mathbb{R} \rightarrow\mathbb{R}^2$ with $i(x) = (x,0)$. Clearly $i$ is continuous and injective and any open set in $\mathbb{R}$ will be sent to a line segment in $\mathbb{R}^2$ which isn't an open set under its standard metric topology.
But now I'm having troubles with either proving or finding a counterexample for disconnectedness. If there is a counterexample out there, then due to the Invariance of Domain Theorem, $m\neq n$ necessarily. But I couldn't think of any. 
Then I've also tried to give a proof, but I got stuck. Here's what I've tried:
Take $f$ and $A$ as stated. Since $A$ is disconnected, there are two open sets $B,C$ such that $A=B\cup C$ and $B\cap C=\emptyset$, hence $\overline{B}\cap C=B\cap\overline{C}=\emptyset$ (where $\overline B$ means the closure of $B$). This means that $f(A)=f(B)\cup f(C)$ and due to injectivity we can easily check that $f(B)\cap f(C)=\emptyset$. But $f(B),f(C)$ aren't necessarily open in $\mathbb{R}^m$ as shown by the previous example, so we can't conclude that $f(A)$ is disconnected. I would need to show that $\overline{f(B)}\cap f(C)=f(B)\cap \overline{f(C)}=\emptyset$
Let $z\in\overline{f(B)}\cap f(C)$. Then there is $c\in C$ such that $f(c)=z$. Due to continuity, we also know that $f(\overline B)\subset \overline{f(B)}$. If $z\in f(\overline B)$ there is $b\in\overline B$ such that $f(b)=z$. Due to injectivity, $b=c$, hence $\overline{f(B)}\cap C \neq \emptyset$ which is a contradiction.
Therefore, $z\in\overline{f(B)}\setminus f(\overline B)$... and here's where I'm stuck.
Any help will be dearly appreciated.

REPLY [3 votes]: By invariance of domain, a continuous injective $f \colon \mathbb{R}^n \to \mathbb{R}^m$ can only exist for $m \geqslant n$. Also by invariance of domain, for $m = n$, such a function would be open, hence a homeomorphism to its image, which is then open in $\mathbb{R}^n$, and therefore preserve disconnectedness.
So we need $n < m$. The simplest examples are for $n = 1,\, m = 2$. It's still more convenient to take a bounded open interval $(a,b)$ for the domain than $\mathbb{R}$. So define $f \colon (-2\pi,\pi) \to \mathbb{R}^2$ by
$$f(t) = \begin{cases} (t + \pi - 1, 0) &, t \leqslant -\pi \\ (\cos t, \sin t) &, t > -\pi.\end{cases}$$
It is easily verified that $f$ is continuous and injective, but the disconnected open set $(-2\pi, -\pi/2) \cup (\pi/2,\pi)$ is mapped to a connected set.