Tutorials › Topology (Undergraduate) › Heine-Borel Theorem In Euclidean Space

Compactness in Metric Spaces · Tutorial 512 of 799

Heine-Borel Theorem In Euclidean Space

Learn both directions of the Heine-Borel theorem and see how completeness and total boundedness make the criterion work in Euclidean space.

Intermediate 13 min read

What You'll Learn

  • State the Heine-Borel theorem for subsets of Euclidean space.
  • Prove that compact subsets of Euclidean space are closed and bounded.
  • Show that bounded subsets of Euclidean space are totally bounded.
  • Use closedness to establish completeness in the induced metric.
  • Apply the theorem to a closed box, an open interval, and an unbounded line.

Compactness and the Euclidean Metric

In a general metric space, being bounded and closed need not guarantee compactness. Euclidean space is special: its finite-dimensional geometry ensures that bounded sets can be covered by finitely many small balls, and closed sets inherit completeness. Together, these facts give a practical test for compactness.

Fix a positive integer \(n\), and give \(\mathbb{R}^n\) its Euclidean metric \(d(x,y)=\|x-y\|\) and its induced topology. A subset \(A\subseteq\mathbb{R}^n\) has the subspace metric. It is bounded if there is \(M\ge 0\) such that \(\|x\|\le M\) for every \(x\in A\); it is closed if its complement in \(\mathbb{R}^n\) is open. A metric space is totally bounded if, for every \(\varepsilon>0\), it is covered by finitely many open balls of radius \(\varepsilon\), with centers in that space. It is complete if every Cauchy sequence in it converges to a point of it. Compactness means that every open cover has a finite subcover.

Theorem (Heine-Borel): A subset \(A\subseteq\mathbb{R}^n\) is compact if and only if it is closed and bounded.

The proof uses the metric compactness criterion established in the earlier material on complete and totally bounded metric spaces: a metric space is compact if and only if it is complete and totally bounded. We will apply this criterion to \(A\) with its subspace metric. We first establish the Euclidean facts needed to do so.

Compact Subsets Are Closed and Bounded

Proposition: Every compact subset \(A\) of \(\mathbb{R}^n\) is closed and bounded.

Proof. If \(A=\varnothing\), it is bounded and closed, so suppose first that \(A\ne\varnothing\). For each \(m\in\mathbb{N}\), let \(U_m=B(0,m)\). These open balls cover \(A\): for any \(x\in A\), some positive integer \(m\) is greater than \(\|x\|\), so \(x\in U_m\). Compactness gives a finite subcover \(U_{m_1},\ldots,U_{m_k}\). Let \(M\) be the largest of the finitely many integers \(m_1,\ldots,m_k\). Since the balls centered at \(0\) are nested, their union is \(B(0,M)\). Therefore \(A\subseteq B(0,M)\), which proves that \(A\) is bounded.

To prove that \(A\) is closed, fix \(x\in\mathbb{R}^n\setminus A\). For each \(a\in A\), the distance \(d(x,a)\) is positive. The balls \(B(a,d(x,a)/3)\), as \(a\) ranges over \(A\), form an open cover of \(A\). Choose a finite subcover, with centers \(a_1,\ldots,a_k\), and set \(V=\bigcap_{i=1}^k B(x,d(x,a_i)/3)\). This is an open neighborhood of \(x\). If \(z\in V\cap A\), then \(z\in B(a_i,d(x,a_i)/3)\) for some \(i\), because the chosen balls cover \(A\). Also \(z\in B(x,d(x,a_i)/3)\). The triangle inequality would then give \(d(x,a_i)\le d(x,z)+d(z,a_i)<2d(x,a_i)/3\), which is impossible. Thus \(V\cap A=\varnothing\). Every point outside \(A\) has an open neighborhood disjoint from \(A\), so \(\mathbb{R}^n\setminus A\) is open and \(A\) is closed. The empty set is closed as well, completing the proof. \(\square\)

This direction of the theorem follows directly from compactness. The reverse direction uses finite-dimensional geometry: boundedness lets us place the set in a large box, then subdivide that box into finitely many small cells.

Boundedness Gives Total Boundedness

Lemma: Every bounded subset \(A\subseteq\mathbb{R}^n\) is totally bounded.

Proof. The empty set is totally bounded, so suppose \(A\ne\varnothing\). Choose \(R\ge 0\) such that \(\|x\|\le R\) for all \(x\in A\). If \(R=0\), every \(x\in A\) has norm zero, so \(A=\{0\}\), which is covered by the single ball \(B(0,\varepsilon)\) for every \(\varepsilon>0\). Now suppose \(R>0\), and fix \(\varepsilon>0\). Choose \(m\in\mathbb{N}\) large enough that \(2R\sqrt{n}/m<\varepsilon\). Each coordinate of every point of \(A\) lies in \([-R,R]\), since \(|x_i|\le\|x\|\le R\). Divide each copy of \([-R,R]\) into \(m\) intervals of length \(2R/m\), assigning each shared endpoint to just one interval. Their Cartesian products give finitely many cells covering \([-R,R]^n\). From each cell that meets \(A\), choose one point of \(A\) in that cell.

If \(x\in A\) lies in a cell with chosen point \(y\in A\), then \(|x_i-y_i|\le 2R/m\) in each of the \(n\) coordinates. Hence \(\|x-y\|\le\sqrt{n}(2R/m)<\varepsilon\). Thus the finitely many open \(\varepsilon\)-balls centered at the chosen points cover \(A\). This holds for every \(\varepsilon>0\), so \(A\) is totally bounded. \(\square\)

Closedness supplies the other metric condition. Euclidean space is complete: a Cauchy sequence of vectors has a Cauchy sequence in each coordinate; each coordinate converges in \(\mathbb{R}\), and the resulting vector is the limit in the Euclidean metric. If \(A\) is closed, a sequence in \(A\) that converges in \(\mathbb{R}^n\) has its limit in \(A\). Indeed, if the limit were outside \(A\), the open complement would contain a ball around it, but convergence would eventually put the sequence inside that ball. Therefore a closed subset \(A\), with its subspace metric, is complete. The empty set is complete too, since it has no sequences that could violate the definition.

Proof of the Reverse Direction

Proof of the Heine-Borel theorem. Suppose \(A\subseteq\mathbb{R}^n\) is closed and bounded. By the lemma, \(A\) is totally bounded. Since \(\mathbb{R}^n\) is complete and \(A\) is closed, \(A\) is complete in its subspace metric. The metric compactness criterion therefore implies that \(A\) is compact.

Conversely, if \(A\) is compact, the proposition proves that \(A\) is closed and bounded. These arguments include \(A=\varnothing\): it is closed and bounded, and it is compact because the empty subcover is a finite subcover of any open cover of it. Hence compactness and being closed and bounded are equivalent for every \(A\subseteq\mathbb{R}^n\). \(\square\)

Worked Applications

Worked Example: A Closed Rectangle in the Plane

Consider \(A=[0,1]\times[-1,2]\subseteq\mathbb{R}^2\), with the Euclidean metric. We verify the two conditions in the theorem.

For any \((x,y)\in A\), we have \(0\le x\le1\) and \(-1\le y\le2\). Therefore \(x^2\le1\) and \(y^2\le4\), so \(\|(x,y)\|^2=x^2+y^2\le5\). Thus \(\|(x,y)\|\le\sqrt{5}\), and \(A\) is bounded. The bound is attained at \((1,2)\), whose squared norm is \(1^2+2^2=5\).

To check closedness, take a point \((u,v)\notin A\). At least one of \(u<0\), \(u>1\), \(v<-1\), or \(v>2\) holds. In the first case, a ball of radius \(-u/2>0\) around \((u,v)\) remains in the half-plane with first coordinate less than \(0\). In the second case, radius \((u-1)/2>0\) keeps the first coordinate greater than \(1\). In the third and fourth cases, radii \((-1-v)/2>0\) and \((v-2)/2>0\), respectively, keep the second coordinate outside \([-1,2]\). Thus every point outside \(A\) has a ball disjoint from \(A\), so \(A\) is closed. The theorem now gives that \(A\) is compact.

Check: the largest squared norm on this rectangle is \(5\), as shown above, and the closedness argument covers every way a point can fail either coordinate condition.

Worked Example: A Bounded Set That Is Not Compact

Consider \(A=(0,1)\subseteq\mathbb{R}\), with the standard topology. Every \(x\in A\) satisfies \(|x|<1\), so \(A\) is bounded. It is not closed: every open ball around \(1\) contains points of \(A\), while \(1\notin A\).

There is also an explicit open cover with no finite subcover. For each integer \(n\ge2\), let \(U_n=(1/n,1)\). These sets are open in \(\mathbb{R}\) and contained in \(A\). If \(x\in(0,1)\), choose \(n\ge2\) with \(n>1/x\). Then \(1/n<x<1\), so \(x\in U_n\). Hence the \(U_n\) cover \(A\).

For any finite nonempty selection of these sets, let \(N\) be the largest selected index. Since \(1/n\ge1/N\) for each selected \(n\), their union is \((1/N,1)\). The point \(1/(2N)\) belongs to \(A\), because \(0<1/(2N)<1\), but it is not in that union, because \(1/(2N)<1/N\). No finite selection covers \(A\), so \(A\) is not compact.

Check: the example fails exactly the closedness condition of the theorem, and the open cover independently confirms noncompactness.

Worked Example: A Closed but Unbounded Subset of the Plane

Consider \(L=\{(t,0):t\in\mathbb{R}\}\subseteq\mathbb{R}^2\). To see that \(L\) is closed, take any point \((u,v)\notin L\), so \(v\ne0\). Every point in the ball of radius \(|v|/2\) centered at \((u,v)\) has second coordinate different from zero: its second coordinate differs from \(v\) by less than \(|v|/2\). This ball misses \(L\), proving that the complement of \(L\) is open.

The set is unbounded because \((m,0)\in L\) has norm \(m\) for every \(m\in\mathbb{N}\). In particular, the norms of points in \(L\) exceed any proposed bound by choosing a sufficiently large integer \(m\). Thus the theorem implies that \(L\) is not compact.

For a direct open-cover check, the balls \(B((0,0),m)\), for \(m\in\mathbb{N}\), cover \(L\): for each \(t\in\mathbb{R}\), some positive integer \(m\) satisfies \(|t|<m\). A finite selection has a largest index \(M\), and its union is \(B((0,0),M)\). This misses \((M+1,0)\in L\), whose distance from \((0,0)\) is \(M+1\), not less than \(M\). So no finite selection covers \(L\).

Check: \(L\) satisfies closedness but fails boundedness, and the displayed cover shows directly why it is not compact.

What the Criterion Does—and Does Not—Say

A common mistake is to assume that boundedness alone guarantees compactness. The interval \((0,1)\) disproves this: it is bounded but not compact. In the proof, the two hypotheses do different jobs. Boundedness gives total boundedness in finite-dimensional Euclidean space, while closedness ensures completeness. The metric compactness criterion requires both.

Another important restriction is the setting: the result concerns subsets of \(\mathbb{R}^n\) with the Euclidean metric. The finite subdivision argument relies on having finitely many coordinates. The conclusion should not be transferred to arbitrary metric spaces just from the words “closed” and “bounded.” Within Euclidean space, however, the theorem turns compactness into two concrete tests: check whether the set contains all its limit points, and whether its points stay within a fixed distance of the origin.

Check Your Understanding

Use the theorem and its proof to justify each answer.

  1. Is \([0,1]\cup[2,3]\) compact as a subset of \(\mathbb{R}\)? Identify the topology and check both conditions.
  2. Is the closed ball \(\{x\in\mathbb{R}^2:\|x\|\le1\}\) compact? Give a bound and explain why the set is closed.
  3. For \(A=\{(x,0):0<x\le1\}\subseteq\mathbb{R}^2\), which condition in the theorem fails?
  4. Why does a finite subdivision of a bounded box establish total boundedness only after choosing a point of \(A\) from each cell that meets \(A\)?
  5. Explain why the empty subset of \(\mathbb{R}^n\) satisfies both sides of the Heine-Borel equivalence.