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
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
Let $f(x) = \sin x$, and let $E = [0,1]$. Then $E$ is compact and connected, but $f^{-1}(E)$ is the disjoint union of infinitely many closed intervals, and is therefore neither compact nor connected.
Take any space $X$ which is not connected and not compact. For example, you could think of $\mathbf R - \{0\}$. Map this to a topological space consisting of one point. [What properties does such a space have?]
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.)