39

How to prove: Continuous function $f : M\to N$ maps compact set to compact set?

  1. The simplest case in real analysis: if $f: [a,b] \rightarrow \mathbb{R}$ is continuous, then I need to show that $f([a,b])$ is closed and bounded, by the Heine-Borel theorem.

I have proved the boundedness, and I need some insight on how to prove that $f([a,b])$ is closed, i.e. $f([a,b])=[c,d]$. From the Extreme Value Theorem, we know that $c$ and $d$ can be achieved, but how to prove that if $c < x < d$, then $x \in f([a,b])$ ?

  1. What if $M, N$ are metric spaces?
  2. What if $M$ and $N$ are general topological spaces?
Arctic Char
  • 16,007
  • Use the fact that $f$ is continuous plus the Mean Value Theorem (I'm not sure if this is the actual name in english, sorry). – Leonardo Fontoura Mar 12 '11 at 04:38
  • 2
    @Leonardo: The Mean Value Theorem says that if $f$ is continuous on $[a,b]$ and differentiable on $(a,b)$, then there exists $c\in(a,b)$ such that $f'(c)(a-b) = f(a)-f(b)$. I think you mean the Intermediate value theorem, which says that if $f$ is continuous on $[a,b]$, and $f(a)\leq k\leq f(b)$, then there exists $c\in[a,b]$ such that $f(c)=k$. – Arturo Magidin Mar 12 '11 at 04:40
  • @Lindsay: So you want to show that for every point $k$ between $c$ and $d$, there is a point $c$ in $[a,b]$ such that $f(k)=c$... Sounds like the Intermediate Value Theorem to me... – Arturo Magidin Mar 12 '11 at 05:00
  • 11
    May I ask why you are not trying to prove this using the very definitions of compactness and continuity? E.g., start with an open covering of the image of $f$, pull it back to an open cover of the domain of $f$, extract a finite subcover, and so forth. Isn't this more straightforward than going through (twice!) the Heine-Borel characterization of compact subsets of $\mathbb{R}^n$ as those that are closed and bounded? – Pete L. Clark Mar 12 '11 at 05:21
  • I agree with Peter (since I just was reviewing my notes on this yesterday). Open cover, then finite subcover. Triangle inequality somewhere in there... – The Chaz 2.0 Mar 12 '11 at 05:35
  • @Arturo: yes, that is the one I meant. In my languange intermediate and mean are very similar words, so it's a bit confusing sometimes. – Leonardo Fontoura Mar 12 '11 at 15:23
  • @Pete: I agree that this is the way to go; I, like you, would be curious to know why the OP said "...using real analysis." – Arturo Magidin Mar 12 '11 at 20:12
  • @PeteL.Clark The OP may not have encountered topology yet and is doing a real analysis course perhaps... – Vishal Gupta Mar 02 '17 at 20:02

3 Answers3

80

This is a proof assuming that $X$, $Y$ are both general topological spaces.

Let $\{V_a\}$ be an open cover of $f(X)$. Since $f$ is continuous, we know that each of the sets $f^{-1}(V_a)$ is open. Since $X$ is compact, there are finitely many indices $a_1,...,a_n$ such that $$X\subset f^{-1}(V_{a_1})\cup \cdots\cup f^{-1}(V_{a_n}),$$ where $f^{-1}$ represents the preimage map of $f$. Since $f(f^{-1}(E))\subset E$ for every $E\subset Y$, the above implies that $$f(X)\subset V_{a_1}\cup \cdots\cup V_{a_n}.$$ Hence, $f(X)$ is compact.

cdhanson
  • 963
  • 1
    The fact that f is continuous doesn't guarantee that the image of f's inverse is open, much less is even defined. For example, f(x) = 1 is continuous but it's inverse isn't even defined. Maybe the argument here needs to be broken into more cases? – bschneidr Dec 05 '17 at 06:14
  • 25
    @BIQS No, the argument of cdhanson is correct. Here $f^{-1}$ is the preimage map, not the inverse of $f$. – Olivier Jan 12 '18 at 01:09
  • 5
    Ah, ok.Thanks for clarifying this @Olivier! – bschneidr Jan 12 '18 at 03:04
  • 3
    So this is valid for $X$ and $Y$ being any two metric (or even topological) spaces right, where $f: X \rightarrow Y$? Seems so from the proof. Let me know if I've understood something incorrectly. – Canine360 Jul 26 '21 at 02:38
  • Updated to reflect @Olivier’s comment about the preimage of $f$. – cdhanson Feb 06 '24 at 21:12
16

In this answer we assume that $M, N$ are metric spaces.

I feel using the sequence definition is far easier to understand is much more intuitive, and the proof is nice and clean.

Let $f:M\to N$ be a continuous function and $M$ be a compact metric space. Now let $(y_n)$ be any sequence in $f(M)$ (the image of $f$). We need to show that there exists a subsequence $y_{n_{k}}$ that converges to some $y \in f(M)$ as $k\to \infty$.

We choose a sequence $(x_n)\in M$, and since $M$ is compact by definition we have that there exists a subsequence $(x_{n_{k}})$ which converges to some $p\in M$ as $k \to \infty$. Given that a continuous function preserves the convergence of sequences i.e. if $(x_n) \to p$ in $M$, then $f((x_n)) \to f(p)$ in the image, we have that $f((x_{n_{k}})) \to f(p)$. Since $f(p) \in f(M)$, we have that our image is compact and we obtain our desired result.

Arctic Char
  • 16,007
  • how does compactness of image follow at the end? Seems like a leap. Also does the convergent sub/sequence (xk) relate to the bolzano-weierstrass theorem? – CogitoErgoCogitoSum Feb 24 '18 at 15:43
  • 2
    @CogitoErgoCogitoSum One can prove that in a metric space a set $A$ is compact if and only if every sequence in it contains a convergent subsequence. By the way, you cannot apply Bolzano-Weierstrass in infinite-dimensional spaces. – ComFreek Jun 28 '18 at 14:15
  • 2
    Technically speaking, you have to choose a sequence from $N$ first and then tie it to the corresponding sequence in $M$. – qarabala Aug 22 '18 at 05:13
12

Lindsay, what you need is the intermediate value theorem, its proof is given in wikipedia.

niyazi
  • 718