The Baire category theorem
Statement
Let \( (X,d) \) be a non-empty complete metric space. Then \(X\) is not a countable union of nowhere-dense subsets of \(X\); equivalently, if \( \{F_n\}_{n=1}^{\infty} \) is a countable family of closed sets with \( \operatorname{int}(F_n) = \emptyset \) for every \(n\), then \( \bigcup_{n=1}^{\infty} F_n \neq X \). Equivalently again (the "dense open" form used in analysis): if \( \{U_n\}_{n=1}^{\infty} \) is a countable family of dense open subsets of \(X\), then \( \bigcap_{n=1}^{\infty} U_n \) is dense in \(X\).
Why it matters
The theorem is a completeness statement in disguise: it converts "metric completeness" (a Cauchy-sequence property) into a purely topological statement about which sets can be "large" (comeagre / residual) versus "small" (meagre, a countable union of nowhere-dense sets). It is the engine behind almost every existence-without-construction argument in analysis: existence of continuous nowhere-differentiable functions, the uniform boundedness principle, the open mapping theorem, and the closed graph theorem in functional analysis all reduce to Baire category.
Conceptually it says that "most" points of a complete space avoid any fixed countable list of "thin" sets simultaneously — a quantifier-swap (countably many "almost everywhere" statements can be intersected) that has no counterpart for incomplete spaces or for uncountable unions.
Hypotheses
Proof
Result
Reading. You cannot cover a non-empty complete metric space by countably many "thin" (nowhere-dense) pieces; dually, countably many "generic" (dense open) conditions can be imposed simultaneously and the set of points satisfying all of them is still dense — indeed still large in the Baire-category sense.
Scope. Applies to any complete metric space: \(\mathbb{R}^n\), Banach and Hilbert spaces, complete function spaces such as \(C[a,b]\) with the sup metric, \(\ell^p\), and any closed subspace of these. It also holds more generally for locally compact Hausdorff spaces (a separate, non-metric proof via compactness), but the metric-space proof above specifically needs completeness, not just being Hausdorff or Tychonoff.
Corollaries & converses
- A non-empty complete metric space with no isolated points is uncountable (each singleton is nowhere dense, so the space cannot be the countable union of its points).
- A complete metric space is a Baire space: every comeagre (residual) set is dense; in particular no non-empty complete metric space is meagre in itself.
- If a complete metric space \(X = \bigcup_n F_n\) with each \(F_n\) closed, then at least one \(F_n\) has non-empty interior (this is the contrapositive form used constantly, e.g. in the proof of the uniform boundedness principle / Banach–Steinhaus theorem).
- Converse fails: being a Baire space does not imply metric completeness, nor does it imply a metric even exists. There exist incomplete metric spaces that are still Baire spaces — e.g. the irrationals \( \mathbb{P} = \mathbb{R}\setminus\mathbb{Q}\) with the subspace metric from \(\mathbb{R}\) are incomplete under that metric yet form a Baire space (in fact \( \mathbb{P}\) is homeomorphic to a complete metric space, \(\mathbb{N}^{\mathbb{N}}\), even though the inherited metric itself is not complete — completeness is not a topological invariant, but "being completely metrizable" is what actually transfers).
- Consequently the correct converse-type statement is: \(X\) is Baire whenever \(X\) is completely metrizable (admits some complete metric inducing its topology) or locally compact Hausdorff — completeness of the specific given metric is sufficient but not necessary.
Fails without
- Without completeness: \(\mathbb{Q}\) (usual metric) is a countable union of nowhere-dense singletons \( \{q\}_{q\in\mathbb{Q}} \) that exhausts \(\mathbb{Q}\); equivalently, \(U_n := \mathbb{Q}\setminus\{q_n\}\) is open and dense in \(\mathbb{Q}\) for an enumeration \((q_n)\) of \(\mathbb{Q}\), but \( \bigcap_n U_n = \emptyset\), not dense.
- Without countability of the family: in the complete space \(\mathbb{R}\), the uncountable family of open dense... fails differently — take instead \(\mathbb{R} = \bigcup_{x\in\mathbb{R}}\{x\}\): an uncountable union of nowhere-dense (closed, empty-interior) singletons equal to the whole space, so the "not expressible as a union of thin sets" conclusion is specific to countable unions.
- Without \(X \neq \emptyset\): the statement degenerates; the empty space is (vacuously and unhelpfully) the union of the empty family of nowhere-dense sets, so the theorem is conventionally stated for non-empty \(X\).
Common errors
- Confusing "measure zero" with "nowhere dense" / "meagre": a meagre set can have full Lebesgue measure (e.g. a countable union of shrinking open intervals around the rationals, arranged so the complement has measure zero but is itself meagre — a fat Cantor-type residual set) and a measure-zero set need not be meagre. Baire category and measure are independent notions of "smallness".
- Believing "nowhere dense" means "small" in a naive sense such as "countable" — nowhere-dense sets can be uncountable (e.g. the Cantor set in \(\mathbb{R}\)).
- Forgetting that closedness matters in the "\(F_n\) nowhere dense" formulation: a set with empty interior need not be nowhere dense unless you take its closure — e.g. \(\mathbb{Q}\) has empty interior in \(\mathbb{R}\) but is not nowhere dense because \(\overline{\mathbb{Q}} = \mathbb{R}\) has non-empty (indeed full) interior. The correct definition is \( \operatorname{int}(\overline{A}) = \emptyset\), not \( \operatorname{int}(A) = \emptyset\).
- Trying to apply the theorem to an incomplete space (e.g. an open interval with a metric under which it is not complete, or a dense proper subspace of a Banach space) without first checking or supplying completeness.
- Misreading the conclusion as "\( \bigcap U_n\) is open" — it is generally only a dense \(G_\delta\) (countable intersection of opens), which need not be open at all.
Discussion
Baire proved this in his 1899 thesis for \(\mathbb{R}^n\); the general complete-metric-space (and locally compact Hausdorff) versions came shortly after and now bear his name uniformly. The theorem sits at an unusual crossroads: its statement is purely topological (open, dense, closed, interior — no metric numbers appear in the conclusion), yet its proof for general spaces genuinely needs a metric (or at least a compatible uniform/Cauchy structure) to run the nested-ball, Cauchy-convergence argument. This is why "completely metrizable" — admitting some complete metric — rather than "complete with respect to a specific metric" is the topologically meaningful hypothesis.
The construction in the proof is a prototype of a wider technique sometimes called the "gliding hump" or gluing/diagonal argument: build a decreasing sequence of "commitments" (here, shrinking closed balls) that simultaneously satisfies countably many density requirements, one per stage, then pass to a limit using a completeness-type axiom. The same shape recurs in the construction of nowhere-differentiable continuous functions (Banach's genericity proof), in forcing arguments in set theory, and in the construction of generic filters.
Baire category gives an "existence without construction" method: to show some object with property \(P\) exists in a complete metric space \(X\), one shows the set of objects failing \(P\) is meagre, so its complement (objects with \(P\)) is comeagre, hence non-empty (indeed dense) by the theorem — without ever exhibiting one explicitly. The classical example is Banach's proof that "most" continuous functions on \([0,1]\) (comeagre in \(C[0,1]\)) are nowhere differentiable, without writing one down via a formula.
A subtlety worth flagging: the theorem as proved here uses the axiom of dependent choice (DC) at the countably-infinite recursive step of picking \((x_n,r_n)\); in ZF without any choice the Baire category theorem for general complete metric spaces can fail, though it holds unconditionally for separable complete metric spaces (where a fixed countable dense set removes the need for choice at each step). Common misconception: that the theorem asserts \( \bigcap_n U_n \neq X\) or gives a description of what is missing — it asserts only density, and \( \bigcap_n U_n\) can consistently be a "small" set in other senses (e.g. measure zero) while still being topologically large (dense, comeagre).
Worked examples
Reading. A property that individually seems rare (an infinite recurring pattern) is in fact topologically generic once phrased as a countable intersection of dense open conditions.
Reading. "Most" continuous functions, in the Baire-category sense, are nowhere differentiable; the smooth or piecewise-smooth functions one usually visualises are the exception, not the rule.
Problems
- Show directly (without citing Baire) that \(\mathbb{Q}\) cannot be written as a countable intersection of dense open subsets of \(\mathbb{R}\), i.e. \(\mathbb{Q}\) is not a dense \(G_\delta\) in \(\mathbb{R}\).
Solution
Suppose \(\mathbb{Q} = \bigcap_n U_n\) with each \(U_n\) open dense in \(\mathbb{R}\). Enumerate \(\mathbb{Q} = \{q_1,q_2,\dots\}\) and set \(V_n = \mathbb{R}\setminus\{q_n\}\), which is open and dense (removing a point from \(\mathbb{R}\) leaves a dense open set). Then \( \bigcap_n U_n \cap \bigcap_n V_n = \mathbb{Q} \cap (\mathbb{R}\setminus\mathbb{Q}) = \emptyset\). But the left side is a countable intersection of dense open sets in the complete space \(\mathbb{R}\), so by the Baire category theorem it must be dense, in particular non-empty — contradiction. Hence no such \((U_n)\) exists. - Let \(X\) be a complete metric space with no isolated points. Prove \(X\) is uncountable.
Solution
Suppose \(X = \{x_1,x_2,\dots\}\) is countable. Each singleton \(\{x_n\}\) is closed (metric spaces are \(T_1\)) and has empty interior, because \(x_n\) is not isolated (every ball around \(x_n\) contains other points, so \(\{x_n\}\) contains no ball). Thus each \(\{x_n\}\) is nowhere dense, and \(X = \bigcup_n \{x_n\}\) writes \(X\) as a countable union of nowhere-dense sets — contradicting the Baire category theorem (applicable since \(X\) is a non-empty complete metric space). Hence \(X\) is uncountable. - Let \(f_n : [0,1] \to \mathbb{R}\) be a sequence of continuous functions converging pointwise to a function \(f\). Using Baire category, show that \(f\) must be continuous on a dense subset of \([0,1]\) (in fact on a comeagre set). (You may use, without proof, that for a pointwise limit of continuous functions the sets \(E_{n} = \{x : \forall p,q \ge n,\ |f_p(x)-f_q(x)| \le \varepsilon\}\) are closed for fixed \(\varepsilon\gt0\), and \(\bigcup_n E_n = [0,1]\).)
Solution
Fix \(\varepsilon\gt0\). By hypothesis \([0,1] = \bigcup_n E_n\) with each \(E_n\) closed. Since \([0,1]\) is a non-empty complete metric space, the Baire category theorem (nowhere-dense form) forbids all \(E_n\) from having empty interior — so some \(E_{n_0}\) contains a non-empty open interval \(I\). On \(I\), the tail \((f_p)_{p\ge n_0}\) satisfies \(|f_p(x)-f_q(x)|\le\varepsilon\) for all \(p,q\ge n_0\) and all \(x \in I\): a uniform Cauchy-type bound, which forces the limit \(f\) restricted to \(I\) to be a uniform limit (up to \(\varepsilon\)) of continuous functions, hence "close to continuous" on \(I\). Carrying this out for a sequence \(\varepsilon = 1/k \to 0\) and intersecting the resulting dense open sets of continuity points (this is the standard oscillation argument: the set of continuity points of any pointwise limit of continuous functions is exactly \( \bigcap_k \{x : \operatorname{osc}_f(x) \lt 1/k\}\), each of which is open, and the argument above shows each is dense) and applying Baire again shows the continuity points of \(f\) form a dense \(G_\delta\), hence a dense (comeagre) set. - Let \((X,d)\) be complete and suppose \(X = A \cup B\) where \(A\) is meagre (a countable union of nowhere-dense sets). Show \(B\) is dense in every non-empty open subset of \(X\); in particular \(B\) is dense in \(X\).
Solution
Write \(A = \bigcup_n F_n\) with each \(F_n\) nowhere dense (WLOG closed, else replace \(F_n\) by its closure, which is still nowhere dense and only enlarges \(A\), so this WLOG is safe for the containment argument — actually to keep the argument clean, just note \(F_n \subseteq \overline{F_n}\) and \(\overline{F_n}\) is nowhere dense too, so \(A \subseteq \bigcup_n \overline{F_n} =: A'\), also meagre with closed pieces). Let \(W\) be any non-empty open subset of \(X\). If \(B \cap W = \emptyset\) then \(W \subseteq A \subseteq A'= \bigcup_n \overline{F_n}\), so \(W = \bigcup_n (W \cap \overline{F_n})\). But \(W\), as a non-empty open subset of the complete metric space \(X\), is itself of "second category in itself" by the Baire category theorem applied within \(W\) (which is an open, hence not-necessarily-complete, but Baire category theorem applies to \(X\) directly: the sets \(\overline{F_n}\) are closed nowhere dense in \(X\), and \(W \not\subseteq \bigcup_n \overline{F_n}\) by the theorem, since otherwise \(X = \bigcup_n \overline{F_n} \cup (X\setminus W)\) is not immediately a contradiction — instead argue directly: apply the theorem's proof restricted to building the nested balls inside \(W\), exactly as in Step 3 of the main proof, taking \(U_n = X\setminus \overline{F_n}\), dense open, and \(W\) as the starting open set) — we get \(D \cap W \neq \emptyset\) where \(D = \bigcap_n (X\setminus\overline{F_n}) = X \setminus A'\). Any point of \(D \cap W\) lies in \(W\) but not in \(A'\supseteq A\), so it lies in \(B \cap W\), contradicting \(B \cap W=\emptyset\). Hence \(B \cap W \neq \emptyset\) for every non-empty open \(W\), i.e. \(B\) is dense. - Give an example of a complete metric space \(X\) and a countable family of dense open sets \(U_n\) such that \( \bigcap_n U_n\) is dense but has empty interior and Lebesgue measure zero (illustrating that "comeagre" and "large measure" are independent notions).
Solution
Take \(X=\mathbb{R}\) (complete). Enumerate \(\mathbb{Q} = \{q_1,q_2,\dots\}\) and fix \(\varepsilon\gt0\). For each \(n\), let \(U_n = \mathbb{R}\setminus \{q_n\}\) intersected further with \(\bigcup_k (q_k - \varepsilon 2^{-k-n}, q_k+\varepsilon2^{-k-n})\)'s complement is not needed — simpler: instead directly define, for each \(n\), \(U_n = \bigcup_{k=1}^\infty \big(q_k - \varepsilon 2^{-k-n},\, q_k+\varepsilon 2^{-k-n}\big)\). Each \(U_n\) is open (union of open intervals) and dense (it contains an interval around every rational, and rationals are dense, so it meets every open set). Its Lebesgue measure is at most \(\sum_k 2\varepsilon 2^{-k-n} = \varepsilon 2^{1-n}\), which \(\to 0\) as \(n\to\infty\). By Baire, \(G:=\bigcap_n U_n\) is dense in \(\mathbb{R}\) (a dense \(G_\delta\)), yet \(G \subseteq U_n\) for every \(n\), so the outer measure of \(G\) is at most \(\varepsilon 2^{1-n}\) for every \(n\), forcing measure\((G)=0\); and \(G\) contains no interval (any interval would meet \(\mathbb{R}\setminus U_N\) for \(N\) large since \(U_N\) has arbitrarily small measure, so it cannot contain a fixed non-degenerate interval), so \(\operatorname{int}(G)=\emptyset\). Thus \(G\) is comeagre and dense yet has empty interior and measure zero.