Metric Spaces
Spaces equipped with a notion of distance. The metric gives rise to a topology through open balls. Includes standard examples, norms, and the metric topology.
In the previous chapter, we took the abstract viewpoint: a topology is any collection of subsets satisfying three axioms. But almost every space that appears in practice carries an additional piece of data — a way to measure distance between points. This chapter introduces metric spaces, in which a distance function is given and a topology arises automatically from it.
The key observation is one we already saw in : once you have a notion of distance, you can define open balls, and once you have open balls, you can say which sets are "open" — namely, those sets in which every point sits inside some small ball contained in the set. This construction generalizes from to any set equipped with a suitable distance function.
The Definition of a Metric
Let be a nonempty set. A function is called a distance (or metric) on if it satisfies the following four axioms:
- Non-negativity and definiteness: for all , and .
- Symmetry: for all .
- Triangle inequality: for all .
The pair is called a metric space.
Intuition: These axioms extract the bare minimum from our geometric intuition of distance. Non-negativity and definiteness say "distance is zero exactly between identical points." Symmetry says "the distance from to equals the distance from to ." The triangle inequality says "it's never shorter to detour through a third point." Any function obeying these three rules is, for our purposes, a perfectly good notion of distance — even if it looks exotic.
Some authors split axiom 1 into two separate axioms (non-negativity; iff ), giving four axioms total. Either formulation is standard. Occasionally one sees a weaker object called a pseudometric, which drops the "" half of axiom 1.
Examples of Metrics
On , the Euclidean metric is Non-negativity, definiteness, and symmetry are clear. The triangle inequality follows from the Cauchy–Schwarz inequality and is the content of the classical "triangle inequality for the Euclidean norm." When this reduces to .
Let be any nonempty set. Define This is the discrete metric on . Axioms 1 and 2 are obvious. For the triangle inequality : if then the left side is 0. If then the left side is 1, and at least one of or must hold (otherwise ), so the right side is at least 1.
The discrete metric regards every pair of distinct points as being "at distance 1" — it is as if every point were isolated on its own island.
On , define This is called the taxicab metric or metric or Manhattan metric (because it measures distance as if one must travel along a grid of city blocks). Non-negativity, definiteness, and symmetry are clear. The triangle inequality follows from the triangle inequality for absolute values applied coordinate-by-coordinate: then summing over .
On , define This is the max metric or sup metric or metric. Non-negativity, definiteness, and symmetry are clear. For the triangle inequality, for each , Taking the maximum over on the left gives .
More generally, for , the metric on is This recovers the taxicab metric when and the Euclidean metric when . As it approaches the max metric. Proving the triangle inequality for general requires Minkowski's inequality, a nontrivial result whose proof typically uses the Hölder inequality.
If is a metric space and is a nonempty subset, then is again a metric space. This is immediate — restricting a metric to a subset preserves all four axioms. For instance, the open interval is a metric space under the restricted Euclidean metric .
Open Balls and the Metric Topology
In a metric space, the distance function lets us define "open balls," and these in turn generate a topology.
Let be a metric space. For and , the open ball of radius centered at is
Let be a metric space. The collection is a topology on . It is called the metric topology on .
Intuition: The metric topology encodes "openness" in the familiar sense: is open iff around every point of we have a little buffer region (an open ball) that still sits inside . The definition of the Euclidean topology on was just the special case of the metric topology for the Euclidean metric.
In any metric space , every open ball is an open set (i.e., belongs to ).
Neighbourhoods in a Metric Space
Let be a metric space with metric topology , and let . Then is a neighbourhood of in if and only if there exists such that .
Intuition: In a metric space, open balls are the "canonical" neighbourhoods. Any neighbourhood must contain some small open ball, and any set that contains an open ball around is automatically a neighbourhood of .
Metric Spaces are Hausdorff
If is a metric space, then is a Hausdorff topological space.
Intuition: The triangle inequality is exactly what lets us take two balls around two distinct points and shrink them so they don't overlap. This is why metric spaces are always "nice" in the separation sense, unlike exotic non-Hausdorff topologies such as — no metric can induce that topology.
Let be a discrete metric space. For any , the ball , since the only point at distance less than from is itself (every other point is at distance exactly 1). Thus every singleton is open in . Since every subset can be written as a union of open singletons, every subset is open. Hence is the discrete topology.
Equivalent Metrics
Two different metrics can induce the same topology. This turns out to be more important than which specific metric one uses — topological properties (continuity, compactness, convergence of sequences) depend only on the topology, not on the particular distance function.
Let be a nonempty set and let be two metrics on . We say and are topologically equivalent (or simply equivalent) if they induce the same topology: .
A useful sufficient condition for equivalence is the existence of two-sided bounds between the metrics:
Let be two metrics on . Suppose there exist constants such that Then .
On , the metrics , , are all topologically equivalent. We show this via the elementary chain of inequalities
Proof of the chain. Let .
- : .
- : this follows from because the cross-terms are non-negative.
- : .
Thus all three metrics are pairwise strongly equivalent and induce the same topology — namely, the Euclidean topology .
Intuition: Different metrics can have different-looking "balls" (the unit ball is a diamond, the unit ball is a disk, the unit ball is a square), but as long as balls of each type can be sandwiched between balls of the other, the open sets they generate are identical. The take-away: for topological questions on (continuity, convergence, openness), the choice of in does not matter.
Product Metrics
Given two metric spaces, we can form a metric on their Cartesian product in several natural ways.
Let and be metric spaces. On , define three candidate product metrics:
Each of these is a metric on , and all three are topologically equivalent.
Intuition: The product metrics are exactly the analogs of , , on , applied here to the "coordinates" and . Since all three are equivalent, there is a single well-defined product topology on . A sequence converges in any one of these product metrics if and only if in and in simultaneously.
Isometries and Contractions
Metric spaces come with a natural notion of "distance-preserving" or "distance-shrinking" maps.
Let and be metric spaces. A function is called an isometry if If an isometry is also a bijection, we say and are isometric.
Intuition: An isometry is a rigid embedding — it sends into while preserving distances exactly. Rotations, reflections, and translations of are isometries of . Two isometric metric spaces are indistinguishable from the metric point of view. Every isometry is automatically injective (if , then , so ).
Every isometry is continuous with respect to the metric topologies.
Let be a metric space. A function is called a contraction (or contractive map) if there exists a constant such that The constant is called the contraction constant or Lipschitz constant.
Intuition: A contraction shrinks all distances by a uniform factor strictly less than 1. Think of repeatedly applying on : iterating the map drives every point toward a single fixed point (the origin). This behaviour is general and is the content of the Banach Fixed-Point Theorem: on a complete metric space, every contraction has a unique fixed point, and iterating from any starting point converges to it. The Banach fixed-point theorem is the mathematical engine behind existence/uniqueness of solutions to ODEs, Markov chain convergence, and many practical iterative algorithms.
Every contraction is continuous.
Continuity in Metric Spaces: the Familiar -
The topological definition of continuity simplifies dramatically when both spaces are metric.
Let and be metric spaces, equipped with their metric topologies. Let and . Let . Then is continuous at if and only if
Intuition: In metric spaces, "neighbourhood" can always be replaced by "open ball of some radius," so the general topological condition collapses to the familiar - formulation from first-year calculus. When and with their Euclidean metrics, this is exactly the definition you have seen before:
Limits in Metric Spaces are Unique
Let and be topological spaces with Hausdorff. Let , , and let be an accumulation point of . If and , then .
If is a metric space (with its metric topology), then every function has at most one limit at each accumulation point of . In particular, limits of sequences in metric spaces are unique.
Intuition: Uniqueness of limits is something we take for granted in calculus, but it's a nontrivial topological fact — it holds precisely because metric spaces are Hausdorff. In the non-Hausdorff topology , limits are genuinely not unique (a function converging to also converges to every ).
Cauchy Sequences and Completeness
We close with one of the most important concepts tied to metric spaces — one that does not have a purely topological formulation.
Let be a metric space. A sequence in is called a Cauchy sequence if and only if
Intuition: A Cauchy sequence is one whose terms eventually get arbitrarily close to each other — no reference to a limit point is made. Contrast this with convergence, which requires the terms to get close to a specific point.
Every convergent sequence in a metric space is Cauchy.
A metric space is called complete if and only if every Cauchy sequence in converges (to a point in ).
- with the Euclidean metric is complete (the core theorem from MATH/MTHE 281). More generally, with any of is complete.
- with is not complete. For instance, defines a Cauchy sequence in , but its limit is .
- The open interval with is not complete. The sequence is Cauchy but its limit is not in .
- The closed interval with is a complete metric space. (It is a closed subset of the complete space .)
Why completeness matters. Completeness is the property that lets us do analysis: it guarantees that "reasonable" sequences (those whose terms bunch up) have limits. Without completeness, many theorems fail — for example, in you cannot build as the limit of a sequence of rationals that "should" converge to it. The Baire Category Theorem, the contraction mapping principle (Banach fixed-point theorem), and existence of solutions to differential equations all rely crucially on the underlying space being complete.
Completeness is metric-dependent, not topological. Two equivalent metrics can differ in completeness: with is not complete, but is homeomorphic to (via, e.g., ), and is complete. So completeness is a property of the metric, not just the topology it induces.
Looking Ahead
Equipped with a metric, a space inherits a topology "for free," and many familiar notions from calculus — continuity, convergence, completeness — become available. The next chapter examines how the basic topological building blocks (interior, closure, boundary) behave on the metric side, and develops the language of dense sets, nowhere dense sets, and accumulation points that we'll need to state and prove deeper results such as the Baire Category Theorem.