Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let $X$ be a metric space. Show that all continuous functions from $X$ to $\Bbb R$ are bounded iff $X$ is compact.

share|cite|improve this question
See the first answer here for the non-trivial implication. – David Mitra Oct 1 '12 at 19:40
up vote 0 down vote accepted

The hardest direction is the "only if". If $X$ is not compact, we can find a sequence $\{x_n\}$ without converging subsequence. Pick for each $n$ a positive number $r_n$ such that the balls $B(x_n,r_n)$ are pairwise disjoint (work by induction, and using the fact there are no converging subsequences).

Then we define $f_n(x):=\frac 1{r_n}\max(r_n-d(x,x_n),0)$, which is continuous and $f(x):=\sum_{j=0}^{+\infty}jf_j(x)$. The sum is convergent, as for each $x$, $f_n(x)\neq 0$ for at most one $n$, and it defines a continuous function, as the same $n$ works in a small neighborhood of the considered point $x$. But this function is not bounded, as $f(x_n)=n$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.