02.01.05 · analysis / topology

Metric space

shipped3 tiersLean: full

Anchor (Master): Bourbaki — General Topology Ch. IX; Engelking §4.1

Intuition [Beginner]

A metric space is a set together with a notion of distance between any two points — a function that returns a non-negative real number, equals zero exactly when , is symmetric in its inputs, and satisfies the triangle inequality.

That last condition — the triangle inequality — is the geometric heart of the definition. It says: going through an intermediate point can never be shorter than going directly. Without it, "distance" wouldn't behave the way our spatial intuition requires.

From a metric you build a topology: a set is open if every point has a small ball around it contained in the set. Continuity, convergence, completeness, and compactness all then have natural metric formulations. Metric spaces are the most familiar topological spaces — and they are the bridge from set-theoretic topology to honest analytic geometry.

Visual [Beginner]

A scattered set of points with a distance function. Any three points satisfy the triangle inequality: the direct distance from one to a third is no longer than going through the middle one.

Three points in a metric space, with three pairwise distances satisfying the triangle inequality.

The triangle inequality is what makes "balls" — sets of all points within a fixed distance of a centre — well-behaved. Open balls form a basis for the metric topology.

Worked example [Beginner]

The plane with the Euclidean distance is the prototype metric space.

But there are many metrics on :

  • Taxicab metric: — distance you'd travel along a grid of streets.
  • Chebyshev metric: — chessboard king's-move distance.
  • Discrete metric: if and otherwise.

Each is a valid metric. The first three give the same topology on (open sets and continuous functions agree), even though the actual distance values differ. The discrete metric gives a different topology, where every singleton is an open ball of radius .

So distance and topology are linked but not identical: many metrics produce the same topology, and a topology can be metrisable in many ways.

Check your understanding [Beginner]

Formal definition [Intermediate+]

A metric space is a pair where is a set and is a function (the metric or distance function) satisfying, for all :

  1. Positive-definiteness: .
  2. Symmetry: .
  3. Triangle inequality: .

The open ball of radius centered at is .

The metric topology on is generated by open balls: a set is open iff for every there is with . This is a topology (axioms verified directly), making every metric space a topological space 02.01.01.

A topological space whose topology arises from some metric is called metrisable.

A sequence in converges to if as . The sequence is Cauchy if for every there exists such that for all . Every convergent sequence is Cauchy, but not every Cauchy sequence converges in the same space (e.g., the rational numbers under standard distance are not complete).

A metric space is complete if every Cauchy sequence converges (to a limit in the space).

A function between metric spaces is:

  • Continuous at : for every there is such that .
  • Uniformly continuous: the can be chosen independently of .
  • Lipschitz: there is with for all .
  • Isometry: for all .

Key theorem with proof [Intermediate+]

Theorem (the metric topology is a topology). Let be a metric space. The collection of subsets is a topology on .

Proof. Verify the three topology axioms:

: The empty set vacuously satisfies the condition. For : any point has . So both are open.

Arbitrary unions: Let . For , for some , so there is with . Hence .

Finite intersections: Let . For , there are with and . Set . Then , so .

The proof is mechanical, but it's the proof: every metric space is a topological space via the metric topology. The converse — when does a topology come from a metric? — is the metrisation problem, addressed by Urysohn's metrisation theorem and its generalisations.

Bridge. The construction here builds toward 02.11.04 (banach space fundamentals), where the same data is upgraded, and the symmetry side is taken up in 02.11.08 (hilbert space). The defining pattern appears again in those units in a sharpened form, where the local data is glued or quotiented. Putting these together, the foundational insight is that the data of this unit gives the structural signature that the rest of the strand reads off.

Exercises [Intermediate+]

Lean formalization [Intermediate+]

lean_status: full — Mathlib has comprehensive metric-space coverage: MetricSpace, IsCompact, Cauchy, Complete, UniformContinuous, Lipschitz, the Banach fixed-point theorem, and many more.

[object Promise]

The Codex companion module re-exports the standard metric-space API and conventions used in downstream functional-analysis units.

Advanced results [Master]

Banach fixed-point theorem. Stated in Exercise 7. Used throughout functional analysis (existence/uniqueness of solutions to integral and differential equations) and inverse-function-style theorems.

Heine-Borel theorem. A subset of is compact iff it is closed and bounded. Generalises to: in a metric space, a subset is compact iff it is complete and totally bounded.

Arzelà-Ascoli theorem. A subset of (continuous functions from a compact metric space to a metric space ) is relatively compact in the uniform topology iff it is bounded and equicontinuous. This is the foundational tool for compactness arguments in function spaces.

Stone-Weierstrass theorem. Continuous functions on a compact metric space can be uniformly approximated by elements of any subalgebra that separates points and contains a non-vanishing function.

Baire category theorem. A complete metric space cannot be written as a countable union of nowhere-dense sets. This is the foundation of the open mapping, closed graph, and uniform boundedness principles in functional analysis 02.11.01.

Metrisation theorems. Urysohn (1925): a regular Hausdorff space with a countable basis is metrisable. Nagata-Smirnov (1950s): a topological space is metrisable iff it is regular Hausdorff with a countably locally finite basis. These characterise which topological spaces arise from a metric.

Hausdorff distance. For two compact subsets of a metric space, the Hausdorff distance makes the space of compact subsets a metric space itself. Foundation for geometric measure theory and shape analysis.

Synthesis. This construction generalises the pattern fixed in 02.01.01 (topological space), with the symmetric data replaced by its skew or twisted analogue. Read in the opposite direction, the construction is dual to the metric story: complements and orthogonality are taken with respect to the bilinear datum of this unit, not a metric, and the resulting category of subobjects is the one the rest of the strand classifies. The central insight is that this datum identifies algebra with geometry: functions become vector fields, subspaces become quotients, and invariants become cohomology classes — and that identification is the engine driving every theorem downstream.

Full proof set [Master]

Metric topology axioms. Proved in §"Key theorem".

Banach fixed-point theorem. Define . Then . Sum: for , as . Cauchy in complete , so converges to some . Continuity of gives . Uniqueness: if too, , forcing .

Completion construction. Proved in Exercise 6.

Heine-Borel for . A bounded subset of has bounded sequences with subsequential limits (Bolzano-Weierstrass); a closed bounded set thus has every sequence contain a subsequence converging in the set, which is compactness in the metric topology. Conversely, compact subsets of metric spaces are closed (Hausdorff) and bounded (totally bounded → bounded).

Baire (sketch). For complete and a countable union of nowhere-dense sets , recursively construct a nested sequence of closed balls with and radius . The sequence of centres is Cauchy, hence convergent (by completeness) to a point not in any . So .

Connections [Master]

  • Topological space 02.01.01 — metric spaces are a special class of topological spaces.

  • Banach space 02.11.04 — a complete normed space is a complete metric space.

  • Hilbert space 02.11.08 — inner-product space with the induced norm-metric, complete.

  • Smooth manifold 03.02.01 — every smooth manifold admits a Riemannian metric, making it a metric space.

  • Bounded linear operators 02.11.01 — continuous linear maps between metric (normed) spaces.

Historical & philosophical context [Master]

The notion of a metric space was introduced by Maurice Fréchet in his 1906 thesis, generalising the Euclidean distance to abstract sets. Hausdorff's 1914 Grundzüge der Mengenlehre placed metric and topological spaces side by side, distinguishing the two. The early-twentieth-century insight was that distance and neighbourhood are different notions, and topology is the more general one.

The interplay between metric and topological structure is a recurring theme: complete metric spaces are particularly tractable (Banach fixed-point, Baire category), but not every topological space is metrisable. The 1925 Urysohn metrisation theorem and its 1950s refinements (Nagata-Smirnov, Bing) gave necessary and sufficient conditions for metrisability.

In modern analysis, metric spaces are the natural setting for fixed-point theorems, function-space approximation results, and (after Banach) the foundations of functional analysis. The completion construction abstracts the way the reals are built from the rationals — a process that recurs in -spaces, distribution spaces, and many other constructions.

Bibliography [Master]

  • Munkres, J. R., Topology, 2nd ed., Prentice Hall, 2000. Ch. 2.
  • Rudin, W., Principles of Mathematical Analysis, 3rd ed., McGraw-Hill, 1976. Ch. 2.
  • Bourbaki, N., General Topology, Hermann, 1966. Ch. IX.
  • Engelking, R., General Topology, Heldermann, 1989.
  • Fréchet, M., "Sur quelques points du calcul fonctionnel", Rendiconti del Circolo Matematico di Palermo 22 (1906), 1–74.

Wave 3 Phase 3.1 unit #5. Metric space — the bridge from set-theoretic topology to honest analytic geometry; completes Phase 3.1 except for foundational group theory.