Compactness
Let be a topological space and An open cover of is a collection of open sets whose union contains and a subcover is a subcollection of an open cover that still covers The set is compact if and only if every open cover of has a finite subcover, and is a compact space if is compact as a subset of itself. Compactness of is a property of the subspace alone, so it does not depend on the space in which sits.
Finite sets are compact, is not compact, since the open cover has no finite subcover, and is not compact, since has no finite subcover. A closed bounded interval is compact. Compact sets have the following properties:
- a closed subset of a compact set is compact;
- a compact subset of a Hausdorff space is closed;
- a finite union of compact sets is compact;
- the product of finitely many compact spaces is compact;
- the continuous image of a compact set is compact.
The last property states that if is continuous and is compact then is compact. Consequently a continuous bijection from a compact space onto a Hausdorff space is a homeomorphism, since it maps closed sets, which are compact, to compact sets, which are closed.
A set in a metric space is sequentially compact if and only if every sequence in has a subsequence that converges to a point of and totally bounded if and only if for every it is covered by finitely many open balls of radius A totally bounded set is bounded, and in the converse holds. In a metric space the following are equivalent:
- is compact;
- is sequentially compact;
- is complete and totally bounded.
The Heine–Borel theorem states that a subset of is compact if and only if it is closed and bounded. The Bolzano–Weierstrass theorem states that every bounded sequence in has a convergent subsequence, which is the sequential compactness of closed balls. Neither holds in every metric space: the closed unit ball of an infinite-dimensional normed vector space is closed and bounded but not compact, and the discrete metric makes every infinite set closed, bounded and non-compact. The Lebesgue number lemma states that for every open cover of a compact metric space there exists such that every subset of with diameter less than lies inside some set of the cover.
Let be a non-empty compact space and be continuous. Since is a compact subset of it is closed and bounded, so it contains its supremum and infimum: is bounded and attains its maximum and minimum.
This extends the extreme value theorem from closed bounded intervals to compact sets, and the Heine–Cantor theorem extends in the same way: a continuous function from a compact metric space to a metric space is uniformly continuous. If is a compact subset of a metric space and then the distance is attained at some point of and two disjoint compact sets are at positive distance from one another.