Let XX be a topological space and A⊆X.A\subseteq X. An open cover of AA is a collection of open sets whose union contains A.A. A subcover of an open cover of AA is a subcollection of the open cover whose union still contains A.A.

Let XX be a topological space and A⊆X.A\subseteq X. The set AA is compact if and only if every open cover of AA has a finite subcover. The space XX is a compact space if and only if XX is compact as a subset of itself. Compactness of AA is a property of the subspace AA alone, so it does not depend on the space in which AA sits.

Compact sets have the following properties:

  • finite sets are compact;
  • R\mathbb{R} is not compact, since the open cover {(−n,n):n∈N}\left\{\left(-n,n\right):n\in\mathbb{N}\right\} has no finite subcover;
  • (0,1]\left(0,1\right] is not compact, since {(1n,2):n∈N}\left\{\left(\frac{1}{n},2\right):n\in\mathbb{N}\right\} has no finite subcover;
  • a closed bounded interval [a,b]\left[a,b\right] is compact;
  • 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: if f:X→Yf:X\rightarrow Y is continuous and A⊆XA\subseteq X is compact then f(A)f(A) is compact.

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.

Let (X,d)(X,d) be a metric space and A⊆X.A\subseteq X. The set AA is sequentially compact if and only if every sequence in AA has a subsequence that converges to a point of A.A.

Let (X,d)(X,d) be a metric space and A⊆X.A\subseteq X. The set AA is totally bounded if and only if for every ε>0\varepsilon>0 it is covered by finitely many open balls of radius ε.\varepsilon. A totally bounded set is bounded, and in Rn\mathbb{R}^n the converse holds.

Let (X,d)(X,d) be a metric space and A⊆X.A\subseteq X. The following are equivalent:

  • AA is compact;
  • AA is sequentially compact;
  • AA is complete and totally bounded.

Let A⊆Rn.A\subseteq\mathbb{R}^n. The Heine–Borel theorem states that AA is compact if and only if it is closed and bounded.

Let (x‾n)\left(\underline{x}_n\right) be a bounded sequence in Rn.\mathbb{R}^n. The Bolzano–Weierstrass theorem states that (x‾n)\left(\underline{x}_n\right) has a convergent subsequence. The Bolzano–Weierstrass theorem is the sequential compactness of closed balls in Rn.\mathbb{R}^n.

Neither the Heine–Borel theorem nor the Bolzano–Weierstrass theorem 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.

Let AA be a compact metric space with an open cover. The Lebesgue number lemma states that there exists δ>0\delta>0 such that every subset of AA with diameter less than δ\delta lies inside some set of the cover. Such a δ\delta is a Lebesgue number of the cover.

Let AA be a non-empty compact space and f:A→Rf:A\rightarrow\mathbb{R} be continuous. The image f(A)f(A) is a compact subset of R,\mathbb{R}, so it is closed and bounded and contains its supremum and infimum. Hence ff is bounded and attains its maximum and minimum.

∃ xmin⁡,xmax⁡∈A:f(xmin⁡)≤f(x)≤f(xmax⁡)  ∀ x∈A\exists\,x_{\min},x_{\max}\in A:f\left(x_{\min}\right)\leq f(x)\leq f\left(x_{\max}\right)\,\,\forall\,x\in A

This extends the extreme value theorem from closed bounded intervals to compact sets. The Heine–Cantor theorem extends in the same way: a continuous function from a compact metric space to a metric space is uniformly continuous.

Let (X,d)(X,d) be a metric space, A⊆XA\subseteq X be non-empty and x∈X.x\in X. The distance from xx to AA is the infimum of the distances from xx to points of A.A.

d(x,A):=inf⁡a∈Ad(x,a)d(x,A):=\inf_{a\in A}d(x,a)

If AA is compact then the distance from xx to AA is attained at some point of A,A, and two disjoint compact sets are at positive distance from one another.