55

Let $X$ be a metric space. Prove that if every continuous function $f: X \rightarrow \mathbb{R}$ is bounded, then $X$ is compact.

This has been asked before, but all the answers I have seen prove the contrapositive. Realistically, this may be the way to go, but is there way to exhibit an unbounded continuous function (under the assumption $X$ is not compact) without appealing to results beyond introductory real analysis (e.g., the solution I've seen involves the Tietze Extension theorem)?

Because we're working with metric spaces, it's clear that the assumption that $X$ is noncompact (towards proving contrapositive) will lead us to extract a sequence of points in the space with no convergent subsequences. But how can we infer the existence of an unbounded continuous on the space knowing only about some sequence of points in this space (without using anything too advanced)?

Arctic Char
  • 16,007
combinator
  • 1,356
  • It turns out that pseudocompactness and compactness are equivalent for metric spaces: http://math.stackexchange.com/questions/668905/if-every-real-valued-continuous-function-is-bounded-on-x-metric-space-then

    Since a metric space is compact iff it is complete and totally bounded, it follows that pseudocompactness implies completeness.

    – Math1000 Dec 12 '14 at 22:11
  • 4
    @Math1000 Wrong link... – YuiTo Cheng Jun 07 '19 at 14:33

3 Answers3

32

But how can we infer the existence of an unbounded continuous on the space knowing only about some sequence of points in this space

By using the sequence to construct an unbounded continuous function.

Since the sequence - call it $(x_n)_{n\in\mathbb{N}}$ - has no convergent subsequence, every point occurs only finitely many times in the sequence. Passing to a subsequence, we may assume all the $x_n$ are distinct.

For every $m\in\mathbb{N}$, the distance of $x_m$ to the rest of the sequence is positive,

$$\delta_m := \inf \left\{ d(x_m,x_k) : k \in \mathbb{N}\setminus \{m\}\right\} > 0,$$

for if $\delta_m = 0$, then $(x_n)$ would have a subsequence converging to $x_m$.

Now consider the functions

$$f_m(x) = \left(1 - \frac{3}{\delta_m}d(x_m,x)\right)^+,$$

where $u^+$ is the positive part of $u$, $u^+ = \max \{u,0\}$. These functions are continuous since the maximum of two continuous functions is continuous. The function

$$f(x) = \sum_{m=0}^\infty m\cdot f_m(x)$$

is, if well-defined, unbounded, since $f(x_m) \geqslant m$.

It remains to see that $f$ is well-defined and continuous. That follows if we can show that every point $x\in X$ has a neighbourhood on which at most one of the $f_m$ attains values $\neq 0$.

If $x = x_m$ for some $m\in\mathbb{N}$, then $f_k\lvert B_{\delta_m/3}(x_m) \equiv 0$ for all $k\neq m$: Suppose we had $f_k(y)\neq 0$ for some $y\in B_{\delta_m/3}(x_m)$ and some $k\neq m$. Then

$$\max \{\delta_k,\delta_m\} \leqslant d(x_m,x_k) \leqslant d(x_m,y) + d(y,x_k) \leqslant \frac{\delta_m}{3} + \frac{\delta_k}{3} \leqslant 2\frac{\max \{\delta_m,\delta_k\}}{3} < \max \{\delta_k,\delta_m\},$$

so that is impossible.

If $x \neq x_m$ for all $m$, the argument is similar. Let $\delta = \inf \{ d(x,x_n) : n\in\mathbb{N}\}$. Then $\delta > 0$ for otherwise the sequence would have a subsequence converging to $x$. Then on $B_{\delta/4}(x)$ at most one $f_m$ can attain a nonzero value. Suppose again it weren't so, and also $f_k$ attained a nonzero value there. Then we have $y,z \in B_{\delta/4}(x)$ with $f_m(y) \neq 0$ and $f_k(z) \neq 0$. That implies $\frac{3}{4}\delta < \frac{1}{3}\min \{ \delta_m,\delta_k\}$ since $d(y,x_m) \geqslant d(x,x_m) - d(x,y) \geqslant \frac{3}{4}\delta$ and similarly for $x_k$. But then we would have

$$0 < \max \{ \delta_m,\delta_k\} \leqslant d(x_m,x_k) \leqslant d(x_m,y) + d(y,z) + d(z,x_k) \leqslant \frac{\delta_m}{3} + \frac{1}{2}\delta + \frac{\delta_k}{3} < \max \{\delta_m,\delta_k\}.$$

Since every point has a neighbourhood on which at most one $f_k$ does not identically vanish, $f$ is well-defined and continuous.

Daniel Fischer
  • 206,697
  • Daniel Fischer said that since every point has a neighbourhood on which at most one $f_k$ attains values $\neq 0$ , then $f$ is well-defined and continuous.I have no idea what is going on and I thought it for a long time . Could someone tell me what is going on ? –  Aug 22 '18 at 07:49
  • @LiAlex For every $x$, only finitely many terms of the series are nonzero (either one term or none here), so the series converges at every point. Thus $f$ is well-defined. And if $S \subset X$ is a set on which all but finitely many of the functions vanish identically, then the series converges uniformly on $S$. Let $x \in X$, and take an open neighbourhood of $x$ on which only finitely many of the terms (here we can choose it so that it's only one term) don't vanish identically for $S$. Then, since each term is continuous, and the convergence is uniform on $S$, it follows that $f$ is … – Daniel Fischer Aug 22 '18 at 08:12
  • … continuous on $S$. Since $x$ was arbitrary, $f$ is globally continuous. – Daniel Fischer Aug 22 '18 at 08:12
  • Thanks.But I am still confused about it . I confused about the following two statements.Could you explain more detailed ? 1.For every points , only finitely many terms of the series are nonzero (either one term or none here), so the series converges at every point . 2. if S⊂X is a set on which all but finitely many of the functions vanish identically, then the series converges uniformly on S –  Aug 22 '18 at 11:23
  • @ZONEWONG In the answer I've shown that every point $x \in X$ has a neighbourhood - call it $U_x$ - such that all but at most one of the $f_k$ vanish identically on $U_x$. In particular, there is at most one $k$ with $f_k(x) \neq 0$. If $f_m(x) = 0$ for all $m$, then $\sum_{m = 1}^r m\cdot f_m(x) = 0$ for every $r$, and the series $\sum_{m = 1}^{\infty} mf_m(x)$ is seen to be convergent. If $f_k(x) \neq 0$, then $f_m(x) = 0$ for all $m \neq k$, and $\sum_{m = 1}^r m f_m(x) = kf_k(x)$ for all $r \geqslant k$, and again we see that the series converges. – Daniel Fischer Aug 22 '18 at 11:40
  • 1
    The argument for 2. is essentially the same. If all but finitely many of the $f_m$ vanish identically on $S$, then there is a $k$ such that $f_m$ vanishes identically on $S$ for all $m > k$. Then for all $r \geqslant k$ we have $$\sum_{m = 1}^r mf_m(y) = \sum_{m = 1}^k mf_m(y)$$ for all $y \in S$. So on $S$ we have $$f(y) - \sum_{m = 1}^r mf_m(y) = 0$$ for every $r \geqslant k$, in particular $$\sup_{y \in S}: \Biggl\lvert f(y) - \sum_{m = 1}^r mf_m(y)\Biggr\rvert < \varepsilon$$ for all $\varepsilon > 0$ if $r \geqslant k$. – Daniel Fischer Aug 22 '18 at 11:40
  • THANKS ! But how can an unbounded function converges ? –  Aug 22 '18 at 15:08
  • @ZONEWONG I don't understand what you mean. Are you asking how the series can converge when $f$ is unbounded? If so, look at the exponential series. At every point (more, uniformly on a suitable neighbourhood of each point) the series is bounded, and the terms of the series converge to $0$ (fast enough to ensure absolute and locally uniform convergence). Otherwise, can you state more precisely what you don't understand? – Daniel Fischer Aug 22 '18 at 15:11
  • $f(x_m) \geqslant m$. When m goes to infinity , isn't f unbounded ? It may contradict that the series converges at every points . –  Aug 22 '18 at 15:20
  • @ZONEWONG But the points $x_m$ wander off. At every point - on a small neighbourhood - everything is bounded. The sum can still be unbounded on $X$ because for every $x$ there are points that are far away from $x$. For a simple example of such a series, let $X = \mathbb{R}$, $x_m = 3m$, $h(x) = \max {0, 1- \lvert x\rvert}$ and $f_m(x) = m\cdot h(x-x_m)$. Then $f_m$ vanishes identically on $[-K,K]$ for $m \geqslant (K + 1)/3$, so on every bounded part of the real line, things are bounded. The growing spikes wander off to infinity. – Daniel Fischer Aug 22 '18 at 15:32
  • '' every point '' does not include x_m when m goes to infinity ? WHY ? This may be the only gap which I don't understand . Anyway , I strongly appreciate that you spend lots of time to explain to me . Because I am doing about a math project which is related about this kind of thing . I want to make anything clear . –  Aug 22 '18 at 16:42
  • @ZONEWONG "$x_m$ when $m$ goes to infinity" is a sequence of points, not one point. For every fixed $m$, $x_m$ is a single point, and there is a ball $V_m = B_{\delta_m}(x_m)$ around that point such that a) $f_k$ is identically $0$ on $V_m$ for all $k \neq m$, and b) $f$ is bounded on $V_m$. Just like for every other fixed point $x \in X$. But $f$ is not bounded on the set ${ x_m : m \in \mathbb{N}}$, since $f(x_m) = m$. One must distinguish between the behaviour near an arbitrary but fixed point, and the behaviour on a special infinite subset of $X$. – Daniel Fischer Aug 22 '18 at 17:55
  • So it means it bounded when we consider every single point , but it is unbounded when we consider a sequence of points . Am I correct ? –  Aug 23 '18 at 01:20
  • So it means it bounded on the neighbourhoods of every fixed point , but it is unbounded on a particular infinite subset . Am I correct ? –  Aug 23 '18 at 01:39
  • It sounds weird to me . In my mind ,lim $x_m$ is a fixed point . –  Aug 23 '18 at 01:57
  • But basically I know what you mean . Thanks ! –  Aug 23 '18 at 03:02
  • In the explanation of argument 2 , the series should converge to k f(y) instead of f(y) . Is there a typing error ? –  Aug 23 '18 at 03:05
  • @ZONEWONG When asking whether a function is bounded, one always has to take into account on which set it is bounded or not. If no set is explicitly mentioned, it is understood that one considers the whole domain. For every real-valued function there are subsets of its domain on which the function is bounded, whether the function is globally bounded or not. For every $c > 0$, $f$ is bounded on $f^{-1}([-c,c])$, and for large enough $c$ this is not empty. If $f$ is continuous, then every $x \in X$ has a neighbourhood on which $f$ is bounded. We can take $f^{-1}((f(x)-1,f(x)+1))$ for example. – Daniel Fischer Aug 23 '18 at 13:43
  • Since $f$ is continuous, that is a neighbourhood of $x$. And since it is the preimage of a bounded subset of $\mathbb{R}$, $f$ is bounded on that set. Here, $f$ was constructed such that it is unbounded on the set ${ x_m : m \in \mathbb{N}}$ (and thus a fortiori unbounded on $X$). For this to be possible with a continuous function, it is necessary that $\lim x_m$ does not exist. The construction starts with a sequence that not even has an accumulation point, it has no convergent subsequences. – Daniel Fischer Aug 23 '18 at 13:44
  • lim $x_m$ is still a point in X even though lim $x_m$ does not exist . I want to clarify how the function is bounded in a neighbourhood of every fixed point but is unbounded in a particular infinite subset . If the function is bounded in a neighbourhood of every fixed point but is unbounded in a particular infinite subset , I think we are not going to say f is bounded in X since we can find a subset of X such that f is unbounded . The weird thing is that you said f is bounded in X but we can find a subset such that f is unbounded . –  Aug 24 '18 at 12:01
  • @ZONEWONG No, $\lim x_m$ is not a point in $X$. It doesn't exist, it's a unicorn, an element of the empty set. It is an expression that does not denote anything. Since $f$ is unbounded on a subset of $X$, it is a fortiori unbounded on $X$. That was the point, to construct an unbounded continuous function on $X$. Where did I say that $f$ is bounded on $X$? I just re-read everything, and I didn't see anything that could be read in that way. – Daniel Fischer Aug 25 '18 at 15:17
  • Thanks ! I got the point . –  Aug 26 '18 at 08:24
  • lim $x_m$ is not a point in X ? But the proof is that you need to find a point in X such that f is unbounded in order to show the contrapositive . Also , you didn't say that f is bounded on X but you did say that f converges at every point in X . isn't it the same ? –  Aug 27 '18 at 07:07
  • The main confusion is that you said '' f is unbounded on a particular subset of X'' .It means that if we pick any point in the particular subset , f is unbounded . But you did say f converges at every point in X . –  Aug 27 '18 at 10:46
  • @ZONEWONG A function $g \colon Y \to \mathbb{R}$ is bounded on $S \subset Y$ if $g(S) = { x \in \mathbb{R} : (\exists y \in S)(g(y) = x)}$ is a bounded subset of $\mathbb{R}$. Since all finite subsets of $\mathbb{R}$ are bounded, every real-valued function is bounded on every finite subset of its domain. It is impossible for a function to be "unbounded at a point". One needs an infinite $S$ for it to be possible that $g$ is unbounded on $S$. Here, $S = {x_m : m \in \mathbb{N}}$ is an infinite subset on which $f$ is unbounded. But on every finite subset of $S$, $f$ is bounded. – Daniel Fischer Aug 27 '18 at 13:20
  • It can't be otherwise, one needs infinitely many different values for unboundedness, and for infinitely many different values one needs infinitely many different arguments of the function. Take a simple example, $g \colon \mathbb{R} \to \mathbb{R}$, $g(x) = x$. Clearly $g$ is unbounded on $\mathbb{R}$, but if you pick any fixed $x_0 \in \mathbb{R}$, then $g$ is bounded near $x_0$, we have $\lvert g(x)\rvert \leqslant \lvert x_0\rvert + 1$ for all $x \in [x_0 - 1, x_0 + 1]$. – Daniel Fischer Aug 27 '18 at 13:20
  • Oh ! I got it !!! Thank for your patience Daniel . I am just a high school student and I make anything clear right now !! –  Aug 27 '18 at 13:44
  • In the explanation of argument 2 , the series should converge to k f(y) instead of f(y) . Is there a typing error ? –  Aug 27 '18 at 13:55
  • @ZONEWONG No, $f$ is defined by $f(y) = \sum_{m = 0}^{\infty} m\cdot f_m(y)$. If $y$ is such that $f_k(y) \neq 0$, then we will have $f(y) = k\cdot f_k(y)$. – Daniel Fischer Aug 27 '18 at 14:09
  • Oh , MY BAD .Sorry ...... –  Aug 27 '18 at 14:15
  • Sir, in the proof, when $y\in B_{\delta_m/3}(x_m)$, then how did you write for some $k \neq m$, $d(y,x_k) \leq \frac{\delta_k}{3}?$ – Rabi Kumar Chakraborty Mar 06 '20 at 07:40
  • 1
    @RabiKumarChakraborty I make the assumption that some $f_k$ with $k \neq m$ does not vanish identically on $B_{\delta_m/3}/x_m)$, and from that assumption I obtain a contradiction, namely $f_k(y) \neq 0$ implies $d(y,x_k) < \frac{\delta_k}{3}$, and that cannot be when $d(y,x_m) < \frac{\delta_m}{3}$. – Daniel Fischer Apr 24 '20 at 22:09
  • So are there no metric spaces in which every real continuous function are bounded, but does not attain its bound? – Saikat Jul 17 '20 at 01:08
  • @SaikatGoswami Yes. A metric space on which every continuous real-valued function is bounded is compact, and thus all continuous real-valued functions attain their supremum and infimum. – Daniel Fischer Jul 20 '20 at 12:52
27

Another approach: Assume $X$ is not compact, so that there exists a sequence $a_n$ in $X$ that has no converging subsequence, and denote $A$ to be the underlying set of this sequence. Define $f:A\to R$ via $f(a_n)=n$. It is continuous on A, and $A\subset X$ is a closed set, so by the Tietze extension theorem $f$ extends to a (non-bounded) function on all of $X$.

  • 1
    I actually gravitated towards these ideas when I found this problem in Munkres (this problem appears in the section on the Tietze extension theorem). The only problem I had was showing that $A$ is closed and that $f$ is continuous. How did you prove these? – user193319 Feb 12 '18 at 14:09
  • 1
    @user193319
    1. $A$ is closed since it is sequentially closed - any converging sequence in $A$ has its limit in $A$, since such a sequence does not exist!
    2. You should note that $A$ has the discreet topology. You can see easily using sequences that any point in $A$ is open. Any map from a discreet space is continuous.
    – Espace' etale Feb 13 '18 at 22:20
  • $X$ is not necessary $C_2$ space, so you can’t use Tietze extension. – XT Chen Nov 02 '19 at 08:37
  • You don't need C_2 for tietze. Normality is enough. – Espace' etale Nov 03 '19 at 09:47
  • So are there no metric spaces in which every real continuous function are bounded, but does not attain its bound? – Saikat Jul 17 '20 at 01:08
  • @Saikat Goswami correct. – Espace' etale Jul 18 '20 at 10:42
  • @Espace'etale: But the function may not be well-defined, if I understood your construction . A may contain repeats, i.e., we may have $a_n=a_m ; n \neq m$ unless you restrict to a subsequence without repeats. – MSIS Jan 23 '22 at 23:33
  • 1
    @MSIS You are correct, congrats on being the first to spot this! – Espace' etale Jan 25 '22 at 00:03
  • 1
    @MSIS By the way, this doesn't ruin the solution - since the sequence has no converging subsequence there are finitely many repetitions for every value, so we might as well assume there are no repetitions. – Espace' etale Mar 21 '22 at 17:36
  • @Espace'etale Thanks for you answer. but I have a question about the continuousness of $f$. What we talk about is in the metric space, and naturally your $A$ is supposed to be endowed with the metric topology, but you prove the continuousness by discrete topology. What the ideas behind this? – xdyy Mar 10 '24 at 11:04
17

You can say the following: consider a sequence $(x_n)$, which has no convergent subsequence. Then, inductively, you can construct a sequence of positive numbers $\varepsilon_n$ such that $\overline{B(x_n,\varepsilon_n)}\cap\overline{B(x_m,\varepsilon_m)}=\emptyset$ for all $n\neq m$. Then, define a function $f$ as follows: $$f(x)=\left\{\begin{array}{c l}n\left(1-\frac{d(x,x_n)}{\varepsilon_n}\right), & x\in B(x_n,\varepsilon_n)\\ 0, & {\rm otherwise}\end{array}\right.$$ Then $f$ is continuous and not bounded.

detnvvp
  • 8,237