Prove that a continuous image of a closed subset of a compact space is a closed subset 
Suppose $f$ is a continuous mapping from a compact metric space $X$ into a metric space $Y$. Prove that if $F$ is a closed subset of $X$, then $f[F]$ is a closed subset of $Y$.

Here is my idea for the proof: The continuous image of a connected space is connected. Use the intermediate value theorem to show that the image of every continuous real-valued function is an interval, and should return closed sets into closed sets.
Corrections are appreciated! 
 A: You might want to proceed in the following manner:


*

*Closed subsets of compact sets are compact, thus $F$ is compact;

*Continuous image of a compact set is compact, hence $f(F)$ is compact in $Y$;

*Compact sets in a metric space are closed, hence $f(F)$ is closed.

A: First let me tell you the flaws in your argument. 1) nobody said anything about $X$ being connected. 2) You never used compactness of $X$. 3) You are using a property of "real" valued functions, these are metric spaces, which are much more general than real spaces.
Here's how you do it. Take any open covering for $f(F)$ in $Y$, say $\{U_\alpha\}_{\alpha \in I}$ ($I$ possibly infinite index set). Since $f$ is continuous $f^{-1}(U_\alpha)$ is open in $X$ for every open set in the cover. Moreover $\{f^{-1}(U_\alpha)\}$ covers $F$. But $X$ is compact, so there is a finite subcover, say $\{f^{-1}(U_i)\}_{i=1, \cdots, n}$ covering the whole $F$, i.e. $F\subset \bigcup_{i=1}^n f^{-1}(U_i)$. Then $\{U_i\}_{i=1, \cdots, n}$ covers $f(F)$. So any open cover of $F$ has a finite subcover. Hence $f(F)$ is compact. Any compact subspace of a metric space is closed and bounded, so $f(F)$ is closed.
A: A slightly different answer using sequences. Take $F$ a closed set of $X$. Now take a sequence $(y_n)$ of elements in $f(F)$ converging to $y\in Y$. We want to show that $y\in f(F)$. 
Because $y_n\in f(F)$ we can find $x_n\in F$ such that $f(x_n)=y_n$. Now $(x_n)$ is a sequence of $X$ (compact), so it admits a subsequence converging $(x_{\varphi(n)})$ to $x\in X$. Since $F$ is closed and $(x_{\varphi(n)})$ is a sequence of $F$ we know that actually $x\in F$. 
Finally, because $f$ is continuous we have that $f(x_{\varphi(n)})$ converges to $f(x)$. In other words $(y_{\varphi(n)})$ converges to $f(x)$. Since $(y_{\varphi(n)})$ also converges to $y$, by unicity of the limit we get that $y=f(x)\in f(F)$.  
We have shown that $f(F)$ is sequentially closed so it is closed (we are in a metric space). 
