Let $X$ and $Y$ be metric spaces, $X$ compact, and $T:X \to Y$ bijective and continuous. Show that $T$ is a homeomorphism.
My attempt:
We need only show that $T^{-1}$ is continuous.
Let $M \subset Y$ be closed. Then, from the surjectiveness of $T$, there exists a $A \subset X$ such that $T(A)=M$. Since $M$ is closed, by the continuity of $T$, we must have that $A$ is closed.
Now $$T^{-1}(T(A))=T^{-1}(M)$$ i.e, $A=T^{-1}(M)$. Since $A$ and $M$ are closed, we must have that $T^{-1}$ is continuous.
My problem with this, however, is that I am not using the fact that $X$ is compact anywhere in the proof. Is there perhaps another way that I can show this, using the compactness of $X$?
Any hints will be appreciated.
I don't really understand your argument (see Arthur's comment).
Now, to show that $T^{-1}$ is continuous, we show that $T$ maps closed set to closed set (do you see why it's equivalent?). Let $A\subset X$ be closed. Since $X$ is compact, $A$ is also compact. Thus $T(A)$ is also compact. And a compact subset of a metric space is closed.