Compact Subset of Hausdorff is Closed
Statement
Let be a Hausdorff (T2) topological space and let be compact. Then is closed:
This is a strict generalisation of the Heine–Borel direction "compact closed" from to arbitrary Hausdorff spaces.
The Hausdorff condition is essential. In a non-Hausdorff space, compact sets need not be closed. Example: the Sierpinski space with topology — the singleton is compact (trivially) but not closed (its complement is not open).
Visualization
Counter-example anatomy — why is NOT compact in :
ℝ: 0 1/4 1/3 1/2 1
|──●────●────●────●────●──▶
↑ ↑ ↑ ↑ ↑
missing 1/4 1/3 1/2 n=1
limit 0
(not in set → not closed → not compact)
Open cover: U_n = (1/(n+1), ∞) covers {1/n : n≥1}
but NO finite sub-collection covers it (any finite sub-
collection misses 1/n for all large n).
Compact and closed — in :
ℝ: 0 1/4 1/3 1/2 1
|────●────●────●────●──▶
● ← 0 IS in K (limit included)
K is closed (contains its limit point 0)
K is compact (every open cover has finite subcover)
ℝ is Hausdorff → theorem applies ✓
Proof idea in pictures:
Fix x ∉ K. For each k ∈ K, Hausdorff gives disjoint opens:
U_k ∋ x V_k ∋ k U_k ∩ V_k = ∅
{V_k : k ∈ K} covers K → finite subcover V_{k₁},...,V_{kₙ}
Let U = U_{k₁} ∩ ... ∩ U_{kₙ} (open, contains x)
Then U ∩ K ⊆ U ∩ (V_{k₁} ∪ ... ∪ V_{kₙ}) = ∅
So U ⊆ X \ K: every x ∉ K has an open neighbourhood in X \ K.
Therefore X \ K is open, i.e. K is closed.
Proof Sketch
-
Fix . We find an open neighbourhood of disjoint from .
-
For each , by the Hausdorff condition, there exist disjoint open sets and .
-
The collection is an open cover of . Since is compact, finitely many suffice: .
-
Let . This is a finite intersection of open sets, so is open, and .
-
For each , and , so .
-
Therefore , meaning .
-
Since was arbitrary, is open, so is closed.
Connections
- Heine–Borel TheoremHeine–Borel TheoremIn ℝⁿ, a subset is compact if and only if it is closed and boundedRead more → — in (which is Hausdorff), this theorem gives "compact closed", exactly the easy half of Heine–Borel; the hard half (closed and bounded compact) uses completeness of .
- Hausdorff Implies T1Hausdorff Implies T1Every Hausdorff (T2) space is a T1 space, meaning singletons are closed setsRead more → — closedness of singletons (T1) follows from Hausdorff; the present theorem shows the Hausdorff property forces much more: all compact sets are closed, not just singletons.
- Continuous Image of Compact is CompactContinuous Image of Compact is CompactThe continuous image of a compact set is compact, a cornerstone of analysis and topologyRead more → — combining these two theorems: a continuous bijection from a compact space to a Hausdorff space is automatically a homeomorphism (the inverse is continuous because it maps closed compact sets to closed compact sets).
- Urysohn's LemmaUrysohn's LemmaIn a normal space, disjoint closed sets can be separated by a continuous functionRead more → — compact Hausdorff spaces are normal (T4); this uses the compactness-implies-closed result to show any two disjoint closed sets in a compact Hausdorff space can be separated, the hypothesis Urysohn's lemma needs.
Lean4 Proof
import Mathlib.Topology.Separation.Hausdorff
/-- A compact subset of a Hausdorff space is closed. -/
theorem compact_in_hausdorff_is_closed
{X : Type*} [TopologicalSpace X] [T2Space X]
{s : Set X} (hs : IsCompact s) : IsClosed s :=
hs.isClosedReferenced by
- Hausdorff Implies T1Topology
- Continuous Image of Compact is CompactTopology