Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let $X$, $Y$, be metric spaces. Let $f: X \to Y$ be continuous. If $X$ is a compact metric space, show that $f^{-1}(K)$ is compact in $X$ whenever $K \subseteq Y$ is compact.

My proof is as follows:

Since $f$ is continuous and since $K$ is compact, $f^{-1}(K)$ is closed. Since $K$ is compact, $K \subseteq \bigcup\limits_{k=1}^{n}I_k$ where the $I_k$'s form a finite open cover of $K$. Again, since $f$ is continuous, $f^{-1}(\bigcup\limits_{k=1}^{n}I_k)=\bigcup\limits_{k=1}^{n}f^{-1}(I_k)$, which is a finite open cover of $f^{-1}(K)$. Thus $f^{-1}(K)$ is compact.

share|cite|improve this question
I think you're assuming that since $K$ is compact, it is also closed, which is not necessarily the case. Simply consider an infinite set with co-finite topology, also called the finite complement topology. – Clayton Dec 3 '12 at 6:22
@Jonas I have corrected that. – emka Dec 3 '12 at 6:27
@Clayton: The problem has been updated to say that $X$ and $Y$ are metric spaces. – Jonas Meyer Dec 3 '12 at 6:31
up vote 2 down vote accepted

Your proof is wrong. You just proved that exist a finite open cover of $f^{-1}(K)$. The definition of compactness is different. You can try the following:


  1. If $X$ is compact and $K\subseteq X$ then $K$ is compact iff $K$ is closed.
  2. If $f:X\longrightarrow Y$ is continuous and $K\subseteq Y$ is closed then $f^{-1}(K)$ is closed,

to prove:

If $f:X\longrightarrow Y$ is continuous and $X$ is compact then for $K\subseteq Y$ compact $ \Rightarrow K$ is closed $\Rightarrow f^{-1}(K)$ is closed $\Rightarrow f^{-1}(K)$ is compact.

share|cite|improve this answer

There are two problems with your proof:
1) If you don;t know that $Y$ is Hausdorff, then you can't say that $K$ is closed just because it is compact.
2) More importantly: you got the definition wrong - what you proved is that there exists a finite open cover of $f^{-1}(K)$, but what you should have proved is that for any cover of $f^{1}(K)$ there exists a finite sub-covering. So you should start with an arbitrary open cover of $f^{-1}(K)$ and extract a finite open sub-covering from it.

share|cite|improve this answer
The problem has been updated to say that $X$ and $Y$ are metric spaces. – Jonas Meyer Dec 3 '12 at 6:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.