# Metric space

This is a variation of topological space. View other variations of topological space

## Definition

A metric space is a set $X$ along with a distance function $d:X \times X \to \R$ such that the following hold for all $x,y,z \in X$:

• Non-negativity: $d(x,y) \ge 0$
• Identity of indiscernibles: $d(x,x) = 0 \iff x = 0$
• Symmetry: $d(x,y) = d(y,x)$
• Triangle inequality: $d(x,y) + d(y,z) \ge d(x,z)$

A distance function satisfying all the above three conditions is termed a metric.

A metric space is typically denoted by the ordered pair of the set and the metric, so the metric space above is $(X,d)$. However, when the metric is implicitly understood or has been pre-specified, we can omit it and simply say that $X$ is a metric space.

## Induced topology

Further information: Metric induces topology

There is a natural induced topology on any metric space: the topology whose basis is open balls of positive radii about points in the metric space. Here, by open ball of radius $r$ about $x$ we mean the set of points $y$ such that $d(x,y) < r$. The fact that this works requires the use of the axioms of symmetry and triangle inequality.

A topological space which arises via the induced topology on a metric space, is termed metrizable. There may be many different metrics yielding the same topology, for instance the taxicab metric and the Euclidean metric for Euclidean space.

## Category structure

### With continuous maps

Further information: Category of metric spaces with continuous maps

The collection of metric spaces can be viewed as a category, with a morphism of metric spaces defined as a continuous map. A map between metric spaces is continuous if the following $\epsilon-\delta$ definition is satisfied. A map $f:(X,d) \to (X',d')$ is continuous if:

$\ \forall \ x \in X, \ \epsilon > 0, \ \exists \ \delta > 0, d(y,x) < \delta \ \implies \ d'(f(y),f(x)) < \epsilon$

Note that under this definition, the isomorphisms do not necessarily preserve the metric -- they simply preserve the underlying topological structure.

### With short maps

Further information: Category of metric spaces with short maps

The collection of metric spaces can be viewed as a category, with a morphism of metric spaces defined as a short map. A short map is a map between metric spaces that does not increase distance. A map $f:(X,d) \to (X',d')$ is termed short, or non-expanding, if:

$\ \forall x,y \in X, d(f(x),f(y)) \le d(x,y)$

## Facts

• The metric is a jointly continuous function from the metric space to $\R$. This follows from the various axioms for the function. For full proof, refer: Metric is jointly continuous
• The map that sends a metric space to its associated topological space, is a functor. In other words, a continuous map between metric spaces is a continuous map of the underlying topological spaces. For full proof, refer: Induced topology from metric is functorial
• The topology arising from the metric induced on a subspace (by restricting the metric from the whole space) is the same as the subspace topology arising from the whole space. For full proof, refer: topology from subspace metric equals subspace topology