Altanis

3.4Compact Sets

Updated 18 Oct 2026Chapter (PDF)

[3.4.1]Definition(Covering)#

A collection of subsets A\mathcal{A} of XX is said to be a cover for XX if the union of each set in A\mathcal{A} equals XX. A\mathcal{A} is said to be an open covering if each element of A\mathcal{A} is an open subset of XX.

Let Y⊆XY \subseteq X. Then a collection of subsets A\mathcal{A} of XX is said to be a cover for YY if YY is contained in the union of each set in A\mathcal{A}.

[3.4.2]Definition(Compact Set)#

Suppose XX is a topological space. Then C⊆XC \subseteq X is said to be compact if every open cover of CC has a finite subcover.

[3.4.3]Theorem(Compactness of Subspace)#

Suppose XX is a topological space, and Y⊆XY \subseteq X is a subspace. Then YY is compact if and only if, for every open cover of XX that covers YY, there is a finite subcover that also covers YY.

Proof.

(⟹)(\Longrightarrow): Suppose A\mathcal{A} is a collection of open subsets of XX that covers YY. Then note A∩Y\mathcal{A} \cap Y, the intersection of each set in A\mathcal{A} by YY, forms an open cover of YY. Thus there is a finite subcover B∩Y\mathcal{B} \cap Y that covers YY. Then B\mathcal{B} is a finite collection of open subsets of XX that covers YY.

(⟸)(\Longleftarrow): Let B\mathcal{B} be an open cover for YY. Each B∈BB \in \mathcal{B} can be written as B=A∩YB = A \cap Y, where the set of all AA's forms a collection of open subsets A\mathcal{A} of XX that covers YY. There is a finite subcover of these that, when intersected with YY, forms a finite subcover for B\mathcal{B}, completing the proof.

[3.4.4]Theorem(Closed Subspace of Compact Space is Compact)#

Any closed subspace of a compact space is compact.

Proof.

Let XX be a compact space, and let Y⊆XY \subseteq X be closed. Let A\mathcal{A} be an open cover of YY. Then note the collection defined by B=A∪{X∖Y}\mathcal{B} = \mathcal{A} \cup \{X \setminus Y\} is an open cover of XX (X∖YX \setminus Y is open, since YY is closed). Since XX is compact, there is a finite subcover BB of XX from B\mathcal{B}. Then B∖{X∖Y}B \setminus \{X \setminus Y\} is a finite subcover of A\mathcal{A}, completing the proof.

[3.4.5]Lemma(Separation of a Point and a Compact Set)#

Suppose XX is a Hausdorff space and Y⊆XY \subseteq X is compact. If x0∉Yx_0 \notin Y, then there are disjoint open neighborhoods containing x0x_0 and YY.

Proof.

Fix x0∈X∖Yx_0 \in X \setminus Y—we seek to find disjoint open neighborhoods containing x0x_0 and YY. For each y∈Yy \in Y, it is obviously true that x0≠yx_0 \ne y. Thus, by Hausdorffness of XX, note that there are disjoint open neighborhoods Uy⊆XU_y \subseteq X of x0x_0 and Vy⊆XV_y \subseteq X of yy. Then note {Vy}y∈Y\{V_y\}_{y \in Y} forms a cover of YY by open sets from XX, and by compactness of YY, we have that there exists a finite subcover {Vyk}k=1n\{V_{y_k}\}_{k = 1}^n of these open sets for YY. Thus we may write Y⊆⋃k=1nVykY \subseteq \bigcup_{k = 1}^n V_{y_k}.

Let U=⋂k=1nUykU = \bigcap_{k = 1}^n U_{y_k} and V=⋃k=1nVykV = \bigcup_{k = 1}^n V_{y_k}, which are open subsets of XX containing x0x_0 and YY, respectively. Then any v∈Vv \in V belongs to VykV_{y_k} for some k∈{1,2,…,n}k \in \{1, 2, \dots, n\}. By how VykV_{y_k} was chosen, it follows that v∉Uykv \notin U_{y_k}, and so v∉Uv \notin U. Thus, UU and VV are disjoint open neighborhoods containing x0x_0 and YY.

[3.4.6]Theorem(Compact Subspace of Hausdorff Space is Closed)#

Any compact subspace of a Hausdorff space is closed.

Proof.

Suppose XX is a Hausdorff space, and let Y⊆XY \subseteq X be compact. We will show YY is closed by showing X∖YX \setminus Y is open. Fix x0∈X∖Yx_0 \in X \setminus Y. By the preceding lemma, note that there are disjoint open neighborhoods UU and VV containing x0x_0 and YY, respectively. Since Y⊆VY \subseteq V and UU and VV are disjoint, it follows that UU cannot intersect YY. Thus U∩Y=∅U \cap Y = \emptyset, and so U⊆X∖YU \subseteq X \setminus Y. Thus x0∈U⊆X∖Yx_0 \in U \subseteq X \setminus Y, implying X∖YX \setminus Y is open and YY is closed.

[3.4.7]Theorem(Continuous Image of Compact Set is Compact)#

The continuous image of a compact set is compact.

Proof.

Suppose XX is a compact set, and f:X→Yf: X \to Y is continuous. Let A\mathcal{A} be a cover for f(X)f(X) with open subsets of YY. Since the preimage of an open set is open, the preimage f−1(A)f^{-1}(\mathcal{A}) is an open cover of XX. By compactness, there is a finite subcover {f−1(Ak)}k=1n\{f^{-1}(A_k)\}_{k = 1}^n with open sets of XX. Then f({f−1(Ak)}k=1n)={Ak}k=1nf\left( \{f^{-1}(A_k)\}_{k = 1}^n \right) = \{A_k\}_{k = 1}^n forms a finite subcover of f(X)f(X), completing the proof.

[3.4.8]Theorem#

Suppose f:X→Yf: X \to Y is a bijective, continuous function. If XX is compact and YY is Hausdorff, then ff is a homeomorphism.

Proof.

To show ff is a homeomorphism, we show ff sends closed sets to closed sets. Let O⊆XO \subseteq X be closed, and thus consequently compact since all closed subsets of a compact space is compact. Thus f(O)⊆Yf(O) \subseteq Y is closed, and thus consequently closed since all compact subsets of a Hausdorff space are closed. Thus ff sends closed sets to closed sets.

[3.4.9]Lemma(Tube Lemma)#

Suppose X,YX, Y are topological spaces, with YY compact. Fix x0∈Xx_0 \in X. If N⊆X×YN \subseteq X \times Y is an open set containing {x0}×Y\{x_0\} \times Y, then NN contains some tube W×YW \times Y about {x0}×Y\{x_0\} \times Y, where W⊆XW \subseteq X is an open neighborhood of x0x_0.

Proof.

Fix x0∈Xx_0 \in X and consider the set {x0}×Y⊆X×Y\{x_0\} \times Y \subseteq X \times Y. Let N⊆X×YN \subseteq X \times Y be an open neighborhood of {x0}×Y\{x_0\} \times Y. For each y∈Yy \in Y, choose some open neighborhoods UyU_y of x0x_0 and VyV_y of yy such that (x0,y)∈Uy×Vy⊆N(x_0, y) \in U_y \times V_y \subseteq N. Then {Uy×Vy}y∈Y\{U_y \times V_y\}_{y \in Y} forms an open cover for {x0}×Y\{x_0\} \times Y. Note that {x0}×Y≅Y\{x_0\} \times Y \cong Y, and so the left-hand side is compact, and so there is a finite subcover {Uk×Vk}k=1n\{U_k \times V_k\}_{k = 1}^n of {x0}×Y\{x_0\} \times Y. Define

W=⋂k=1nUk,W = \bigcap_{k = 1}^n U_k,

an open neighborhood in XX about x0x_0. We will show W×Y⊆NW \times Y \subseteq N, completing the proof.

Let (x,y)∈W×Y(x, y) \in W \times Y be arbitrary. Then note (x0,y)∈{x0}×Y(x_0, y) \in \{x_0\} \times Y, with yy being the same as chosen from W×YW \times Y. Thus there is some j∈{1,2,…,n}j \in \{1, 2, \dots, n\} such that y∈Vjy \in V_j, reason being that {Uk×Vk}k=1n\{U_k \times V_k\}_{k = 1}^n is a finite subcover for {x0}×Y\{x_0\} \times Y. Recall that x∈Ujx \in U_j as well, since x∈Wx \in W, and so (x,y)∈(Uj×Vj)⊆N(x, y) \in (U_j \times V_j) \subseteq N. Thus W×Y⊆NW \times Y \subseteq N, completing the proof.

[3.4.10]Theorem(Finite Product of Compact Spaces is Compact)#

The product of finitely many compact spaces is compact.

Proof.

Suppose X,YX, Y are compact spaces, and fix x∈Xx \in X. Let A\mathcal{A} be an open cover for X×YX \times Y—we show it has a finite subcover.

Consider the slice {x0}×Y\{x_0\} \times Y: note that it is homeomorphic to the compact space YY, so there is a finite subcover {Ak}k=1m\{A_k\}_{k = 1}^m for {x0}×Y\{x_0\} \times Y. Let N=⋃k=1mAkN = \bigcup_{k = 1}^m A_k, an open set in X×YX \times Y containing {x0}×Y\{x_0\} \times Y. By the Tube Lemma, there is some open neighborhood Wx⊆XW_x \subseteq X of xx such that Wx×Y⊆NW_x \times Y \subseteq N. Thus {Ak}k=1m\{A_k\}_{k = 1}^m forms a finite cover for Wx×YW_x \times Y. Finally, note {Wx}x∈X\{W_x\}_{x \in X} is an open cover of XX. By compactness of XX, we have that {Wk}k=1n\{W_k\}_{k = 1}^n forms a finite subcover for XX. Thus we have that the union of the tubes

W1×Y,W2×Y,…,Wn×YW_1 \times Y, W_2 \times Y, \dots, W_n \times Y

is all of X×YX \times Y; since each tube has a finite cover of open sets from A\mathcal{A}, we have that X×YX \times Y is covered by finitely many sets from A\mathcal{A}, completing the proof.

The proof for more compact sets proceeds by induction on the number of sets.

We now investigate the finite intersection property and a reformulation of compact spaces in terms of them.

[3.4.11]Definition(Finite Intersection Property)#

A collection of sets C\mathcal{C} is said to have the finite intersection property if, for every finite subcollection {Ck}k=1n\{C_k\}_{k = 1}^n of C\mathcal{C}, ⋂k=1nCk≠∅\bigcap_{k = 1}^n C_k \ne \emptyset.

[3.4.12]Theorem(Compactness in Terms of Finite Intersection Property)#

Let XX be a topological space. Then XX is compact if and only if, for every collection C\mathcal{C} of closed subsets of XX that have the finite intersection property, the intersection ⋂C∈CC\bigcap_{C \in \mathcal{C}} C of all the elements of C\mathcal{C} is nonempty.

Proof.

Given a collection A\mathcal{A} of subsets of XX, we may define

C={X∖A:A∈A}.\mathcal{C} = \{X \setminus A: A \in \mathcal{A}\}.

Then the following statements are true:

  1. A\mathcal{A} is a collection of open subsets of XX if and only if C\mathcal{C} is a collection of closed subsets of XX.

  2. A\mathcal{A} forms a cover for XX if and only if ⋂C∈CC=∅\bigcap_{C \in \mathcal{C}} C = \emptyset.

  3. {Ak}k=1n\{A_k\}_{k = 1}^n forms a finite subcover for XX if and only if ⋂k=1nCk=∅\bigcap_{k = 1}^n C_k = \emptyset, where Ck=X∖AkC_k = X \setminus A_k.

The first statement is by definition of a closed set, and the other two are a direct application of De Morgan's Laws. Namely that

X∖(⋃λ∈ΛAλ)=⋂λ∈Λ(X∖Aλ).X \setminus \left(\bigcup_{\lambda \in \Lambda} A_\lambda\right) = \bigcap_{\lambda \in \Lambda} (X \setminus A_\lambda).

Consider the original definition of compactness: XX is compact if and only if, for any open cover A\mathcal{A}, there is a finite subcover. Thus if A\mathcal{A} has no finite subcover for XX, then it follows that A\mathcal{A} does not cover the compact set XX. Now let C={X∖A:A∈A}\mathcal{C} = \{X \setminus A: A \in \mathcal{A}\} as before. Immediately we see that compactness may be rephrased as such:

“We say that XX is compact if, for every collection of closed subsets C\mathcal{C} of XX with the finite intersection property, the intersection of all elements in C\mathcal{C} is nonempty.”

[3.4.13]Remark(Cantor's Intersection Theorem)#

Suppose {Ck}k∈Z+\{C_k\}_{k \in \bZ_+} is a sequence of closed subsets of a compact space XX, such that Ck⊇Ck+1C_k \supseteq C_{k + 1} for each k∈Z+k \in \bZ_+. Immediately we see that any finite subcollection of {Ck}\{C_k\} has nonempty intersection, meaning this sequence has the finite intersection property. By compactness, we have that ⋂C∈CC≠∅\bigcap_{C \in \mathcal{C}} C \ne \emptyset. This result is familiar to us with X=RX = \bR.

[3.4.14]Recap#
  1. For any topological space XX, a collection of subsets A\mathcal{A} of XX is said to cover XX if ⋃A∈AA=X\bigcup_{A \in \mathcal{A}} A = X. An open cover is a cover comprised of open sets. A subcover of XX is a subset of A\mathcal{A} that still manages to cover XX.

  2. A space XX is said to be compact if, for every open cover A\mathcal{A}, there is a finite subcover of XX.

  3. For a subspace Y⊆XY \subseteq X, a collection of subsets A\mathcal{A} of XX is said to cover YY if Y⊆⋃A∈AAY \subseteq \bigcup_{A \in \mathcal{A}} A. This is different from the traditional definition of a cover for one space.

  4. A space Y⊆XY \subseteq X is compact if and only if, for every open cover of YY from open subsets of XX, there is a finite subcover.

    Intuition.

    The idea behind this proof is that an open set in YY is an open set in XX intersected with YY. Thus open covers can be moved around seamlessly between XX and YY: simply move an open cover to the space that is given as compact by hypothesis, take the finite subcover, then move it back to the other space.

  5. Every closed subspace of a compact space is compact.

    Intuition.

    Let XX be compact and Y⊆XY \subseteq X closed. Of course, X∖YX \setminus Y is open. For any open cover of YY, we may adjoin X∖YX \setminus Y to form an open cover for XX, use its compactness, then simply get rid of the X∖YX \setminus Y term to get a finite subcover of YY.

  6. Every compact subspace of a Hausdorff space is closed.

    Intuition.

    Let XX be Hausdorff and Y⊆XY \subseteq X compact. We want to show X∖YX \setminus Y is open. Fixing x0∈X∖Yx_0 \in X \setminus Y, we show the set is open by showing there exists an open neighborhood U⊆XU \subseteq X of x0x_0 lying in X∖YX \setminus Y—that is, U∩Y=∅U \cap Y = \emptyset. For each y∈Yy \in Y, we have that y≠x0y \ne x_0, so by Hausdorffness there exist disjoint open neighborhoods Uy⊆XU_y \subseteq X of x0x_0 and Vy⊆XV_y \subseteq X of yy. Then note {Vy}y∈Y\{V_y\}_{y \in Y} forms an open cover for the compact space YY, so there exists a finite subcover {Vyk}k=1n\{V_{y_k}\}_{k = 1}^n of YY. Then define U=⋂k=1nUyk,U = \bigcap_{k = 1}^n U_{y_k}, an open neighborhood of x0x_0. For any y∈Yy \in Y, there is some k∈{1,…,n}k \in \{1, \dots, n\} such that y∈Vyky \in V_{y_k}, implying y∉Uyky \notin U_{y_k}, so y∉Uy \notin U.

  7. We extract the key mechanism from the last proof: for any compact subspace YY of a Hausdorff space XX, we can always construct disjoint open neighborhoods U,VU, V about x0,Yx_0, Y respectively—that is, x0∈U⊆X∖Yx_0 \in U \subseteq X \setminus Y, meaning X∖YX \setminus Y is open.

  8. The continuous image of a compact set is compact.

    Intuition.

    Let f:X→Yf: X \to Y be a continuous map from the compact space XX to a target space YY. Let A\mathcal{A} be an open covering for f(X)f(X). Then note f−1(A)f^{-1}(\mathcal{A}) is an open covering of XX by continuity of ff. Since XX is compact, we have a finite subcover {f−1(Ak)}k=1n\{f^{-1}(A_k)\}_{k = 1}^n. Pushing forward yields that f(X)f(X) is covered by the finite subcover {Ak}k=1n\{A_k\}_{k = 1}^n.

  9. Let f:X→Yf: X \to Y be a bijective, continuous function. If XX is compact and YY is Hausdorff, then ff is a homeomorphism.

    Intuition.

    We show f−1f^{-1} is continuous by showing ff takes closed sets to closed sets. For some closed set C⊆XC \subseteq X, we note CC is also compact by a previous theorem. Since ff is continuous, it follows that f(C)⊆Yf(C) \subseteq Y is compact in a Hausdorff space, which makes f(C)f(C) closed.

  10. Let X,YX, Y be topological spaces, with YY compact. For fixed x0∈Xx_0 \in X and any open neighborhood N⊆X×YN \subseteq X \times Y of {x0}×Y\{x_0\} \times Y, there is some open neighborhood W⊆XW \subseteq X of x0x_0 such that W×Y⊆NW \times Y \subseteq N.

    Intuition.

    Fix x0∈Xx_0 \in X and let N⊆X×YN \subseteq X \times Y be an open neighborhood of {x0}×Y\{x_0\} \times Y. Form a cover for {x0}×Y\{x_0\} \times Y, of the form {Uy×Vy}y∈Y\{U_y \times V_y\}_{y \in Y}, where Uy×VyU_y \times V_y is a basic, open neighborhood about (x0,y)(x_0, y). Note that {x0}×Y≅Y\{x_0\} \times Y \cong Y, and since YY is compact, we form an open cover {Uk×Vk}k=1n\{U_k \times V_k\}_{k = 1}^n. Then we define W=⋂k=1nUkW = \bigcap_{k = 1}^n U_k, an open neighborhood of x0x_0. We show {Uk×Vk}k=1n\{U_k \times V_k\}_{k = 1}^n covers not only {x0}×Y\{x_0\} \times Y, but also W×YW \times Y. Let (x,y)∈W×Y(x, y) \in W \times Y be arbitrary, and let (x0,y)∈{x0}×Y(x_0, y) \in \{x_0\} \times Y be the corresponding element with the same yy-coordinate. Thus y∈Vjy \in V_j for some j∈{1,…,n}j \in \{1, \dots, n\}, and since x∈Ukx \in U_k for every kk, x∈Ujx \in U_j. Thus (x,y)∈(Uj×Vj)⊆N(x, y) \in (U_j \times V_j) \subseteq N, completing the proof.

  11. The product of finitely many compact sets is compact.

    Intuition.

    We prove this for two compact topological spaces X,YX, Y, and the full theorem is proven in a straightforward manner by induction. Suppose A\mathcal{A} is a cover of X×YX \times Y. Fix x∈Xx \in X, then note {x}×Y≅Y\{x\} \times Y \cong Y is compact, so there is some finite subcover {Ak}k=1m\{A_k\}_{k = 1}^m of sets from A\mathcal{A}. Then N=⋃k=1mAkN = \bigcup_{k = 1}^m A_k is an open subset of X×YX \times Y containing {x}×Y\{x\} \times Y. By the Tube Lemma, there is some open neighborhood Wx⊆XW_x \subseteq X of xx such that Wx×Y⊆NW_x \times Y \subseteq N. Then {Wx}x∈X\{W_x\}_{x \in X} forms an open cover for XX, and since XX is compact, there is a finite subcover {Wk}k=1n\{W_k\}_{k = 1}^n. Thus

    {W1×Y,W2×Y,…,Wn×Y}\{W_1 \times Y, W_2 \times Y, \dots, W_n \times Y\}

    forms an open cover for X×YX \times Y. Each element of this set also has a finite subcover of elements from A\mathcal{A}, thus the entirety of X×YX \times Y has a finite subcover from elements of A\mathcal{A}.

  12. A topological space XX is compact if, for every collection of closed subsets C\mathcal{C} with the finite intersection property, the intersection ⋂C∈CC≠∅\bigcap_{C \in \mathcal{C}} C \ne \emptyset.

    Intuition.

    Observe that, for any collection of subsets {Aλ}λ∈Λ\{\mathcal{A}_\lambda\}_{\lambda \in \Lambda} of XX, it is true that

    X∖(⋃λ∈ΛAλ)=⋂λ∈Λ(X∖Aλ).X \setminus \left(\bigcup_{\lambda \in \Lambda} A_\lambda\right) = \bigcap_{\lambda \in \Lambda} (X \setminus A_\lambda).

    Defining C={X∖A:A∈A}\mathcal{C} = \{X \setminus A: A \in \mathcal{A}\}, where A\mathcal{A} is an open cover of XX, and reformulating compactness in terms of C\mathcal{C} and the relation above yields this theorem.

Exercises#

[3.4.15]Problem#
  1. Let T,T′\Tau, \Tau' be topologies on XX such that T⊆T′\Tau \subseteq \Tau'. What does compactness of XX in one topology say about the other?

  2. Show that if XX is compact and Hausdorff under topologies T,T′\Tau, \Tau', the topologies are either equal or incomparable.

Solution.
  1. If XX is compact in T′\Tau', then all open covers of XX have finite subcovers—necessarily, this includes covers formed by sets in T\Tau, and so XX is compact in T\Tau. No statement can be made in the reverse direction.

  2. Suppose the two topologies are comparable: without loss of generality, say T⊆T′\Tau \subseteq \Tau'. Then define the map

    f:(X,T′)→(X,T)f(x)=x.f: (X, \Tau') \to (X, \Tau) \quad f(x) = x.

    Note ff is a bijective, continuous map. Notably, it sends closed sets to closed sets: if C⊆XC \subseteq X is closed, then it is compact, and since ff is continuous, f(C)f(C) is also compact (and thus closed since the codomain is Hausdorff). Thus ff is a homeomorphism and so T=T′\Tau = \Tau'. Thus the topologies are either equal or incomparable.

[3.4.16]Problem#

Show that every compact subspace of a metric space is closed and bounded (with respect to the metric). Give an example of a closed and bounded subset of a metric space that is not necessarily compact.

Solution.

Suppose (X,d)(X, d) is a metric space in its metric topology, and suppose C⊆XC \subseteq X is compact. Note that the metric topology is Hausdorff, and since CC is a compact subset of a Hausdorff space, it is closed. To show it is bounded, let A\mathcal{A} be an open cover of CC with basic, open subsets from XX. Then we may take a finite subcover {A1,…,An}\{A_1, \dots, A_n\}. Finitely many open balls can be contained in exactly one ball of finite radius, which means CC is bounded.

Consider the metric space Q\bQ together with metric d(x,y)=∣x−y∣d(x, y) = |x - y|. Then note that [0,2)⊆Q[0, \sqrt2) \subseteq \bQ is closed and bounded. Then consider the open cover A=(−1,1)∪{(0,2−1/n)}n∈Z+\mathcal{A} = (-1, 1) \cup \{(0, \sqrt{2} - 1/n)\}_{n \in \bZ_+}, which has no finite subcover.

[3.4.17]Problem#

Suppose A,BA, B are disjoint, compact subspaces of the Hausdorff space XX. Show that there exist disjoint open sets U,VU, V such that A⊆UA \subseteq U and B⊆VB \subseteq V.

Solution.

Note that in a Hausdorff space, a compact space and a point outside of it can be separated by two disjoint open neighborhoods. Namely, for each x∈Ax \in A, there are disjoint open neighborhoods Ux⊆XU_x \subseteq X of xx and Vx⊆XV_x \subseteq X of BB. Then note {Ux}x∈A\{U_x\}_{x \in A} forms an open cover of AA, and by compactness of AA, we have a finite subcover {Uk}k=1n\{U_k\}_{k = 1}^n. Then simply define

U=⋃k=1nUkV=⋂k=1nVk,U = \bigcup_{k = 1}^n U_k \quad V = \bigcap_{k = 1}^n V_k,

which are both open open sets containing AA and BB respectively. For each u∈Uu \in U, there is some j∈{1,…,n}j \in \{1, \dots, n\} such that u∈Uju \in U_j, meaning u∉Vju \notin V_j and so u∉Vu \notin V. Thus U,VU, V are disjoint, completing the proof.