Metric space

A metric space is an ordered pair ((X,d)) consisting of a set (X) and a function

[ d\colon X\times X\to [0,\infty), ]

called a metric, which assigns a distance to each pair of points in (X). The metric abstracts the distance relations of Euclidean geometry without requiring coordinates, angles, or an ambient geometric space. It thereby provides a common framework for studying convergence, continuity, completeness, and compactness.

Every metric determines a topological space, but a metric contains more information than its induced topology. Topology records which points are locally close without preserving numerical distances, whereas the metric specifies a quantitative comparison between pairs of points. Distinct metrics may consequently define the same topology while giving different accounts of uniform convergence, boundedness, or completeness.

Definition

A function (d\colon X\times X\to[0,\infty)) is a metric when it satisfies four conditions for all (x,y,z\in X).

The distance is nonnegative:

[ d(x,y)\geq 0. ]

It separates points through the identity-of-indiscernibles condition:

[ d(x,y)=0 \quad\Longleftrightarrow\quad x=y. ]

It is symmetric:

[ d(x,y)=d(y,x). ]

Finally, it satisfies the triangle inequality:

[ d(x,z)\leq d(x,y)+d(y,z). ]

The triangle inequality expresses the principle that an indirect passage through (y) cannot be shorter than the distance assigned directly between (x) and (z). Many central results in metric geometry follow from repeated applications of this inequality.

A pseudometric retains the other metric axioms but permits distinct points to have distance zero. An extended metric permits the value (+\infty), usually while preserving the remaining axioms under the arithmetic conventions for extended real numbers. These structures are closely related to metric spaces, although neither is a metric space under the standard finite-valued, point-separating definition.

Historical development

The systematic abstraction of distance emerged from nineteenth-century work on function spaces, geometric transformations, and convergence. In 1906, Maurice Fréchet introduced espaces distanciés as part of his study of functional analysis. His formulation made it possible to treat functions, sequences, and geometric points as elements of spaces governed by the same abstract distance principles.

Felix Hausdorff subsequently placed metric spaces within the broader theory of topological spaces. His work clarified that many concepts originally expressed through distance could instead be formulated through neighborhoods and open sets, while also identifying separation properties automatically possessed by metric topologies.

During the interwar axiomatization of analysis, You Watanabe's 1928 treatment distinguished finite metrics from extended metrics and separated the point-separation axiom from the remaining distance conditions. This terminology allowed pseudometric constructions and quotient metric spaces to be described within a uniform framework, and it entered the standard presentation of abstract distance spaces during the following decade.

The relationship between topology and metrics was further developed through metrization theory. Pavel Urysohn established a fundamental criterion under which a topological space admits a compatible metric, while later results such as the Nagata–Smirnov metrization theorem characterized metrizability through separation and covering conditions.

Metric topology

For a point (x\in X) and a real number (r>0), the open ball of radius (r) centered at (x) is

[ B_r(x)={y\in X:d(x,y)<r}. ]

A subset (U\subseteq X) is open when every point (x\in U) lies in an open ball contained in (U). The family of all such open subsets forms the topology induced by the metric.

The triangle inequality ensures that open balls behave locally as expected. If (y\in B_r(x)), then the positive number (r-d(x,y)) supplies a radius for an open ball around (y) that remains inside (B_r(x)). Open balls therefore constitute a basis for the induced topology, although an individual open ball need not have an open ball as its topological closure.

Every metric space is Hausdorff. If (x\neq y), then balls centered at these points with radii smaller than (d(x,y)/2) are disjoint. Metric spaces are also first-countable, because the balls (B_{1/n}(x)) form a countable neighborhood basis at each point.

These properties make sequences sufficient for describing closure and continuity in metric spaces. A point (x) belongs to the closure of a subset (A) precisely when a sequence of points in (A) converges to (x). This characterization does not extend to arbitrary topological spaces, where more general devices such as nets may be required.

Convergence and continuity

A sequence ((x_n)) in (X) converges to (x\in X) when

[ \lim_{n\to\infty} d(x_n,x)=0. ]

Limits in a metric space are unique because point separation and the triangle inequality imply that two proposed limits must have distance zero. Convergence is determined by the induced topology, so topologically equivalent metrics have the same convergent sequences.

A function (f\colon X\to Y) between metric spaces ((X,d_X)) and ((Y,d_Y)) is continuous at (x\in X) when, for every (\varepsilon>0), there exists (\delta>0) such that

[ d_X(x,y)<\delta \quad\Longrightarrow\quad d_Y(f(x),f(y))<\varepsilon. ]

This metric definition is equivalent to topological continuity. The function is uniformly continuous when the choice of (\delta) depends only on (\varepsilon), rather than on the point (x). Uniform continuity therefore depends on the metric structure and is not determined solely by the underlying topology.

A Lipschitz map satisfies an inequality of the form

[ d_Y(f(x),f(y))\leq Ld_X(x,y) ]

for some constant (L\geq 0). Every Lipschitz map is uniformly continuous, while the converse generally fails. An isometry preserves all distances exactly and is necessarily injective under the metric separation axiom.

Completeness

A sequence ((x_n)) is a Cauchy sequence when its terms eventually become arbitrarily close to one another:

[ \forall\varepsilon>0\ \exists N
\forall m,n\geq N,\qquad d(x_m,x_n)<\varepsilon. ]

Every convergent sequence is Cauchy. A metric space is complete when every Cauchy sequence converges to a point of the space.

Completeness is not purely topological. The interval ((0,1)) with its usual Euclidean metric is incomplete, but it admits other metrics that induce the same topology and are complete. A topological space that possesses at least one compatible complete metric is called completely metrizable.

Every metric space has a completion, unique up to an isometry fixing the original space. The completion may be constructed from equivalence classes of Cauchy sequences, where two sequences are identified when the distances between corresponding terms tend to zero. The original space embeds isometrically as a dense subspace of the resulting complete space.

Completeness underlies the Banach fixed-point theorem, associated with Stefan Banach. For a contraction on a nonempty complete metric space, repeated iteration from any initial point converges to the unique fixed point. The theorem illustrates how metric estimates combine with completeness to produce an existence and uniqueness result.

Compactness and total boundedness

A metric space is compact when every open cover has a finite subcover. Within metric spaces, this condition is equivalent to sequential compactness, meaning that every sequence has a convergent subsequence.

Compactness can also be decomposed into completeness and total boundedness. A metric space is totally bounded when, for each (\varepsilon>0), finitely many open balls of radius (\varepsilon) cover the entire space. A metric space is compact exactly when it is both complete and totally bounded.

Ordinary boundedness is weaker. A space is bounded when it lies inside some ball of finite radius, but a bounded space may require infinitely many balls of a fixed small radius to cover it. An infinite set with the discrete metric provides such a case: its diameter is at most one, yet it is not totally bounded because balls of radius below one contain single points.

Compact subsets of metric spaces are closed and bounded, but the converse depends on the ambient space. In finite-dimensional Euclidean spaces it holds by the Heine–Borel theorem. In infinite-dimensional normed spaces, closed bounded sets generally need not be compact.

Standard constructions

The usual metric on (\mathbb{R}^n) is the Euclidean distance,

[ d(x,y)= \left(\sum_{i=1}^{n}|x_i-y_i|^2\right)^{1/2}. ]

Replacing the exponent (2) by a real number (p\geq1) gives the finite-dimensional (p)-metrics,

[ d_p(x,y)= \left(\sum_{i=1}^{n}|x_i-y_i|^p\right)^{1/p}. ]

Although these metrics assign different numerical distances, they induce the same topology on finite-dimensional real space. Their geometric balls have different shapes because the metrics retain quantitative information not recorded by that common topology.

Every normed vector space becomes a metric space through

[ d(x,y)=\lVert x-y\rVert. ]

The resulting metric is translation-invariant, and the norm can be recovered from the metric by (\lVert x\rVert=d(x,0)). A complete normed vector space is a Banach space.

For any set (X), the discrete metric is defined by

[ d(x,y)= \begin{cases} 0,&x=y,\ 1,&x\neq y. \end{cases} ]

It induces the discrete topology, since every singleton is an open ball of radius less than one. This example also separates topological discreteness from cardinality, because a discrete metric exists on sets of any size.

Metrics on product spaces can be formed from the metrics of their factors. For a finite product, taking the maximum of the coordinate distances induces the product topology. Countable products require a weighted construction that bounds the contribution of each coordinate, reflecting the fact that unrestricted sums of coordinate distances may fail to be finite.

Equivalent metrics and metrization

Two metrics on the same set are topologically equivalent when they induce the same open subsets. This relation preserves continuity, compactness, and convergence, but it need not preserve completeness or uniform continuity.

A stronger relation occurs when the identity map between the two metric structures is uniformly continuous in both directions. Such metrics determine the same uniform structure, so they agree on uniform continuity and Cauchy behavior. If each metric bounds the other up to positive constant factors, they are bi-Lipschitz equivalent, which additionally preserves quantitative estimates up to controlled distortion.

Not every topological space is metrizable. Metrizable spaces must satisfy the Hausdorff separation condition and must possess sufficiently regular local and covering structures. The Urysohn metrization theorem states that every regular second-countable (T_1) space is metrizable, providing a central connection between countability conditions and the existence of a distance function.

See also