Let $E, E'$ be metric spaces, $f: E\to E'$ a continuous function. Prove that if $E$ is compact and $f$ is bijective then $f^{-1}:E' \to E$ is continuous.
I know one way to prove it is by showing that if $S\subset E$ and $S$ is closed then $f(s)\subset E'$ is also closed where $s\in S$. Since $S$ is closed then $p_n \in S$ and $p_n \to p_0$ in $E$ then $p_o\in S$. Since $E$ is compact there is a convergent subsequence. How can I do this proof?