Inverse function that takes connected set to non-connected set I've been struggling with providing examples of the following:
1) A continuous function $f$ and a connected set $E$ such that $f^{-1}(E)$ is not connected
2) A continuous function $g$ and a compact set $K$ such that $f^{-1}(K)$ is not compact

For an example of an invertible function for the second part, map $[0,2\pi)$ to the unit circle in $\Bbb R^2$ via $t\rightarrow(\cos t, \sin t)$. $f$ is continuous, the unit circle $S$ in $\Bbb R^2$ is compact, but $f^{-1}(S)$ is not.
For the other example, take the space to be $[0,1)\cup[2,3]$ and the map to be
$$
f(x)=\cases{x,& $x\in[0,1)$\cr x-1,&$x\in [2,3]$ }
$$
Then $f$ is continuous, invertible, $[0,2]$ is connected, but $f^{-1}([0,2])$ is not.
(This actually furnishes an example for both parts.)
