Compactness Meets Separation
Compactness turns an arbitrary open cover into a finite subcover. A Hausdorff space, by contrast, provides a way to separate any two distinct points by disjoint open sets. The interaction between these properties is strong: if a set is compact, the finitely many separations needed for its points can be combined into one neighborhood separation. This is the key to proving that compact subsets of Hausdorff spaces are closed.
The metric spaces studied earlier are Hausdorff, but the result does not depend on having a metric. We will state and prove it for topological spaces, using only open sets, compactness, and the Hausdorff property.
This definition of a compact subset is equivalent to saying that \(K\), with the subspace topology, is compact. Indeed, a cover of \(K\) by open sets in \(X\) gives a cover by their intersections with \(K\). In the other direction, every open set in the subspace \(K\) is the intersection of \(K\) with an open set in \(X\); replacing each member of a subspace cover by such an ambient open set gives an open cover of \(K\) in \(X\).
Every metric space is Hausdorff. If \(x\ne y\), let \(r=d(x,y)/3\), which is positive. The open balls \(B_r(x)\) and \(B_r(y)\) are disjoint: if some \(z\) belonged to both, then
which is impossible. Thus the theorem we establish below applies, in particular, to compact subsets of metric spaces.
Separating a Compact Set from a Point
Fix a point outside a compact set. Hausdorffness gives a separate pair of open neighborhoods for that point and each individual point of the compact set. At first, the neighborhood of the outside point may depend on which point of the compact set is being separated. Compactness lets us reduce these choices to finitely many, so that their neighborhoods can be intersected.
Proof. If \(K\) is empty, take \(U=X\) and \(V=\varnothing\). Suppose instead that \(K\) is nonempty. For each \(y\in K\), we have \(y\ne x\). Since \(X\) is Hausdorff, choose open sets \(U_y,V_y\subseteq X\) such that
The sets \(V_y\), for \(y\in K\), form an open cover of \(K\). By compactness, there are finitely many points \(y_1,\ldots,y_m\in K\) such that
Set
The set \(U\) is open because it is a finite intersection of open sets, and it contains \(x\). The set \(V\) is open because it is a union of open sets, and it contains \(K\). For every \(i,j\), \(U\subseteq U_{y_i}\) and \(V_{y_j}\) contains \(V_{y_j}\), but these facts alone do not compare \(U_{y_i}\) and \(V_{y_j}\) when \(i\ne j\). Instead, observe that \(U\) is contained in every \(U_{y_j}\), so \(U\cap V_{y_j}\subseteq U_{y_j}\cap V_{y_j}=\varnothing\). This holds for each \(j\), and hence \(U\cap V=\varnothing\). The required neighborhoods have been constructed. \(\square\)
The finite intersection in this proof is crucial. A separate neighborhood of \(x\) for every \(y\in K\) would not by itself give one neighborhood of \(x\) disjoint from all of \(K\): an infinite intersection of open sets need not be open. Compactness supplies a finite subcover, making the intersection open.
Compact Subsets of Hausdorff Spaces Are Closed
Proof. Let \(K\) be a compact subset of a Hausdorff space \(X\). If \(K=X\), it is closed. Otherwise, take any \(x\in X\setminus K\). By the theorem on separating a point from a compact set, there is an open set \(U\) containing \(x\) that is disjoint from an open set containing \(K\). In particular, \(U\cap K=\varnothing\), so \(U\subseteq X\setminus K\).
We have shown that every point of \(X\setminus K\) has an open neighborhood contained in \(X\setminus K\). Therefore \(X\setminus K\) is open, and \(K\) is closed. \(\square\)
The argument establishes more than closedness: each point outside \(K\) has an open neighborhood that misses \(K\). In metric spaces, this theorem is a direct consequence of the fact that metric spaces are Hausdorff. It does not require a distance from the point to the set to be attained, nor does it require a minimum separation distance.
Worked Examples
Worked Example: A Finite Compact Set in the Real Line
Let \(K=\{-2,3\}\subseteq\mathbb{R}\) with the usual metric. First, \(K\) is compact. Given any open cover of \(K\), choose one member containing \(-2\) and one member containing \(3\). These at most two members form a finite subcover.
The real line is Hausdorff, so the theorem shows that \(K\) is closed. We can also check this conclusion directly: its complement is
which is open in \(\mathbb{R}\). This example illustrates the theorem in a simple case; the same conclusion holds for any compact subset of any metric space, including sets that are not finite.
Worked Example: Compactness Cannot Be Dropped
Consider \(A=(0,1)\subseteq\mathbb{R}\). This set is not closed, since \(0\notin A\) but every open interval centered at \(0\) meets \(A\). It is not compact either. For each integer \(n\geq2\), let
Each \(U_n\) is open in \(\mathbb{R}\), and these sets cover \(A\): given \(t\in(0,1)\), choose an integer \(n\geq2\) large enough that \(1/n<t\); then \(t\in U_n\). But no finite subcollection covers \(A\). If \(U_{n_1},\ldots,U_{n_m}\) are chosen and \(N\) is the largest of their indices, their union is \(U_N=(1/N,1)\). The point \(1/(2N)\) lies in \(A\) but not in \(U_N\). Thus this open cover has no finite subcover.
The example shows that Hausdorffness alone does not make every subset closed. Compactness is an essential hypothesis in the theorem.
Worked Example: Compactness Cannot Replace Hausdorffness
Let \(X=\{a,b\}\) have the indiscrete topology \(\{\varnothing,X\}\), in which the only open sets are the empty set and the whole space. The subset \(K=\{a\}\) is compact: any open cover of \(K\) must contain \(X\), and the single set \(X\) covers \(K\).
However, \(K\) is not closed. Its complement \(\{b\}\) is not open, since the only open sets are \(\varnothing\) and \(X\). Moreover, \(X\) is not Hausdorff: there are no disjoint open neighborhoods of \(a\) and \(b\), because the only open neighborhood of either point is \(X\).
So compact subsets need not be closed in spaces that are not Hausdorff. This example isolates the role of the separation hypothesis rather than the compactness hypothesis.
A Related Consequence: Uniqueness of Limits
Hausdorffness also ensures that sequences cannot converge to two distinct points, even in a topological space where no metric is specified. Convergence here means that every open neighborhood of the proposed limit contains all terms from some point onward.
Proof. Suppose a sequence \((x_n)\) converges to both \(p\) and \(q\), and suppose for contradiction that \(p\ne q\). By Hausdorffness, there are disjoint open sets \(U,V\) with \(p\in U\) and \(q\in V\). Since \(x_n\to p\), there is an index \(N_1\) such that \(x_n\in U\) for every \(n\geq N_1\). Since \(x_n\to q\), there is an index \(N_2\) such that \(x_n\in V\) for every \(n\geq N_2\). For \(n\geq\max(N_1,N_2)\), the term \(x_n\) would belong to \(U\cap V\), which is empty. This contradiction proves \(p=q\). \(\square\)
For metric spaces, uniqueness of limits was established earlier. This result explains the topological source of that property: the Hausdorff condition supplies disjoint neighborhoods, while convergence would force sufficiently late terms into both neighborhoods.
Why the Hypotheses Matter
The theorem is useful whenever compactness is known but closedness is needed. In a metric space, one can often establish compactness by a sequence argument and then immediately conclude that the set is closed, without separately testing all points in its complement. The proof also clarifies which assumptions do the work: compactness reduces infinitely many pointwise separations to finitely many, and Hausdorffness provides those separations in the first place.
Do not reverse the theorem without additional hypotheses. A closed set need not be compact: for example, \(\mathbb{R}\) is closed in itself but is not compact, as the open cover \(\{(-n,n):n\geq1\}\) has no finite subcover. Nor should the conclusion be applied to compact sets in arbitrary topological spaces; the indiscrete example shows that Hausdorffness matters.
Check Your Understanding
Use the separation argument and examples above to answer the following questions.
- Where exactly does compactness enter the proof that a point can be separated from a compact set?
- Why is a finite intersection of open neighborhoods used instead of an intersection over every point of the compact set?
- How does separating each point outside \(K\) from \(K\) show that \(K\) is closed?
- Which hypothesis fails for the compact nonclosed set in the indiscrete space?
- Why does the open cover \(U_n=(1/n,1)\) have no finite subcover of \((0,1)\)?