A topological space is compact when every open cover has a finite subcover: whenever open sets satisfy , some finite selection satisfies . A subset of an ambient topological space is compact when its subspace topology is compact; equivalently, every open cover of by ambient open sets has a finite subcover. The word every matters: finding one finite subcover of one open cover is not enough to establish compactness. [ref]
The closed interval is compact by the Heine-Borel theorem. For a concrete open cover, take the three open intervals , , and . Their union is , so they cover every point of , including both endpoints. The overlaps have lengths and , leaving no gaps. Each member is necessary for this particular open cover: removing them respectively leaves , , or uncovered.
Above, hollow markers denote the excluded endpoints of the covering open intervals, while the solid endpoints belong to the covered closed interval. Below, each displayed open interval is one member of an infinite open cover of ; finitely many rows always leave points near zero uncovered. The rows are vertically separated for readability and all refer to the same real line.
The open interval is a bounded set but is not compact: the open setsgive an open cover of , since every has for sufficiently large . These are also open sets for the subspace topology on . Any nonempty finite selection has a largest index , so its union is just and misses the point , which still belongs to . Thus no finite subcover exists, however many members we select. The same family is not an open cover of , since it misses both endpoints.
In a metric space, compactness is equivalent to sequential compactness: every sequence in the subset has a convergent subsequence whose limit of a sequence belongs to that subset. This equivalence does not extend to all topological spaces. For example, for has limit of a sequence zero in . The same sequence lies in , but every subsequence still has limit of a sequence zero on the real line, so no subsequence converges to a point of . Merely approaching a boundary is harmless when the required point remains available. [ref]
https://ocw.mit.edu/courses/18-100b-analysis-i-fall-2010/b7780b2a0629359b11c5de998c72a147_MIT18_100BF10_compactness.pdf. MIT Analysis I, Compactness vs. Sequential Compactness, Theorem 1 and its metric-space proof
The same sequence approaches an included endpoint in a closed interval and a missing endpoint in an open interval
. Details. Both panels show the sequence for approaching zero. In the closed interval, zero is an allowed limit of a sequence; in the open interval, the hollow marker identifies the missing point. This single sequence disproves sequential compactness of ; compactness of still requires control of every open cover or every sequence, supplied by the Heine-Borel theorem.
An infinite set with the discrete topology similarly fails compactness, using the open cover by all its singletons. Every finite set is compact in any topology: select one covering open set for each point. The empty set is compact because the empty selection is a finite subcover. This open cover definition does not require the topological space to be Hausdorff; in algebraic geometry it is often called quasi-compactness.
The beauty of compactness is that information valid around each point can often be controlled using finitely many regions. A finite subcover lets us combine finitely many local bounds, or choose the smallest of finitely many positive tolerances, to obtain control across the whole compact space. This is why compactness repeatedly turns approximation into existence and why it is so useful in optimization through the extreme value theorem.
Every closed set in a compact space is compact, and a continuous image of a compact space is compact. The latter proof pulls an open cover back by inverse images, selects a finite subcover, and maps forward. This makes compactness useful for proving existence: the extreme value theorem guarantees that a continuous function from a nonempty compact space to the real line attains both a minimum and a maximum. For example, on has maximum at and minimum zero at its endpoints. On its infimum is still zero but is never attained. [ref]
New to topics? Read the docs here!

