Tutorials › Real Analysis › Compactness in General Topology

Topology · Tutorial 733 of 1000

Compactness in General Topology

Learn the open-cover definition of compactness and how it behaves under continuous maps, subspaces, finite unions, and separation assumptions.

Advanced 10 min read

What You'll Learn

  • Define compact spaces and compact subsets using open covers
  • Relate compactness of a subset to its subspace topology
  • Prove that continuous images and closed subsets preserve compactness
  • Determine when compact subsets must be closed
  • Compare compactness in discrete and indiscrete topologies

Compactness Beyond Metric Spaces

In metric spaces, compactness connects to properties such as completeness and total boundedness. General topology lets us study compactness without assuming that a distance is available. The common idea is still that open sets cannot cover the space without some finite collection already doing the job. This open-cover viewpoint applies to every topological space, including spaces whose topology does not come from a metric.

Compactness does not, by itself, require a space to be Hausdorff. That distinction matters: in a Hausdorff space, compact subsets are closed, but without the Hausdorff assumption that conclusion can fail. We will establish several basic ways compactness behaves and keep track of where separation assumptions are needed.

Definition: An open cover of a topological space \(X\) is a family \(\{U_\lambda:\lambda\in\Lambda\}\) of open subsets of \(X\) such that \(X=\bigcup_{\lambda\in\Lambda}U_\lambda\). The space \(X\) is compact if every open cover of \(X\) has a finite subcover: there are finitely many members of the cover whose union is still \(X\). A subset \(K\subseteq X\) is compact if every cover of \(K\) by sets open in \(X\) has a finite subcover.

The empty space is compact: the empty subfamily is a finite subcover of its empty open cover. More generally, a cover of a subset \(K\) means a family whose union contains \(K\), not necessarily one whose union equals \(X\). The open-cover definition is about the topology alone. No metric, boundedness condition, or completeness assumption appears in it.

For a subset \(K\), compactness as a subset of \(X\) agrees with compactness as a space with its subspace topology. Indeed, each open set in the subspace \(K\) has the form \(K\cap U\) for some open \(U\subseteq X\). A cover by such sets gives a cover of \(K\) by ambient open sets \(U\), and a finite subcover in either formulation yields one in the other. This allows us to speak either of a compact subset or of a compact subspace.

Examples: The Topology Determines the Covers

Worked Example: Finite Spaces Are Compact

Let \(X\) be a finite topological space, and let \(\mathcal{U}\) be an open cover of \(X\). For each \(x\in X\), choose one member \(U_x\in\mathcal{U}\) containing \(x\). There are only finitely many points, so the chosen sets form a finite family. Every point \(x\) belongs to its chosen set \(U_x\), so this family covers \(X\). Thus every open cover has a finite subcover, and \(X\) is compact. If \(X\) is empty, compactness holds by the empty-subcover observation above.

This argument does not require a particular topology on the finite set. The topology affects which covers are available, but finiteness of the points guarantees that one can select at most one covering set for each point.

Worked Example: An Infinite Set with Two Different Topologies

Let \(X\) be an infinite set. With the indiscrete topology \(\{\varnothing,X\}\), every open cover of \(X\) must contain \(X\): the only open set other than \(X\) is empty, and empty sets cannot cover any point. The single set \(X\) is therefore a finite subcover, so this topology is compact.

Now put the discrete topology on the same set. The family of all singletons \(\{\{x\}:x\in X\}\) is an open cover. A finite subfamily covers only finitely many points, so it cannot cover the infinite set \(X\). Thus the discrete topology on \(X\) is not compact. Compactness depends on the topology, not just on the underlying set.

Worked Example: A Compact Subset Need Not Be Closed

Let \(X=\{0,1\}\) with topology \(\{\varnothing,\{1\},X\}\). The subset \(K=\{1\}\) is compact: any cover of \(K\) contains a set that includes \(1\), and that one set is already a finite subcover. But \(K\) is not closed in \(X\), since its complement \(\{0\}\) is not open. This example shows why one cannot conclude that compact subsets are closed in an arbitrary topological space. The Hausdorff condition in the theorem below is essential.

Compactness Is Preserved by Continuous Images

Continuity transfers open covers in a useful direction. Given an open cover of the image of a continuous map, taking inverse images produces an open cover of the domain. If the domain is compact, finitely many of those inverse images cover it, and the corresponding original sets cover the image.

Theorem: Let \(f:X\to Y\) be a continuous map between topological spaces. If \(X\) is compact, then \(f[X]\), with the subspace topology inherited from \(Y\), is compact.

Proof. Let \(\{V_\lambda:\lambda\in\Lambda\}\) be an open cover of \(f[X]\) by sets open in the subspace \(f[X]\). By the subspace topology, for each \(\lambda\) there is an open set \(O_\lambda\subseteq Y\) such that \(V_\lambda=f[X]\cap O_\lambda\). Since the \(V_\lambda\) cover \(f[X]\), the sets \(f^{-1}(O_\lambda)\) cover \(X\). Each is open in \(X\) by continuity. Compactness of \(X\) gives finitely many indices \(\lambda_1,\ldots,\lambda_n\) such that $$ X=f^{-1}(O_{\lambda_1})\cup\cdots\cup f^{-1}(O_{\lambda_n}). $$ For any \(y\in f[X]\), choose \(x\in X\) with \(f(x)=y\). The displayed equality places \(x\) in some \(f^{-1}(O_{\lambda_j})\), so \(y\in O_{\lambda_j}\). As \(y\in f[X]\), it follows that \(y\in V_{\lambda_j}\). Hence \(V_{\lambda_1},\ldots,V_{\lambda_n}\) cover \(f[X]\). Thus \(f[X]\) is compact. If \(X\) is empty, its image is empty and is compact as well. \(\square\)

Worked Example: A Continuous Map Can Have an Infinite Compact Image

Let \(X\) be an infinite set with the indiscrete topology, let \(Y\) be an infinite set with the indiscrete topology, and let \(f:X\to Y\) be a surjection. Every map into an indiscrete space is continuous: the only open subsets of \(Y\) are \(\varnothing\) and \(Y\), whose inverse images are \(\varnothing\) and \(X\), respectively, and both are open in \(X\). The domain is compact by the preceding cover argument for the indiscrete topology. The continuous-image theorem therefore says that \(f[X]=Y\) is compact. In this example the image is infinite, so compactness does not mean that a space has only finitely many points.

Closed Subsets and the Hausdorff Condition

Two further facts clarify the role of compactness in subspaces. First, a closed subset of a compact space is compact, with no Hausdorff assumption. Second, the converse direction—compact subsets being closed—does require a separation property. A space is Hausdorff if any two distinct points have disjoint open neighborhoods.

Theorem: Let \(X\) be compact and let \(F\subseteq X\) be closed. Then \(F\) is compact.

Proof. Let \(\{U_\lambda:\lambda\in\Lambda\}\) be a cover of \(F\) by sets open in \(X\). Since \(F\) is closed, \(X\setminus F\) is open. The family consisting of \(X\setminus F\) together with all the \(U_\lambda\) covers \(X\). By compactness, finitely many sets from this family cover \(X\). After removing \(X\setminus F\), if it was selected, the remaining finitely many \(U_\lambda\) cover \(F\), because \(X\setminus F\) contains no point of \(F\). If the finite cover used only \(X\setminus F\), then \(F\) must be empty, which is itself compact. Thus \(F\) is compact. \(\square\)

Theorem: Every compact subset of a Hausdorff space is closed.

Proof. Let \(K\) be compact in a Hausdorff space \(X\), and fix \(x\in X\setminus K\). For each \(y\in K\), the points \(x\) and \(y\) are distinct. By the Hausdorff property, there are disjoint open sets \(V_y\) and \(U_y\) with \(x\in V_y\) and \(y\in U_y\). The family \(\{U_y:y\in K\}\) covers \(K\). Compactness gives finitely many points \(y_1,\ldots,y_n\in K\) such that \(U_{y_1},\ldots,U_{y_n}\) cover \(K\). The finite intersection $$ V=V_{y_1}\cap\cdots\cap V_{y_n} $$ is an open neighborhood of \(x\). It is disjoint from each \(U_{y_j}\), so it is disjoint from their union and hence from \(K\). Thus every point \(x\in X\setminus K\) has an open neighborhood contained in \(X\setminus K\). Therefore \(X\setminus K\) is open, and \(K\) is closed. If \(K=\varnothing\), it is closed directly. \(\square\)

Worked Example: Applying the Separation Theorems

Suppose \(X\) is compact and Hausdorff, and \(F\subseteq X\) is closed. The closed-subset theorem shows that \(F\) is compact. Since \(F\) is a compact subset of the Hausdorff space \(X\), the compact-subset theorem also shows that \(F\) is closed in \(X\), consistently with the hypothesis. More significantly, if a subset \(K\subseteq X\) is known to be compact, the Hausdorff theorem gives a way to prove it is closed without needing to describe its complement directly.

In the two-point example above, the compact subset \(\{1\}\) was not closed. This does not contradict the theorem: that space is not Hausdorff. Indeed, the only open neighborhood of \(0\) is \(X\), which cannot be disjoint from an open neighborhood of \(1\).

How the Basic Results Fit Together

The direction of each theorem is worth keeping clear. Continuous maps carry compact domains to compact images. Closed subsets of compact spaces are compact. Compact subsets of Hausdorff spaces are closed. The last statement does not say that every compact subset of every space is closed; the Hausdorff hypothesis cannot be dropped. Nor does continuity alone imply that the image of a closed set is closed. It is compactness of the domain, followed by the Hausdorff condition on the target, that can provide such a conclusion: a closed subset of a compact space is compact, its continuous image is compact, and a compact subset of a Hausdorff target is closed.

These results make compactness useful even when no metric is present. They let us transport compactness through continuous maps, pass to closed parts of a compact space, and recognize compact sets as closed when the ambient space separates points. The next step is to develop the open-cover method itself more systematically: how to organize covers, extract finite subcovers, and use equivalent formulations of compactness.

Check Your Understanding

Use the open-cover definition and the results proved here to answer the following questions.

  1. Why is every finite topological space compact, regardless of its topology?
  2. What does the continuous-image theorem require of the map and the domain, and what conclusion does it give?
  3. Where is the closedness assumption used when proving that a closed subset of a compact space is compact?
  4. Why does the proof that compact subsets of Hausdorff spaces are closed need a finite subcover?
  5. Give an example of a compact subset that is not closed, and identify which hypothesis of the compact-subset theorem fails.
  6. Can an infinite space be compact? Give an example and explain why its open covers have finite subcovers.