Proving the inverse of a continuous function is also continuous 
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? 
 A: All metric spaces are Hausdorff. Given a continuous bijection between a compact space and a Hausdorff space the map is a homeomorphism.
Proof:
We show that $f$ is a closed map. Let $K \subset E_1$ be closed then it is compact so $f(K)$ is compact and compact subsets of Hausdorff spaces are closed. Hence, we have that $f$ is a homeomorphism.
A: For proving it we use the if and only if condition that continuous function bring back closed sets to closed sets.
Let $F$ be a closed set in $E$.
Since $E$ is compact, $F$ is compact.
hence $f(F)$ is compact and hence closed.
Now $(f^{-1})^{-1}(F)=f(F)$ is closed.
Since the choice of $F$ was arbitrary, $(f^{-1})$ brings back closed sets to closed sets. hence $f^{-1}$ is continuous.
A: We need to prove that $f(A)$ is closed for all closed set $A$ in compact space $K$.
Indeed, $\forall \{y_n \} \subset f(A)$, we assume that $y_n \to y$. We will show that $y \in f(A)$.
We have $f$ is continuous and A is a compact set, so $f(A)$ is also a compact set. By the definition of compact set, we obtain that $\forall \{ y_n\} \subset f(A)$, $\exists \{y_{n_k} \} \subset \{ y_n\}$: $y_{n_k}\to y_0 \in f(A)$. Since $y_n \to y$, $y_{n_k}\to y$. Thus $y=y_0\in f(A)$.    
A: Theorem 1:  A mapping f of a metric space X into a metric space Y is continuous on X if and only if $f^{-1}(V)$ is open in X for every open set V in Y.
Theorem 2: $f$ is a continuous mapping of a compact metric space X into a metric space Y. Then $f(X)$ is compact.
Based on Theorem 1, it is suffice to show that $f(V)$ is an open set in Y for every open set V in X.
Fix such a set V. $V^c$ is closed in X, hence compact.  Theorem 2 tells us $f(V^{c})$ is a compact subset of Y and so is closed in Y. Since Y is one-to-one and onto, $f(V)$ is the complement of $f(V^{c})$. Hence $f(V)$ is open.
