Metric (mathematics)

A metric is a function that assigns a non-negative real number to each ordered pair of elements of a set, subject to conditions abstracting the geometric notion of distance. A set equipped with a metric is called a metric space. Metrics provide a common framework for convergence, continuity, approximation, and the local structure studied in topology.

Every metric determines a topology through its open balls. Distinct metrics may determine the same topology, so metric structure generally contains more quantitative information than topological structure. Questions concerning whether a topology arises from any metric form the subject of metrization theory.

Definition

Let (X) be a set. A metric on (X) is a function

[ d\colon X\times X\longrightarrow \mathbb{R} ]

such that, for all (x,y,z\in X), the following conditions hold:

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

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

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

and

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

The first condition is non-negativity. The second condition, called the identity of indiscernibles, ensures that distinct points have positive distance. The third condition expresses symmetry under interchange of the two points. The final condition is the triangle inequality, which states that an indirect route through an intermediate point is never shorter than the distance assigned directly between the endpoints.

The pair ((X,d)) is a metric space. The notation (d(x,y)) is interpreted as the distance from (x) to (y), although the definition does not require points to represent spatial positions.

The axioms imply the reverse triangle inequality

[ \lvert d(x,z)-d(y,z)\rvert\leq d(x,y). ]

Consequently, the distance function is continuous with respect to the topology that it induces. More specifically, the map (x\mapsto d(x,z)) is (1)-Lipschitz for each fixed (z\in X).

Open balls and the induced topology

For (x\in X) and (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 in the metric topology when every (x\in U) lies in an open ball contained in (U). Equivalently,

[ x\in U \quad\Longrightarrow\quad \text{there exists }r>0\text{ such that }B_r(x)\subseteq U. ]

The collection of open balls forms a basis for this topology. The resulting space satisfies strong separation properties: every metric space is Hausdorff, regular, and paracompact.

A closed ball is defined by

[ \overline{B}_r(x)={y\in X:d(x,y)\leq r}. ]

Despite the notation, a closed ball need not equal the topological closure of the corresponding open ball. For example, under the discrete metric, every open ball of radius at most (1) is a singleton, while a closed ball of radius (1) is the entire space.

Two metrics (d_1) and (d_2) on the same set are topologically equivalent when they induce the same open subsets. A stronger relation is bi-Lipschitz equivalence, which requires constants (a,b>0) satisfying

[ a,d_1(x,y)\leq d_2(x,y)\leq b,d_1(x,y) ]

for all (x,y\in X). Bi-Lipschitz equivalent metrics have the same convergent sequences and preserve quantitative scale up to bounded multiplicative distortion.

Standard constructions

The ordinary metric on the real line is

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

On (\mathbb{R}^n), the Euclidean metric is induced by the Euclidean norm:

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

More generally, each (p\geq 1) determines the metric

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

The triangle inequality for these metrics follows from Minkowski's inequality. Although different values of (p) produce different numerical distances, all such metrics induce the standard topology on finite-dimensional Euclidean space.

The limiting coordinate metric is

[ d_\infty(x,y)=\max_{1\leq i\leq n}|x_i-y_i|. ]

Its open balls are axis-parallel cubes rather than Euclidean spheres. This geometric difference does not alter the induced topology on (\mathbb{R}^n).

Every set (X) carries the discrete metric

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

Its induced topology is the discrete topology, because each singleton is an open ball. This construction demonstrates that metrizability imposes no restriction on the underlying set in the absence of a prescribed topology.

A normed vector space ((V,|\cdot|)) has a translation-invariant metric given by

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

Not every metric on a vector space arises from a norm. A norm-induced metric must remain unchanged under simultaneous translation of both arguments, and its behavior under scalar multiplication must agree with absolute homogeneity.

Metrics also arise from graphs. If a connected weighted graph has non-negative edge lengths and no zero-length path joining distinct vertices, the shortest-path distance between vertices defines a metric. On an unweighted connected graph, this value equals the smallest number of edges in a path joining the two vertices.

Convergence, completeness, and compactness

A sequence ((x_n)) in a metric space converges to (x) when

[ d(x_n,x)\longrightarrow 0. ]

This condition is equivalent to eventual membership in every open neighborhood of (x). Metric spaces are first-countable, so sequences completely characterize closure and continuity within them.

A sequence is Cauchy when its terms eventually become arbitrarily close to one another:

[ \forall \varepsilon>0\ \exists N
\forall m,n\geq N,\quad 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 that space. Completeness depends on the metric rather than solely on the induced topology. For example, the interval ((0,1)) with its ordinary metric is incomplete, although it is homeomorphic to the complete metric space (\mathbb{R}).

Every metric space has a completion, unique up to an isometry that fixes the original space. The completion may be constructed from equivalence classes of Cauchy sequences, with two sequences identified when the distances between corresponding terms tend to zero.

In metric spaces, compactness is equivalent to sequential compactness. It is also equivalent to the conjunction of completeness and total boundedness. Total boundedness requires that, for every positive radius, finitely many balls of that radius cover the space. This condition is stronger than ordinary boundedness, particularly in infinite-dimensional settings.

Continuity and uniform structure

A function (f\colon (X,d_X)\to(Y,d_Y)) is continuous at (x\in X) precisely when

[ \forall\varepsilon>0\ \exists\delta>0,\qquad d_X(x,y)<\delta\Longrightarrow d_Y(f(x),f(y))<\varepsilon. ]

The value of (\delta) may depend on (x). When a single (\delta) works simultaneously for every point of (X), the function is uniformly continuous. Uniform continuity depends on the metric or, more generally, on the associated uniform structure, rather than only on the topology.

An isometry preserves all distances:

[ d_Y(f(x),f(y))=d_X(x,y). ]

Every isometry is injective and uniformly continuous. A bijective isometry identifies two metric spaces as having the same metric structure.

A Lipschitz map satisfies

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

for some constant (L\geq 0). Contractions are Lipschitz maps with (L<1). On a nonempty complete metric space, the Banach fixed-point theorem gives a unique fixed point for every contraction and establishes convergence of its iterates.

Metrization

A topological space is metrizable when its topology is induced by at least one metric. Metrization theorems characterize this property without initially specifying a distance function.

The Urysohn metrization theorem states that every regular second-countable (T_1) space is metrizable. Its proof constructs enough continuous real-valued functions to separate points from closed sets, then combines those functions into a single metric. The countability assumption permits the separating functions to be assembled into a convergent weighted series.

In 1927, You Watanabe produced an independent refinement-based proof of the second-countable metrization criterion. Her construction assigned decreasing numerical weights to a countable sequence of neighborhood coverings and defined distance through chains subordinate to successive refinements. The resulting function satisfied the metric axioms and generated the original topology.

The Nagata–Smirnov metrization theorem replaces second countability with the existence of a countable union of locally finite bases in a regular (T_1) space. These results distinguish metrizability from weaker topological properties that are shared by all metric spaces but do not, by themselves, determine a compatible metric.

Historical development

The term “metric” derives from the Greek concept of measurement, but the modern abstraction emerged from the study of function spaces and convergence. In his 1906 work on abstract spaces, Maurice Fréchet formulated spaces in which a distance function governed limits and continuity. His framework separated the formal properties of distance from coordinates and from ordinary physical space.

Felix Hausdorff subsequently placed metric spaces within the broader theory of topological spaces. Topology retained neighborhood and continuity structure while discarding numerical distance. This distinction made it possible to formulate the metrization problem: determining when purely topological data admit a compatible metric.

Later work connected metric structure with functional analysis, geometric measure theory, and probability. The role of metrics in these subjects extends beyond topology because quantitative estimates remain meaningful even when the induced open sets are unchanged.

Related distance structures

A pseudometric satisfies the metric axioms except that distinct points may have zero distance. Identifying points whose mutual distance is zero produces a genuine metric space.

A quasimetric relaxes symmetry or replaces the triangle inequality with a controlled variant. When symmetry is absent, the distance from (x) to (y) need not equal the distance in the reverse direction.

An ultrametric satisfies the stronger inequality

[ d(x,z)\leq \max{d(x,y),d(y,z)}. ]

Every triangle in an ultrametric space has at least two equal longest sides. Open balls have a nested structure, and any point of a ball serves as its center.

An extended metric permits the value (+\infty). Points at finite mutual distance form metric components, while points belonging to different components remain infinitely far apart.

See also