# Continuous images of compact sets are compact

Let $X$ be a compact metric space and $Y$ any metric space. If $f:X \to Y$ is continuous, then $f(X)$ is compact (that is, continuous functions carry compact sets into compact sets).

Proof:

Consider an open cover of $f(X)$.

Then $f(X) \subset \bigcup_{\alpha \in A}V_\alpha$ where each $V_\alpha$ is open in $Y$.

$X \subset f^{-1}(f(X)) \subset f^{-1}\left(\bigcup_{\alpha \in A}V_\alpha\right) = \bigcup_{\alpha \in A}f^{-1}(V_\alpha)$.

Hence $\bigcup_{\alpha \in A}f^{-1}(V_\alpha)$ is an open cover of $X$. Since $X$ is compact then we can choose a finite subcover $\{V_i\}_{i=1}^n$ such that $X \subset \bigcup_{i=1}^n f^{-1}(V_i)$.

So then $f(X) \subset f\left(\bigcup_{i=1}^n f^{-1}(V_i)\right) = \bigcup_{i=1}^n f\left(f^{-1}(V_i)\right) \subset \bigcup_{i=1}^n V_i$, a finite subcover of $f(X)$. $\therefore f(X)$ is compact.

Does this proof have an error?

Thanks for your help.

-
What is your question? –  copper.hat May 31 '12 at 2:10
Please don't write your titles in capital letters like this. It attracts attention, but not the good sort. –  Dylan Moreland May 31 '12 at 2:12
By "test" do you mean "proof?" –  Thomas Andrews May 31 '12 at 2:17
Where do you think there might be a mistake in the proof? ¿En dónde crees tú que existe un error en esa demostración? –  DonAntonio May 31 '12 at 2:17
The proof looks fine. Note that you never use the fact that these spaces are metric, so the first sentence could read, "Let $X$ and $Y$ be topological spaces, with $X$ compact." –  Dylan Moreland May 31 '12 at 3:40

The proof is not good. Knowing that $f$ is continuous does not say much about $f^{-1}$, while the proof assumes that it exists and is continuous. It was not given that $f$ is a homeomorphism.
The statement is still true though. Take any sequence $x_n$ in compact $X$. Then it has a convergent subsequence $x_q$ (by definition of compactness). Now take the sequence $f(x_n)$ and notice that it has a convergent subsequence $f(x_q)$ (by definition of continuity). Since for any point $y \in f(X)$ there exists $x \in X$ such that $f(x) = y$, every sequence if $f(X)$ can be written as $f(x_n)$ for some sequence $x_n \in X$ and we are done.
$f^{-1}$ is being used in this sense, I think. –  Dylan Moreland May 31 '12 at 4:57
You're right. I was worried about the pre-image of $f(x) = const.$, but that does work too. –  Karolis Juodelė May 31 '12 at 5:10