[Math] Is the image of a compact set under a bounded continuous function compact

general-topologyproof-verification

DISCLAIMER: The question has been changed from "Is the image of a closed set under a bounded continuous function closed" to "Is the image of a compact set under a bounded continuous function compact". Those are the conditions I wished to originally deal with, but I simply forgot that $\mathbb{R}$.

$
\newcommand{\reals}{\mathbb{R}}
\newcommand{\cl}{\operatorname{cl}}
$

Given a compact set $K\subset\mathbb{R}$ and a continuous bounded function $f:\mathbb{R}\to\mathbb{R}$, is it true that $f(K)=\{f(x)\ |\ x\in K\}$ is also compact? I'm having trouble proving it, but also can't find a counter example. I have the following proof, which would be fine if $f$ was also bijective (and so invertible), but I can't see if it entirely works when $f$ isn't bijective. It doesn't use the fact that $f$ is bounded, which worries me.

The proof is as follows:

Theorem: If $K\subset\reals$ is compact, and $f:\reals\to\reals$ is continuous and bounded, then $f[K]$ is compact.

Proof: Denote the closure of $S$ by $\cl S$. More specifically:
$$
\cl S = \{x\ |\ \text{there exists a sequence $x_n\subset S$ that converges to $x$}\}
$$
By the definition of $\cl S$, it is obvious that $S\subseteq \cl S$, $\cl S$ is always closed, and $\cl S$ is the "smallest" closed set containing $S$ (in the sense that removing a single element would make $S$ not closed).

Thus we have $f[K]\subseteq\cl f[K]$. Now take $y\in\cl f[K]$. There exists a sequence $y_n\in f[K]$ with $y_n\to y$. For each $y_n\in f[K]$, $y_n=f(x_n)$ for some $x_n\in K$.

By the definition of convergence of $y_n$, $\forall \epsilon>0\ \exists N\in\mathbb{N}\ \forall n\ge N\ |y_n-y|<\epsilon$, or equivalently $|f(x_n)-y|<\epsilon$. By the continuity of $f(x)$, and the Sequential Characterization of Continuity, $x_n\to f^{-1}(y)$. However, since $x_n\in K$, and $K$ is closed, $x_n\to x\in K$, and by the continuity of $f$, $f(x_n)\to f(x)$. Since $x\in K$, $f(x)=y\in f[K]$ as well, so $\cl f[K]\subseteq f[K]$.

Since $f[K]\subseteq \cl f[K]$ and $\cl f[K]\subseteq f[K]$, the only possibility is that $f[K]=\cl f[K]$. Thus $f[K]$ is closed if $K$ is closed and $f$ is continuous and bounded. Since $f$ is bounded, $f[K]$ is also bounded, and so $f[K]$ is compact by the Heine-Borel theorem.

Is the claim even true? Is my proof ok? How could I fix my proof to account for $f$ not bijective, or modify the claim (i.e. add more conditions on $K$ and $f$) so that it is true?

Best Answer

If $f:X\to Y$ is continuous and $K\subseteq X$ is a compact subset, then $f[K]$ is a compact subset of $Y$.


Proof:

Let it be that $(U_{\alpha})_{\alpha\in A}$ is a family of open sets in $Y$ such that $f[K]\subseteq\bigcup_{\alpha\in A}U_{\alpha}$.

Then the sets $f^{-1}(U_{\alpha})$ are open in $X$ with $K\subseteq\bigcup_{\alpha\in A}f^{-1}(U_{\alpha})$.

Then $A$ contains a finite subset $B$ such that $K\subseteq\bigcup_{\alpha\in B}f^{-1}(U_{\alpha})$.

Then $f[K]\subseteq\bigcup_{\alpha\in B}U_{\alpha}$.

Proved is now that any open cover of $f[K]$ contains a finite subcover, wich means exactly that $f[K]$ is compact.

Related Question