The inverse of a continuous one-to-one function that is defined on a connected set is not always continuous I am trying to find a function $f:B \subset \Bbb R^n \rightarrow \Bbb R^m$ for $B$ a connected set that is continuous, one-to-one where $f^{-1} = f(B) \rightarrow B$ is discontinuous. The hint I have been given in my textbook is to choose $m>1$. I know that the image will be a connected set. The only idea I had is to send an angle to the unit circle $\theta \rightarrow (\cos(\theta),\sin(\theta)), \theta \in [0, 2\pi)$ and then take the inverse to be $f^{-1}:(x,y)\rightarrow (\arctan(y/x))$ but I feel that this function is continuous and not appropriate. Any hints appreciated.
I have seen a similar question here:
Inverse function that takes connected set to non-connected set

I was working on this, managed to prove the opposite (If wrong, please point out the mistake)
I claim that $f^{-1}$ is continuous. Let's call it $g$ for convenience of notation, i.e. $g\circ f (x) = x$ $\forall x \in B$
Enough to show that $g^{-1}(U)$ is open in $f(B)$ if $U$ is open in $B$
Now, $g^{-1}(U) = \{ x : g(x) \in U , x \in f(B)\}$ and
$g^{-1}(U)$ is open $\iff$ $f(U)$ is open, as both are the same
Let $U' = f(U)$. Since $f$ is continuous, $U'$ is open $\iff$ $f^{-1}(U')$ is open 
$f^{-1}(U') = \{ y : f(y) \in U' , y \in B\} = \{ y : f(y) \in f(U) , y \in B\}$. Now, as $f$ is one-one, $f(y) \in f(U) \iff y \in U$. 
So, $f^{-1}(U') = U$. 
Thus, $U' = f(U) = g^{-1}(U)$ is open $\iff$ $U$ is open.

P.S : Apologies if this proof is wrong.
