Tutorials › Real Analysis › Closed Intervals

Compactness · Tutorial 278 of 1000

Closed Intervals

Use openness near the right endpoint and the least-upper-bound property to show that every open cover of a closed interval has a finite subcover.

Intermediate 10 min read

What You'll Learn

  • Identify a closed interval, including the degenerate case where its endpoints agree
  • Prove that a closed interval is a closed subset of the real line
  • Use the supremum property to extract a finite subcover from an arbitrary open cover
  • Apply interval compactness to specific covers and verify that selected sets cover every point
  • Distinguish the compactness of a closed interval from the failure of compactness for an open interval

Why Closed Intervals Behave Differently

In “Examples of Noncompact Sets,” we saw that an open interval is bounded but not compact: an open cover can approach a missing endpoint while every finite selection still falls short. A closed interval includes both endpoints. We will prove directly from the open-cover definition that this difference is enough to make every closed interval compact.

Throughout, let \(a,b\in\mathbb{R}\) with \(a\leq b\), and write \([a,b]=\{x\in\mathbb{R}:a\leq x\leq b\}\). When \(a=b\), this interval consists of the single point \(a\). When \(a<b\), it includes every point between its two endpoints, including the endpoints themselves.

Definition: A family of open subsets of \(\mathbb{R}\) is an open cover of a set \(E\) if every point of \(E\) belongs to at least one set in the family. A finite subcover is a finite selection from that family whose union still contains \(E\). A set is compact if every open cover of it has a finite subcover.

To prove compactness, we must start with an arbitrary open cover, not just one convenient family of intervals, and show that some finite selection covers the whole interval. The key idea is to consider how far to the right we can cover, beginning at \(a\), with finitely many members of the given cover. The supremum of those points cannot stop short of \(b\): an open set containing the supremum also contains a small interval to its right.

Closed Intervals Are Closed Sets

First, we verify the topological property indicated by the name “closed interval.” This argument also handles the case \(a=b\).

Theorem: If \(a,b\in\mathbb{R}\) and \(a\leq b\), then \([a,b]\) is closed in \(\mathbb{R}\).

Proof. We show that the complement of \([a,b]\) is open. Take any \(x\in\mathbb{R}\setminus[a,b]\). Then either \(x<a\) or \(x>b\).

If \(x<a\), let \(r=(a-x)/2\), which is positive. For every \(y\in B_r(x)=(x-r,x+r)\), we have \(y<x+r=(x+a)/2<a\). Thus \(B_r(x)\) does not meet \([a,b]\).

If \(x>b\), let \(r=(x-b)/2\), which is positive. For every \(y\in B_r(x)\), we have \(y>x-r=(x+b)/2>b\). Again, \(B_r(x)\) does not meet \([a,b]\).

Every point outside \([a,b]\) therefore has an open ball contained in the complement. The complement is open, so \([a,b]\) is closed by the characterization of closed sets as sets with open complements. \(\square\)

This theorem concerns closedness, not compactness: a closed set need not be compact. For example, \(\mathbb{R}\) is closed but unbounded and is not compact. The closed intervals considered here have both a finite extent and included endpoints, and we now use the open-cover definition to prove their compactness without assuming a general compactness criterion.

The Finite-Subcover Argument

Theorem: If \(a,b\in\mathbb{R}\) and \(a\leq b\), then the closed interval \([a,b]\) is compact.

Proof. If \(a=b\), then \([a,b]=\{a\}\). Given any open cover of this set, at least one member contains \(a\); that single member is a finite subcover. We may therefore assume \(a<b\).

Let \(\mathcal{U}\) be an arbitrary open cover of \([a,b]\). Define \(S\) to be the set of points \(x\in[a,b]\) for which \([a,x]\) can be covered by finitely many members of \(\mathcal{U}\). The set \(S\) is nonempty: some member of \(\mathcal{U}\) contains \(a\), and that one set covers \([a,a]\). Also, \(S\subseteq[a,b]\), so \(S\) is bounded above. Let \(c=\sup S\).

We first show that \(c\in S\). Choose \(U\in\mathcal{U}\) with \(c\in U\). Since \(U\) is open, there is a \(\delta>0\) such that \((c-\delta,c+\delta)\subseteq U\).

If \(c=a\), then \(U\) contains \([a,y]\) for some \(y\in(a,b]\): for instance, choose \(y=\min\{b,a+\delta/2\}\). This would put \(y>c\) in \(S\), contradicting that \(c\) is an upper bound of \(S\). Hence \(c>a\). By the definition of supremum, there is an \(x\in S\) with \(c-\delta/2<x\leq c\). A finite selection from \(\mathcal{U}\) covers \([a,x]\), because \(x\in S\). The set \(U\) covers \([x,c]\), since each point of this interval lies in \((c-\delta,c+\delta)\). Together these finitely many sets cover \([a,c]\), so \(c\in S\).

We now show that \(c=b\). If \(c<b\), use the same open set \(U\) and choose \(y=\min\{b,c+\delta/2\}\). Then \(y>c\), and \(U\) covers \([c,y]\). Since \(c\in S\), a finite selection covers \([a,c]\); adding \(U\) gives a finite cover of \([a,y]\). Thus \(y\in S\), contradicting that \(c\) is an upper bound of \(S\). Therefore \(c=b\). Since \(c\in S\), finitely many members of \(\mathcal{U}\) cover \([a,c]=[a,b]\). The arbitrary open cover \(\mathcal{U}\) has a finite subcover, proving that \([a,b]\) is compact. \(\square\)

The proof depends on two distinct features of the interval. The supremum \(c\) exists because the points under consideration lie in the bounded interval \([a,b]\). Once \(c\) is chosen, openness of a cover member containing \(c\) lets us extend a finite cover a little farther to the right. If the interval stopped at a point not included in the set, as with \((a,b)\), this argument would not produce a cover at the omitted endpoint.

Worked Examples

Worked Example: A Two-Set Cover of \([0,2]\)

Consider the open sets \(U=(-1,5/4)\) and \(V=(3/4,3)\). They form an open cover of \([0,2]\). If \(x\in[0,2]\) and \(x<5/4\), then \(-1<x<5/4\), so \(x\in U\). If \(x\in[0,2]\) and \(x\geq5/4\), then \(3/4<x<3\), so \(x\in V\). These two cases include every point of the interval.

Neither set alone covers \([0,2]\): \(U\) does not contain \(2\), and \(V\) does not contain \(0\). But the two sets together do cover it. Thus \(\{U,V\}\) is a finite subcover, illustrating that the finite subcover need not consist of a single open set.

Worked Example: Covering \([-2,1]\) Across Zero

Let \(P=(-3,0)\) and \(Q=(-1,2)\). Both are open in \(\mathbb{R}\). If \(x\in[-2,1]\) and \(x<0\), then \(-3<x<0\), so \(x\in P\). If \(x\in[-2,1]\) and \(x\geq0\), then \(-1<x<2\), so \(x\in Q\). Hence \(P\cup Q\) contains all of \([-2,1]\); in particular, the endpoint \(-2\) lies in \(P\) and the endpoint \(1\) lies in \(Q\).

The two intervals overlap on \((-1,0)\), so there is no gap between the part covered on the left and the part covered on the right. The family \(\{P,Q\}\) is a finite subcover of the open cover \(\{P,Q\}\) itself.

Worked Example: The Degenerate Interval \([4,4]\)

The interval \([4,4]\) is the singleton \(\{4\}\). Suppose \(\mathcal{V}\) is any open cover of \(\{4\}\). Because it is a cover, there is some \(W\in\mathcal{V}\) with \(4\in W\). The single set \(W\) then contains every point of \([4,4]\), since \(4\) is its only point.

Thus every open cover of \([4,4]\) has a one-set subcover. The endpoint case is not an exception to compactness; it is the simplest instance of it. Treating \(a=b\) separately in the theorem’s proof ensures that no step relying on points strictly between \(a\) and \(b\) is applied when there are no such points.

What the Result Does—and Does Not—Say

The compactness theorem applies to every closed interval with finite real endpoints, including a singleton. It is a statement about arbitrary open covers: no matter how many open sets are used or how they are arranged, some finite selection covers the entire interval. The supremum argument explains why an attempted finite cover cannot stop short of the right endpoint while still being maximal.

Compare this with the open interval \((a,b)\) from “Examples of Noncompact Sets.” There, a cover can consist of intervals whose left endpoints approach \(a\), with every finite selection missing points close to \(a\). In \([a,b]\), the endpoint \(a\) belongs to the set and is covered by some member of any open cover. Openness supplies a neighborhood around it, and the supremum argument carries the finite-cover process across the interval. The included right endpoint \(b\) is ultimately reached because the supremum itself can be covered and extended if it lies short of \(b\).

A common pitfall is to think that boundedness alone ensures compactness. The open interval \((a,b)\) is bounded but is not compact. It is also a mistake to think that closedness alone is enough: the whole real line is closed and is not compact. The result proved here concerns intervals that have both finite endpoints included; a general test for compact subsets of \(\mathbb{R}\) will bring these requirements together.

1
Start with an arbitrary open cover.
Compactness requires a finite subcover for every open cover, not only for a specially chosen one.
2
Record how far a finite cover reaches.
Form the set of right endpoints \(x\) for which the initial segment \([a,x]\) has a finite cover.
3
Take the supremum and use openness.
A cover member containing the supremum covers a neighborhood of it, preventing the finite-cover process from stopping before \(b\).

Check Your Understanding

Use the open-cover definition and the supremum argument to answer the following questions.

  1. Why is the set \(S\) in the compactness proof nonempty?
  2. Where is boundedness used when defining \(c=\sup S\)?
  3. Why does an open set \(U\) containing \(c\) also cover \([x,c]\) when \(c-\delta/2<x\leq c\)?
  4. What contradiction arises if \(c<b\)?
  5. How does the proof handle the case \(a=b\), and why is that case worth checking separately?