A topology question about compact sets Suppose $K \subseteq \mathbb{R}^d$ is a compact set. Let $f: K \to \mathbb{R}^m$ be a continuous and injective function. Then we must have that $f^{-1} : f(K) \to K$ is  continuous.
My Attempt
Take $F \subseteq K$ closed set. Since $K$ is compact, then $K$ is closed and bounded. Hence, $F$ must be bounded. Since it is closed, then $F$ is compact. By continuity of $f$, we must have that $f(F)$ is compact. Hence, $f(F)$ is closed. By injectivity of $f$, we have that $(f^{-1})^{-1} (F) = f(F) \subseteq f(K) $. Hence, $f^{-1}$ is continuous as desired.
Is this a correct solution? Can we still have this result if $K$ is not compact? I was thinking maybe $f: [0, 2 \pi) \to R^2 $ . But I cant show that $f^{-1}$ is not continuous. Can someone help me? thanks a lot.
 A: Consider the set $[0,\pi)$ which is open in $[0,2\pi)$ ($[0,2\pi)$ is not compact in $\mathbb{R}$ since it is not closed) with $f:[0,2\pi)\rightarrow \mathbb{R}^2,\enspace f(x)=(cos(x),sin(x))$ as you suggest. Note that $f[0,2\pi)=S^1$, the unit circle. If $f^{-1}:S^1\rightarrow [0,2\pi)$ is continuous then $f^{-1}(U)$ is open in $S^1$ (equipped with the subspace topology) for all $U\subset [0,2\pi)$ open. Equivalently, $f:[0,2\pi)\rightarrow S^1$ is an open map. 
Let $U=[0,\pi)$ then $U$ is open in $[0,2\pi)$. Suppose $f(U)$ is open. since $p:=(1,0)=f(0)\in f(U)$, there must exist $r>0$ such that $B_r(p)\cap S^1\subset f(U)$. 
Choose $\pi>\epsilon>0$ such that $(1-\cos(\epsilon))<r^2/2$. Consider the point $x=2\pi-\epsilon\in [0,2\pi)$. Since $f$ is surjective onto $S^1$, $f(x)\in S^1$. I claim that $f(x)\in B_r(p)\cap S^1$. If this is true then we have arrived at a contradiction since then $f(x)\in B_r(p)\cap S^1\subset f(U)$ and $f(x)\notin f(U)$ since $x\in U$ and $f$ is injective. 
We have:
\begin{align*}
||p-f(x)||&=||(1,0)-(\cos(2\pi-\epsilon),\sin(2\pi-\epsilon)||\\
          &=||(1-\cos(2\pi-\epsilon), -\sin(2\pi-\epsilon))||\\
          &=\sqrt{(1-\cos(2\pi-\epsilon))^2+\sin(2\pi-\epsilon)^2}\\     
          &=\sqrt{2(1-\cos(2\pi-\epsilon))}<r    
\end{align*}
Thus $f(x)\in B_r(p)\cap S^1$, and so we have reached a contradiction. In particular $f(U)$ is not open in $S^1$ where $U=[0,\pi)$, open in $[0,2\pi)$. 
Remark
This proves that the statement of the proposition fails in the case we remove the requirement that the domain be compact. Perhaps a more interesting question to ask is does it hold if the domain is closed but not compact? 
In regards to the first question, your proof looks good, as I have mentioned in the comments on the OP.
