In mathematics, specifically general topology, compactness is a property that generalizes the notion of a subset of Euclidean space being closed (containing all its limit points) and bounded (having all its points lie within some fixed distance of each other).
Examples of compact spaces include a closed real interval, a union of a finite number of closed intervals, a rectangle, or a finite set of points. This notion is defined for more general topological spaces in various ways, which are usually equivalent in Euclidean space but may be inequivalent in other spaces.
One such generalization is that a topological space is sequentially compact if every infinite sequence of points sampled from the space has an infinite subsequence that converges to some point of the space.
The Bolzano–Weierstrass theorem states that a subset of Euclidean space is compact in this sequential sense if and only if it is closed and bounded.
Thus, if one chooses an infinite number of points in the closed unit interval [0, 1], some of those points will get arbitrarily close to some real number in that space.
For instance, some of the numbers in the sequence 1/2, 4/5, 1/3, 5/6, 1/4, 6/7, … accumulate to 0 (while others accumulate to 1).
The same set of points would not accumulate to any point of the open unit interval (0, 1), so the open unit interval is not compact. Although subsets (subspaces) of Euclidean space can be compact, the entire space itself is not compact since it is not bounded.
For example, considering

R

1

{\displaystyle \mathbb {R} ^{1}}
, the entire real number line, the sequence of points 0, 1, 2, 3, …, has no subsequence that converges to any real number.
Compactness was formally introduced by Maurice Fréchet in 1906 to generalize the Bolzano–Weierstrass theorem from spaces of geometrical points to spaces of functions. Arzelà–Ascoli theorem and the Peano existence theorem exemplify applications of this notion of compactness to classical analysis. Following its initial introduction, various equivalent notions of compactness, including sequential compactness and limit point compactness, were developed in general metric spaces. In general topological spaces, however, these notions of compactness are not necessarily equivalent. The most useful notion—and the standard definition of the unqualified term compactness—is phrased in terms of the existence of finite families of open sets that "cover" the space in the sense that each point of the space lies in some set contained in the family. This more subtle notion, introduced by Pavel Alexandrov and Pavel Urysohn in 1929, exhibits compact spaces as generalizations of finite sets. In spaces that are compact in this sense, it is often possible to patch together information that holds locally—that is, in a neighborhood of each point—into corresponding statements that hold throughout the space, and many theorems are of this character.
The term compact set is sometimes used as a synonym for compact space, but often refers to a compact subspace of a topological space as well.

View More On Wikipedia.org