Let $X$ and $Y$ be metric spaces, $X$ compact, and $T: X \to Y$ bijective and continuous. Show that $T$ is a homeomorphism.

Your proof is not clear. Yes, if $x_n\to x_0$ then $T(x_n)\to T(x_0)=y_0$. But it is not necessary an "if and only if" relation. Anyway, you must use the fact that $X$ is compact because otherwise the statement is false. (take the identity map from the discrete metric space in $\mathbb{R}$ to the standard metric space).

Here is a proof. It is enough to show that if $F\subseteq X$ is closed then $(T^{-1})^{-1}(F)$ is a closed set in $Y$. Since $X$ is compact and $F$ is a closed subset we know that $F$ is compact as well. Continuous functions preserve compact sets, hence $T(F)$ is compact in $Y$. But $Y$ is a Hausdorff space (since it is a metric space), so it follows that $T(F)$ is closed in $Y$. This means $(T^{-1})^{-1}(F)$ is closed.


You have already assumed $(T^{-1}(y_n))=(x_n)\rightarrow x_0=T^{-1}(y_0)$. That’s why it looks that $T^{-1}$ is continuous.

What you have to do is, take an arbitrary sequence $y_n\rightarrow y$ and prove that $T^{-1}(y_n)\rightarrow T^{-1}(y)$.

How to use compactness of $X$? Remember that, as $X$ is compact, every sequence has convergent subsequence. From $y_n\rightarrow y$ you can get a sequence $(x_n)$ in $ X$ with $f(x_n)=y_n$ (because of surjective property). This has a convergent subsequence, can you finish from here?

Another hint : In case you can prove $(x_n)$ is Cauchy, then you are done. A Cauchy sequence is convergent if it has a convergent subsequence. By above observation, it is clear that it has convergent subsequence. Showing that Cauchy, and using the injective property, you will see that $(x_n)\rightarrow x$. Thus $T^{-1}$ is continuous.

As $T$ is continuous, $x_{n_k}\rightarrow x_0$ which imply $T(x_{n_k})\rightarrow T(x_0)$; as $T(x_{n_k})=y_{n_k}\rightarrow y$, uniqueness of limits says that $T(x_0)=y_0$. This says there exists a subsequence of $(x_n)$ that converge to inverse image of $y_0$. How do you see whole sequence converge?