If $n\in\mathbb{N}$, and X is a compact metric space, show that every continuous injective function $f:X\to\mathbb{R}^n$ is a homeomorphism of X. $(f\subseteq\mathbb{R}^n)$
So I persumed that I have to show that f is an open map from $X\to\mathbb{R}^n$: Let U be an open set in X. Then $U^c$ is closed in X, which is compact, so $U^c$ is also compact. Since $f$ is continuous $f(U^c)$ is compact in $\mathbb{R}^n$.
Then I got stuck. Does this lead to $f(U^c)$ being closed in $\mathbb{R}^n$? is it sufficient enough?