# Contents

## Idea

A metric space is a set which comes equipped with a function which measures distance between points, called a metric. The metric can be used to generate a topology on the set, and a topological space whose topology comes from some metric is said to be metrizable.

## Definitions

Traditionally, a metric space is defined to be a set $X$ equipped with a distance function

$d:X×X\to \left[0,\infty \right)$d\colon X \times X \to [0, \infty)

(valued in nonnegative real numbers) satisfying the following axioms:

• Triangle inequality: $d\left(x,y\right)+d\left(y,z\right)\ge d\left(x,z\right)$;
• Point inequality: $0\ge d\left(x,x\right)$ (so $0=d\left(x,x\right)$);
• Separation: $x=y$ if $d\left(x,y\right)=0$ (so $x=y$ iff $d\left(x,y\right)=0$);
• Symmetry: $d\left(x,y\right)=d\left(y,x\right)$.

Given a metric space $\left(X,d\right)$ and a point $x\in X$, the open ball centered at $x$ of radius $r$ is

${B}_{r}\left(x\right)≔\left\{y\in X:d\left(x,y\right)B_r(x) \coloneqq \{y \in X : d(x, y) \lt r\} ,

and it may be shown that the open balls form a basis for a topology on $X$. In fact, metric spaces are examples of uniform spaces, and much of the general theory of metric spaces, including for example the notion of completion of a metric space, can be extrapolated to uniform spaces and even Cauchy spaces.

### Metrizable spaces

A metrizable space is a topological space $X$ which admits a metric such that the metric topology agrees with the topology on $X$. In general, many different metrics (even ones giving different uniform structures) may give rise to the same topology; nevertheless, metrizability is manifestly a topological notion.

Metrizable spaces enjoy a number of separation properties: they are Hausdorff, regular, and even normal. They are also paracompact.

Metrizable spaces are closed under topological coproducts and of course subspaces (and therefore equalizers); they are closed under countable products but not general products (for instance, a product of uncountably many copies of the real line $ℝ$ is not a normal space).

### Variations

If we allow $d$ to take values in $\left[0,\infty \right]$ (the nonnegative lower reals) instead of just in $\left[0,\infty \right)$, then we get extended metric spaces. If we drop separation, then we get pseudometric spaces. If we drop the symmetry condition, then we get quasimetric spaces. Thus the most general notion is that of an extended quasipseudometric space, which are also called Lawvere metric spaces for the reasons below.

On the other hand, if we strengthen the triangle inequality to

$\mathrm{max}\left(d\left(x,y\right),d\left(y,z\right)\right)\ge d\left(x,z\right),$max(d(x,y), d(y,z)) \geq d(x,z) ,

then we get ultrametric spaces, a more restricted concept. (This include for example $p$-adic completion?s of number fields.) Extended quasipseudoultrametric spaces can also be called Lawvere ultrametric spaces.

## Lawvere metric spaces

Bill Lawvere has pointed out that Lawvere metric spaces are precisely categories enriched in the monoidal poset $\left(\left[0,\infty \right],\ge \right)$, where the monoidal product is taken to be addition. Taking the monoidal product to be supremum instead, enriched categories amount to Lawvere ultrametric spaces.

Thus generalized, many constructions and results on metric spaces turn out to be special cases of yet more general constructions and results of enriched category theory. This includes for example the notion of Cauchy completion, which in general enriched category theory is related to Karoubi envelopes and Morita equivalence.

Imposing the symmetry axiom then gives us enriched $†$-categories. Note that when enriching over a cartesian monoidal poset, there is no difference between a $†$-category and a groupoid, so ultrametric spaces can also be regarded as enriched groupoids?, which is perhaps a more familiar concept.

(The requisite axioms for an enriched groupoid do not make sense when the enriching category is not cartesian, but one might argue that since in a poset “they would commute automatically anyway”, it makes sense to call any poset-enriched $†$-category also an “enriched groupoid”. However, perhaps it makes more sense just to speak about enriched $†$-categories.)

## Motivation for the axioms

The triangle axiom is the fundamental idea behind a metric space; it goes back (at least) to Euclid and captures the idea that we are discussing the shortest distance between two points. Given the triangle inequality, we have the polygon inequality

$d\left({x}_{0},{x}_{1}\right)+\cdots +d\left({x}_{n-1},{x}_{n}\right)\ge d\left({x}_{0},{x}_{n}\right)$d(x_0,x_1) + \cdots + d(x_{n-1},x_n) \geq d(x_0,x_n)

for all $n>0$; the point inequality extends this to $n=0$.

Besides extended metric spaces (where distances may be infinite), one might consider spaces where distances may be negative. But in fact this gives us nothing new, at least if we have symmetry. First,

$d\left(x,x\right)+d\left(x,x\right)\ge d\left(x,x\right)$d(x,x) + d(x,x) \geq d(x,x)

forces $d\left(x,x\right)\ge 0$, so $d\left(x,x\right)=0$; then

$2d\left(x,y\right)=d\left(x,y\right)+d\left(y,x\right)\ge d\left(x,x\right)$2 d(x,y) = d(x,y) + d(y,x) \geq d(x,x)

forces $d\left(x,y\right)\ge 0$. A generalisation to negative distances is possible for quasimetric spaces, however; the simplest example has $2$ elements, with $d\left(x,y\right)=-d\left(y,x\right)$ (but necessarily $d\left(x,x\right)=0$ still).

We can define a preorder $\le$ on the points of a Lawvere metric space:

$x\le y\phantom{\rule{thickmathspace}{0ex}}⇔\phantom{\rule{thickmathspace}{0ex}}d\left(x,y\right)=0.$x \leq y \;\Leftrightarrow\; d(x,y) = 0 .

Then the symmetry axiom implies that this relation is symmetric and hence an equivalence relation. The quotient set under this equivalence relation satisfies separation; in this way, every pseudometric space is equivalent (as an enriched category) to a metric space. Even for quasimetric spaces, we can still define an equivalence relation:

$x\equiv y\phantom{\rule{thickmathspace}{0ex}}⇔\phantom{\rule{thickmathspace}{0ex}}d\left(x,y\right)=0\phantom{\rule{thickmathspace}{0ex}}\wedge \phantom{\rule{thickmathspace}{0ex}}d\left(y,x\right)=0.$x \equiv y \;\Leftrightarrow\; d(x,y) = 0 \;\wedge\; d(y,x) = 0 .

In constructive mathematics, it works better to use $⪇$:

$x⪇y\phantom{\rule{thickmathspace}{0ex}}⇔\phantom{\rule{thickmathspace}{0ex}}d\left(x,y\right)>0;$x \lneq y \;\Leftrightarrow\; d(x,y) \gt 0 ;

then the symmetry axiom implies that this is an apartness relation, which (for quasimetric spaces) we can also define directly:

$x#y\phantom{\rule{thickmathspace}{0ex}}⇔\phantom{\rule{thickmathspace}{0ex}}d\left(x,y\right)>0\phantom{\rule{thickmathspace}{0ex}}\vee \phantom{\rule{thickmathspace}{0ex}}d\left(y,x\right)>0.$x \# y \;\Leftrightarrow\; d(x,y) \gt 0 \;\vee\; d(y,x) \gt 0 .

## Examples

• Every set carries the discrete metric given by

$d\left(x,y\right)≔\left\{\begin{array}{cc}0& \text{if}x=y\\ 1& \text{otherwise}\end{array}$d(x,y) \coloneqq \left\{\array{ 0 & \text{if }x = y \\ 1 & \text{otherwise} }\right.

For certain purposes, it makes more sense to make most the non-zero distance $\infty$ instead of $1$; then one has an extended metric space.

• Every normed vector space is a metric space by $d\left(x,y\right)≔\parallel x-y\parallel$; a pseudonormed vector space is a pseudometric space.

• Every connected Riemannian manifold becomes a pseudometric space (or a metric space if, as is often assumed, the manifold is Hausdorff) by taking the distance between two points to be infimum of the Riemannian lengths of all continuously differentiable paths connecting them:

$d\left(x,y\right)≔{\mathrm{inf}}_{x\stackrel{\gamma }{\to }y}\mathrm{len}\left(\gamma \right).$d(x,y) \coloneqq inf_{x \stackrel{\gamma}{\to} y} len(\gamma) .

If the manifold might not be connected, then it still becomes an extended metric space.

• metric jet – a notion of “tangency” for maps of metric spaces

Revised on May 22, 2013 15:05:53 by Andrew Stacey (192.76.7.217)