Contents / Real Analysis / Metric Spaces & Topology
Chapter 7
Metric Spaces & Topology
Metrics, balls and the topology they generate; open and closed sets, closure, interior and boundary; compactness by open covers, Heine-Borel in R^n, and its equivalence with sequential compactness; completeness, Banach spaces and the completion construction; connectedness and path-connectedness with the topologist's sine curve; the Banach fixed point theorem with convergence rates and Picard-Lindelof; and the Baire category theorem with its generic consequences.
Introduction
Everything proved about so far leans on one thing: the absolute value , and the three facts that it is zero only when , that it is symmetric, and that it obeys . Nothing in the arguments for convergence, for continuity, for the Bolzano–Weierstrass theorem ever used that and were numbers. They used that there was a notion of how far apart two points are, and that going via a third point never shortens the trip.
This chapter takes that observation seriously. A metric space is a set together with a distance function obeying those three axioms and nothing else. The payoff is not generality for its own sake. It is that one proof, written once, then applies to the plane, to sequences, to the space of continuous functions on , to a graph with its shortest-path distance, and to a set of DNA strings with the Hamming distance — and that in the process we find out which of our familiar theorems were really theorems about distance and which were secretly theorems about .
The chapter has six movements. First the definition itself, together with the vocabulary — balls, convergence, continuity, Cauchy sequences — transplanted from with the absolute value replaced by . Then topology: open sets, closed sets, closure and interior, which package that vocabulary into statements that never mention at all. Then compactness, where the abstraction pays its first large dividend: in the Heine–Borel theorem says compact means closed and bounded, in a general metric space that is false, and what survives is the equivalence of open-cover compactness with sequential compactness. Then completeness, the property lacks and has, and the normed spaces built on it. Then connectedness, which makes precise the idea that an interval is all one piece. Finally two theorems that are the reason the whole apparatus was built: the Banach fixed point theorem, which turns "solve this equation" into "iterate this map", and the Baire category theorem, which says a complete space cannot be assembled from countably many thin pieces, and from which existence proofs for objects nobody can write down fall out almost for free.
Notation throughout: is a metric space, the open ball of radius about , and means in . Results about itself — the completeness axiom, the Bolzano–Weierstrass theorem, the Monotone convergence theorem — are taken from Sequences and Series of Real Numbers and used without reproof.
7.1Metrics: the axioms and what they already force
Definition 7.1 (Metric space). A metric on a set is a function such that for all :
- (Positivity) , with if and only if ;
- (Symmetry) ;
- (Triangle inequality) .
The pair is a metric space, and the elements of are called points.
Three axioms is a short list, and it is worth noticing what is not on it. There is no requirement that carry addition, or scalar multiplication, or an order. There is no requirement that distances be small, or that be infinite. A one-point set is a metric space. The axioms are also not independent of one another in the loose sense: non-negativity is redundant, and the following proposition shows why — it is already hiding inside the other two.
Proposition 7.2 (Non-negativity is forced). Suppose satisfies , symmetry, and the triangle inequality. Then automatically.
Proof. Fix and apply the triangle inequality with the middle point and endpoints and :
The left side is because , and the right side is by symmetry. Hence , so .∎
A second consequence of the axioms is used constantly and deserves a name. The triangle inequality bounds a distance from above; the reverse triangle inequality bounds the change in a distance from below, and it is what makes itself a continuous function.
Proposition 7.3 (Reverse triangle inequality). For all in a metric space,
Proof. By the triangle inequality routed through , , so
Now swap the roles of and : , so by symmetry. The two displayed inequalities say that and its negative are both at most , which is exactly the assertion that its absolute value is at most .∎
Read the statement as a Lipschitz estimate: moving the point by at most changes its distance to any fixed by at most . Distance is never more sensitive than the motion that causes it. This single inequality will do the work in half a dozen proofs below, so it is worth having in the hand rather than rederiving each time.
Now the examples, which are the real content of the definition — a definition with two examples is a definition nobody trusts.
Example 7.4 (The standard metrics on ). Verify that , and are all metrics on , and compute all three distances from to .
Solution.
- Positivity and symmetry are immediate for all three: each is built from the quantities , which are non-negative and symmetric, and each vanishes exactly when every coordinate difference vanishes, that is when .
- The triangle inequality for is coordinatewise: in , and summing over preserves the inequality.
- For , fix the index achieving the maximum on the left. Then , since each term is at most its own maximum.
- For the coordinatewise argument fails and the Minkowski inequality of Normed and Inner Product Spaces is needed; it gives , and applying it to , gives the claim.
- Numerically, with differences : , , .
- The ordering seen here is general in , and it is the first hint that these three metrics, while numerically different, may be interchangeable for topological purposes. The section Equivalent metrics and the discrete metric makes that precise.
Example 7.5 (Metrics that are not about arrows in space). Show that each of the following is a metric: (a) the discrete metric for and otherwise, on any set ; (b) the Hamming distance between binary strings of length , counting positions where they differ; (c) the sup metric on , the continuous real functions on .
Solution.
- (a) Positivity and symmetry are visible. For the triangle inequality, note the right side is only when and , hence when , in which case the left side is too. In every other case the right side is at least and the left side is at most .
- (b) Hamming distance is restricted to , since is exactly at a mismatching position. It inherits the axioms.
- (c) The supremum is finite because a continuous function on a closed bounded interval is bounded, by the Extreme value theorem. It is zero exactly when pointwise. For the triangle inequality, fix : , and taking the supremum over on the left preserves the bound because the right side does not depend on .
- The point of (c) is that a function is now a single point of a metric space, and two functions are close when their graphs are uniformly close. Sequences of functions become sequences of points, and uniform convergence becomes convergence in a metric — which is what makes the whole theory of this chapter available to analysis of functions.
Remark. Dropping an axiom gives a named weaker object rather than nonsense. Allowing for distinct points gives a pseudometric (useful when you intend to identify points at distance zero). Dropping symmetry gives a quasimetric, of which "driving time between two addresses in a city with one-way streets" is the honest everyday example. Allowing gives an extended metric. All are studied; none is what "metric" means here.
7.2Balls, and the topology they generate
Once distances exist, the basic geometric object is the set of points within a given distance of a centre. Everything topological in this chapter is ultimately phrased in terms of these sets.
Definition 7.6 (Open and closed balls, spheres). For and , the open ball, closed ball and sphere of radius about are
The word "ball" is a picture drawn from with the Euclidean metric, and the picture misleads more often than it helps. In with the unit ball is a diamond; with it is a square; in the discrete metric is a single point while is everything, so a ball can have empty interior in the naive sense or be the whole space, and there is nothing in between. In a subspace of such as , the ball is the half-open interval , which has an "edge" at only because the rest of is not there. Balls are defined by an inequality, not by a shape.
Theorem 7.8 (Open balls are open). Let be a metric space, and . For every there is with .
Proof. Let , so , and set . Let , so . By the triangle inequality,
so . As was arbitrary, .∎
This is the single most-used computation in the chapter, and it deserves to be understood rather than memorised: the radius you are allowed to use at is exactly the distance from to the edge, , and the triangle inequality is what converts " is not at the edge" into "a whole ball around is inside".
Definition 7.10 (The metric topology). A set is open if for every there exists with . The collection of all open sets is the topology induced by , written .
With this language the theorem Open balls are open says precisely that every open ball belongs to — which is why the name is not a tautology. The open sets are exactly the sets that are unions of open balls, and that reformulation is worth recording.
Proposition 7.11 (Open sets are unions of balls). is open if and only if is a union of open balls.
Proof. () If is open, choose for each a radius with . Then , and the reverse inclusion holds because each lies in its own ball . So is that union.
() Suppose and let . Then for some , and by the theorem Open balls are open there is with .∎
Pitfall. The closure of need not equal . In the discrete metric on a set with at least two points, is already closed, so its closure is , while . In with the Euclidean metric the two do coincide, which is exactly why the false statement survives so long unchallenged.
7.3Convergence, continuity and Cauchy sequences
Every definition in this section is the corresponding definition from with replaced by . That is the whole idea, and the interest lies in which theorems survive the translation and which do not.
Definition 7.12 (Convergence in a metric space). A sequence in converges to if for every there is with for all ; equivalently, if the real sequence converges to . We write .
Proposition 7.13 (Limits are unique). A sequence in a metric space has at most one limit.
Proof. Suppose and . For any choose beyond which both and . Then for such ,
So the non-negative number is smaller than every positive , forcing and hence by positivity.∎
Uniqueness of limits is exactly where the axiom " " is spent. In a pseudometric space, where that implication is dropped, limits are unique only up to distance zero — which is the technical reason pseudometric spaces are usually quotiented before use.
Definition 7.14 (Continuity at a point). Let and be metric spaces. A map is continuous at if for every there is such that
It is continuous if it is continuous at every point, and uniformly continuous if may be chosen depending on alone.
Theorem 7.15 (Sequential characterisation of continuity). is continuous at if and only if in for every sequence in .
Proof. () Suppose is continuous at and . Given , pick from continuity, then with for . For those , . Hence .
() We prove the contrapositive. If is not continuous at , there is some for which no works. In particular fails for each , so there is a point with
The first condition gives ; the second says . So the sequential condition fails as well.∎
The backward direction is the one that carries content, and its engine is the freedom to choose a countable sequence of candidate 's, namely . That is available because the metric takes real values; in a general topological space it is not, and the sequential characterisation of continuity genuinely fails there. Metric spaces are, in the standard terminology, first countable, and this proof is what that buys.
Definition 7.16 (Cauchy sequence). A sequence in is Cauchy if for every there is such that for all .
Proposition 7.17 (Convergent implies Cauchy, and Cauchy implies bounded). Every convergent sequence is Cauchy, and every Cauchy sequence is bounded — that is, contained in some ball.
Proof. If , given choose with for . For , .
For boundedness, take in the Cauchy condition and get with for all . Put , a maximum over finitely many numbers. Then for every , so the whole sequence lies in .∎
The converse of the first statement is false in general, and its failure is the subject of the completeness sections below: in the decimal truncations of form a Cauchy sequence with no limit in . Notice what the difference is. Convergence mentions a limit point and so can fail because the space is missing that point; the Cauchy condition mentions only the sequence's own terms and so cannot detect the absence.
Example 7.18 (A continuous map and a sequence, in the sup metric). In with the sup metric let and let be . Show is continuous, decide whether converges in this metric, and compute .
Solution.
- For , , since the integrand is bounded by the sup at every point and the interval has length .
- So works for every and every : is not merely continuous but uniformly continuous, indeed Lipschitz with constant .
- Pointwise, for and , so the pointwise limit is discontinuous and cannot be the sup-metric limit, since that limit would have to be an element of and would have to agree with the pointwise limit.
- Directly: for every , so does not converge to ; and at shows the sequence is not Cauchy either. It converges to nothing.
- Finally , which does tend to . Continuity of is not contradicted: carries convergent sequences to convergent ones, and says nothing about a sequence that fails to converge.
7.4Equivalent metrics and the discrete metric
Two different metrics on the same set may generate the same open sets, in which case every topological statement — convergence, continuity, compactness, connectedness — holds for one exactly when it holds for the other, even though the numerical distances differ.
Definition 7.19 (Topologically and strongly equivalent metrics). Metrics and on are topologically equivalent if . They are strongly (or Lipschitz) equivalent if there are constants with
Proposition 7.20 (Strong equivalence implies topological equivalence). If with , then and induce the same topology; the converse fails.
Proof. Let and , so for some . If then , so and . Symmetrically, if then , giving , so .
For the failure of the converse take , and . Since whenever , every -ball of radius under is a -ball and conversely, so the topologies agree; but is bounded by while is not, so no constant can satisfy globally.∎
Corollary 7.21 (All -metrics on agree topologically). On the metrics , and are strongly equivalent, hence induce the same open sets, the same convergent sequences and the same continuous functions.
Proof. For any , each is at most and at least nothing, so summing gives . Also , so ; and since the cross terms are non-negative, so . Chaining,
Applying this to gives strong equivalence of each pair with constants depending only on , and the theorem Strong equivalence implies topological equivalence finishes.∎
The discrete metric is the standard source of counterexamples in this chapter, because it makes everything open and thereby breaks every theorem whose proof secretly used that balls shrink.
Proposition 7.22 (The discrete metric, catalogued). Let carry the discrete metric . Then every subset of is both open and closed; a sequence converges if and only if it is eventually constant; every map out of into any metric space is continuous; is complete; and is compact if and only if is finite.
Proof. For any , , so every singleton is open and hence every set, as a union of singletons, is open; complements of open sets are then also open, so every set is closed too.
If then eventually , which in this metric forces , i.e. ; the converse is clear. Continuity of any follows from the theorem Sequential characterisation of continuity, since an eventually constant sequence has eventually constant image.
A Cauchy sequence satisfies for large , hence is eventually constant, hence converges; so is complete. Finally is an open cover with no proper subcover, so a finite subcover exists exactly when itself is finite; and a finite metric space is compact because any cover of it has a finite subcover trivially.∎
Example 7.23 (Bounded and closed but not compact). In an infinite set with the discrete metric, show that is closed and bounded but not compact, and reconcile this with the Heine–Borel theorem.
Solution.
- is closed in itself, always and in any space, since its complement is open.
- is bounded: for any chosen , because every distance is at most .
- is not compact by the proposition The discrete metric, catalogued, since is infinite.
- There is no contradiction, because the Heine–Borel theorem is a statement about with the Euclidean metric and not about metric spaces in general. Its proof will use the completeness of and the fact that a bounded set in sits inside a box that can be bisected — neither available here. "Closed and bounded implies compact" is a theorem about , not a definition of compactness, and this example is the standard reminder.
7.5Open sets: the three axioms they satisfy
The definition The metric topology declared which sets are open. The next theorem says that the family of open sets is closed under exactly two operations, and it is the whole reason the word "topology" exists: one may forget entirely and keep only this family.
Theorem 7.24 (The open sets form a topology). In a metric space :
- and are open;
- an arbitrary union of open sets is open;
- the intersection of finitely many open sets is open.
Proof. (1) The condition on is vacuous — there is no point at which to check it. For , any radius works, since every ball is contained in .
(2) Let with each open, and let . Then for some , so there is with .
(3) Let with each open and let . For each pick with , and set . This is a minimum of finitely many positive numbers, hence positive, and for every , so .∎
The word "finitely" in (3) is not a limitation of the proof; it is a fact about the world. An infinite family supplies infinitely many radii, whose infimum can be , and then no ball survives.
Example 7.25 (An infinite intersection of open sets that is not open). In compute and , and say which are open.
Solution.
- A real lies in every precisely when for all , that is when , by the Archimedean property. So the first intersection is .
- is not open in : every ball around contains .
- For the second, lies in every exactly when and , so the intersection is , again not open — no ball about fits inside.
- Both examples show the same mechanism: the sets shrink to a limit that includes its own boundary, and the minimum of the available radii degenerates to zero. The finiteness in the theorem The open sets form a topology is exactly what forbids that degeneration.
Remark. Openness is not intrinsic to a set; it is relative to the ambient space. The interval is not open in , but it is open in the metric space , where it equals . When two spaces are in play, say "open in " and mean it. This relative notion is the subspace topology: the open sets of are exactly the sets with open in .
7.6Closed sets and the sequential test
Definition 7.26 (Closed set). is closed if its complement is open.
Theorem 7.27 (Sequential characterisation of closed sets). is closed if and only if the limit of every convergent sequence of points of lies in .
Proof. () Let be closed, with , and suppose for contradiction . Then lies in the open set , so for some . But for large , putting some in — contradicting .
() Suppose contains all its sequential limits and suppose is not open. Then there is such that no ball about lies in ; in particular for each the ball meets , say at . Then , so with every , and the hypothesis forces — a contradiction. Hence is open.∎
This is the workhorse criterion. To prove a set closed one almost never returns to complements; one takes a convergent sequence inside it and shows the limit stays. The proof of the backward direction again exploits the radii , and again that is metric-specific.
Corollary 7.28 (Closed balls and spheres are closed). and are closed in any metric space.
Proof. Let with . By the proposition Reverse triangle inequality, , so . Each , and a limit of a sequence of reals bounded by is bounded by , so and . Apply the theorem Sequential characterisation of closed sets. The same argument with in place of handles .∎
Proposition 7.29 (De Morgan for closed sets). Arbitrary intersections and finite unions of closed sets are closed; and are closed.
Proof. Complement the theorem The open sets form a topology using De Morgan's laws: is a union of open sets, hence open; and is a finite intersection of open sets, hence open.∎
Pitfall. "Closed" is not "not open". In the set is neither; the sets and are both; and in the discrete metric every set is both. A door is open or shut; a set is not a door.
Example 7.30 (An infinite union of closed sets that is not closed). Show in , and explain which hypothesis fails.
Solution.
- Each is closed, and each is a subset of , so the union is contained in .
- Conversely if then by the Archimedean property there is with , so .
- The union is , which is not closed: the sequence lies in it and converges to .
- The failing hypothesis is finiteness in the proposition De Morgan for closed sets: only finite unions of closed sets are guaranteed closed, mirroring the finite intersections of open sets exactly.
7.7Closure, interior and boundary
Given an arbitrary set, there is a largest open set inside it and a smallest closed set containing it. These two operations, and the difference between them, organise most of point-set topology.
Definition 7.31 (Interior, closure, boundary). For ,
and the boundary is . By the theorem The open sets form a topology and the proposition De Morgan for closed sets, is open and is closed; so is the largest open subset of and the smallest closed superset.
Theorem 7.32 (Pointwise descriptions). For and :
- if and only if for some ;
- if and only if for every ;
- if and only if for some sequence in ;
- if and only if every ball about meets both and .
Proof. (1) If then is an open subset of by the theorem Open balls are open, so it lies in the union defining and contains . Conversely if then lies in some open , which supplies a ball.
(2) Suppose some ball misses . Then is closed and contains , so , and , hence . Conversely suppose . Then lies in the open set , which supplies a ball , missing .
(3) Given (2), if choose ; then . Conversely if with , every ball about contains some , so (2) applies.
(4) means and . By (2) the first says every ball meets ; by (1) the second says no ball is contained in , i.e. every ball meets .∎
Proposition 7.33 (Duality of interior and closure). For every , and .
Proof. By part (2) of the theorem Pointwise descriptions, iff every ball about meets , which by part (1) is exactly the failure of . The second identity is the first applied to in place of .∎
Example 7.34 (Closure, interior and boundary of and of a disc). Compute , and for (a) ; (b) Euclidean; (c) .
Solution.
- (a) Every interval contains both rationals and irrationals, by density of each in . So every ball meets , giving ; no ball lies inside , giving ; hence . A set can have empty interior and full closure — "thin" and "everywhere" are compatible.
- (b) is open so . Its closure is the closed disc : any with is the limit of . So is the unit circle, and has empty interior.
- (c) No ball lies in since is countable and balls are not, so . The only new limit point is , so and .
- Note in (b) that is "small" and in (a) that is everything. Boundary means "touches both sides", not "thin edge".
Proposition 7.35 (Closure adds nothing the second time). and , and is closed iff , open iff .
Proof. is closed, and the smallest closed set containing a closed set is itself; likewise is open. If then is closed as is; conversely if is closed it is one of the sets intersected in the definition, so . The open case is dual.∎
7.8Limit points, isolated points, dense sets
The closure of consists of points of together with points approached by . Separating those two kinds is the business of this section.
Definition 7.36 (Limit point, isolated point, dense set). is a limit point (or accumulation point) of if every ball contains a point of other than . The set of limit points is the derived set . A point that is not a limit point of is isolated: some ball meets only in . A set is dense if , and is separable if it has a countable dense subset.
Proposition 7.37 (Closure splits into the set and its limit points). , and consequently is closed if and only if .
Proof. If then trivially, and if every ball meets , so by the theorem Pointwise descriptions. Conversely let and ; every ball about meets , and the meeting point is not since , so . The consequence follows from the proposition Closure adds nothing the second time: closed iff iff .∎
Proposition 7.38 (A limit point is approached infinitely often). If is a limit point of , then every ball about contains infinitely many points of . Hence a finite set has no limit points.
Proof. Suppose some met in only finitely many points . Put , a minimum of finitely many positive numbers. Then contains no point of except possibly itself, contradicting that .∎
Example 7.39 (Sorting the points of some familiar sets). For each set, find the limit points and the isolated points: (a) ; (b) ; (c) ; (d) any in a discrete space.
Solution.
- (a) and every point of is isolated: around the ball of radius meets only at . So has one limit point, which is not in — hence is not closed.
- (b) ; every integer is isolated, since . A set with no limit points is closed by the proposition Closure splits into the set and its limit points, and indeed is closed.
- (c) and no rational is isolated: every interval around a rational contains other rationals.
- (d) In the discrete metric , so no point is a limit point of anything: always, and every point of every set is isolated. This is the extreme case, and it matches the fact that every set there is closed.
Proposition 7.40 ( is separable). is a countable dense subset of .
Proof. is countable as a finite product of countable sets, by the results of Cardinality and Countability. Given and , choose for each coordinate a rational with , possible by density of in . Then , so . Every ball meets , so .∎
Separability is a smallness condition that most spaces of interest satisfy — is separable, by the Weierstrass approximation theorem, with the polynomials of rational coefficients as the countable dense set — and an uncountable discrete space is the standard space that is not.
7.9Compactness by open covers
Compactness is the property that lets a local hypothesis be upgraded to a global conclusion. The definition looks strange on first reading because it quantifies over all covers, and it is worth saying immediately what it is for: a statement true near each point of a compact set holds uniformly across the set, because finitely many neighbourhoods already do the job and a finite list has a minimum.
Intuition. Compactness is a finiteness licence. You are handed an infinite amount of local information — one neighbourhood per point, each guaranteeing something only nearby — and compactness says a finite sublist already covers everything. Finiteness is what lets you take a minimum of the 's, a maximum of the bounds, a worst case over the list. Every proof in this section is that one move.
Definition 7.41 (Open cover, compactness). A family of open sets is an open cover of if . The set is compact if every open cover of admits a finite subcover: there are with .
Two remarks on the logic, because misreading it is the usual first error. The definition demands a finite subcover for every cover; exhibiting one cover with a finite subcover proves nothing. And the subcover must be drawn from the given family, not replaced by some other finite family of open sets.
Proposition 7.42 (Compact implies closed and bounded). A compact subset of a metric space is closed and bounded.
Proof. Bounded. Fix . The balls are open and cover , hence . A finite subcover is contained in the largest of its members, so for some .
Closed. Let . For each put . The balls cover , so finitely many suffice: . Set . If lay in , it would lie in some , and then
a contradiction. So , and is open.∎
The converse of this proposition is false in a general metric space — the example Bounded and closed but not compact settles that — and the two sections that follow identify the extra input that makes it true in and the correct general replacement.
Proposition 7.43 (A closed subset of a compact set is compact). If is compact and is closed in , then is compact.
Proof. Let be an open cover of . Adjoining the open set gives an open cover of , since every point of is either in , hence in some , or outside , hence in . Extract a finite subcover of ; discard from it if present. The remaining finitely many still cover , because contains no point of .∎
Example 7.44 (A cover with no finite subcover). Show directly that is not compact in , and that is not covered by finitely many members of the same family.
Solution.
- Take for . Each is open, and their union is , since any exceeds for some .
- Any finite subfamily has union where , because the sets are nested increasing.
- The point is missed. So no finite subfamily covers , and is not compact.
- Consistency check with the proposition Compact implies closed and bounded: is bounded but not closed, so the conclusion was unavailable anyway. The same family also fails to cover at all — no contains — which is not a counterexample to compactness of but a reminder that a "cover" must genuinely cover.
7.10The Heine–Borel theorem in
Theorem 7.45 (Heine–Borel). A subset is compact if and only if it is closed and bounded.
Proof. () This is the proposition Compact implies closed and bounded, valid in any metric space.
() By the proposition A closed subset of a compact set is compact it suffices to prove that a closed box is compact, since a bounded lies in such a box and is closed in it.
Suppose some open cover of has no finite subcover. Bisect each edge of , splitting it into closed sub-boxes. If every sub-box had a finite subcover, their union — finitely many finite families — would be a finite subcover of . So at least one sub-box has none. Repeat, obtaining nested boxes
none admitting a finite subcover, with .
For each coordinate , the -th edges form a nested sequence of closed intervals in , so by the Nested interval property — itself a consequence of the completeness axiom — their intersection is non-empty. Choosing one point in each coordinate gives .
Now , so for some , and open gives . Choose with . Since , every point of is within of , so . But then the single set is a finite subcover of — contradicting the construction. Hence no such cover exists and is compact.∎
Track where the hypotheses were spent. Boundedness put inside a box, which is what made bisection possible; closedness transferred compactness from the box down to ; and the completeness of produced the point in the nested intersection. Remove completeness and the theorem dies: in , the set is closed and bounded and not compact, because the nested boxes close in on an irrational that is simply not there.
Corollary 7.46 (Extreme value theorem). A continuous real-valued function on a non-empty compact set attains a maximum and a minimum.
Proof. By the theorem Continuous images of compact sets are compact below, is compact, hence closed and bounded by Heine–Borel. Bounded and non-empty gives a finite supremum ; by the theorem Pointwise descriptions, , so for some . Apply the same to for the minimum.∎
Example 7.47 (Deciding compactness in ). Which of these are compact in ? (a) the unit circle ; (b) the closed disc minus its centre; (c) ; (d) .
Solution.
- (a) Closed as a sphere, by the corollary Closed balls and spheres are closed, and bounded inside : compact.
- (b) Bounded, but not closed — the points lie in it and converge to the missing centre. Not compact.
- (c) Closed, as the preimage of under the continuous map , but unbounded, containing for all large . Not compact.
- (d) A closed filled ellipse: closed as the preimage of under a continuous function, and bounded since and force . Compact.
- The recipe in is always the same two checks, and by Heine–Borel it is complete. Resist importing it into a general metric space.
7.11Sequential compactness and total boundedness
In a general metric space "closed and bounded" is too weak. The right strengthening of boundedness is that the space can be covered by finitely many balls of any prescribed radius.
Definition 7.48 (Sequential compactness, total boundedness). is sequentially compact if every sequence in has a subsequence converging to a point of . It is totally bounded if for every finitely many balls of radius cover .
Totally bounded is strictly stronger than bounded: an infinite discrete space is bounded but cannot be covered by finitely many balls of radius , each of which is a single point. That gap is exactly what "closed and bounded" was missing.
Theorem 7.49 (Compactness equals sequential compactness in a metric space). For in a metric space, is compact if and only if is sequentially compact.
Proof. () Let be compact and a sequence in with no subsequential limit in . Then no is a limit of a subsequence, so for each there is with containing for only finitely many indices — otherwise the indices with would be infinite for every and a subsequence converging to could be chosen. The balls cover ; take a finite subcover . Each contains only finitely many terms, so their union contains only finitely many — yet it contains all of them. Contradiction, since is infinite.
() Let be sequentially compact.
Step 1: is totally bounded. If not, there is such that no finite family of -balls covers . Pick ; having chosen , the balls do not cover , so pick outside them. Then for , so no subsequence is Cauchy, hence none converges — contradicting sequential compactness.
Step 2: every open cover has a Lebesgue number. Claim: for an open cover of there is such that every ball with lies inside a single . If not, for each there is with contained in no . Pass to a subsequence . Then for some , and for some . Choose with and . For , , so — contradiction.
Step 3: conclude. Given an open cover, take its Lebesgue number and, by Step 1, cover by finitely many balls with . Each sits inside some , and then is a finite subcover.∎
Corollary 7.50 (Compact equals complete plus totally bounded). A metric space is compact if and only if it is complete and totally bounded.
Proof. If is compact it is totally bounded by Step 1 of the proof above, and complete: a Cauchy sequence has a convergent subsequence by the theorem Compactness equals sequential compactness in a metric space, and a Cauchy sequence with a convergent subsequence converges, since makes both terms small. Conversely, given a sequence in a complete totally bounded space, cover by finitely many balls of radius ; one contains infinitely many terms. Inside it, cover by finitely many balls of radius , and so on. A diagonal choice produces a subsequence whose terms eventually lie within of one another, hence Cauchy, hence convergent by completeness. So is sequentially compact, hence compact.∎
This corollary is the correct generalisation of Heine–Borel, and it explains Heine–Borel: in , completeness is automatic and bounded already implies totally bounded, because a bounded set fits in a box and a box is cut into finitely many small boxes. In neither simplification holds, and the closed unit ball there is famously not compact.
7.12What compactness buys
Theorem 7.51 (Continuous images of compact sets are compact). If is continuous and is compact, then is compact.
Proof. Let be an open cover of in . For each put , which is open in : if then , so for some , and continuity supplies with , i.e. .
The cover , since each has in some . Compactness yields , and applying ,
Theorem 7.52 (Heine–Cantor: continuity on a compact set is uniform). A continuous map on a compact metric space is uniformly continuous.
Proof. Fix . For each continuity gives with whenever . The balls cover ; take a finite subcover indexed by and put .
Let . Then for some , and . So both and are within of , whence
The depends only on .∎
Corollary 7.53 (A continuous bijection off a compact set is a homeomorphism). If is a continuous bijection and is compact, then is continuous.
Proof. It suffices that carry closed sets to closed sets, since . Let be closed. Then is compact by the proposition A closed subset of a compact set is compact, so is compact by the theorem Continuous images of compact sets are compact, hence closed by the proposition Compact implies closed and bounded.∎
Example 7.54 (Where compactness is doing the work). Show that is uniformly continuous on but not on , and find the largest that works for on .
Solution.
- is compact by Heine–Borel and is continuous, so uniform continuity is automatic by the theorem Heine–Cantor.
- On take and . Then but , so no works for .
- Quantitatively on : , so suffices; for that gives .
- The contrast is exactly the failure of compactness: on the unbounded ray the local Lipschitz constant is unbounded, and there is no finite subcover to take a minimum over.
7.13Completeness: definition and examples
The proposition Convergent implies Cauchy, and Cauchy implies bounded left one implication open. Spaces in which it closes are the ones in which analysis works.
Definition 7.55 (Complete metric space). is complete if every Cauchy sequence in converges to a point of .
Completeness is a property of the pair , not of the topology: the proposition Strong equivalence implies topological equivalence gave two topologically equivalent metrics, and the space carries a metric equivalent to the usual one under which it is complete, even though with is not. Completeness is a metric notion, and this is the standard warning against treating it as a topological one.
Theorem 7.56 ( is complete). Every Cauchy sequence of real numbers converges.
Proof. Let be Cauchy. It is bounded, by the proposition Convergent implies Cauchy, and Cauchy implies bounded. By the Bolzano–Weierstrass theorem it has a convergent subsequence . Given , choose with for , and choose with and . Then for every ,
Proposition 7.57 (Completeness passes to and to closed subsets). is complete, and a subset of a complete metric space is complete (as a space in its own right) if and only if is closed in .
Proof. For : if is Cauchy then each coordinate sequence is Cauchy, since . Each converges by the theorem is complete, to some , and then as a finite sum of null sequences.
For the second claim. If is closed and is Cauchy, it converges in by completeness and its limit lies in by the theorem Sequential characterisation of closed sets. Conversely if is complete and with , then is Cauchy, so it converges in ; limits are unique by the proposition Limits are unique, so and is closed.∎
Example 7.58 (Three incomplete spaces, and what is missing). Exhibit a non-convergent Cauchy sequence in (a) ; (b) with the usual metric; (c) with the metric .
Solution.
- (a) Let be the decimal expansion of truncated to places. Then , so the sequence is Cauchy in ; its only possible limit in is , which is irrational, so by uniqueness of limits it has no limit in .
- (b) is Cauchy and converges in to . By the proposition Completeness passes to and to closed subsets this had to happen: is not closed in .
- (c) Let be on , on , linear between. Then , so the sequence is Cauchy, but any -limit would have to agree almost everywhere with the step function jumping at , which no continuous function does.
- The moral of (c) is that the same set is complete in the sup metric (proved below) and incomplete in the metric. Completeness is about , not about .
Theorem 7.59 ( with the sup metric is complete). The space with is complete.
Proof. Let be Cauchy. For each fixed , , so is Cauchy in and converges; call the limit .
The convergence is uniform: given take with for ; fixing and letting in gives for every , hence .
Finally is continuous, by the theorem A uniform limit of continuous functions is continuous of Sequences and Series of Functions. So and in the metric.∎
7.14Banach spaces
Most metric spaces in analysis come from a norm, and the extra linear structure makes series available.
Definition 7.60 (Norm, normed space, Banach space). A norm on a real vector space is a map with , , and . It induces the metric . A Banach space is a normed space complete in that metric.
Proposition 7.61 (The induced metric is a metric, and is translation invariant). is a metric satisfying and .
Proof. iff iff . Symmetry: . Triangle: . The two invariances are immediate from and with homogeneity.∎
Translation invariance is the property a general metric lacks, and it is why in a normed space one may always reduce a question about the ball to the same question about . The discrete metric on is not induced by any norm, since .
Theorem 7.62 (Completeness by absolutely convergent series). A normed space is complete if and only if every series with converges in .
Proof. () Let and . For , , which is small for large because the tail of a convergent series of non-negative reals tends to . So is Cauchy and converges.
() Let be Cauchy. Choose with for all . Put and , so and . By hypothesis the series converges, and its -th partial sum telescopes to , so the subsequence converges. A Cauchy sequence with a convergent subsequence converges, as in the corollary Compact equals complete plus totally bounded.∎
Example 7.63 (Which of these are Banach?). Decide completeness for (a) with ; (b) with ; (c) the polynomials with ; (d) , bounded real sequences with .
Solution.
- (a) Complete by the proposition Completeness passes to and to closed subsets.
- (b) Complete by the theorem with the sup metric is complete.
- (c) Not complete. The partial sums of are polynomials forming a Cauchy sequence in whose limit is not a polynomial. Equivalently, is dense in by the Weierstrass approximation theorem and , so is not closed and the proposition Completeness passes to and to closed subsets applies.
- (d) Complete, by the argument of the theorem with the sup metric is complete with the index in place of the variable ; there is no continuity to check at the end, so the proof is shorter.
7.15Completion of a metric space
is incomplete and repairs it. That repair is a general construction, and it works with no properties of beyond being a metric space.
Definition 7.64 (Isometry and completion). A map between metric spaces is an isometry if for all . A completion of is a complete metric space together with an isometry whose image is dense in .
Theorem 7.65 (Every metric space has a completion, unique up to isometry). Every metric space admits a completion, and any two completions of are related by a surjective isometry fixing .
Proof. Construction. Let be the set of Cauchy sequences in and declare when . This is an equivalence relation, transitivity following from . Let and set
The limit exists because by two applications of the proposition Reverse triangle inequality, making the real sequence Cauchy; and it is unchanged by replacing either sequence with an equivalent one, by the same estimate. Positivity of holds by the definition of , and symmetry and the triangle inequality pass to the limit.
Embedding. Send to the class of the constant sequence. Then , so is an isometry. Its image is dense: given and , choose with for ; then .
Completeness. Let be Cauchy in . By density pick with . Then is Cauchy, hence so is in since is an isometry, and satisfies .
Uniqueness. If and are two completions, define on the dense set by . It is an isometry there, so it is uniformly continuous and extends to all of by taking limits of Cauchy sequences, the limits existing by completeness of . The extension is still an isometry, since is continuous, and its image is a complete, hence closed, set containing the dense set , so it is all of .∎
Applied to this construction is the Cauchy-sequence construction of . Applied to with the metric it produces the Lebesgue space , which is the honest answer to why Lebesgue integration is needed: the completion exists abstractly, and Lebesgue theory identifies its elements as functions rather than as equivalence classes of sequences.
Remark. Completion never adds anything that was not already being approached. If is already complete, every Cauchy sequence converges, so every class contains a constant sequence and is onto: . The construction is idempotent, as any decent repair should be.
7.16Baire category: a first look
Completeness has a consequence that is not about limits of particular sequences at all, but about how a complete space can be decomposed.
Definition 7.66 (Nowhere dense). is nowhere dense if has empty interior: . Equivalently, every ball contains a sub-ball missing .
The equivalence is worth spelling out, since it is the form used in proofs: says no ball is contained in , so every ball meets , which is open, and therefore contains a ball disjoint from and a fortiori from .
Theorem 7.67 (Baire category theorem, preliminary form). A non-empty complete metric space is not the union of countably many nowhere dense sets.
The full statement and its proof occupy the last movement of this chapter; the point of stating it here is that it is a theorem about completeness, provable from nothing else, and that it is the reason completeness matters beyond the ability to take limits.
Example 7.68 ( is meagre in itself). Show that is a countable union of nowhere dense subsets of , and say what this proves.
Solution.
- Enumerate , possible since is countable, and write .
- Each singleton is closed, and it has empty interior in because every interval of rationals contains more than one rational. So each is nowhere dense in .
- By the theorem Baire category theorem, preliminary form, with the usual metric therefore cannot be complete — which we knew independently from the example Three incomplete spaces, and what is missing, but now as a corollary of a structural theorem rather than by exhibiting .
- Contrast : singletons are nowhere dense there too, so this argument shows is uncountable. That proof of uncountability uses no decimal expansions and no diagonal argument.
7.17Connectedness
"All one piece" is made precise by the impossibility of splitting, and the definition is phrased negatively for a reason: there is no positive way to say a set cannot be cut.
Definition 7.69 (Connected space, separation). A metric space is disconnected if there exist non-empty open sets with and ; such a pair is a separation. is connected if no separation exists. A subset is connected if it is connected as a space in the subspace metric.
Proposition 7.70 (Equivalent formulations). For a metric space the following are equivalent: (i) is connected; (ii) the only subsets of that are both open and closed are and ; (iii) every continuous , the latter discrete, is constant.
Proof. (i) (ii): if is open, closed and proper and non-empty, then is a separation.
(ii) (iii): is open, since is open in the discrete space and preimages of open sets under continuous maps are open — proved inside the theorem Continuous images of compact sets are compact. Its complement is open for the same reason, so is also closed, hence or , and is constant.
(iii) (i): given a separation , the function equal to on and on is continuous — each preimage is , , or , all open — and non-constant, since both and are non-empty.∎
Theorem 7.71 (Continuous images of connected sets are connected). If is continuous and is connected, then is connected.
Proof. Use criterion (iii) of the proposition Equivalent formulations. Let be continuous. Then is continuous as a composition, hence constant since is connected. As is onto , takes only that one value on , so is constant and is connected.∎
Proposition 7.72 (Unions with a common point). If are connected subsets of with , then is connected.
Proof. Fix in the common intersection and let be continuous. Its restriction to each is continuous, hence constant, and that constant equals because . So on the union, which is therefore connected by the proposition Equivalent formulations.∎
7.18Connected subsets of are exactly the intervals
Definition 7.73 (Interval). is an interval if and imply . This includes , singletons, and the unbounded and half-open cases.
Theorem 7.74 (Connected subsets of ). is connected if and only if is an interval.
Proof. () Suppose is not an interval: there are with and . Then and are open in , disjoint, non-empty (they contain and ), and their union is because . That is a separation.
() Let be an interval and suppose is a separation. Pick , , and assume ; then . Let
which exists by the completeness axiom and lies in , so or .
If , then open in gives an interval ; since (as ), points just to the right of lie in , contradicting that is an upper bound.
If , then open gives , so no point of lies in ; but is a supremum of a set of points of , so some point of lies in . Contradiction either way, so no separation exists.∎
Corollary 7.75 (Intermediate value theorem). If is continuous and lies between and , then for some .
Proof. is an interval, hence connected by the theorem Connected subsets of , so is connected by the theorem Continuous images of connected sets are connected, hence is an interval. An interval containing and contains everything between them, in particular .∎
That derivation is the reason connectedness is worth defining. The intermediate value theorem, proved directly, is a bisection argument special to ; proved this way it is the composition of two structural facts, and the same composition yields the analogous statement in any connected domain.
Example 7.76 (Connected or not?). Decide connectedness for (a) ; (b) ; (c) minus a point; (d) minus a point.
Solution.
- (a) Disconnected, badly: and separate it, and the same trick works around every irrational. In fact the only connected subsets of are the singletons and — such a space is called totally disconnected.
- (b) Connected: it is the image of the connected interval under the continuous map , so the theorem Continuous images of connected sets are connected applies.
- (c) Connected. Any two points can be joined by a path avoiding the removed point, so the section Path-connectedness implies connectedness gives the result.
- (d) Disconnected: , and by the theorem Connected subsets of it fails the interval test directly. Dimension matters: removing a point disconnects a line but not a plane.
7.19Path-connectedness, and why it is strictly stronger
Definition 7.77 (Path, path-connected). A path from to in is a continuous with and . is path-connected if every pair of points is joined by a path.
Theorem 7.78 (Path-connected implies connected). Every path-connected metric space is connected.
Proof. Suppose is path-connected and non-empty, and fix . For each choose a path from to ; its image is connected by the theorems Connected subsets of and Continuous images of connected sets are connected, being the continuous image of the interval .
Every one of these images contains , so their intersection is non-empty, and their union is all of since . By the proposition Unions with a common point, is connected.∎
The converse fails, and the standard counterexample is worth knowing precisely because it shows that "connected" is genuinely weaker than the intuitive picture of being able to walk from any point to any other.
Example 7.79 (The topologist's sine curve). Let and . Show is connected but not path-connected.
Solution.
- is connected, as the continuous image of under .
- : any with is a limit of points of , since takes the value at for every large integer , and those tend to .
- A set squeezed between a connected set and its closure is connected: if and were a separation, then connected forces inside one piece, say ; but then is a non-empty open subset of disjoint from , contradicting that every point of is in . So is connected.
- is not path-connected. Suppose ran from to , and let be the supremum of times with first coordinate . On the first coordinate is positive, and by continuity of at the second coordinate would have to converge to 's. But as the first coordinate tends to while oscillates through all of infinitely often on every interval , so the second coordinate has no limit. Contradiction.
- The two notions therefore differ, and the difference lives entirely at the limit segment: is the union of two path-connected pieces glued by closure rather than by any path.
Remark. The implication does become an equivalence for open subsets of : in an open connected , the set of points reachable from a fixed by a path is both open and closed in — around any point a whole ball is reachable, balls being convex — hence is all of by criterion (ii) of the proposition Equivalent formulations. Every counterexample is therefore forced to be non-open, as the topologist's sine curve is.
7.20Components and quasicomponents
A space that is not connected still decomposes canonically into connected pieces.
Definition 7.81 (Connected component). The component of is the union of all connected subsets of containing . The quasicomponent of is the intersection of all sets containing that are simultaneously open and closed.
Proposition 7.82 (Components partition the space and are closed). Each component is connected and closed, distinct components are disjoint, and the components cover .
Proof. The component is a union of connected sets all containing , hence connected by the proposition Unions with a common point, and it is maximal by construction. If then is connected by the same proposition and contains both and , so maximality gives . Coverage holds since .
Closedness: is connected — the argument in step 3 of the example The topologist's sine curve applies verbatim to any set between a connected set and its closure — and contains , so by maximality.∎
Proposition 7.83 (Components sit inside quasicomponents). The component of is contained in its quasicomponent, and the inclusion can be strict.
Proof. Let be open and closed with . Then is open and closed in and contains , so by criterion (ii) of the proposition Equivalent formulations applied to the connected space , it equals ; that is, . Intersecting over all such gives .
For strictness take realised in as together with nothing else: the component of is the singleton , since is totally disconnected, while any open-and-closed set containing must contain for large and, by a connectedness-free separation argument, also . So the quasicomponent is strictly larger.∎
Proposition 7.84 (In a compact space the two agree). If is compact, every quasicomponent is a component.
Proof. Given the inclusion already proved, it suffices to show is connected. Suppose with closed in , disjoint, and . As is an intersection of closed sets it is closed, hence compact by the proposition A closed subset of a compact set is compact, so and are compact and can be separated by disjoint open sets , of , using the argument of the proposition Compact implies closed and bounded. The family of open-and-closed sets containing has intersection ; by compactness finitely many of them, hence their intersection , satisfy . Then is open and closed — closed because its closure lies in , which avoids and so lies in — and contains , so , forcing .∎
Example 7.85 (Counting components). Find the components of (a) ; (b) ; (c) .
Solution.
- (a) The intervals for : each is connected as an interval, and no larger connected subset exists because any set meeting two of them would contain an integer by the theorem Connected subsets of . Countably many components.
- (b) Every point is its own component, so there are countably many — the space is totally disconnected. Note is a component that is not open in the space, so components need not be open.
- (c) A hyperbola with two branches, and , each the continuous image of under and hence connected, and separated by the open sets and . Two components.
7.21The contraction mapping principle: statement
Everything in this chapter has been vocabulary. The next theorem is the first that produces something: it manufactures solutions to equations, and it is the reason completeness was worth isolating.
Intuition. A contraction is a map that shrinks every distance by at least a fixed factor. Photocopy a map of the room at 60% and drop it on the floor: exactly one point of the copy lies on top of the corresponding point of the room. Iterating the copy-and-drop shrinks the discrepancy by 40% each time, which is why the process converges geometrically and why it converges to the same place no matter where you start.
Definition 7.86 (Contraction). A map on a metric space is a contraction with constant if there is with
A point with is a fixed point.
Proposition 7.87 (A contraction is uniformly continuous). Every contraction is uniformly continuous; indeed works for any .
Proof. If then , since . The choice of did not depend on the point.∎
Theorem 7.88 (Banach fixed point theorem). Let be a non-empty complete metric space and a contraction with constant . Then has exactly one fixed point ; moreover, for any starting point the iterates converge to , with
Three hypotheses, each indispensable, and each with a one-line counterexample. Completeness: on is a contraction with no fixed point, because the fixed point was removed. Strictness of : the shift on satisfies exactly, and has no fixed point. Self-mapping: a contraction of into obviously fixes nothing, so must map into itself.
Pitfall. The condition for all — strict but with no uniform — is not enough. On , complete, take . Then for distinct , yet always, so there is no fixed point. What fails is uniformity: the effective factor approaches as grow, and no single dominates it.
7.22Proof: existence, uniqueness and the rate
Proof. Uniqueness first, since it is one line and does not need completeness. If and then
so ; as this forces , hence .
The iterates contract geometrically. Fix and set . Applying the contraction property repeatedly,
The iterates are Cauchy. For , the triangle inequality along the chain and the geometric bound give
the last step summing the full geometric tail, which converges because . Since , the right-hand side is under any prescribed for all large , uniformly in . So is Cauchy.
Existence. By completeness for some . By the proposition A contraction is uniformly continuous and the theorem Sequential characterisation of continuity, . But , a subsequence-shift of a sequence converging to , so as well. Limits are unique by the proposition Limits are unique, so .
The rate. Let in the Cauchy estimate with fixed. The left side tends to , because is continuous by the proposition Reverse triangle inequality, and the right side does not involve :
That is the a priori bound: before iterating at all, it says how many steps guarantee a given accuracy. Running the same argument from the starting point instead of , so that the roles of are played by and the index by , gives the a posteriori bound
which uses the step actually just taken and is usually far sharper in practice.∎
Convergence at rate is linear (geometric): each iteration multiplies the error by roughly , so the number of correct digits grows linearly in , and the number of iterations needed for tolerance is about . Halving does not halve the work; it divides the iteration count by — which is why Newton's method, converging quadratically, is preferred when it is available, and why the contraction principle is valued for existence first and for computation second.
Example 7.90 (Iterating to a prescribed tolerance). Let on . Verify the hypotheses, and use the a priori bound with to find how many iterations guarantee an error below .
Solution.
- maps into , and is complete as a closed subset of , by the proposition Completeness passes to and to closed subsets.
- By the mean value theorem, for some between and , so on the constant works.
- With , , so and the a priori bound reads .
- Solve : taking logarithms, , so suffices.
- That is pessimistic, as a priori bounds always are — the true fixed point is and the iterates are within well before step — but it is a guarantee available before any computation is done, which is what an existence theorem is for.
7.23Applications: Picard–Lindelöf and others
The pattern is always the same: rewrite "solve this problem" as "find a fixed point of this map", choose a complete space in which the map contracts, and read off existence, uniqueness and an algorithm at once.
Theorem 7.91 (Picard–Lindelöf). Let be continuous on the rectangle , bounded there by , and Lipschitz in with constant . Then the initial value problem
has a unique solution on for any with , and .
Proof. By the fundamental theorem of calculus, a continuous solves the initial value problem on if and only if it satisfies the integral equation
Let , a closed subset of with the sup metric, hence complete by the theorem with the sup metric is complete and the proposition Completeness passes to and to closed subsets. Define to be the right-hand side above.
maps into : , and is continuous, indeed differentiable.
contracts: for and ,
Taking the supremum over gives with .
The theorem Banach fixed point theorem now supplies a unique with , which is the unique solution.∎
The iterates starting from the constant function are the Picard iterates, and the fixed point theorem's rate estimate says they converge uniformly at the geometric rate . Note also what the hypotheses buy: continuity of alone gives existence but not uniqueness — , has both and — and the Lipschitz condition is exactly what the contraction step needed.
Example 7.92 (Two more fixed-point arguments). (a) Solve by iteration from and state the contraction constant. (b) Show that the linear system has a unique solution whenever some induced matrix norm satisfies .
Solution.
- (a) satisfies , so on the complete space . The fixed point solves , i.e. , so . Iterating from : , with error .
- (b) on , complete, satisfies , a contraction with . So the fixed point exists and is unique, which says is uniquely solvable, and the iteration converges — this is the Jacobi and Gauss–Seidel family of numerical methods, and is their convergence criterion.
- Both instances show the division of labour: the algebra identifies , the metric space supplies completeness, and the theorem does the rest without any further thought.
7.25The Baire category theorem: two forms
Theorem 7.96 (Baire category theorem). Let be a non-empty complete metric space.
- (Dense open form) If are open and dense in , then is dense in .
- (Closed cover form) If with each closed, then some has non-empty interior.
Proposition 7.97 (The two forms are equivalent). Statements (1) and (2) above imply one another.
Proof. (1) (2): given closed covering , suppose every . Then is open, and it is dense because its closure is by the proposition Duality of interior and closure. By (1) the intersection is dense, in particular non-empty — contradicting that the cover .
(2) (1): let be open dense and let be any ball; we must show meets . The closed ball of half the radius is complete, being closed in . If missed then , a countable union of closed sets, each with empty interior because is dense. By (2) applied in the complete space , that is impossible.∎
Form (2) is the one that sounds like a theorem about size: a complete space is "thick", and cannot be exhausted by countably many "thin" closed pieces. Form (1) is the one that is used: it says a countable list of generic conditions can be imposed simultaneously and still leave points satisfying all of them.
7.26Proof by nested balls
Proof. We prove form (1). Let be open and dense in the complete space , and let be an arbitrary non-empty open set; it suffices to produce a point of .
Step 1: start. is dense, so , and it is open, so it contains a closed ball with . (Choose an open ball inside the open set, then shrink its radius by half to get a closed ball inside.)
Step 2: descend. Suppose has been chosen. Since is dense and is open and non-empty, the set is non-empty and open, so it contains a closed ball with
This gives nested closed balls with , and for every , and .
Step 3: the centres are Cauchy. For the point lies in , so , which is under any for large uniformly in .
Step 4: collect the limit. By completeness for some . Fix : all terms with lie in the closed set , so the limit does too, by the theorem Sequential characterisation of closed sets. Hence
So every non-empty open meets , which is the definition of density.∎
Two details are load-bearing and are exactly where a careless version of this proof fails. The balls must be closed, so that Step 4 can capture the limit; nested open balls can have empty intersection even in . And the radii must be forced to zero, which is what makes the centres Cauchy — nested closed balls with radii bounded below can also have empty intersection in a general complete space, so neither condition is decorative.
Example 7.98 (Where the proof breaks without completeness). Run the construction in with for an enumeration of , and locate the failure.
Solution.
- Each is open in , its complement being a single point, and dense, since removing one rational leaves the rest dense.
- But , which is not dense. So the conclusion of the theorem is false in .
- Tracing the proof: Steps 1–3 go through verbatim and produce a Cauchy sequence of centres with radii tending to zero. Step 4 is the one that fails — the limit exists in but is irrational, hence is not a point of .
- This is the same missing point as in every other failure of completeness in this chapter, and it confirms that the Baire category theorem is a theorem about completeness and nothing else.
7.27Meagre, comeagre, and "generic"
Definition 7.99 (Meagre and comeagre). is meagre (of the first category) if it is a countable union of nowhere dense sets, and comeagre (residual) if its complement is meagre. A property is said to hold generically if the set of points where it holds is comeagre.
Proposition 7.100 (Baire, restated in this language). In a non-empty complete metric space, a comeagre set is dense; in particular is not meagre in itself, and a countable intersection of comeagre sets is comeagre.
Proof. Let with each nowhere dense. Then is open, and dense because by the proposition Duality of interior and closure. Since , the theorem Baire category theorem makes dense. If were meagre in itself, would be comeagre and hence dense, which is false as . The last claim holds because a countable union of countably many nowhere dense families is again countable.∎
Pitfall. Meagre is a topological smallness, not a measure-theoretic one, and the two are genuinely different — see the closing section. Also, meagre is not "small" in any everyday sense until completeness is assumed: every space is meagre in some superspace, and is meagre in itself, which says nothing about being small inside .
Example 7.101 (Comeagre sets in ). Show that the irrationals are comeagre in , and that the set of with unbounded partial quotients in its continued fraction is comeagre.
Solution.
- is a countable union of singletons, each closed with empty interior in , hence meagre. So is comeagre, and by the proposition Baire, restated in this language it is dense — which we knew, but now with the extra information that it is "generic".
- For the second, let be the set of irrationals all of whose partial quotients are at most . Each is closed in the irrationals and has empty interior, since inside any interval one can choose a continued fraction with a large partial quotient. So is meagre and its complement is comeagre.
- The pattern is the one used throughout: to prove a property generic, write its failure set as a countable union of closed sets, then show each is nowhere dense by finding a nearby point with the property inside every ball.
7.28Applications: existence proofs for objects nobody constructs
Theorem 7.102 (Generic nowhere differentiability). In with the sup metric, the set of functions that are differentiable at at least one point is meagre. Hence a generic continuous function is differentiable nowhere, and in particular such functions exist.
Proof. For let
If is differentiable at some , the difference quotients are bounded near and is bounded, so for some ; thus the differentiable-somewhere functions lie in .
is closed. Let with witnesses and uniformly. By compactness of pass to a subsequence with . The inequality passes to the limit, uniform convergence and continuity of letting both arguments move, so .
has empty interior. Given and , the Weierstrass approximation theorem supplies a polynomial with . Let , where is a sawtooth of amplitude whose linear pieces have slope with chosen so large that . Then while every difference quotient of over a short interval exceeds in absolute value, so . Hence every ball meets the complement of .
So each is closed and nowhere dense, is meagre, and is complete by the theorem with the sup metric is complete. The theorem Baire category theorem gives a comeagre, hence non-empty, set of nowhere differentiable functions.∎
Read what that argument did and did not do. It proves that nowhere differentiable continuous functions exist — indeed that they are the overwhelming majority — without exhibiting a single one. Weierstrass's explicit came first historically and is much harder; the category argument is three paragraphs and gives a stronger conclusion.
Corollary 7.103 (Generic transcendence, and a second application). The transcendental numbers are comeagre in , and a generic is a Liouville number.
Proof. The algebraic numbers are countable, by Cardinality and Countability, so they form a countable union of singletons — closed with empty interior — and are therefore meagre. Their complement is comeagre. For the second claim, the Liouville numbers are , a countable intersection of open sets each dense because it contains all rationals' neighbourhoods; the theorem Baire category theorem makes the intersection comeagre.∎
Example 7.104 (Uniform boundedness from category). Let be a family of continuous functions on a complete space with for each . Show is uniformly bounded on some ball.
Solution.
- Put , an intersection of closed sets, hence closed by the proposition De Morgan for closed sets.
- The pointwise bound says every lies in some , so .
- By form (2) of the theorem Baire category theorem, some has non-empty interior, so it contains a ball .
- On that ball every is bounded by : a uniform bound extracted from purely pointwise hypotheses. This is the uniform boundedness principle of functional analysis, and category is its entire content.
7.29Category versus measure
Meagre sets and null sets are both notions of "negligible", and they share the formal properties: each is closed under subsets and countable unions, and each excludes the whole space when the space is . It is tempting to conclude they are two names for one idea. They are not, and the following example settles it.
Theorem 7.105 ( splits into a meagre set and a null set). There is a decomposition with meagre and of Lebesgue measure zero, and .
Proof. Enumerate the rationals as . For each , let
an open set containing , hence dense, of Lebesgue measure at most .
Put . It is null, since its measure is at most for every . And is a countable union of closed sets, each with empty interior because is dense; so is meagre. The two are complementary by construction.∎
So is the union of a set that is topologically negligible and a set that is measure-theoretically negligible. Neither notion implies the other: is null but comeagre, is meagre but of full measure. A property that holds generically may fail almost everywhere, and conversely.
Remark. The two notions do share a great deal of structure — Oxtoby's classical treatment develops them in parallel columns, and there is a duality principle exchanging theorems about category for theorems about measure in a wide class of statements. The practical advice is simply to say which one is meant. "Almost every real number is normal" is a measure statement and true; "a generic real number is not normal" is a category statement and also true, because the non-normal numbers are comeagre. Both are correct, and reading either as the other is wrong.
Example 7.106 (Which notion of small?). Classify each subset of as meagre or not, and null or not: (a) ; (b) the Cantor set ; (c) a fat Cantor set of measure ; (d) the set of the theorem above.
Solution.
- (a) is meagre, as a countable union of singletons, and null, as a countable set. Both notions agree here, which is why countable sets give no insight into the difference.
- (b) is closed with empty interior — it contains no interval, since at stage it is covered by intervals of length — so it is nowhere dense, hence meagre; and it is null, of measure . Uncountable, and small in both senses.
- (c) A fat Cantor set is nowhere dense by the same argument, hence meagre, but has measure and so is not null. Meagre does not imply null.
- (d) is null but comeagre, hence very far from meagre. Null does not imply meagre. Parts (c) and (d) together show the two notions are logically independent.
- Treating "closed and bounded" as the definition of compact. It is a theorem, Heine–Borel, and it is a theorem about only. In a general metric space the correct equivalent is complete and totally bounded, and an infinite discrete space is the standing counterexample.
- Assuming . True in , false in general; in the discrete metric the closure of is while is everything.
- Intersecting infinitely many open sets and expecting an open set. . The finiteness in The open sets form a topology is where the minimum of the radii is guaranteed positive.
- Saying a set is "not open, therefore closed". is neither; and are both; in a discrete space everything is both.
- Forgetting that openness and closedness are relative to the ambient space. is open in and not in . Always name the space.
- Proving compactness by exhibiting one cover with a finite subcover. The definition quantifies over every cover; one cover proves nothing. To disprove compactness, one bad cover does suffice.
- Applying the Banach fixed point theorem without checking that maps into , or that is complete. on contracts and has no fixed point.
- Using in place of a uniform . On , satisfies the strict inequality everywhere and has no fixed point. The uniform constant is what makes the geometric series converge.
- Confusing completeness with closedness. Completeness is a property of a space in its own right; a subset is complete exactly when it is closed in a complete ambient space. And completeness is not topological: and are homeomorphic, but only one is complete in its usual metric.
- Assuming connected implies path-connected. The topologist's sine curve is connected and not path-connected. The implication does hold for open subsets of .
- Reading "meagre" as "measure zero". They are logically independent: a fat Cantor set is meagre and not null, and splits into a meagre set and a null set.
- Quoting a result by number. Every statement in this chapter has a title; the numbers are computed at render time and shift when anything is inserted.