Compact Set
High school (subsets of $\reals^n$)
Caveat. “Closed and bounded” is equivalent to compact in $\reals^n$ (the Heine–Borel theorem), but not in general. The closed unit ball of an infinite-dimensional Hilbert space is closed and bounded, but not compact.
Undergraduate (metric spaces)
Consider a set $K$ in a metric space. The set $K$ is compact if
Caveat. In a general topological space, there is no distance, so “complete” and “totally bounded” have no meaning; compactness is defined with open covers instead.
Examples
Examples
-
$[0, 1]$ is compact because it is closed and bounded in $\reals$.
-
$\setdef{1, 2, 3}$ is compact, because it is finite, and every finite subset of $\reals$ is compact.
Non-examplesThings that may be mistaken for examples of this term.
-
$\nats$ is not compact, because it is not bounded.
-
$(0, 1)$ is not compact, because it is not closed: the sequence $1/n$ has no limit in $(0, 1)$.
-
$\rationals$ is not compact, because it is not bounded.
-
The set of real numbers, $\reals$, is not compact, because the sequence $1, 2, 3, \dots$ has no convergent subsequence.
-
The closed unit ball of $\ell^2$ is not compact, even though it is closed and bounded, because the standard basis vectors have no convergent subsequence.
Properties
- In a metric space, a set is compact if and only if it is sequentially compact: every sequence in the set has a subsequence that converges to a point of the set. In a general topological space, neither property implies the other.
- In a metric space, the definitions agree: a set is complete and totally bounded if and only if every open cover of the set has a finite subcover. In $\reals^n$, both are equivalent to being closed and bounded.
- A continuous image of a compact set is compact. In particular, a continuous real-valued function on a nonempty compact set attains a maximum and a minimum (the extreme value theorem).
- A closed subset of a compact set is compact, and a compact subset of a Hausdorff space is closed.
All definitions · All distinctions · All examples · Notation