Fiveable

🧠Thinking Like a Mathematician Unit 8 Review

QR code for Thinking Like a Mathematician practice questions

8.8 Compactness

8.8 Compactness

Written by the Fiveable Content Team • Last updated August 2025
Written by the Fiveable Content Team • Last updated August 2025
🧠Thinking Like a Mathematician
Unit & Topic Study Guides

Compactness is one of the most important ideas in topology and analysis. It lets you take techniques that work for finite collections and apply them to infinite ones. If a set is compact, it behaves "almost like a finite set" in key ways, which makes proving things about it much more tractable.

This guide covers the definition of compactness through open covers, its equivalent formulations, its core properties, and how it shows up across different areas of mathematics.

Definition of compactness

Compactness generalizes the notion of finiteness to infinite sets. A set is compact if, no matter how you try to cover it with open sets, you can always find a finite collection from that cover that still does the job. That single requirement turns out to have surprisingly deep consequences.

Open cover concept

An open cover of a set XX is a collection of open sets whose union contains every point of XX. The individual open sets can overlap, and the collection can be infinite (even uncountably so).

For example, consider the closed interval [0,1][0, 1] on the real line. You could cover it with the collection of open intervals {(0.1,0.5),(0.3,0.8),(0.6,1.1)}\{(-0.1, 0.5), (0.3, 0.8), (0.6, 1.1)\}. That's a finite open cover. But you could also cover it with infinitely many tiny intervals. The point is that any collection of open sets that contains all of XX counts as an open cover.

Finite subcover requirement

Here's where compactness gets its teeth: a set XX is compact if every open cover of XX has a finite subcover. That means no matter which open cover someone hands you, you can always pick out finitely many of those open sets that still cover all of XX.

This is a strong condition. It's not enough that some open covers have finite subcovers (that's trivially true). Every open cover must have one. This requirement is what lets you reduce infinite problems to finite ones when working with compact sets.

Equivalent formulations

The open cover definition is the standard one, but compactness can be characterized in several equivalent ways, each useful in different contexts.

Bolzano-Weierstrass property

The Bolzano-Weierstrass property says that every infinite subset of a compact set has a limit point (a point that every open neighborhood around it contains other points of the subset). In practical terms, points in a compact set can't "escape to infinity" or spread out without clustering somewhere.

This connects compactness directly to convergence: if you have an infinite sequence in a compact set, some subsequence must converge to a point within the set.

Heine-Borel theorem

The Heine-Borel theorem gives a concrete characterization of compactness in Rn\mathbb{R}^n: a subset of Euclidean space is compact if and only if it is both closed and bounded.

  • Closed means the set contains all its limit points.
  • Bounded means the set fits inside some ball of finite radius.

This is extremely useful because checking "closed and bounded" is often much easier than verifying the open cover definition directly. But be careful: Heine-Borel applies specifically to Euclidean spaces. In general topological or metric spaces, closed and bounded does not guarantee compactness.

Sequential compactness

A set is sequentially compact if every sequence in the set has a subsequence that converges to a point within the set. In metric spaces, sequential compactness is equivalent to compactness. In general topological spaces, however, the two notions can differ.

Sequential compactness is often the most intuitive version to work with, especially in analysis, because it directly involves sequences and limits rather than abstract collections of open sets.

Properties of compact sets

Closed and bounded sets

In Rn\mathbb{R}^n, compact sets are always closed and bounded (and vice versa, by Heine-Borel). Closedness ensures limit points stay in the set, while boundedness keeps the set from stretching out to infinity. Together, these properties enable results like the extreme value theorem and uniform continuity.

Intersection of compact sets

The intersection of any collection of compact subsets of a Hausdorff space is compact. This preserves compactness under set operations and is useful for constructing new compact sets from existing ones. It plays a role in fixed point theorems and other intersection arguments in topology.

Open cover concept, general topology - I need visual examples of topological concepts - Mathematics Stack Exchange

Continuous image of compact sets

If ff is continuous and KK is compact, then f(K)f(K) is compact. This is one of the most frequently used properties of compactness. It means compactness is preserved under continuous maps, which is essential for optimization (guaranteeing that a continuous function on a compact set actually attains its extreme values) and for many existence proofs in analysis.

Compactness in metric spaces

Completeness vs compactness

These two concepts are related but distinct:

  • A space is complete if every Cauchy sequence converges within the space.
  • A space is compact if every sequence has a convergent subsequence within the space.

Every compact metric space is complete, but the converse fails. For instance, R\mathbb{R} with the standard metric is complete but not compact (it's unbounded). The real line shows that completeness alone doesn't force the "clustering" behavior that compactness requires.

Total boundedness

A metric space is totally bounded if, for every ϵ>0\epsilon > 0, you can cover the entire space with finitely many open balls of radius ϵ\epsilon. This is a stronger condition than ordinary boundedness.

The key equivalence in metric spaces is:

A metric space is compact if and only if it is both complete and totally bounded.

This gives you a two-part test for compactness in metric spaces that's often easier to check than the open cover definition.

Compactness in topological spaces

Hausdorff spaces

A Hausdorff space is one where any two distinct points can be separated by disjoint open neighborhoods. In Hausdorff spaces, compact subsets are always closed, and limits of sequences (when they exist) are unique. Most spaces you encounter in analysis are Hausdorff, so compact subsets there automatically carry the "closed" property.

Local compactness

A space is locally compact if every point has a neighborhood whose closure is compact. This is a weaker condition than global compactness but still very useful. The real line R\mathbb{R} is locally compact (every point sits inside a closed bounded interval) but not compact. Local compactness is important in the study of manifolds, locally compact groups, and harmonic analysis.

Applications of compactness

Extreme value theorem

If ff is a continuous real-valued function on a compact set KK, then ff attains its maximum and minimum values on KK. There exist points xmin,xmaxKx_{\min}, x_{\max} \in K such that f(xmin)f(x)f(xmax)f(x_{\min}) \leq f(x) \leq f(x_{\max}) for all xKx \in K.

Without compactness, this can fail. For example, f(x)=xf(x) = x on the open interval (0,1)(0, 1) gets arbitrarily close to 0 and 1 but never reaches either value.

Open cover concept, Soft ii-Open Sets in Soft Topological Spaces

Uniform continuity on compact sets

A continuous function on a compact set is automatically uniformly continuous. This means the "rate" of continuity doesn't depend on where you are in the set. Formally, for any ϵ>0\epsilon > 0, there's a single δ>0\delta > 0 that works everywhere in the domain, not just at each individual point.

This is a significant upgrade from ordinary continuity and is important for approximation theory, numerical methods, and proving convergence results.

Compactness in optimization

Many optimization problems require you to show that an optimal solution exists before you try to find it. Compactness, combined with continuity, guarantees existence: a continuous function on a compact set achieves its minimum and maximum. This principle underlies results in linear programming, game theory (existence of Nash equilibria), and the calculus of variations.

Counterexamples and non-compact sets

Understanding why certain sets fail to be compact solidifies the concept.

Open intervals

The open interval (0,1)(0, 1) is bounded but not closed, and it's not compact. Consider the open cover {(1/n,1):n=1,2,3,}\{(1/n, 1) : n = 1, 2, 3, \ldots\}. Every point of (0,1)(0,1) lies in some (1/n,1)(1/n, 1), but no finite subcollection covers points arbitrarily close to 0. This shows that boundedness alone isn't enough; you also need closedness (in Rn\mathbb{R}^n).

Unbounded closed sets

The set [0,)[0, \infty) is closed but not bounded, and it's not compact. The open cover {(1,n):n=1,2,3,}\{(-1, n) : n = 1, 2, 3, \ldots\} covers the entire set, but no finite subcollection reaches all the way to infinity. This shows that closedness alone isn't enough either.

Compactness in analysis

Arzelà-Ascoli theorem

The Arzelà-Ascoli theorem characterizes compact subsets of the space of continuous functions C(X)C(X) (with the uniform norm). A subset FC(X)\mathcal{F} \subseteq C(X) is relatively compact if and only if it is:

  1. Uniformly bounded: there exists MM such that f(x)M|f(x)| \leq M for all fFf \in \mathcal{F} and all xXx \in X.
  2. Equicontinuous: for every ϵ>0\epsilon > 0, there exists δ>0\delta > 0 such that f(x)f(y)<ϵ|f(x) - f(y)| < \epsilon whenever d(x,y)<δd(x,y) < \delta, uniformly across all fFf \in \mathcal{F}.

This theorem is a workhorse for proving existence of solutions to differential equations and for approximation arguments in functional analysis.

Stone-Weierstrass theorem

The Stone-Weierstrass theorem says that certain subalgebras of C(X)C(X) (continuous functions on a compact space XX) are dense in the uniform norm. It generalizes the classical Weierstrass approximation theorem (which says polynomials can approximate any continuous function on [a,b][a,b]) to much more abstract settings. Compactness of the underlying space is essential to the result.

Compactness in algebra

Compact groups

A compact group is a topological group that is compact as a topological space. Key examples include the circle group S1S^1 (complex numbers of modulus 1 under multiplication) and the orthogonal group O(n)O(n) (rotation and reflection matrices). Every compact group admits a unique normalized Haar measure, which enables integration over the group and is foundational for representation theory and harmonic analysis.

Compactification of spaces

Compactification is the process of embedding a non-compact space into a compact one as a dense subset. Two important constructions:

  • One-point compactification: adds a single "point at infinity." For example, compactifying R2\mathbb{R}^2 this way gives the sphere S2S^2.
  • Stone-Čech compactification: the "largest" compactification, adding as many points as needed to make every bounded continuous function extendable.

Compactification lets you apply compact-space techniques to non-compact spaces by working in the larger compact space and then restricting back.