Tutorials › Real Analysis › Compact Subsets of Hausdorff Spaces

Topology · Tutorial 737 of 1000

Compact Subsets of Hausdorff Spaces

Understand compact subsets through open covers and see how Hausdorffness lets disjoint compact sets be separated.

Advanced 10 min read

What You'll Learn

  • Translate between compactness in a subspace and covers by open sets in the ambient space
  • Prove that finite unions of compact subsets are compact
  • Separate a point from a compact subset in a Hausdorff space
  • Separate two disjoint compact subsets by disjoint open neighborhoods
  • Recognize why the Hausdorff hypothesis matters for separation

Compactness for a Subset

Compactness is defined for a topological space by requiring every open cover to have a finite subcover. When we speak of a compact subset \(K\) of a space \(X\), we mean that \(K\), with the subspace topology inherited from \(X\), is compact. This definition involves open sets of \(K\), which need not themselves be open in \(X\). The subspace topology provides a direct way to relate those covers to open sets in the ambient space.

Definition: A subset \(K\subseteq X\) is compact if the subspace \(K\), with its subspace topology, is compact. Equivalently, every cover of \(K\) by sets open in \(X\) has a finite subcover.

To see why the two formulations agree, recall that an open set in the subspace \(K\) has the form \(K\cap O\), where \(O\) is open in \(X\). If a family of subspace-open sets covers \(K\), choose an ambient open set for each member and use those ambient sets as a cover of \(K\). Conversely, any ambient open cover restricts to a subspace-open cover by intersecting each member with \(K\). The finite-subcover condition is therefore the same in either formulation.

This equivalence is useful because many problems describe neighborhoods or open covers in \(X\), while compactness belongs to \(K\) as a space in its own right. In particular, the ambient open sets need not be contained in \(K\); they only need to cover its points.

Worked Example: Covering a Finite Subset in the Ambient Space

Let \(K=\{p,q\}\subseteq X\), where \(p\ne q\), and let \(\{O_\lambda:\lambda\in\Lambda\}\) be any cover of \(K\) by sets open in \(X\). Since the family covers \(K\), there are indices \(\lambda_p,\lambda_q\in\Lambda\) such that \(p\in O_{\lambda_p}\) and \(q\in O_{\lambda_q}\). The two sets \(O_{\lambda_p}\) and \(O_{\lambda_q}\) form a finite subcover of \(K\). If they happen to be the same set, the subcover has just one member. Thus \(K\) is compact. This argument does not require \(X\) to be Hausdorff or even to have more than the topology axioms.

The empty subset is compact as well: every open cover of it has the empty finite subcover. A one-point subset is compact because any cover contains at least one set covering its point. These cases are consistent with the definition and will be useful when treating finite unions and separation statements.

Finite Unions Preserve Compactness

Compactness is stable under taking a finite union, even when the ambient space is not Hausdorff. The reason is that an open cover of the union covers each compact piece; each piece supplies finitely many members of the cover, and the combined collection remains finite.

Theorem: If \(K_1,\ldots,K_m\) are compact subsets of a topological space \(X\), then \(\bigcup_{j=1}^{m}K_j\) is compact.

Proof. If \(m=0\), the union is empty and is compact. Suppose \(m\geq1\), and let \(\{O_\lambda:\lambda\in\Lambda\}\) be an open cover of \(\bigcup_{j=1}^{m}K_j\), with each \(O_\lambda\) open in \(X\). For each \(j\), this family also covers \(K_j\). Compactness of \(K_j\) gives a finite set of indices \(\Lambda_j\subseteq\Lambda\) such that $$ K_j\subseteq\bigcup_{\lambda\in\Lambda_j}O_\lambda. $$ The union \(\Lambda_1\cup\cdots\cup\Lambda_m\) is finite, since it is a finite union of finite sets. The corresponding members of the original cover cover every \(K_j\), and hence cover \(\bigcup_{j=1}^{m}K_j\). This proves compactness. If any \(K_j\) is empty, its finite subcover may be chosen to have no members; the argument still applies. \(\square\)

The finiteness of the union is essential to this proof: infinitely many compact pieces might require infinitely many different members of an open cover. No claim about arbitrary unions follows from the theorem.

Worked Example: A Finite Union of Compact Sets

Let \(K_1=\{(-2,0),(2,0)\}\) and \(K_2=\{(0,-1),(0,1)\}\) in \(\mathbb{R}^2\) with its usual topology. Each set is finite and therefore compact: given any open cover, choose one member covering each point, producing at most two sets for each \(K_j\). The finite-union theorem now shows that \(K_1\cup K_2\) is compact. More explicitly, for any open cover of this union, select a cover member for each of its four points. Those at most four members cover the entire union.

The theorem is more useful than this particular finite-point calculation because it applies when the compact pieces are not finite and when the ambient space has no metric. Its proof needs only the open-cover definition.

A Point Can Be Separated from a Compact Set

Hausdorffness says that two distinct points have disjoint open neighborhoods. A compact set lets us turn this point-by-point condition into a separation of one point from an entire set. Compactness supplies a finite subcover, allowing us to intersect finitely many neighborhoods of the fixed point while combining neighborhoods of the compact set.

Theorem: Let \(X\) be Hausdorff, let \(K\subseteq X\) be compact, and let \(x\in X\setminus K\). There are disjoint open sets \(U,V\subseteq X\) such that \(x\in U\) and \(K\subseteq V\).

Proof. If \(K=\varnothing\), take \(U=X\) and \(V=\varnothing\). These are disjoint open sets, \(x\in U\), and \(K\subseteq V\). Now suppose \(K\ne\varnothing\). For each \(y\in K\), we have \(x\ne y\), so Hausdorffness gives disjoint open sets \(U_y,V_y\subseteq X\) with \(x\in U_y\) and \(y\in V_y\). The family \(\{V_y:y\in K\}\) covers \(K\). By compactness, finitely many of these sets cover it: for some \(y_1,\ldots,y_r\in K\), $$ K\subseteq V_{y_1}\cup\cdots\cup V_{y_r}. $$ Since \(K\ne\varnothing\), we can take \(r\geq1\). Define $$ U=U_{y_1}\cap\cdots\cap U_{y_r}, \qquad V=V_{y_1}\cup\cdots\cup V_{y_r}. $$ The set \(U\) is open as a finite intersection of open sets, and it contains \(x\). The set \(V\) is open as a union of open sets, and it contains \(K\). For every \(i\), \(U\subseteq U_{y_i}\), so \(U\cap V_{y_i}=\varnothing\). It follows that \(U\cap V=\varnothing\). Thus the required neighborhoods exist. \(\square\)

The argument uses compactness at precisely the point where an infinite collection of neighborhoods is reduced to finitely many. The finite intersection of the corresponding \(U_y\)'s is still open and still contains \(x\). An infinite intersection of open sets need not be open, so simply taking all the neighborhoods at once would not establish the result.

Worked Example: Separating a Point from a Two-Point Set

In \(\mathbb{R}^2\), let \(K=\{(-1,0),(1,0)\}\) and \(x=(0,0)\). The set \(K\) is compact because it is finite, and \(x\notin K\). We can exhibit disjoint open neighborhoods directly. Let \(U=B_{1/3}(x)\) and let $$ V=B_{1/3}((-1,0))\cup B_{1/3}((1,0)). $$ Then \(x\in U\) and \(K\subseteq V\). The distance from \(x\) to either point of \(K\) is \(1\). If a point belonged to \(U\) and one of the two balls in \(V\), the triangle inequality would give $$ 1\leq \text{the distance from }x\text{ to that point of }K <\frac{1}{3}+\frac{1}{3}=\frac{2}{3}, $$ which is impossible. Hence \(U\cap V=\varnothing\). This concrete choice illustrates the general finite-cover construction in the point-versus-compact theorem.

Disjoint Compact Sets Can Be Separated

The point-versus-compact result can be applied repeatedly to separate two compact sets. For each point of one set, first find an open neighborhood of that point and an open neighborhood of the other compact set that are disjoint. Then use compactness of the first set to retain only finitely many such pairs. A finite union on one side and a finite intersection on the other produce the desired neighborhoods.

Theorem: Let \(X\) be Hausdorff, and let \(A,B\subseteq X\) be disjoint compact subsets. There are disjoint open sets \(U,V\subseteq X\) such that \(A\subseteq U\) and \(B\subseteq V\).

Proof. If \(A=\varnothing\), take \(U=\varnothing\) and \(V=X\). If \(B=\varnothing\), take \(U=X\) and \(V=\varnothing\). In either case the sets are open, disjoint, and contain the required subsets. Now suppose both \(A\) and \(B\) are nonempty.

For each \(a\in A\), apply the point-versus-compact theorem to the point \(a\) and the compact set \(B\). This is permitted because \(a\notin B\), as \(A\cap B=\varnothing\). It gives disjoint open sets \(U_a,V_a\) such that \(a\in U_a\) and \(B\subseteq V_a\). The family \(\{U_a:a\in A\}\) covers \(A\), so compactness of \(A\) gives \(a_1,\ldots,a_s\in A\) with $$ A\subseteq U_{a_1}\cup\cdots\cup U_{a_s}. $$ Since \(A\ne\varnothing\), take \(s\geq1\). Set $$ U=U_{a_1}\cup\cdots\cup U_{a_s}, \qquad V=V_{a_1}\cap\cdots\cap V_{a_s}. $$ Both are open, because \(U\) is a union and \(V\) is a finite intersection of open sets. We have \(A\subseteq U\), and \(B\subseteq V\) because every \(V_{a_i}\) contains \(B\). If \(z\in U\cap V\), then \(z\in U_{a_i}\) for some \(i\), while \(z\in V\subseteq V_{a_i}\). This contradicts \(U_{a_i}\cap V_{a_i}=\varnothing\). Thus \(U\cap V=\varnothing\), proving the theorem. \(\square\)

Worked Example: Separating Two Finite Compact Sets

In \(\mathbb{R}^2\), take \(A=\{(-2,0),(2,0)\}\) and \(B=\{(0,-1),(0,1)\}\). Both sets are compact because they are finite, and they are disjoint. For any \(a\in A\) and \(b\in B\), the distance between them is \(\sqrt{5}\): for example, $$ \|(-2,0)-(0,-1)\|=\sqrt{(-2)^2+1^2}=\sqrt{5}, \qquad \|(2,0)-(0,1)\|=\sqrt{2^2+(-1)^2}=\sqrt{5}. $$ The other two pairings give the same calculation. Let \(U\) be the union of the open balls of radius \(1/2\) centered at the points of \(A\), and let \(V\) be the union of the open balls of radius \(1/2\) centered at the points of \(B\). Each set is open and contains its respective finite set. If a point \(z\) belonged to both, there would be \(a\in A\) and \(b\in B\) with \(\|a-z\|<1/2\) and \(\|z-b\|<1/2\). The triangle inequality would imply $$ \|a-b\|\leq\|a-z\|+\|z-b\|<1, $$ contradicting \(\|a-b\|=\sqrt{5}>1\). Therefore \(U\) and \(V\) are disjoint open neighborhoods of \(A\) and \(B\).

Why Hausdorffness Matters

Compactness alone does not ensure that disjoint compact subsets have disjoint open neighborhoods. For example, let \(X=\{p,q\}\) have the indiscrete topology \(\{\varnothing,X\}\). Each singleton is compact: any cover of it must contain a set that covers its point, and the only such open set is \(X\). The singletons \(\{p\}\) and \(\{q\}\) are disjoint compact subsets. However, the only open set containing either point is \(X\), so they cannot have disjoint open neighborhoods. This example shows why the Hausdorff hypothesis in the separation theorem cannot be omitted.

There is a related consequence already established in Compactness in General Topology: every compact subset of a Hausdorff space is closed. That result concerns compactness and closedness; the separation theorem proved here gives additional information, producing open neighborhoods that keep two disjoint compact sets apart. The point-versus-compact argument also explains the finite-selection mechanism behind these kinds of separation results.

When applying the theorems, keep the hypotheses distinct. A finite union of compact subsets is compact in any topological space. Separating a point from a compact set, or separating two disjoint compact sets, uses Hausdorffness as well as compactness. Also check empty sets explicitly when a proof selects points or finite subcovers; treating those cases separately ensures that every conclusion covers its full stated range.

Check Your Understanding

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

  1. Why is a subset \(K\) compact precisely when every cover of \(K\) by ambient open sets has a finite subcover?
  2. Where does the finite nature of the union enter the proof that a finite union of compact sets is compact?
  3. In the point-versus-compact theorem, why is the family of neighborhoods of points in \(K\) reduced to a finite subcover?
  4. Why is the intersection used in the point-versus-compact proof finite, and what property of that intersection is needed?
  5. Give an example showing that disjoint compact sets in a space need not have disjoint open neighborhoods when the space is not Hausdorff.