How to prove: Continuous function $f : M\to N$ maps compact set to compact set?
- 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])$ ?
- What if $M, N$ are metric spaces?
- What if $M$ and $N$ are general topological spaces?