3

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?

user3002473
  • 8,943

4 Answers4

7

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.

drhab
  • 151,093
5

Define $f:[1,\infty)\to \Bbb R$ as $f(x)=\frac{1}{x}$

Then :

$\text{Image}(f)=(0,1]$ .

Learnmore
  • 31,062
  • 1
    Though not applicable now, yours is a good counter-example to the question that was originally posted (and still there when you answered). So +1. – Paul Sinclair Nov 04 '16 at 17:18
4

HINT: Consider $f:\Bbb R\to\Bbb R:x\mapsto\tan^{-1}x$, taking $\Bbb R$ itself as your $K$.

Brian M. Scott
  • 616,228
  • 1
    Oh I forgot that $\mathbb{R}$ was closed too. I considered that, but thought $\mathbb{R}$ was open. What if I require $K$ to be compact? – user3002473 Nov 04 '16 at 15:14
  • 2
    @user3002473, continuous images of compact sets are compact, and thus closed. – Mees de Vries Nov 04 '16 at 15:15
  • 2
    @user3002473: $\Bbb R$ is both open and closed as a subset of $\Bbb R$. The continuous image of a compact set is compact, and a compact subset of $\Bbb R$ is closed, so in that case you’ll be fine: you don’t even need to assume that $f$ is bounded. – Brian M. Scott Nov 04 '16 at 15:16
4

As Brian commented in his answer, the continuous image of a compact set is compact - there is no need to ask $f$ bounded. So, it is natural that a proof of this doesn't use the fact that $f$ is bounded.

However, in your proof you also take $f^{-1}(y)$, which would require more assumptions than necessary. In order to avoid this, notice that when you have the sequence $(x_n)$ in $K$, you may take a subsequence $(x_{n_k})$ in $K$ converging to some $x\in K$, then you may prove that $f(x)=y$.

If you only want to show that $f[K]$ is closed, then you are done. But you can also prove that $f[K]$ is bounded: suppose it's not bounded, take an unbounded sequence in $f[K]$ and notice that such a sequence induces a sequence in $K$ that have a convergent subsequence, then get a contradiction. The details are here.

EDIT: take a look at the answer of drhab also, it is far more general than mine.