# Metric space

Last updated

In mathematics, a metric space is a set together with a metric on the set. The metric is a function that defines a concept of distance between any two members of the set, which are usually called points. The metric satisfies a few simple properties. Informally:

## Contents

• the distance from ${\displaystyle A}$ to ${\displaystyle B}$ is zero if and only if ${\displaystyle A}$ and ${\displaystyle B}$ are the same point,
• the distance between two distinct points is positive,
• the distance from ${\displaystyle A}$ to ${\displaystyle B}$ is the same as the distance from ${\displaystyle B}$ to ${\displaystyle A}$, and
• the distance from ${\displaystyle A}$ to ${\displaystyle B}$ is less than or equal to the distance from ${\displaystyle A}$ to ${\displaystyle B}$ via any third point ${\displaystyle C}$.

A metric on a space induces topological properties like open and closed sets, which lead to the study of more abstract topological spaces.

The most familiar metric space is 3-dimensional Euclidean space. In fact, a "metric" is the generalization of the Euclidean metric arising from the four long-known properties of the Euclidean distance. The Euclidean metric defines the distance between two points as the length of the straight line segment connecting them. Other metric spaces occur for example in elliptic geometry and hyperbolic geometry, where distance on a sphere measured by angle is a metric, and the hyperboloid model of hyperbolic geometry is used by special relativity as a metric space of velocities. Some of non-geometric metric spaces include spaces of finite strings (finite sequences of symbols from a predefined alphabet) equipped with e.g. a Hamming's or Levenshtein distance, a space of subsets of any metric space equipped with Hausdorff distance, a space of real functions integrable on a unit interval with an integral metric ${\displaystyle d(f,g)=\int _{x=0}^{x=1}\left\vert f(x)-g(x)\right\vert \,dx}$ or probabilistic spaces on any chosen metric space equipped with Wasserstein metric.

## History

In 1906 Maurice Fréchet introduced metric spaces in his work Sur quelques points du calcul fonctionnel. [1] However the name is due to Felix Hausdorff.

## Definition

A metric space is an ordered pair ${\displaystyle (M,d)}$ where ${\displaystyle M}$ is a set and ${\displaystyle d}$ is a metric on ${\displaystyle M}$, i.e., a function

${\displaystyle d\,\colon M\times M\to \mathbb {R} }$

such that for any ${\displaystyle x,y,z\in M}$, the following holds: [2]

 1 ${\displaystyle d(x,y)=0\iff x=y}$ identity of indiscernibles 2 ${\displaystyle d(x,y)=d(y,x)}$ symmetry 3 ${\displaystyle d(x,z)\leq d(x,y)+d(y,z)}$ subadditivity or triangle inequality

Given the above three axioms, we also have that ${\displaystyle d(x,y)\geq 0}$ for any ${\displaystyle x,y\in M}$. This is deduced as follows:

 ${\displaystyle d(x,y)+d(y,x)\geq d(x,x)}$ by triangle inequality ${\displaystyle d(x,y)+d(x,y)\geq d(x,x)}$ by symmetry ${\displaystyle 2d(x,y)\geq 0}$ by identity of indiscernibles ${\displaystyle d(x,y)\geq 0}$ we have non-negativity

The function ${\displaystyle d}$ is also called distance function or simply distance. Often, ${\displaystyle d}$ is omitted and one just writes ${\displaystyle M}$ for a metric space if it is clear from the context what metric is used.

Ignoring mathematical details, for any system of roads and terrains the distance between two locations can be defined as the length of the shortest route connecting those locations. To be a metric there shouldn't be any one-way roads. The triangle inequality expresses the fact that detours aren't shortcuts. If the distance between two points is zero, the two points are indistinguishable from one-another. Many of the examples below can be seen as concrete versions of this general idea.

## Examples of metric spaces

• The real numbers with the distance function ${\displaystyle d(x,y)=|y-x|}$ given by the absolute difference, and, more generally, Euclidean n-space with the Euclidean distance, are complete metric spaces. The rational numbers with the same distance function also form a metric space, but not a complete one.
• The positive real numbers with distance function ${\displaystyle d(x,y)=\left|\log(y/x)\right|}$ is a complete metric space.
• Any normed vector space is a metric space by defining ${\displaystyle d(x,y)=\lVert y-x\rVert }$, see also metrics on vector spaces. (If such a space is complete, we call it a Banach space.) Examples:
• The British Rail metric (also called the “post office metric” or the “SNCF metric”) on a normed vector space is given by ${\displaystyle d(x,y)=\lVert x\rVert +\lVert y\rVert }$ for distinct points ${\displaystyle x}$ and ${\displaystyle y}$, and ${\displaystyle d(x,x)=0}$. More generally ${\displaystyle \lVert \cdot \rVert }$ can be replaced with a function ${\displaystyle f}$ taking an arbitrary set ${\displaystyle S}$ to non-negative reals and taking the value ${\displaystyle 0}$ at most once: then the metric is defined on ${\displaystyle S}$ by ${\displaystyle d(x,y)=f(x)+f(y)}$ for distinct points ${\displaystyle x}$ and ${\displaystyle y}$, and ${\displaystyle d(x,x)=0}$. The name alludes to the tendency of railway journeys to proceed via London (or Paris) irrespective of their final destination.
• If ${\displaystyle (M,d)}$ is a metric space and ${\displaystyle X}$ is a subset of ${\displaystyle M}$, then ${\displaystyle (X,d)}$ becomes a metric space by restricting the domain of ${\displaystyle d}$ to ${\displaystyle X\times X}$.
• The discrete metric, where ${\displaystyle d(x,y)=0}$ if ${\displaystyle x=y}$ and ${\displaystyle d(x,y)=1}$ otherwise, is a simple but important example, and can be applied to all sets. This, in particular, shows that for any set, there is always a metric space associated to it. Using this metric, the singleton of any point is an open ball, therefore every subset is open and the space has the discrete topology.
• A finite metric space is a metric space having a finite number of points. Not every finite metric space can be isometrically embedded in a Euclidean space. [5] [6]
• The hyperbolic plane is a metric space. More generally:
• If ${\displaystyle M}$ is any connected Riemannian manifold, then we can turn ${\displaystyle M}$ into a metric space by defining the distance of two points as the infimum of the lengths of the paths (continuously differentiable curves) connecting them.
• If ${\displaystyle X}$ is some set and ${\displaystyle M}$ is a metric space, then, the set of all bounded functions ${\displaystyle f\colon X\to M}$ (i.e. those functions whose image is a bounded subset of ${\displaystyle M}$) can be turned into a metric space by defining ${\displaystyle d(f,g)=\sup _{x\in X}d(f(x),g(x))}$ for any two bounded functions ${\displaystyle f}$ and ${\displaystyle g}$ (where ${\displaystyle \sup }$ is supremum). [7] This metric is called the uniform metric or supremum metric, and If ${\displaystyle M}$ is complete, then this function space is complete as well. If X is also a topological space, then the set of all bounded continuous functions from ${\displaystyle X}$ to ${\displaystyle M}$ (endowed with the uniform metric), will also be a complete metric if M is.
• If ${\displaystyle G}$ is an undirected connected graph, then the set ${\displaystyle V}$ of vertices of ${\displaystyle G}$ can be turned into a metric space by defining ${\displaystyle d(x,y)}$ to be the length of the shortest path connecting the vertices ${\displaystyle x}$ and ${\displaystyle y}$. In geometric group theory this is applied to the Cayley graph of a group, yielding the word metric.
• Graph edit distance is a measure of dissimilarity between two graphs, defined as the minimal number of graph edit operations required to transform one graph into another.
• The Levenshtein distance is a measure of the dissimilarity between two strings ${\displaystyle u}$ and ${\displaystyle v}$, defined as the minimal number of character deletions, insertions, or substitutions required to transform ${\displaystyle u}$ into ${\displaystyle v}$. This can be thought of as a special case of the shortest path metric in a graph and is one example of an edit distance.
• Given a metric space ${\displaystyle (X,d)}$ and an increasing concave function ${\displaystyle f\colon [0,\infty )\to [0,\infty )}$ such that ${\displaystyle f(x)=0}$ if and only if ${\displaystyle x=0}$, then ${\displaystyle f\circ d}$ is also a metric on ${\displaystyle X}$.
• Given an injective function ${\displaystyle f}$ from any set ${\displaystyle A}$ to a metric space ${\displaystyle (X,d)}$, ${\displaystyle d(f(x),f(y))}$ defines a metric on ${\displaystyle A}$.
• Using T-theory, the tight span of a metric space is also a metric space. The tight span is useful in several types of analysis.
• The set of all ${\displaystyle m}$ by ${\displaystyle n}$ matrices over some field is a metric space with respect to the rank distance ${\displaystyle d(X,Y)=\mathrm {rank} (Y-X)}$.
• The Helly metric is used in game theory.

## Open and closed sets, topology and convergence

Every metric space is a topological space in a natural manner, and therefore all definitions and theorems about general topological spaces also apply to all metric spaces.

About any point ${\displaystyle x}$ in a metric space ${\displaystyle M}$ we define the open ball of radius ${\displaystyle r>0}$ (where ${\displaystyle r}$ is a real number) about ${\displaystyle x}$ as the set

${\displaystyle B(x;r)=\{y\in M:d(x,y)

These open balls form the base for a topology on M, making it a topological space.

Explicitly, a subset ${\displaystyle U}$ of ${\displaystyle M}$ is called open if for every ${\displaystyle x}$ in ${\displaystyle U}$ there exists an ${\displaystyle r>0}$ such that ${\displaystyle B(x;r)}$ is contained in ${\displaystyle U}$. The complement of an open set is called closed . A neighborhood of the point ${\displaystyle x}$ is any subset of ${\displaystyle M}$ that contains an open ball about ${\displaystyle x}$ as a subset.

A topological space which can arise in this way from a metric space is called a metrizable space.

A sequence (${\displaystyle x_{n}}$) in a metric space ${\displaystyle M}$ is said to converge to the limit ${\displaystyle x\in M}$ if and only if for every ${\displaystyle \varepsilon >0}$, there exists a natural number N such that ${\displaystyle d(x_{n},x)<\varepsilon }$ for all ${\displaystyle n>N}$. Equivalently, one can use the general definition of convergence available in all topological spaces.

A subset ${\displaystyle A}$ of the metric space ${\displaystyle M}$ is closed if and only if every sequence in ${\displaystyle A}$ that converges to a limit in ${\displaystyle M}$ has its limit in ${\displaystyle A}$.

## Types of metric spaces

### Complete spaces

A metric space ${\displaystyle M}$ is said to be complete if every Cauchy sequence converges in ${\displaystyle M}$. That is to say: if ${\displaystyle d(x_{n},x_{m})\to 0}$ as both ${\displaystyle n}$ and ${\displaystyle m}$ independently go to infinity, then there is some ${\displaystyle y\in M}$ with ${\displaystyle d(x_{n},y)\to 0}$.

Every Euclidean space is complete, as is every closed subset of a complete space. The rational numbers, using the absolute value metric ${\displaystyle d(x,y)=\vert x-y\vert }$, are not complete.

Every metric space has a unique (up to isometry) completion, which is a complete space that contains the given space as a dense subset. For example, the real numbers are the completion of the rationals.

If ${\displaystyle X}$ is a complete subset of the metric space ${\displaystyle M}$, then ${\displaystyle X}$ is closed in ${\displaystyle M}$. Indeed, a space is complete if and only if it is closed in any containing metric space.

Every complete metric space is a Baire space.

### Bounded and totally bounded spaces

A metric space ${\displaystyle M}$ is called bounded if there exists some number ${\displaystyle r}$, such that ${\displaystyle d(x,y)\leq r}$ for all ${\displaystyle x,y\in M}$. The smallest possible such ${\displaystyle r}$ is called the diameter of ${\displaystyle M}$. The space ${\displaystyle M}$ is called precompact or totally bounded if for every ${\displaystyle r>0}$ there exist finitely many open balls of radius ${\displaystyle r}$ whose union covers ${\displaystyle M}$. Since the set of the centres of these balls is finite, it has finite diameter, from which it follows (using the triangle inequality) that every totally bounded space is bounded. The converse does not hold, since any infinite set can be given the discrete metric (one of the examples above) under which it is bounded and yet not totally bounded.

Note that in the context of intervals in the space of real numbers and occasionally regions in a Euclidean space ${\displaystyle \mathbb {R} ^{n}}$ a bounded set is referred to as "a finite interval" or "finite region". However boundedness should not in general be confused with "finite", which refers to the number of elements, not to how far the set extends; finiteness implies boundedness, but not conversely. Also note that an unbounded subset of ${\displaystyle \mathbb {R} ^{n}}$ may have a finite volume.

### Compact spaces

A metric space ${\displaystyle M}$ is compact if every sequence in ${\displaystyle M}$ has a subsequence that converges to a point in ${\displaystyle M}$. This is known as sequential compactness and, in metric spaces (but not in general topological spaces), is equivalent to the topological notions of countable compactness and compactness defined via open covers.

Examples of compact metric spaces include the closed interval ${\displaystyle [0,1]}$ with the absolute value metric, all metric spaces with finitely many points, and the Cantor set. Every closed subset of a compact space is itself compact.

A metric space is compact if and only if it is complete and totally bounded. This is known as the Heine–Borel theorem. Note that compactness depends only on the topology, while boundedness depends on the metric.

Lebesgue's number lemma states that for every open cover of a compact metric space ${\displaystyle M}$, there exists a "Lebesgue number" ${\displaystyle \delta }$ such that every subset of ${\displaystyle M}$ of diameter ${\displaystyle r<\delta }$ is contained in some member of the cover.

Every compact metric space is second countable, [8] and is a continuous image of the Cantor set. (The latter result is due to Pavel Alexandrov and Urysohn.)

### Locally compact and proper spaces

A metric space is said to be locally compact if every point has a compact neighborhood. Euclidean spaces are locally compact, but infinite-dimensional Banach spaces are not.

A space is proper if every closed ball ${\displaystyle \{y\,\colon d(x,y)\leq r\}}$ is compact. Proper spaces are locally compact, but the converse is not true in general.

### Connectedness

A metric space ${\displaystyle M}$ is connected if the only subsets that are both open and closed are the empty set and ${\displaystyle M}$ itself.

A metric space ${\displaystyle M}$ is path connected if for any two points ${\displaystyle x,y\in M}$ there exists a continuous map ${\displaystyle f\colon [0,1]\to M}$ with ${\displaystyle f(0)=x}$ and ${\displaystyle f(1)=y}$. Every path connected space is connected, but the converse is not true in general.

There are also local versions of these definitions: locally connected spaces and locally path connected spaces.

Simply connected spaces are those that, in a certain sense, do not have "holes".

### Separable spaces

A metric space is separable space if it has a countable dense subset. Typical examples are the real numbers or any Euclidean space. For metric spaces (but not for general topological spaces) separability is equivalent to second-countability and also to the Lindelöf property.

### Pointed metric spaces

If ${\displaystyle X}$ is a metric space and ${\displaystyle x_{0}\in X}$ then ${\displaystyle (X,x_{0})}$ is called a pointed metric space, and ${\displaystyle x_{0}}$ is called a distinguished point. Note that a pointed metric space is just a nonempty metric space with attention drawn to its distinguished point, and that any nonempty metric space can be viewed as a pointed metric space. The distinguished point is sometimes denoted ${\displaystyle 0}$ due to its similar behavior to zero in certain contexts.

## Types of maps between metric spaces

Suppose ${\displaystyle (M_{1},d_{1})}$ and ${\displaystyle (M_{2},d_{2})}$ are two metric spaces.

### Continuous maps

The map ${\displaystyle f\,\colon M_{1}\to M_{2}}$ is continuous if it has one (and therefore all) of the following equivalent properties:

General topological continuity
for every open set ${\displaystyle U}$ in ${\displaystyle M_{2}}$, the preimage ${\displaystyle f^{-1}[U]}$ is open in ${\displaystyle M_{1}}$
This is the general definition of continuity in topology.
Sequential continuity
if ${\displaystyle (x_{n})}$ is a sequence in ${\displaystyle M_{1}}$ that converges to ${\displaystyle x}$, then the sequence ${\displaystyle (f(x_{n}))}$ converges to ${\displaystyle f(x)}$ in ${\displaystyle M_{2}}$.
This is sequential continuity, due to Eduard Heine.
ε-δ definition
for every ${\displaystyle x\in M_{1}}$ and every ${\displaystyle \varepsilon >0}$ there exists ${\displaystyle \delta >0}$ such that for all ${\displaystyle y}$ in ${\displaystyle M_{1}}$ we have
${\displaystyle d_{1}(x,y)<\delta \implies d_{2}(f(x),f(y))<\varepsilon .}$
This uses the (ε, δ)-definition of limit, and is due to Augustin Louis Cauchy.

Moreover, ${\displaystyle f}$ is continuous if and only if it is continuous on every compact subset of ${\displaystyle M_{1}}$.

The image of every compact set under a continuous function is compact, and the image of every connected set under a continuous function is connected.

### Uniformly continuous maps

The map ${\displaystyle f\,\colon M_{1}\to M_{2}}$ is uniformly continuous if for every ${\displaystyle \varepsilon >0}$ there exists ${\displaystyle \delta >0}$ such that

${\displaystyle d_{1}(x,y)<\delta \implies d_{2}(f(x),f(y))<\varepsilon \quad {\mbox{for all}}\quad x,y\in M_{1}.}$

Every uniformly continuous map ${\displaystyle f\,\colon M_{1}\to M_{2}}$ is continuous. The converse is true if ${\displaystyle M_{1}}$ is compact (Heine–Cantor theorem).

Uniformly continuous maps turn Cauchy sequences in ${\displaystyle M_{1}}$ into Cauchy sequences in ${\displaystyle M_{2}}$. For continuous maps this is generally wrong; for example, a continuous map from the open interval ${\displaystyle (0,1)}$onto the real line turns some Cauchy sequences into unbounded sequences.

### Lipschitz-continuous maps and contractions

Given a real number ${\displaystyle K>0}$, the map ${\displaystyle f\,\colon M_{1}\to M_{2}}$ is K-Lipschitz continuous if

${\displaystyle d_{2}(f(x),f(y))\leq Kd_{1}(x,y)\quad {\mbox{for all}}\quad x,y\in M_{1}.}$

Every Lipschitz-continuous map is uniformly continuous, but the converse is not true in general.

If ${\displaystyle K<1}$, then ${\displaystyle f}$ is called a contraction. Suppose ${\displaystyle M_{2}=M_{1}}$ and ${\displaystyle M_{1}}$ is complete. If ${\displaystyle f}$ is a contraction, then ${\displaystyle f}$ admits a unique fixed point (Banach fixed-point theorem). If ${\displaystyle M_{1}}$ is compact, the condition can be weakened a bit: ${\displaystyle f}$ admits a unique fixed point if

${\displaystyle d(f(x),f(y)).

### Isometries

The map ${\displaystyle f\,\colon M_{1}\to M_{2}}$ is an isometry if

${\displaystyle d_{2}(f(x),f(y))=d_{1}(x,y)\quad {\mbox{for all}}\quad x,y\in M_{1}}$

Isometries are always injective; the image of a compact or complete set under an isometry is compact or complete, respectively. However, if the isometry is not surjective, then the image of a closed (or open) set need not be closed (or open).

### Quasi-isometries

The map ${\displaystyle f\,\colon M_{1}\to M_{2}}$ is a quasi-isometry if there exist constants ${\displaystyle A\geq 1}$ and ${\displaystyle B\geq 0}$ such that

${\displaystyle {\frac {1}{A}}d_{2}(f(x),f(y))-B\leq d_{1}(x,y)\leq Ad_{2}(f(x),f(y))+B\quad {\text{ for all }}\quad x,y\in M_{1}}$

and a constant ${\displaystyle C\geq 0}$ such that every point in ${\displaystyle M_{2}}$ has a distance at most ${\displaystyle C}$ from some point in the image ${\displaystyle f(M_{1})}$.

Note that a quasi-isometry is not required to be continuous. Quasi-isometries compare the "large-scale structure" of metric spaces; they find use in geometric group theory in relation to the word metric.

## Notions of metric space equivalence

Given two metric spaces ${\displaystyle (M_{1},d_{1})}$ and ${\displaystyle (M_{2},d_{2})}$:

• They are called homeomorphic (topologically isomorphic) if there exists a homeomorphism between them (i.e., a bijection continuous in both directions).
• They are called uniformic (uniformly isomorphic) if there exists a uniform isomorphism between them (i.e., a bijection uniformly continuous in both directions).
• They are called isometric if there exists a bijective isometry between them. In this case, the two metric spaces are essentially identical.
• They are called quasi-isometric if there exists a quasi-isometry between them.

## Topological properties

Metric spaces are paracompact [9] Hausdorff spaces [10] and hence normal (indeed they are perfectly normal). An important consequence is that every metric space admits partitions of unity and that every continuous real-valued function defined on a closed subset of a metric space can be extended to a continuous map on the whole space (Tietze extension theorem). It is also true that every real-valued Lipschitz-continuous map defined on a subset of a metric space can be extended to a Lipschitz-continuous map on the whole space.

Metric spaces are first countable since one can use balls with rational radius as a neighborhood base.

The metric topology on a metric space ${\displaystyle M}$ is the coarsest topology on ${\displaystyle M}$ relative to which the metric ${\displaystyle d}$ is a continuous map from the product of ${\displaystyle M}$ with itself to the non-negative real numbers.

## Distance between points and sets; Hausdorff distance and Gromov metric

A simple way to construct a function separating a point from a closed set (as required for a completely regular space) is to consider the distance between the point and the set. If ${\displaystyle (M,d)}$ is a metric space, ${\displaystyle S}$ is a subset of ${\displaystyle M}$ and ${\displaystyle x}$ is a point of ${\displaystyle M}$, we define the distance from ${\displaystyle x}$ to ${\displaystyle S}$ as

${\displaystyle d(x,S)=\inf\{d(x,s):s\in S\}}$ where ${\displaystyle \inf }$ represents the infimum.

Then ${\displaystyle d(x,S)=0}$ if and only if ${\displaystyle x}$ belongs to the closure of ${\displaystyle S}$. Furthermore, we have the following generalization of the triangle inequality:

${\displaystyle d(x,S)\leq d(x,y)+d(y,S),}$

which in particular shows that the map ${\displaystyle x\mapsto d(x,S)}$ is continuous.

Given two subsets ${\displaystyle S}$ and ${\displaystyle T}$ of ${\displaystyle M}$, we define their Hausdorff distance to be

${\displaystyle d_{H}(S,T)=\max\{\sup\{d(s,T):s\in S\},\sup\{d(t,S):t\in T\}\}}$ where ${\displaystyle \sup }$ represents the supremum.

In general, the Hausdorff distance ${\displaystyle d_{H}(S,T)}$ can be infinite. Two sets are close to each other in the Hausdorff distance if every element of either set is close to some element of the other set.

The Hausdorff distance ${\displaystyle d_{H}}$ turns the set ${\displaystyle K(M)}$ of all non-empty compact subsets of ${\displaystyle M}$ into a metric space. One can show that ${\displaystyle K(M)}$ is complete if ${\displaystyle M}$ is complete. (A different notion of convergence of compact subsets is given by the Kuratowski convergence.)

One can then define the Gromov–Hausdorff distance between any two metric spaces by considering the minimal Hausdorff distance of isometrically embedded versions of the two spaces. Using this distance, the class of all (isometry classes of) compact metric spaces becomes a metric space in its own right.

## Product metric spaces

If ${\displaystyle (M_{1},d_{1}),\ldots ,(M_{n},d_{n})}$ are metric spaces, and ${\displaystyle N}$ is the Euclidean norm on ${\displaystyle \mathbb {R} ^{n}}$, then ${\displaystyle {\Bigl (}M_{1}\times \cdots \times M_{n},N(d_{1},\ldots ,d_{n}){\Bigr )}}$ is a metric space, where the product metric is defined by

${\displaystyle N(d_{1},\ldots ,d_{n}){\Big (}(x_{1},\ldots ,x_{n}),(y_{1},\ldots ,y_{n}){\Big )}=N{\Big (}d_{1}(x_{1},y_{1}),\ldots ,d_{n}(x_{n},y_{n}){\Big )},}$

and the induced topology agrees with the product topology. By the equivalence of norms in finite dimensions, an equivalent metric is obtained if ${\displaystyle N}$ is the taxicab norm, a p-norm, the maximum norm, or any other norm which is non-decreasing as the coordinates of a positive ${\displaystyle n}$-tuple increase (yielding the triangle inequality).

Similarly, a countable product of metric spaces can be obtained using the following metric

${\displaystyle d(x,y)=\sum _{i=1}^{\infty }{\frac {1}{2^{i}}}{\frac {d_{i}(x_{i},y_{i})}{1+d_{i}(x_{i},y_{i})}}.}$

An uncountable product of metric spaces need not be metrizable. For example, ${\displaystyle \mathbb {R} ^{\mathbb {R} }}$ is not first-countable and thus isn't metrizable.

### Continuity of distance

In the case of a single space ${\displaystyle (M,d)}$, the distance map ${\displaystyle d\colon M\times M\to R^{+}}$ (from the definition) is uniformly continuous with respect to any of the above product metrics ${\displaystyle N(d,d)}$, and in particular is continuous with respect to the product topology of ${\displaystyle M\times M}$.

## Quotient metric spaces

If M is a metric space with metric ${\displaystyle d}$, and ${\displaystyle \sim }$ is an equivalence relation on ${\displaystyle M}$, then we can endow the quotient set ${\displaystyle M/\!\sim }$ with a pseudometric. Given two equivalence classes ${\displaystyle [x]}$ and ${\displaystyle [y]}$, we define

${\displaystyle d'([x],[y])=\inf\{d(p_{1},q_{1})+d(p_{2},q_{2})+\dotsb +d(p_{n},q_{n})\}}$

where the infimum is taken over all finite sequences ${\displaystyle (p_{1},p_{2},\dots ,p_{n})}$ and ${\displaystyle (q_{1},q_{2},\dots ,q_{n})}$ with ${\displaystyle [p_{1}]=[x]}$, ${\displaystyle [q_{n}]=[y]}$, ${\displaystyle [q_{i}]=[p_{i+1}],i=1,2,\dots ,n-1}$. In general this will only define a pseudometric, i.e. ${\displaystyle d'([x],[y])=0}$ does not necessarily imply that ${\displaystyle [x]=[y]}$. However, for some equivalence relations (e.g., those given by gluing together polyhedra along faces), ${\displaystyle d'}$ is a metric.

The quotient metric ${\displaystyle d}$ is characterized by the following universal property. If ${\displaystyle f\,\colon (M,d)\to (X,\delta )}$ is a metric map between metric spaces (that is, ${\displaystyle \delta (f(x),f(y))\leq d(x,y)}$ for all ${\displaystyle x}$, ${\displaystyle y}$) satisfying ${\displaystyle f(x)=f(y)}$ whenever ${\displaystyle x\sim y,}$ then the induced function ${\displaystyle {\overline {f}}\,\colon M/\!\sim \to X}$, given by ${\displaystyle {\overline {f}}([x])=f(x)}$, is a metric map ${\displaystyle {\overline {f}}\,\colon (M/\!\sim ,d')\to (X,\delta ).}$

A topological space is sequential if and only if it is a quotient of a metric space. [11]

## Generalizations of metric spaces

• Every metric space is a uniform space in a natural manner, and every uniform space is naturally a topological space. Uniform and topological spaces can therefore be regarded as generalizations of metric spaces.
• Relaxing the requirement that the distance between two distinct points be non-zero leads to the concepts of a pseudometric space or a dislocated metric space. [12] Removing the requirement of symmetry, we arrive at a quasimetric space. Replacing the triangle inequality with a weaker form leads to semimetric spaces.
• If the distance function takes values in the extended real number line ${\displaystyle \mathbb {R} \cup \{+\infty \}}$, but otherwise satisfies the conditions of a metric, then it is called an extended metric and the corresponding space is called an ${\displaystyle \infty }$-metric space. If the distance function takes values in some (suitable) ordered set (and the triangle inequality is adjusted accordingly), then we arrive at the notion of generalized ultrametric. [12]
• Approach spaces are a generalization of metric spaces, based on point-to-set distances, instead of point-to-point distances.
• A continuity space is a generalization of metric spaces and posets, that can be used to unify the notions of metric spaces and domains.
• A partial metric space is intended to be the least generalisation of the notion of a metric space, such that the distance of each point from itself is no longer necessarily zero. [13]

### Metric spaces as enriched categories

The ordered set ${\displaystyle (\mathbb {R} ,\geq )}$ can be seen as a category by requesting exactly one morphism ${\displaystyle a\to b}$ if ${\displaystyle a\geq b}$ and none otherwise. By using ${\displaystyle +}$ as the tensor product and ${\displaystyle 0}$ as the identity, it becomes a monoidal category ${\displaystyle R^{*}}$. Every metric space ${\displaystyle (M,d)}$ can now be viewed as a category ${\displaystyle M^{*}}$ enriched over ${\displaystyle R^{*}}$:

• Set ${\displaystyle \operatorname {Ob} (M^{*}):=M}$
• For each ${\displaystyle X,Y\in M}$ set ${\displaystyle \operatorname {Hom} (X,Y):=d(X,Y)\in \operatorname {Ob} (R^{*})}$
• The composition morphism ${\displaystyle \operatorname {Hom} (Y,Z)\otimes \operatorname {Hom} (X,Y)\to \operatorname {Hom} (X,Z)}$ will be the unique morphism in ${\displaystyle R^{*}}$ given from the triangle inequality ${\displaystyle d(y,z)+d(x,y)\geq d(x,z)}$
• The identity morphism ${\displaystyle 0\to \operatorname {Hom} (X,X)}$ will be the unique morphism given from the fact that ${\displaystyle 0\geq d(X,X)}$.
• Since ${\displaystyle R^{*}}$ is a poset, all diagrams that are required for an enriched category commute automatically.

See the paper by F.W. Lawvere listed below.

## Related Research Articles

In mathematics, more specifically in general topology, compactness is a property that generalizes the notion of a subset of Euclidean space being closed and bounded. Examples include a closed interval, a rectangle, or a finite set of points. This notion is defined for more general topological spaces than Euclidean space in various ways.

In mathematics, a continuous function is a function that does not have any abrupt changes in value, known as discontinuities. More precisely, a function is continuous if arbitrarily small changes in its output can be assured by restricting to sufficiently small changes in its input. If not continuous, a function is said to be discontinuous. Up until the 19th century, mathematicians largely relied on intuitive notions of continuity, during which attempts such as the epsilon–delta definition were made to formalize it.

In mathematical analysis, a metric space M is called complete if every Cauchy sequence of points in M has a limit that is also in M or, alternatively, if every Cauchy sequence in M converges in M.

Euclidean space is the fundamental space of classical geometry. Originally it was the three-dimensional space of Euclidean geometry, but in modern mathematics there are Euclidean spaces of any nonnegative integer dimension, including the three-dimensional space and the Euclidean plane. It was introduced by the Ancient Greek mathematician Euclid of Alexandria, and the qualifier Euclidean is used to distinguish it from other spaces that were later discovered in physics and modern mathematics.

In mathematics, a normed vector space or normed space is a vector space over the real or complex numbers, on which a norm is defined. A norm is the formalization and the generalization to real vector spaces of the intuitive notion of "length" in the real world. A norm is a real-valued function defined on the vector space that is commonly denoted and has the following properties:

1. It is nonnegative, that is for every vector x, one has
2. It is positive on nonzero vectors, that is,
3. For every vector x, and every scalar one has
4. The triangle inequality holds; that is, for every vectors x and y, one has

In mathematics, a topological space is called separable if it contains a countable, dense subset; that is, there exists a sequence of elements of the space such that every nonempty open subset of the space contains at least one element of the sequence.

In mathematics, a topological space is, roughly speaking, a geometrical space in which closeness is defined but, generally, cannot be measured by a numeric distance. More specifically, a topological space is a set of points, along with a set of neighbourhoods for each point, satisfying a set of axioms relating points and neighbourhoods.

This is a glossary of some terms used in the branch of mathematics known as topology. Although there is no absolute distinction between different areas of topology, the focus here is on general topology. The following definitions are also fundamental to algebraic topology, differential topology and geometric topology.

In mathematics, a function f is uniformly continuous if, roughly speaking, it is possible to guarantee that f(x) and f(y) be as close to each other as we please by requiring only that x and y be sufficiently close to each other; unlike ordinary continuity, where the maximum distance between f(x) and f(y) may depend on x and y themselves.

In mathematics, a topological vector space is one of the basic structures investigated in functional analysis. A topological vector space is a vector space which is also a topological space, this implies that vector space operations be continuous functions. More specifically, its topological space has a uniform topological structure, allowing a notion of uniform convergence.

In topology, a discrete space is a particularly simple example of a topological space or similar structure, one in which the points form a discontinuous sequence, meaning they are isolated from each other in a certain sense. The discrete topology is the finest topology that can be given on a set. Every subset is open in the discrete topology so that in particular, every singleton subset is an open set in the discrete topology.

In differential geometry, a Riemannian manifold or Riemannian space(M, g) is a real, smooth manifold M equipped with a positive-definite inner product gp on the tangent space TpM at each point p. A common convention is to take g to be smooth, which means that for any smooth coordinate chart (U, x) on M, the n2 functions

In mathematics, general topology is the branch of topology that deals with the basic set-theoretic definitions and constructions used in topology. It is the foundation of most other branches of topology, including differential topology, geometric topology, and algebraic topology. Another name for general topology is point-set topology.

In functional analysis and related areas of mathematics, Fréchet spaces, named after Maurice Fréchet, are special topological vector spaces. They are generalizations of Banach spaces. All Banach and Hilbert spaces are Fréchet spaces. Spaces of infinitely differentiable functions are typical examples of Fréchet spaces, many of which are typically not Banach spaces.

In mathematics, an isometry is a distance-preserving transformation between metric spaces, usually assumed to be bijective.

In mathematics, the Hausdorff distance, or Hausdorff metric, also called Pompeiu–Hausdorff distance, measures how far two subsets of a metric space are from each other. It turns the set of non-empty compact subsets of a metric space into a metric space in its own right. It is named after Felix Hausdorff and Dimitrie Pompeiu.

This is a glossary of some terms used in Riemannian geometry and metric geometry — it doesn't cover the terminology of differential topology.

In mathematics, a Radon measure, named after Johann Radon, is a measure on the σ-algebra of Borel sets of a Hausdorff topological space X that is finite on all compact sets, outer regular on all Borel sets, and inner regular on open sets. These conditions guarantee that the measure is "compatible" with the topology of the space, and most measures used in mathematical analysis and in number theory are indeed Radon measures.

In topology and related branches of mathematics, total-boundedness is a generalization of compactness for circumstances in which a set is not necessarily closed. A totally bounded set can be covered by finitely many subsets of every fixed "size"

In mathematics, a quasi-isometry is a function between two metric spaces that respects large-scale geometry of these spaces and ignores their small-scale details. Two metric spaces are quasi-isometric if there exists a quasi-isometry between them. The property of being quasi-isometric behaves like an equivalence relation on the class of metric spaces.

## References

1. Rendic. Circ. Mat. Palermo 22 (1906) 1–74
2. B. Choudhary (1992). The Elements of Complex Analysis. New Age International. p. 20. ISBN   978-81-224-0399-2.
3. Huber, Klaus (January 1994) [1993-01-17, 1992-05-21]. "Codes over Gaussian Integers". IEEE Transactions on Information Theory . 40 (1): 207–216. doi:10.1109/18.272484. eISSN   1557-9654. ISSN   0018-9448. S2CID   195866926. IEEE Log ID 9215213. Archived (PDF) from the original on 2020-12-17. Retrieved 2020-12-17.
4. Strang, Thomas; Dammann, Armin; Röckl, Matthias; Plass, Simon (October 2009). Using Gray codes as Location Identifiers (PDF). 6. GI/ITG KuVS Fachgespräch Ortsbezogene Anwendungen und Dienste (in English and German). Oberpfaffenhofen, Germany: Institute of Communications and Navigation, German Aerospace Center (DLR). CiteSeerX  . Archived (PDF) from the original on 2015-05-01. Retrieved 2020-12-16. Lay summary (PDF). (5/8 pages)
5. Searcóid, p. 107.
6. "PlanetMath: a compact metric space is second countable". planetmath.org. Archived from the original on 2009-02-05. Retrieved 2018-05-02.
7. Rudin, Mary Ellen. A new proof that metric spaces are paracompact Archived 2016-04-12 at the Wayback Machine . Proceedings of the American Mathematical Society, Vol. 20, No. 2. (Feb., 1969), p. 603.
8. Goreham, Anthony. Sequential convergence in Topological Spaces Archived 2011-06-04 at the Wayback Machine . Honours' Dissertation, Queen's College, Oxford (April, 2001), p. 14
9. Pascal Hitzler; Anthony Seda (2016-04-19). Mathematical Aspects of Logic Programming Semantics. CRC Press. ISBN   978-1-4398-2962-2.
10. "Partial metrics : welcome". www.dcs.warwick.ac.uk. Archived from the original on 2017-07-27. Retrieved 2018-05-02.

This is reprinted (with author commentary) at Reprints in Theory and Applications of Categories Also (with an author commentary) in Enriched categories in the logic of geometry and analysis. Repr. Theory Appl. Categ. No. 1 (2002), 1–37.