Tutorials › Real Analysis › Compact Sets Are Bounded

Compact Metric Spaces · Tutorial 693 of 1000

Compact Sets Are Bounded

Use compactness to obtain a finite bound on distances, and distinguish this metric consequence from compactness itself.

Advanced 9 min read

What You'll Learn

  • Define bounded subsets and diameter in a metric space
  • Prove that every compact metric subset is bounded using an open cover
  • Relate boundedness to a finite upper bound on pairwise distances
  • Apply compactness to bound continuous images in metric spaces
  • Recognize why boundedness alone does not imply compactness

Compactness Imposes a Finite Distance Bound

Compactness is defined using open covers, while boundedness is expressed in terms of distances. To connect them, cover a compact set by larger and larger balls centered at one of its points. Compactness reduces this cover to finitely many balls, and the largest ball in that finite collection already contains the whole set. This argument works in every metric space; it does not depend on the set being a familiar interval in the real line.

Throughout this tutorial, \(K\) is a subset of a metric space \((X,d)\). Compactness means that every cover of \(K\) by sets open in \(X\) has a finite subcover. For nonempty \(K\), boundedness can be defined by requiring that one ball of finite radius contain it.

Definition: A nonempty subset \(E\) of a metric space \((X,d)\) is bounded if there are a point \(x_0\in X\) and a number \(R>0\) such that \(E\subseteq B_R(x_0)\). The empty set is bounded by convention.

The center \(x_0\) need not belong to \(E\). When \(E\) is nonempty, however, it can always be chosen in \(E\), possibly with a larger radius: choose any \(a\in E\), and use the triangle inequality to compare distances from \(a\) with distances from the original center. The particular center and radius are not part of the set’s boundedness; only the existence of some finite radius matters.

Compact Sets Are Bounded

Theorem (Compact Sets Are Bounded): Every compact subset of a metric space is bounded.

Proof. The empty set is bounded by convention, so suppose \(K\) is nonempty and choose \(x_0\in K\). For each positive integer \(n\), let \(B_n(x_0)\) be the open ball of radius \(n\) centered at \(x_0\). These balls are open in \(X\), and they cover \(K\): for any \(x\in K\), the distance \(d(x,x_0)\) is finite, so there is a positive integer \(n\) with \(d(x,x_0)<n\).

Since \(K\) is compact, finitely many of these balls cover \(K\), say \(B_{n_1}(x_0),\ldots,B_{n_m}(x_0)\). Let \(N\) be the largest of the finitely many integers \(n_1,\ldots,n_m\). Each selected ball is contained in \(B_N(x_0)\), because \(n_j\leq N\). Therefore

$$ K\subseteq\bigcup_{j=1}^{m}B_{n_j}(x_0)\subseteq B_N(x_0). $$

Thus a ball of finite radius contains \(K\), so \(K\) is bounded. In addition, if \(x,y\in K\), then \(d(x,x_0)<N\) and \(d(y,x_0)<N\). By the triangle inequality,

$$ d(x,y)\leq d(x,x_0)+d(x_0,y)<2N. $$

So the proof also gives a uniform finite bound on all pairwise distances in \(K\). \(\square\)

The compactness argument is the finite-subcover step. Before it, the cover uses balls of every positive integer radius. After it, only finitely many radii remain, and their maximum supplies one ball that works for the whole set. The chosen center makes it possible to compare every point of \(K\) with the same reference point.

Boundedness and Diameter

For a nonempty set \(E\), its diameter records the largest possible distance between two of its points, or the supremum of those distances if no largest one exists. The diameter is allowed to be infinite. Boundedness is equivalent to having finite diameter.

Definition: For a nonempty subset \(E\) of a metric space \((X,d)\), its diameter is the extended real number $$ \operatorname{diam}(E)=\sup\{d(x,y):x,y\in E\}. $$
Proposition: A nonempty subset \(E\) of a metric space is bounded if and only if \(\operatorname{diam}(E)<\infty\).

Proof. Suppose first that \(E\subseteq B_R(x_0)\) for some \(x_0\in X\) and \(R>0\). For any \(x,y\in E\), the triangle inequality gives

$$ d(x,y)\leq d(x,x_0)+d(x_0,y)<2R. $$

Hence the set of pairwise distances is bounded above by \(2R\), and \(\operatorname{diam}(E)\leq 2R<\infty\).

Conversely, suppose \(\operatorname{diam}(E)=D<\infty\). Choose \(a\in E\). For every \(x\in E\), the definition of the supremum gives \(d(x,a)\leq D\). Thus \(E\subseteq B_{D+1}(a)\), since \(D<D+1\). This is a ball of finite, positive radius, so \(E\) is bounded. \(\square\)

For a compact nonempty set, the theorem and proposition together show that its diameter is finite. The proof of the theorem also supplies the more specific estimate \(\operatorname{diam}(K)\leq 2N\), where \(N\) comes from a finite subcover by balls centered at the chosen point \(x_0\).

Worked Examples

Worked Example: A Finite Set in a General Metric

Let \(X=\{a,b,c\}\) have distances \(d(a,b)=2\), \(d(b,c)=4\), and \(d(a,c)=5\), along with \(d(x,x)=0\) and symmetry. These distances define a metric: the only largest side is \(5\), and \(5\leq 2+4\); the other triangle inequalities hold because \(2\leq 4+5\) and \(4\leq 2+5\).

The set \(X\) is compact. Indeed, for any open cover, choose one cover member containing \(a\), one containing \(b\), and one containing \(c\). Those at most three members cover \(X\). It is also bounded directly: every point is within distance \(5\) of \(a\), so \(X\subseteq B_6(a)\). Its pairwise distances are \(0,2,4,\) and \(5\), so

$$ \operatorname{diam}(X)=5. $$

This example gives a specific bound, but the compactness theorem does not require listing the distances or finding the diameter.

Worked Example: A Compact Curve in the Plane

Let \(f:[0,1]\to\mathbb{R}^2\) be defined by \(f(t)=(t,1/(1+t))\), where \(\mathbb{R}^2\) has its Euclidean metric. The interval \([0,1]\) is compact, and both coordinate functions are continuous on it. Thus \(f\) is continuous. By the theorem on continuous images of compact sets, \(f[[0,1]]\) is compact.

For \(0\leq t\leq1\), we have \(0\leq t\leq1\) and \(1/2\leq1/(1+t)\leq1\). Consequently, the Euclidean distance from \(f(t)\) to the origin satisfies

$$ \|f(t)-(0,0)\|_2 = \sqrt{t^2+\left(\frac{1}{1+t}\right)^2} \leq\sqrt{1^2+1^2} =\sqrt{2} <2. $$

Therefore the entire image lies in the open ball \(B_2((0,0))\). This calculation exhibits an explicit bound; compactness alone guarantees that some finite-radius ball exists, without prescribing which radius to use.

Worked Example: A Compact Set with Infinitely Many Points

Consider \(E=\{0\}\cup\{1/n:n\in\mathbb{N}\}\) as a subset of \(\mathbb{R}\) with its usual metric. We first verify compactness using open covers. Let \(\mathcal{U}\) be any open cover of \(E\), and choose \(U_0\in\mathcal{U}\) with \(0\in U_0\). Since \(U_0\) is open, there is an \(\varepsilon>0\) such that \((-\varepsilon,\varepsilon)\subseteq U_0\).

Choose a positive integer \(N\) with \(1/N<\varepsilon\). For every \(n\geq N\), \(0<1/n\leq1/N<\varepsilon\), so \(1/n\in U_0\). Only the finitely many points \(1,1/2,\ldots,1/(N-1)\) remain. For each of them, choose one member of \(\mathcal{U}\) that contains it. Together with \(U_0\), these finitely many sets cover \(E\), proving compactness.

The set is bounded as well: \(0\leq x\leq1\) for every \(x\in E\), so \(E\subseteq B_2(0)\). In fact, the supremum of its pairwise distances is \(1\), since \(d(1,0)=1\) and no two points in \([0,1]\) are more than \(1\) apart.

Continuous Images Are Bounded

The result also combines directly with the continuous-image theorem from the previous tutorial. A continuous map carries a compact set to a compact set; if the target is a metric space, the theorem just proved then bounds that image.

Corollary: Let \(K\) be a compact subset of a metric space \(X\), let \(Y\) be a metric space, and let \(f:K\to Y\) be continuous. Then \(f[K]\) is bounded in \(Y\).

Proof. By the theorem on continuous images of compact sets, \(f[K]\) is compact in \(Y\). Since \(Y\) is a metric space, the theorem Compact Sets Are Bounded applies to \(f[K]\). Hence \(f[K]\) is bounded. If \(K\) is empty, its image is empty and is bounded by convention. \(\square\)

For real-valued continuous functions, this says that a continuous function on a compact metric space has bounded range. The conclusion is about boundedness, not necessarily about identifying an exact bound. This result is useful whenever it is easier to establish compactness of a domain than to estimate every function value directly.

Why Boundedness Is Not the Same as Compactness

The implication proved here cannot be reversed: a bounded set need not be compact. For instance, \((0,1)\) is bounded in \(\mathbb{R}\), but the open intervals \(U_n=(1/n,1)\), for integers \(n\geq2\), cover it and have no finite subcover. Indeed, the union of any finite selection is contained in \(U_N\), where \(N\) is the largest selected index, and \(1/(2N)\in(0,1)\) is not in \(U_N\). Thus \((0,1)\) is not compact.

Boundedness also depends on the metric, whereas compactness is a property of the open sets. For example, the usual metric on \(\mathbb{R}\) makes \(\mathbb{R}\) unbounded. The metric \(\rho(x,y)=|x-y|/(1+|x-y|)\) makes the same underlying set bounded, because \(\rho(x,y)<1\) for all \(x,y\in\mathbb{R}\). In either case, compactness must be considered separately; a finite distance bound by itself does not supply the finite-subcover property.

Check Your Understanding

Use the open-cover argument and the relationship between diameter and boundedness to answer these questions.

  1. Why do the balls \(B_n(x_0)\), for positive integers \(n\), cover a nonempty subset \(K\) when \(x_0\in K\)?
  2. Where does compactness enter the proof that a compact set is bounded?
  3. If \(E\subseteq B_R(x_0)\), what upper bound does the triangle inequality give for distances between two points of \(E\)?
  4. Why does finite diameter imply that a nonempty set is contained in a ball centered at one of its own points?
  5. Give an example of a bounded set that is not compact, and identify the open-cover failure.