Metric space
In mathematics, a metric space is a set (or "space") where a distance between points is defined.
History
Formal definition
Formally, a metric space M is a set of points with an associated distance function (also called a metric) d : M × M -> R (where R is the set of real numbers). For all x, y, z in M, this function is required to satisfy the following conditions:
- d(x, y) ≥ 0
- d(x, x) = 0
- if d(x, y) = 0 then x = y (identity of indiscernibles)
- d(x, y) = d(y, x) (symmetry)
- d(x, z) ≤ d(x, y) + d(y, z) (triangle inequality).
In metric spaces, one can talk about limits of sequences; a metric space in which every Cauchy sequence has a limit is said to be complete.
A metric d on M is called intrinsic if any two points x and y in M can be joined by a curve with length arbitrarily close to d(x, y).
Examples
- The discrete metric: d(x,y) = 0 if x = y else 1.
- The real numbers with the distance function d(x, y) = |y - x| given by the absolute value, and more generally Euclidean n-space with the Euclidean distance, are complete metric spaces.
- The Manhattan distance where the distance between any two points, or vectors, is the sum of the distances between corresponding coordinates. More generally, any normed vector space is a metric space by defining d(x, y) = ||y - x|| (If such a space is complete, we call it a Banach space).
- The British Rail metric on a normed vector space, given by d(x, y)=||x|| + ||y|| for distinct points x and y, and d(x, x) = 0. The name alludes to the tendency of railway journeys to always proceed via London, which is identified with the origin.
- If X is some set and M is a metric space, then the set of all bounded functions f : X -> M (i.e. those functions whose image is a bounded subset of M) can be turned into a metric space by defining d(f, g) = sup_{x in X} d(f(x), g(x)) for any bounded functions f and g. If M is complete, then this space is complete as well.
- If X is a topological (or metric) space and M is a metric space, then the set of all bounded continuous functions from X to M forms a metric space if we define the metric as above: d(f, g) = sup_{x in X} d(f(x), g(x)) for any bounded continuous functions f and g. If M is complete, then this space is complete as well.
- If M is a connected Riemannian manifold, then we can turn 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 G is an undirected connected graph, then the set V of vertices of G can be turned into a metric space by defining d(x, y) to be the length of the shortest path connecting the vertices x and y.
- If M is a metric space, we can turn the set K(M) of all compact subsets of M into a metric space by defining the Hausdorff distance d(X, Y) = inf{r : for every x in X there exists a y in Y with d(x, y) < r and for every y in Y there exists an x in X such that d(x, y) < r)}. In this metric, two elements are close to each other if every element of one set is close to some element of the other set. One can show that K(M) is complete if M is complete.
- The set of all (isometry classes of) compact metric spaces form a metric space with respect to Gromov-Hausdorff distance.
Further definitions and properties
Metric spaces as topological spaces
In any metric space M we can define the open balls as the sets of the form- B(x; r) = {y in M : d(x,y) < r},
Since metric spaces are topological spaces, one has a notion of continuous function between metric spaces. Without referring to the topology, this notion can also be directly defined using limits of sequences; this is explained in the article on continuous functions.
Boundedness and compactness
A metric space M is called bounded if there exists some number r, such that d(x,y) ≤ r for all x and y in M. The smallest possible such r is called the diameter of M. The space M is called pre-compact or totally bounded if for every r > 0 there exist finitely many open balls of radius r whose union equals 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 (the first example above) under which it is bounded and yet not totally bounded. A useful characterisation of compactness for metric spaces is that a metric space is compact if and only if it is complete and totally bounded.Note that in the context of Intervalss in the space of real numbers and occasionally regions in a Euclidean space 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.
By restricting the metric, any subset of a metric space is a metric space itself. We call such a subset complete, bounded, totally bounded or compact if it, considered as a metric space, has the corresponding property.
Separation properties and extension of continuous functions
Metric spaces are paracompact Hausdorff spaces 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.Distance between points and sets
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 (M,d) is a metric space, S is a subset of M and x is a point of M, we define the distance from x to S as- d(x,S) = inf {d(x,s) : s ∈ S}
- d(x,S) ≤ d(x,y) + d(y,S)
Identifying two metric spaces as equivalent
An isometry between two metric spaces (M_{1}, d_{1}) and (M_{2}, d_{2}) is a function f : M_{1} → M_{2} which preserves distances: d_{2}(f(x), f(y)) = d_{1}(x, y) for all x, y in M_{1}. Isometries are necessarily injective. We call two spaces isometrically isomorphic if there exists a bijective isometry between them. In this case, the two spaces are essentially identical.Isometries are often used in constructions where one space is embedded in another space. For instance, the completion of a metric space M involves an isometry from M into M', a quotient of the space Cauchy sequences on M. The original space M is thus isometrically isomorphic to a subspace of a complete metric space, and it is usually identified with this subspace. Other embedding constructions show that every metric space is isometrically isomorphic to a closed subset of some normed vector space and that every complete metric space is isometrically isomorphic to a closed subset of some Banach space.
Related concepts and alternative axiom systems
Some authors use the extended real number line and allow the distance function d to attain the value ∞. Every such metric can be rescaled to a finite metric (using d'(x, y) = d(x, y) / (1 + d(x, y)) or d''(x, y) = min(1, d(x, y))) and the two concepts of metric space are therefore equivalent as far as notions of topology (such as continuity or convergence) are concerned.
A metric is called an ultrametric if it satisfies the following stronger version of the triangle inequality:
- For all x, y, z in M, d(x, z) ≤ max(d(x, y), d(y, z))
The requirement that the metric takes values in [0,∞) can also be relaxed to consider metrics with values in other directed sets. The reformulation of the axioms in this case leads to the construction of uniform spaces: topological spaces with an abstract structure enabling one to compare the local topologies of different points.