Tutorials › Real Analysis › Examples of Noncompact Sets

Compactness · Tutorial 277 of 1000

Examples of Noncompact Sets

Learn to recognize noncompact sets and verify noncompactness directly using open covers without finite subcovers.

Intermediate 9 min read

What You'll Learn

  • Use open covers without finite subcovers to show that intervals are not compact.
  • Distinguish failure of closedness from failure of boundedness.
  • Construct open covers tailored to a missing endpoint.
  • Use a convergent sequence with a limit outside a set to show the set is not closed.
  • Apply the Heine–Borel theorem to diagnose noncompact subsets of the real line.

How Compactness Can Fail

In “Examples of Compact Sets,” we used the Heine–Borel theorem to recognize compact subsets of \(\mathbb{R}\): they must be both closed and bounded. This tutorial looks at the contrasting cases. A set can fail to be compact because it is unbounded, because it omits a limit point, or because an open cover reveals a failure that is not immediately apparent from the set’s description.

Recall the open-cover definition: a set \(E\subseteq\mathbb{R}\) is compact if every family of open sets whose union contains \(E\) has a finite subfamily whose union still contains \(E\). To prove that a set is not compact, it is enough to construct one open cover for which no finite subfamily covers the set. This direct method will be useful for intervals whose endpoints are excluded.

The Heine–Borel theorem gives another route. We may cite the results established earlier in “What Is Compactness?” and “Compactness in the Real Line”: every compact subset of \(\mathbb{R}\) is bounded, every compact subset of \(\mathbb{R}\) is closed, and compactness is equivalent to being closed and bounded. Thus an unbounded set, or a bounded set that is not closed, cannot be compact. These tests diagnose the failure; explicit open covers show what the definition looks like in action.

Open Intervals: Bounded but Not Closed

An open interval \((a,b)\), with \(a<b\), is bounded, but it omits both endpoints. The following open cover demonstrates directly that this omission can prevent compactness. Each set in the cover is an open interval in \(\mathbb{R}\).

Theorem: If \(a,b\in\mathbb{R}\) and \(a<b\), then the open interval \((a,b)\) is not compact.

Proof. For each positive integer \(n\), let \(U_n=(a+1/n,b)\) whenever \(a+1/n<b\). To avoid indices for which this interval is empty, choose a positive integer \(N\) such that \(1/N<b-a\), and use the family \(\{U_n:n\geq N\}\). Each \(U_n\) is open in \(\mathbb{R}\).

This family covers \((a,b)\). Indeed, take \(x\in(a,b)\). Since \(x-a>0\), the Archimedean property lets us choose \(n\geq N\) so large that \(1/n<x-a\). Then \(a+1/n<x<b\), so \(x\in U_n\).

Now take any finite subfamily. It has a largest index \(m\), and the intervals are nested: if \(n\leq m\), then \(a+1/n\geq a+1/m\), so \(U_n\subseteq U_m\). The union of the finite subfamily is therefore contained in \(U_m=(a+1/m,b)\). But \(a+1/(2m)\) lies in \((a,b)\) and does not lie in \(U_m\), because \(a+1/(2m)<a+1/m\). Thus no finite subfamily covers \((a,b)\). The open-cover definition shows that \((a,b)\) is not compact. \(\square\)

Worked Example: The Interval \((0,1)\)

For \(E=(0,1)\), consider \(U_n=(1/n,1)\) for integers \(n\geq2\). These intervals cover \(E\): given \(x\in(0,1)\), choose \(n\geq2\) with \(1/n<x\), which gives \(x\in U_n\).

A finite selection has a largest index \(m\), and its union is \(U_m=(1/m,1)\), since the intervals are nested. It misses, for example, \(1/(2m)\), which belongs to \((0,1)\) but is less than \(1/m\). Hence this open cover has no finite subcover. The Heine–Borel theorem gives the same conclusion by noting that \((0,1)\) is bounded but not closed: its endpoint \(0\) is a limit point not contained in the interval.

A Missing Endpoint in a Half-Open Interval

The direct-cover method also applies when one endpoint is included and the other is not. The cover must be chosen with care: an arbitrary open interval containing \([a,b)\) might extend beyond \(b\) and cover the entire set at once. Instead, we use open intervals whose right endpoints approach the omitted endpoint from below.

Theorem: If \(a,b\in\mathbb{R}\) and \(a<b\), then the half-open interval \([a,b)\) is not compact.

Proof. Choose a positive integer \(N\) such that \(1/N<b-a\). For every integer \(n\geq N\), define \(V_n=(a-1,b-1/n)\). The choice of \(N\) ensures \(b-1/n\geq b-1/N>a\), so these are nonempty open intervals.

They cover \([a,b)\). If \(x\in[a,b)\), then \(b-x>0\). Choose \(n\geq N\) with \(1/n<b-x\). This gives \(a-1<x\), since \(x\geq a\), and \(x<b-1/n\). Thus \(x\in V_n\).

For any finite subfamily, let \(m\) be its largest index. If \(N\leq n\leq m\), then \(b-1/n\leq b-1/m\), so \(V_n\subseteq V_m\). Its union is therefore contained in \(V_m=(a-1,b-1/m)\). The point \(y=b-1/(2m)\) belongs to \([a,b)\): because \(1/m<b-a\), we have \(1/(2m)<b-a\), and hence \(a<y<b\). But \(y>b-1/m\), so \(y\notin V_m\). This finite subfamily does not cover \([a,b)\). Since the argument applies to every finite subfamily, the displayed family is an open cover with no finite subcover. Thus \([a,b)\) is not compact. \(\square\)

Worked Example: The Interval \([2,5)\)

For each integer \(n\geq1\), set \(V_n=(1,5-1/n)\). The intervals are open, and they cover \([2,5)\). To check the cover, take \(x\in[2,5)\). Since \(5-x>0\), there is an integer \(n\) large enough that \(1/n<5-x\). Then \(1<x<5-1/n\), so \(x\in V_n\).

If a finite number of these intervals are selected, let \(m\) be the largest index. Each selected interval is contained in \(V_m\), so their union is contained in \((1,5-1/m)\). The point \(5-1/(2m)\) belongs to \([2,5)\), since \(1/(2m)\leq1/2<3\), but it is greater than \(5-1/m\). It is therefore not covered. This verifies directly that \([2,5)\) is not compact. It is bounded, but not closed, because \(5\) is a limit point that is missing.

Unbounded Sets and Compactness

A different failure occurs when a set is unbounded. The result that every compact subset of \(\mathbb{R}\) is bounded was proved in “What Is Compactness?” We can use it directly: no unbounded subset of \(\mathbb{R}\) is compact. The open-cover definition also gives a concise example of this failure.

Worked Example: The Real Line

For each positive integer \(n\), let \(W_n=(-n,n)\). This is an open cover of \(\mathbb{R}\). In fact, for any real number \(x\), the Archimedean property gives an integer \(n>|x|\), so \(x\in W_n\).

A finite selection of these intervals has a largest index \(m\), and its union is contained in \((-m,m)\). The real number \(m+1\) is not in that interval, so the finite selection does not cover \(\mathbb{R}\). Therefore \(\mathbb{R}\) is not compact. This example reflects the unboundedness obstruction: no bounded interval in the cover can contain the whole real line.

The same kind of cover can be adapted to other unbounded sets. If \(E\subseteq\mathbb{R}\) is unbounded, the family \(\{(-n,n):n\geq1\}\) covers \(E\), while every finite subfamily is contained in some \((-m,m)\). Because \(E\) is unbounded, that finite union cannot contain all of \(E\). This is an open-cover proof of the general conclusion already established earlier: unbounded subsets of the real line are not compact.

Bounded Does Not Mean Compact

It is important to distinguish the two requirements in Heine–Borel. Boundedness prevents points from extending arbitrarily far in either direction, but it does not ensure that the set contains its limit points. A bounded set can fail compactness by leaving out just one point.

Worked Example: Rational Points in \([0,1]\)

Consider \(E=\mathbb{Q}\cap[0,1]\). The set is bounded because every one of its elements lies between \(0\) and \(1\). Let \(r=\sqrt{2}/2\). This number lies in \((0,1)\) and is irrational: if \(\sqrt{2}/2\) were rational, then multiplying by \(2\) would make \(\sqrt{2}\) rational, contrary to the irrationality of \(\sqrt{2}\).

By the Density of the Rationals theorem, for every integer \(n\geq4\) we can choose a rational number \(q_n\) with \(|q_n-r|<1/n\). These choices lie in \([0,1]\). Indeed, \(1/n\leq1/4\), and \(1/4<r<3/4\), so \(0<r-1/n<q_n<r+1/n<1\). Thus \(q_n\in E\) for every \(n\geq4\). Also, \(|q_n-r|<1/n\) implies \(q_n\to r\).

The sequence criterion for closedness from “Sequences and Closure” now shows that \(E\) is not closed: a sequence in \(E\) converges to \(r\notin E\). Since compact subsets of \(\mathbb{R}\) are closed, \(E\) cannot be compact. This example shows why boundedness alone is insufficient, even when the set contains many points throughout the interval.

Choosing a Test for Noncompactness

For subsets of \(\mathbb{R}\), the Heine–Borel theorem often gives the shortest diagnosis. If a set is unbounded, it is not compact. If it is bounded but not closed, it is also not compact. When a missing endpoint is involved, an explicit open cover can make the failure especially clear: neighborhoods cover every point of the set, but any finite selection stops short of the omitted endpoint.

A common pitfall is to reason that a set “fits inside” a compact interval and therefore must be compact. A subset of a compact set need not be compact; for example, \((0,1)\subseteq[0,1]\), but \((0,1)\) omits its limit points \(0\) and \(1\). Another pitfall is to confuse an open cover with a finite subcover. An infinite cover may cover every point perfectly well while no finite part of it does. The nested covers above make this distinction explicit.

SetFailure of compactnessUseful test
\((a,b)\)Bounded, but omits its endpoints.Open cover approaching the left endpoint, or Heine–Borel.
\([a,b)\)Bounded, but omits the limit point \(b\).Open cover approaching the right endpoint, or Heine–Borel.
\(\mathbb{R}\)Unbounded.Open cover by \((-n,n)\), or the boundedness condition in Heine–Borel.
\(\mathbb{Q}\cap[0,1]\)Bounded, but not closed.A rational sequence converging to an irrational limit.
1
Check boundedness.
If the set is unbounded, the compactness results for the real line rule out compactness.
2
Check closedness.
Look for an omitted endpoint or a sequence in the set that converges to a point outside it.
3
Build an open cover if useful.
For an interval missing an endpoint, choose open sets that cover the interval while their finite unions stop short of that endpoint.

Check Your Understanding

Use the definitions and examples in this tutorial to answer the following questions.

  1. Why does the family \(U_n=(a+1/n,b)\), for sufficiently large \(n\), cover \((a,b)\)?
  2. Why can no finite subfamily of that cover cover the whole open interval?
  3. What point is left uncovered by a finite selection from the cover of \([a,b)\) in the proof?
  4. Why does boundedness not imply that \(\mathbb{Q}\cap[0,1]\) is compact?
  5. How does the cover \(\{(-n,n):n\geq1\}\) show directly that \(\mathbb{R}\) is not compact?