Skip to content

Metric and Metric Space

Definition

A metric space (X,d)(X, d) consists of a set of points XX and a distance function (or metric) d ⁣:X×X→[0,+∞)d\colon X \times X \to [0,+\infty) that maps pairs of points to nonnegative real values. The metric adheres to the following properties:

  1. Nonnegativity: d(x,y)≥0d(x,y) \geq 0 for any x,y∈X.x, y \in X\text{.}
  2. Identity of indiscernibles: d(x,y)=0d(x,y) = 0 if and only if x=y.x=y\text{.}
  3. Symmetry: d(x,y)=d(y,x)d(x,y) = d(y,x) for any x,y∈X.x, y \in X\text{.}
  4. Triangle inequality: d(x,z)≤d(x,y)+d(y,z)d(x,z) \leq d(x,y) + d(y,z) for any x,y,z∈X.x, y, z \in X\text{.}

The Triangle Inequality requires a direct distance to be no greater than a journey through an intermediate point. The absolute-value inequality ∣x−z∣≤∣x−y∣+∣y−z∣|x-z|\le|x-y|+|y-z| is its real-line instance.


Interpretation

A metric space is a set of points with a clear and reasonable rule for measuring the distance between any two of them. The axioms keep only what every sensible notion of distance has in common, so that one definition of convergence covers numbers, vectors and even functions.

Three points x, y and z joined in a triangle with sides labelled by their distances, illustrating the triangle inequality.

The figure shows the triangle inequality for three points: the red direct distance d(x,z)d(x,z) is at most the sum d(x,y)+d(y,z)d(x,y)+d(y,z) of the two blue distances through the intermediate point yy. A detour through another point is never shorter than the direct route.

Each axiom has a job. Identity of indiscernibles makes distinct points distinguishable, which is why a convergent sequence has only one limit. Symmetry makes "xx is close to yy" a mutual relation. The triangle inequality lets small distances be chained, which is what arguments with ε2\tfrac{\varepsilon}{2} use. Nonnegativity even follows from the other three: 0=d(x,x)≤d(x,y)+d(y,x)=2 d(x,y)0=d(x,x)\le d(x,y)+d(y,x)=2\,d(x,y).

On R\mathbb{R} the usual metric is d(x,y)=∣x−y∣d(x,y)=|x-y|, built from the absolute value, and on Rn\mathbb{R}^n it is the Euclidean distance from Math II. Every norm gives a metric d(x,y)=∥x−y∥d(x,y)=\|x-y\|, but a metric needs no vector structure: the discrete metric works on any set.

A common slip is to treat a metric space as just a set. The same set can carry several metrics, such as the Euclidean and the taxicab metric on R2\mathbb{R}^2, and statements about convergence or completeness depend on which one is meant. That is why a metric space is written as the pair (X,d)(X,d).


Key Results

  • Metrics are always nonnegative. The only point at a zero distance from a point xx is xx itself.
  • Metrics are symmetric and adhere to the triangle inequality.

Examples

  • The Euclidean distance in Rn\mathbb{R}^n is defined as d(x,y)=(∑i=1n(xi−yi)2)1/2.\displaystyle d(\boldsymbol{x}, \boldsymbol{y}) = \left(\sum_{i=1}^n (x_i - y_i)^2\right)^{1/2}\text{.}
  • The complex numbers C\mathbb{C} with the distance function (based on modulus) d(z,w)=∣z−w∣d(z,w) = |z-w| form a metric space.

Prerequisites

Sources

Aliases: distance function Keywords: metric space Symbols: complex numbers, element of, epsilon, infinity, real numbers, sum

Last updated: 20 October 2026 03:02