Topology

Baire Category Theorem

A complete metric space is not the countable union of nowhere-dense sets — completeness is fat

The Baire category theorem says a complete metric space cannot be written as a countable union of nowhere-dense sets. Equivalently, a countable intersection of dense open sets is dense. Sets that are countable unions of nowhere-dense sets are called meagre (or "first category"); their complements (containing a dense Gδ) are residual and characterize generic properties. The theorem is foundational for functional analysis: it powers the open mapping theorem, the closed graph theorem, and the uniform boundedness principle (Banach-Steinhaus). It also proves that a dense Gδ of continuous functions on [0, 1] are nowhere differentiable, that a dense Gδ of self-maps of [0, 1] have dense orbits, and many other genericity statements. Proved by René-Louis Baire in his 1899 doctoral thesis. Holds also in locally compact Hausdorff spaces. Fails in incomplete spaces — ℚ is meagre in itself.

  • Conclusioncomplete ⇒ not a countable union of nowhere-dense
  • Dual formcountable ⋂ of dense open = dense
  • ProvedBaire, 1899 thesis
  • Powers3 pillars of functional analysis
  • Genericity"most" continuous fns are nowhere differentiable
  • Fails forℚ — meagre in itself

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

Why Baire's theorem matters

Baire's category theorem looks like a measure-theoretic curiosity but underwrites the entire infinitary side of functional analysis. The open mapping, closed graph, and uniform boundedness theorems are the three pillars of the subject — without Baire, none of them holds. Beyond functional analysis, Baire is the engine of "generic property" arguments: it tells you that a property can be true on a "topologically large" set of instances even when no single explicit example is available.

  • Foundation of functional analysis. All three of the open mapping theorem, the closed graph theorem, and the Banach-Steinhaus uniform boundedness principle have proofs that reduce to Baire applied to a Banach space (a complete metric space). Without completeness — equivalently, without Baire — pointwise-bounded sequences of operators can fail to be uniformly bounded, and surjective bounded operators can fail to be open.
  • Genericity in analysis. "Most" continuous functions on [0, 1] are nowhere differentiable (Banach 1931); "most" continuous self-maps of an interval have dense orbits; "most" homeomorphisms of a manifold are conjugate to a translation on a fixed Cantor set. The word "most" means "the complement is meagre" — Baire turns "topological largeness" into an analytic tool.
  • Existence proofs without construction. Baire is the prototype non-constructive existence argument: there exists a function with such-and-such property because the set of functions without it is meagre. Examples that exhibit the property explicitly may be hard to write down (Weierstrass's nowhere-differentiable construction took years of work; Baire shows the result is generic in a sentence).
  • Descriptive set theory. Borel hierarchies, the analytic-coanalytic decomposition, and the structure of Polish spaces all use Baire to organize subsets of ℝ by their definability class. The σ-algebra of subsets with the Baire property is the natural setting for Solovay's model where every set of reals is Lebesgue measurable.
  • Dynamical systems. Generic properties of dynamical systems (topological transitivity, density of periodic points, structural stability or its failure) are formulated and proved using Baire on the function space of dynamical systems. The Kupka-Smale theorem (1963) says generic C¹ vector fields have only hyperbolic periodic points, which is a Baire-category statement.
  • Algebra and number theory. Open subgroups of locally compact Hausdorff groups have the Baire property; many results in p-adic analysis use Baire on ℚ_p (a locally compact Hausdorff group). The Skolem-Mahler-Lech theorem on linear-recurrence zeros uses a Baire-style argument in ℚ_p.
  • Topology of function spaces. C(K) with the sup norm, L^p(Ω), and Sobolev spaces W^{k, p}(Ω) are all complete; their Baire-category structure gives generic-function arguments throughout PDE theory (Sobolev embedding genericity, boundary regularity for elliptic equations).

Statement and proof

Theorem (Baire). Let X be a non-empty complete metric space. Then for any sequence (Aₙ) of nowhere-dense subsets of X, the union ⋃ Aₙ ≠ X. Equivalently, the intersection of any countable family of dense open subsets of X is dense in X.

Proof. The two statements are dual via complementation: U dense open ⇔ U^c closed with empty interior ⇔ U^c nowhere dense.

Fix dense open sets U₁, U₂, U₃, … and let V be any non-empty open set in X; we must find a point in V ∩ ⋂ Uₙ. Inductively construct nested closed balls B(xₙ, rₙ):

  • U₁ is dense, so U₁ ∩ V is non-empty open. Pick a closed ball B(x₁, r₁) ⊂ U₁ ∩ V with r₁ ≤ 1.
  • U₂ is dense, so U₂ ∩ int B(x₁, r₁) is non-empty open. Pick B(x₂, r₂) ⊂ U₂ ∩ int B(x₁, r₁) with r₂ ≤ 1/2.
  • Continue: pick B(xₙ, rₙ) ⊂ Uₙ ∩ int B(xₙ₋₁, rₙ₋₁) with rₙ ≤ 1/n.

The sequence (xₙ) is Cauchy because d(xₙ, xₘ) ≤ rₙ ≤ 1/n for m ≥ n. By completeness, xₙ → x ∈ X. The point x lies in B(xₙ, rₙ) for every n (the balls are nested and closed), hence in Uₙ for every n, hence in V ∩ ⋂ Uₙ. The intersection is dense.

The proof is a constructive nested-intersection argument — it uses only dependent choice (DC), not full AC. Completeness is what makes the limit live in X: in an incomplete space, the Cauchy sequence might converge in a larger completion but not in X itself.

Meagre and residual sets

Vocabulary worth memorizing.

  • Nowhere dense. A ⊂ X is nowhere dense if its closure A̅ has empty interior. Equivalently, X \ A̅ is dense in X. Examples: a single point in ℝ, the Cantor set in ℝ, the boundary of an open set.
  • Meagre (first category). A is meagre if it is a countable union of nowhere-dense sets. Examples: ℚ in ℝ (countable union of singletons), the rationals on the Cantor set, the union of all algebraic numbers in ℝ.
  • Residual (comeagre). The complement of a meagre set. By Baire, in a complete metric space a residual set is dense — in fact it contains a dense Gδ.
  • Gδ and Fσ. A Gδ is a countable intersection of open sets; an Fσ a countable union of closed sets. Dense Gδ sets in complete metric spaces are residual; Fσ meagre sets are the "small" sets.
  • Baire property. A set has the Baire property if it differs from an open set by a meagre set. The Baire-property sets form a σ-algebra containing all Borel sets; in Solovay's model, every set of reals has the Baire property.

Genericity in C[0, 1]: nowhere-differentiable functions

The most famous application of Baire outside functional analysis.

Theorem (Banach 1931, Mazurkiewicz 1931). In C[0, 1] with the sup norm, the set of functions that are differentiable at some point is meagre. Therefore a dense Gδ of continuous functions on [0, 1] are nowhere differentiable.

The proof shows that for each pair of positive integers (n, k), the set

E_{n,k} = { f ∈ C[0,1] : ∃ x_0 ∈ [0,1] with |(f(x_0+h) - f(x_0))/h| ≤ k for all 0 < |h| ≤ 1/n }

is closed (a uniform-convergence limit argument) and has empty interior. Empty interior is the key: given any f ∈ E_{n, k} and any ε > 0, perturb f by a fine sawtooth function with very large slope to obtain f̃ with ‖f − f̃‖_∞ < ε but f̃ ∉ E_{n, k}. Any function differentiable at some x_0 lies in ⋃_k E_{n, k} for some n, hence in a meagre set; the complement (nowhere-differentiable functions) is residual.

This says Weierstrass's 1872 construction (a specific nowhere-differentiable continuous function) is the typical rather than pathological case. The same Baire argument shows generic continuous functions have infinite Hausdorff dimension graphs, generic homeomorphisms have Cantor-like fixed-point sets, and generic Lipschitz functions have differential singularities on dense Gδ sets.

The three pillars of functional analysis

All three rely on Baire applied to a Banach space.

  • Open mapping theorem. Let T: X → Y be a surjective bounded linear operator between Banach spaces. Then T is open. Proof: Y = ⋃ₙ T(n B_X̄), so by Baire some T(n B_X̄) has non-empty interior. By linearity T(B_X̄) has non-empty interior; convexity and a completeness-based approximation argument (uses completeness of Y) upgrade this to T(B_X̄) ⊃ some ball around 0. Hence T(open) = open.
  • Closed graph theorem. Let T: X → Y be linear between Banach spaces. Then T is bounded ⇔ its graph G(T) = {(x, Tx) : x ∈ X} is closed in X × Y. Proof: ⇒ is easy (continuous functions have closed graphs in Hausdorff spaces). ⇐ uses open mapping: the projection π₁: G(T) → X is a bijective bounded linear map between Banach spaces (G(T) closed in X × Y means it inherits a Banach structure), so by open mapping its inverse is bounded, i.e., T is bounded.
  • Banach-Steinhaus (uniform boundedness). Let (Tᵢ) be a family of bounded linear operators X → Y with X Banach. If sup_i ‖Tᵢ x‖_Y < ∞ for each x ∈ X (pointwise bounded), then sup_i ‖Tᵢ‖ < ∞ (uniformly bounded). Proof: X = ⋃ₙ {x : sup_i ‖Tᵢ x‖ ≤ n} =: ⋃ₙ Fₙ; each Fₙ is closed (intersection of preimages of closed balls); by Baire some Fₙ has non-empty interior; openness of the interior and linearity propagate the bound everywhere.

Baire versus Banach-Steinhaus

The two are often paired but encode different content.

StatementSettingWhat it givesProof strategyWhere used
Baire (countable union)Complete metric space XX is not meagre in itself; dense Gδ sets existCantor-style nested closed balls + completenessGenericity arguments, descriptive set theory
Baire (locally compact form)Locally compact Hausdorff XSame conclusion as the complete metric caseNested compact closures + compactnessLie groups, p-adic groups, locally compact algebra
Banach-SteinhausBanach space X, family (Tᵢ) of bounded opsPointwise bounded ⇒ uniformly bounded ‖Tᵢ‖Baire applied to Fₙ = {x: sup ‖Tᵢ x‖ ≤ n}Fourier series convergence, weak/strong topologies
Open mapping theoremSurjective bounded T: X → Y, both BanachT is open, bijective ⇒ bounded inverseBaire on Y = ⋃ T(n B_X̄) + completeness shrinkingIsomorphism theorems, spectral theory
Closed graph theoremLinear T: X → Y, both BanachT bounded ⇔ graph closed in X × YReduces to open mapping on the graphUnbounded operators, domains in QM
Inverse mapping theoremContinuous bijection T: X → Y, both BanachT^(-1) is continuousOpen mapping (corollary)Linear isomorphism is automatic-bicontinuity

Worked examples and applications

  • ℚ is meagre in itself. ℚ with the inherited metric has no isolated points (rationals are dense in themselves), so each singleton {q} is nowhere dense in ℚ. Therefore ℚ = ⋃_{q ∈ ℚ} {q} is meagre in itself. This is the canonical example of Baire failing in an incomplete space.
  • ℝ is not meagre. By Baire, ℝ cannot be written as a countable union of nowhere-dense sets. ℚ is meagre in ℝ, the irrationals ℝ \ ℚ are residual (a dense Gδ), and any countable subset of ℝ is meagre. Liouville numbers in ℝ form a residual but Lebesgue-null set, showing that Baire-category and measure-theoretic size disagree.
  • Existence of irrational numbers without construction. ℝ = ℚ ∪ (ℝ \ ℚ). Since ℚ is meagre and ℝ is not, ℝ \ ℚ must be non-empty — Baire gives a non-constructive proof that irrationals exist. (Of course √2 is a much cheaper proof.)
  • Sturm-Liouville eigenfunctions and Fourier series divergence. Banach-Steinhaus gives a continuous function on [0, 2π] whose Fourier series diverges at a point: define partial-sum operators S_N: C(T) → ℂ, show pointwise unboundedness fails, conclude uniform unboundedness — i.e., there exists f with unbounded S_N f. Du Bois-Reymond gave an explicit example in 1873; Banach-Steinhaus gives the existential proof in one line.
  • Generic dynamical systems. In the space of homeomorphisms of a compact manifold (with the C⁰ topology), the set of homeomorphisms with a fixed point is comeagre; the set of homeomorphisms with no periodic points is meagre; the set with dense orbits is residual. The Baire category lens organizes "generic" dynamics.
  • Topological mixing in number theory. Erdős showed (1939) using Baire that for almost every (in the Baire sense) real x ∈ [0, 1] the digit sequence under base-2 expansion is "normal" in a measure-theoretic sense, while the explicit construction of normal numbers is intricate.

Common pitfalls

  • "Meagre means small in measure." No. Meagre and Lebesgue-null are unrelated categories. The Liouville numbers in ℝ form a comeagre (residual) set but have Lebesgue measure zero. A fat Cantor set has positive measure but is nowhere dense — its complement is open and dense (meagre complement equals measure-zero set is fine; comeagre measure-zero set is fine). The two notions of "size" diverge sharply.
  • "Baire holds in any topological space." No. It holds in complete metric spaces and in locally compact Hausdorff spaces (and in Čech-complete spaces, the common generalization). Generic non-Hausdorff spaces, non-complete metric spaces (like ℚ), and even some completely regular Hausdorff non-Čech-complete spaces fail Baire.
  • "Baire is a measure-theoretic statement." Baire is purely topological. It does not depend on a measure, and works in spaces (like p-adic fields) where measure theory is parallel but distinct.
  • "Open mapping gives constructive inverses." No — the inverse is bounded (continuous), but the proof gives no rate. The constant in ‖T⁻¹y‖ ≤ C ‖y‖ can be huge or hard to estimate; only the existence and finiteness are given.
  • "Nowhere differentiable functions are pathological." They are typical in the Baire sense — "most" continuous functions are nowhere differentiable. The smooth ones are meagre. The intuition "if I can't picture a nowhere-differentiable function it must be rare" is exactly backward.
  • "Countable Baire is enough." The conclusion ⋂ Uₙ dense holds only for countable intersections of dense open sets. Uncountable intersections of dense open sets can be empty even in complete metric spaces — example: in ℝ, the dense open sets {ℝ \ {q}} indexed by q ∈ ℝ have empty intersection.

History

René-Louis Baire proved the theorem in his 1899 doctoral thesis "Sur les fonctions de variables réelles," motivated by the question of which discontinuous functions can be limits of continuous functions (the Baire hierarchy of functions). He distinguished sets of first and second category as a topological notion of size — what we now call meagre and non-meagre — and proved the theorem for complete subsets of ℝⁿ.

Hahn (1932) generalized to complete metric spaces; Bourbaki and others extended to locally compact Hausdorff spaces. The application to functional analysis (open mapping, closed graph, Banach-Steinhaus) was developed by Banach and the Lwów school throughout the 1920s and 30s, with Banach-Steinhaus appearing in their joint 1927 paper. Baire's theorem is now considered one of the foundational results of 20th-century topology, alongside Tychonoff's theorem and Urysohn's lemma.

Modern descriptive set theory (Solovay, Shelah, Hjorth, Kechris) builds on the Baire structure of Polish spaces to organize sets of reals by their topological complexity. The Banach-Mazur game, played on a topological space, has a winning strategy for one player iff a certain set is meagre — yet another connection between Baire-category structure and game theory.

Frequently asked questions

What does the Baire category theorem actually say?

Two equivalent statements. (1) A complete metric space X cannot be written as a countable union ⋃ Aₙ of nowhere-dense sets (where a set is nowhere dense if its closure has empty interior). (2) A countable intersection ⋂ Uₙ of dense open sets Uₙ in X is itself dense. The two are connected by complementation: Aₙ nowhere dense ⇔ X \ Aₙ̄ open and dense. The theorem also holds in any locally compact Hausdorff space, even without metrizability. It fails in incomplete spaces — the rationals ℚ are a countable union of nowhere-dense singletons (each {q} is nowhere dense in ℚ since ℚ has no isolated points).

Why is completeness essential? Where does the proof use it?

The proof is a Cantor-style nested-intersection argument. Suppose ⋃ Aₙ = X with each Aₙ nowhere dense and we want a contradiction. Pick a non-empty open ball B₀ ⊂ X. Since A₁ is nowhere dense, A₁̄ misses an open ball B₁ ⊂ B₀; we shrink so diam B₁ ≤ 1/2. Inductively, since Aₙ is nowhere dense, we find Bₙ ⊂ Bₙ₋₁ with Bₙ ∩ Aₙ̄ = ∅ and diam Bₙ ≤ 1/2ⁿ. Pick xₙ ∈ Bₙ. The sequence (xₙ) is Cauchy (diameters shrink); by completeness it converges to some x ∈ X. By construction x ∈ ⋂ Bₙ ⊂ X \ ⋃ Aₙ — contradicting the assumption. Without completeness the limit point can escape the space (as it does for ℚ), so the argument fails.

What are meagre, comeagre, and residual sets?

A set A in a topological space X is meagre (or "of first category") if it is a countable union of nowhere-dense sets. Its complement X \ A is comeagre or residual. Baire's theorem says complete metric spaces are not meagre in themselves. In a comeagre set lives a dense Gδ — a countable intersection of dense open sets. "Generic property holds" is standard terminology for "the set of points where it fails is meagre". The terminology reflects size in the Baire-category sense, which is distinct from measure-theoretic size: there are meagre sets of full Lebesgue measure (a fat Cantor set's complement) and comeagre sets of measure zero (the Liouville numbers in ℝ).

How does Baire give the open mapping and closed graph theorems?

Three pillars all rely on Baire applied to a complete metric space. (1) Open mapping theorem: a surjective bounded linear T: X → Y between Banach spaces is open. Proof: write Y = ⋃ T(nB_X) where B_X is the unit ball. By Baire, some nT(B_X) contains an open set, so T(B_X) has non-empty interior; complete-space approximation arguments then show T(B_X) actually contains a ball around 0. (2) Closed graph theorem: a linear T: X → Y is bounded iff its graph is closed. Reduces to open mapping applied to the projection from the graph onto X. (3) Banach-Steinhaus: a family of bounded operators that is pointwise bounded is uniformly bounded. Write X = ⋃{x : sup_T ‖Tx‖ ≤ n}; by Baire some set has non-empty interior, giving the uniform bound. All three theorems collapse if completeness fails.

What's the genericity of nowhere-differentiable functions?

In C[0, 1] with the sup norm — a complete metric space — the set of continuous functions that are differentiable at any point is meagre. Equivalently, a dense Gδ of continuous functions are nowhere differentiable. The proof: for each pair (n, k), the set E_{n,k} = {f ∈ C[0, 1] : ∃ x with |(f(x + h) - f(x))/h| ≤ k for all |h| ≤ 1/n} is closed and has empty interior (any sup-close function can be perturbed by a sawtooth to violate the bound). The functions with a derivative at some point lie in ⋃_{k} ⋂_{n} E_{n,k}, a meagre set. So "most" continuous functions are nowhere differentiable in the Baire-category sense — Weierstrass's example (1872) is not pathological but typical.

Why does Baire fail for incomplete spaces like ℚ?

The rationals ℚ with the inherited metric are a countable metric space without isolated points, so each singleton {q} is closed with empty interior — that is, nowhere dense in ℚ. Therefore ℚ = ⋃_{q ∈ ℚ} {q} is a countable union of nowhere-dense sets, and ℚ is meagre in itself. This shows completeness is essential: in the same space without completeness, the conclusion fails dramatically. The classical formulation "Baire fails in incomplete spaces — ℚ is meagre in itself" is exactly this observation. Note that ℚ as a subspace of ℝ is meagre in ℝ as well; ℝ \ ℚ (the irrationals) is comeagre in ℝ and is itself a complete metric space under a non-standard metric (the one inherited from the Polish-space structure).