Let $X$ and $Y$ be two metric space such that $X$ is compact. Then show that any continuous bijection $f:X \to Y$ is a homeomorphism.
Attempt
Our target is to show that $f^{-1}$ is continuous.
To prove this let $\{y_n\}$ be a sequence in $Y$ such that $y_n \to y$.
So, $\{f^{-1}(y_n)\}$ is a sequence in $X$ and $X$ is compact. Hence $\{f^{-1}(y_n)\}$ has a subsequence converging to $x$ (say).
Let $\{x_{n_k}\}$ be the subsequence $x_{n_k} \to x$.
Now $f(x_{n_k}) \to f(x)$.
And $f(x_{n_k})$ is a subsequence of $y_n$. Hence $f(x)=y$. Hence $\{f^{-1}(y_n)\}$ has a subsequence converging to $f^{-1}(y)$.
Now how can I show that the whole sequence $\{f^{-1}(y_n)\}$ is convergent?
I have another method to solve this problem.So please help for this method only.