
In mathematics, especially general topology and mathematical analysis, compactness is a property of a space that makes it behave in many ways like a finite set. For instance, on a finite set every infinite sequence must take some value infinitely often, by the pigeonhole principle. For subsets of Euclidean space, the analogous statement is sequential compactness: a set is compact if and only if every infinite sequence in the set has a subsequence that converges to a point of the set. Likewise, whereas every real-valued function on a finite set is bounded and attains its maximum and minimum, every continuous real-valued function on a compact space has these properties. For compact subsets of Euclidean space, this is the extreme value theorem.
Another basic property of finite sets is that every cover of a finite set by subsets has a finite subcover: one may choose, for each point of the finite set, a member of the cover containing it. The corresponding topological property is used to define compactness: a topological space is compact if every open cover has a finite subcover. In metric spaces this is equivalent to several other formulations, including sequential compactness, though these equivalences can fail in more general topological spaces. Thus every sequence in the closed unit interval [0,1] has a convergent subsequence with limit in [0,1], whereas this fails for spaces such as the open interval (0,1) and the real line. For subsets of Euclidean space, compactness is equivalent to being closed and bounded, by the Heine–Borel theorem. The property of compactness often allows local information to be combined into global conclusions. The term compact set may refer either to a compact topological space or, more commonly, to a subset of a topological space that is compact in the subspace topology.
Compactness was formally introduced by Maurice Fréchet in 1906 in work generalizing the Bolzano–Weierstrass theorem from sets of points to spaces of functions. Later, Pavel Alexandrov and Pavel Urysohn developed the open-cover formulation that is now standard in topology. Compactness plays a central role throughout mathematics; for example, continuous real-valued functions on compact spaces attain maxima and minima, and major results such as the Arzelà–Ascoli theorem and the Peano existence theorem depend on compactness.
In the 19th century, several disparate mathematical properties were understood that would later be seen as consequences of compactness. On the one hand, Bernard Bolzano (1817) had been aware that any bounded sequence of points (in the line or plane, for instance) has a subsequence that must eventually get arbitrarily close to some other point, called a limit point. Bolzano's proof relied on the method of bisection: the sequence was placed into an interval that was then divided into two equal parts, and a part containing infinitely many terms of the sequence was selected. The process could then be repeated by dividing the resulting smaller interval into smaller and smaller parts—until it closes down on the desired limit point. The full significance of Bolzano's theorem, and its method of proof, would not emerge until almost 50 years later when it was rediscovered by Karl Weierstrass.
In the 1880s, it became clear that results similar to the Bolzano–Weierstrass theorem could be formulated for spaces of functions rather than just numbers or geometrical points. The idea of regarding functions as themselves points of a generalized space dates back to the investigations of Giulio Ascoli and Cesare Arzelà. The culmination of their investigations, the Arzelà–Ascoli theorem, was a generalization of the Bolzano–Weierstrass theorem to families of continuous functions, the precise conclusion of which was that it was possible to extract a uniformly convergent sequence of functions from a suitable family of functions. The uniform limit of this sequence then played precisely the same role as Bolzano's "limit point". Towards the beginning of the twentieth century, results similar to that of Arzelà and Ascoli began to accumulate in the area of integral equations, as investigated by David Hilbert and Erhard Schmidt. For a certain class of Green's functions coming from solutions of integral equations, Schmidt had shown that a property analogous to the Arzelà–Ascoli theorem held in the sense of mean convergence – or convergence in what would later be dubbed a Hilbert space. This ultimately led to the notion of a compact operator as an offshoot of the general notion of a compact space. It was Maurice Fréchet who, in 1906, had distilled the essence of the Bolzano–Weierstrass property and coined the term compactness to refer to this general phenomenon (he used the term already in his 1904 paper which led to the famous 1906 thesis).
However, a different notion of compactness altogether had also slowly emerged at the end of the 19th century from the study of the continuum, which was seen as fundamental for the rigorous formulation of analysis. In 1870, Eduard Heine showed that a continuous function defined on a closed and bounded interval was in fact uniformly continuous. In the course of the proof, he made use of a lemma that from any countable cover of the interval by smaller open intervals, it was possible to select a finite number of these that also covered it. The significance of this lemma was recognized by Émile Borel (1895), and it was generalized to arbitrary collections of intervals by Pierre Cousin (1895) and Henri Lebesgue (1904). The Heine–Borel theorem, as the result is now known, is another special property possessed by closed and bounded sets of real numbers.
This property was significant because it allowed for the passage from local information about a set (such as the continuity of a function) to global information about the set (such as the uniform continuity of a function). This sentiment was expressed by Lebesgue (1904), who also exploited it in the development of the integral now bearing his name. Ultimately, the Russian school of point-set topology, under the direction of Pavel Alexandrov and Pavel Urysohn, formulated Heine–Borel compactness in a way that could be applied to the modern notion of a topological space. Alexandrov & Urysohn (1929) showed that the earlier version of compactness due to Fréchet, now called (relative) sequential compactness, under appropriate conditions followed from the version of compactness that was formulated in terms of the existence of finite subcovers. It was this notion of compactness that became the dominant one, because it was not only a stronger property, but it could be formulated in a more general setting with a minimum of additional technical machinery, as it relied only on the structure of the open sets in a space.
Any finite space is compact; a finite subcover can be obtained by selecting, for each point, an open set containing it. A nontrivial example of a compact space is the (closed) unit interval [0,1] of real numbers. If one chooses an infinite number of distinct points in the unit interval, then there must be some accumulation point among these points in that interval. For instance, the odd-numbered terms of the sequence 1, 1/2, 1/3, 3/4, 1/5, 5/6, 1/7, 7/8, ... get arbitrarily close to 0, while the even-numbered ones get arbitrarily close to 1. The given example sequence shows the importance of including the boundary points of the interval, since the limit points must be in the space itself—an open (or half-open) interval of the real numbers is not compact. It is also crucial that the interval be bounded, since in the interval [0,∞), one could choose the sequence of points 0, 1, 2, 3, ..., of which no sub-sequence ultimately gets arbitrarily close to any given real number.
In two dimensions, closed disks are compact since for any infinite number of points sampled from a disk, some subset of those points must get arbitrarily close either to a point within the disc, or to a point on the boundary. Likewise, a circle in the plane is compact (easily seen by its being closed and bounded). However, an open disk is not compact, because a sequence of points can tend to the boundary—without getting arbitrarily close to any point in the interior. Likewise, spheres are compact, but a sphere missing a point is not since a sequence of points can still tend to the missing point, thereby not getting arbitrarily close to any point within the space. Lines and planes are not compact, since one can take a set of equally-spaced points in any given direction without approaching any point.
Various definitions of compactness may apply, depending on the level of generality. A subset of Euclidean space in particular is compact if and only if it is closed and bounded. This implies, by the Bolzano–Weierstrass theorem, that any infinite sequence from the set has a subsequence that converges to a point in the set. Various equivalent notions of compactness, such as sequential compactness and limit point compactness, can be developed in general metric spaces.
In contrast, the different notions of compactness are not equivalent in general topological spaces, and the most useful notion of compactness—originally called bicompactness—is defined using covers consisting of open sets (see Open cover definition below). That this form of compactness holds for closed and bounded subsets of Euclidean space is known as the Heine–Borel theorem. Compactness, when defined in this manner, often allows one to take information that is known locally—in a neighbourhood of each point of the space—and to extend it to information that holds globally throughout the space. An example of this phenomenon is Dirichlet's theorem, to which it was originally applied by Heine, that a continuous function on a compact interval is uniformly continuous; here, continuity is a local property of the function, and uniform continuity the corresponding global property.
Formally, a topological space X is called compact if every open cover of X has a finite subcover. That is, X is compact if for every collection C of open subsets of X such that
there is a finite subcollection F ⊆ C such that
Some branches of mathematics such as algebraic geometry, typically influenced by the French school of Bourbaki, use the term quasi-compact for the general notion, and reserve the term compact for topological spaces that are both Hausdorff and quasi-compact. A compact set is sometimes referred to as a compactum, plural compacta.
A subset K of a topological space X is compact if for every arbitrary collection C of open subsets of X such that
there is a finite subcollection F ⊆ C such that
Equivalently, K is compact as a subset of X if and only if the topological space K is compact in the subspace topology. In particular, if , with subset Y equipped with the subspace topology, then K is compact in Y if and only if K is compact in X. Furthermore, the compactness of K as a subset of a topological space X is independent of the embedding, provided that the subspace topology on K is the same.
If X is a topological space then the following are equivalent:
Bourbaki defines a compact space (quasi-compact space) as a topological space where each filter has a cluster point (i.e., 8. in the above).
For any subset A of Euclidean space, A is compact if and only if it is closed and bounded; this is the Heine–Borel theorem.
As a Euclidean space is a metric space, the conditions in the next subsection also apply to all of its subsets. Of all of the equivalent conditions, it is in practice easiest to verify that a subset is closed and bounded, for example, for a closed interval or closed n-ball.
For any metric space (X, d), the following are equivalent (assuming countable choice):
A compact metric space (X, d) also satisfies the following properties:
For an ordered space (X, <) (i.e. a totally ordered set equipped with the order topology), the following are equivalent:
An ordered space satisfying (any one of) these conditions is called a complete lattice.
In addition, the following are equivalent for all ordered spaces (X, <), and (assuming countable choice) are true whenever (X, <) is compact (the converse in general fails if (X, <) is not also metrizable):
Let X be a completely regular Hausdorff space and C(X) the ring of real-valued continuous functions on X. For each p ∈ X, the evaluation map given by is a ring homomorphism. Its kernel is a maximal ideal, since by the first isomorphism theorem
For a completely regular Hausdorff space X, X is pseudocompact if and only if every maximal ideal M of C(X) is real, meaning that its residue field C(X)/M is isomorphic to Moreover, X is realcompact if and only if every real maximal ideal is of the form Mp for some p ∈ X. Consequently, X is compact if and only if every maximal ideal of C(X) is the kernel of an evaluation homomorphism.
If X is not pseudocompact, then C(X) has maximal ideals whose residue fields are proper ordered field extensions of , often called hyperreal fields. In the framework of non-standard analysis, this corresponds to the following characterization of compactness: a topological space X is compact if and only if every point of the natural extension *X is infinitely close to some point of X (that is, lies in the monad of a point of X).
A space X is compact if its hyperreal extension *X (constructed, for example, by the ultrapower construction) has the property that every point of *X is infinitely close to some point of X ⊂ *X. For example, an open real interval X = (0, 1) is not compact because its hyperreal extension *(0,1) contains infinitesimals, which are infinitely close to 0, which is not a point of X.
Since the image of a compact space under a continuous function is compact, the extreme value theorem holds for such spaces: a continuous real-valued function on a nonempty compact space is bounded above and attains its supremum. (Slightly more generally, this is true for an upper semicontinuous function.) As a sort of converse to the above statements, the pre-image of a compact space under a proper map is compact.
Every topological space X is an open dense subspace of a compact space having at most one point more than X, by the Alexandroff one-point compactification. By the same construction, every locally compact Hausdorff space X is an open dense subspace of a compact Hausdorff space having at most one point more than X.
A nonempty compact subset of the real numbers has a greatest element and a least element.
Let X be a totally ordered set endowed with the order topology. Then X is compact if and only if X is a complete lattice (i.e., all subsets have suprema and infima).