# Metric space

In mathematics, a metric space is a set where a notion of distance (called a metric) between elements of the set is defined.

The metric space which most closely corresponds to our intuitive understanding of space is the 3-dimensional Euclidean space. In fact, the notion of "metric" is a 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 connecting them.

The geometric properties of the space depends on the metric chosen, and by using a different metric we can construct interesting non-Euclidean geometries such as those used in the theory of general relativity.

A metric space also induces topological properties like open and closed sets which leads to the study of even more abstract topological spaces.

## History

Maurice Fréchet introduced metric spaces in his work Sur quelques points du calcul fonctionnel, Rendic. Circ. Mat. Palermo 22(1906) 1–74.

## Definition

A metric space is a tuple (M,d) where M is a set and d is a metric on M, that is, a function

such that
1. d(x, y) ≥ 0     (non-negativity)
2. d(x, y) = 0   if and only if   x = y     (identity of indiscernibles)
3. d(x, y) = d(y, x)     (symmetry)
4. d(x, z) ≤ d(x, y) + d(y, z)     (triangle inequality).

The function d is also called distance function or simply distance. Often d is omitted and one just writes M for a metric space if it is clear from the context what metric is used. Removing one or more of these requirements leads to the concepts of a pseudometric space, a quasimetric space, a hemimetric space, a semimetric space or most generally a prametric space.

The first of these four conditions actually follows from the other three, since:

2d(x, y) = d(x, y) + d(y, x) ≥ d(x,x) = 0.

It is more correctly a property of a metric space, but one that many texts include in the definition.

Some authors require the set M to be non-empty.

### Metric spaces as topological spaces

The treatment of a metric space as a topological space is so consistent that it is almost a part of the definition.

About any point x in a metric space M we define the open ball of radius r (>0) about x as the set
:B(x; r) = {y in M : d(x,y) < r}.
These open balls generate a topology on M, making it a topological space. Explicitly, a subset of M is called open if it is a union of (finitely or infinitely many) open balls. The complement of an open set is called closed. A topological space which can arise in this way from a metric space is called a metrizable space; see the article on metrization theorems for further details.

Since metric spaces are topological spaces, one has a notion of continuous function between metric spaces. This definition is equivalent to the usual epsilon-delta definition of continuity (which does not refer to the topology), and can also be directly defined using limits of sequences.

## Examples of metric spaces

• The real numbers with the distance function d(x, y) = |yx| given by the absolute value, and more generally Euclidean n-space with the Euclidean distance, are complete metric spaces.
• The rational numbers with the same distance function are also a metric space, but not a complete one.
• Hyperbolic space.
• Any normed vector space is a metric space by defining d(x, y) = ||yx||, see also relation of norms and metrics. (If such a space is complete, we call it a Banach space). Example:
• the Manhattan norm gives rise to the Manhattan distance, where the distance between any two points, or vectors, is the sum of the distances between corresponding coordinates.
• The maximum norm gives rise to the Chebyshev distance or chessboard distance, the minimal number of moves a chess king would take to travel from x to y.
• The discrete metric, where d(x,y)=1 for all x not equal to y and d(x,y)=0 otherwise, is a simple but important example, and can be applied to all non-empty sets. This, in particular, shows that for any non-empty set, there is always a metric space associated to it.
• The British Rail metric (also called the Post Office metric or the SNCF metric) on a normed vector space, given by d(x, y) = ||x|| + ||y|| for distinct points x and y, and d(x, x) = 0. More generally ||.|| can be replaced with a function f taking an arbitrary set S to non-negative reals and taking the value 0 at most once: then the metric is defined on S by d(x, y)=f(x)+f(y) for distinct points x and y, and d(x, x) = 0. The name alludes to the tendency of railway journeys (or letters) to proceed via London (or Paris) irrespective of their final destination.
• If X is some set and M is a metric space, then the set of all bounded functions f : XM (i.e. those functions whose image is a bounded subset of M) can be turned into a metric space by defining d(f, g) = supx 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.
• The Levenshtein distance, also called character edit distance, is a measure of the dissimilarity between two strings u and v. The distance is the minimal number of character deletions, insertions, or substitutions required to transform u into v.
• 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) = supx 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.
• Similarly (apart from mathematical details):
• For any system of roads and terrains the distance between two locations can be defined as the length of the shortest route. To be a metric there should not be one-way roads. Examples include some mentioned above: the Manhattan norm, the British Rail metric, and the Chessboard distance.
• More generally, for any system of roads and terrains, with given maximum possible speed at any location, the "distance" between two locations can be defined as the time the fastest route takes. To be a metric there should not be one-way roads, and the maximum speed should not depend on direction. The direction at A to B can be defined, not necessarily uniquely, as the direction of the "shortest" route, i.e., in which the "distance" reduces 1 second per second when travelling at the maximum speed.
• Similarly, in 3D, the metrics on the surface of a polyhedron include the ordinary metric, and the distance over the surface; a third metric on the edges of a polyhedron is one where the "paths" are the edges. For example, the distance between opposite vertices of a unit cube is √3, √5, and 3, respectively.
• 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.
• Given a metric space (X,d) and an increasing concave function f:[0,∞)→[0,∞) such that f(x)=0 if and only if x=0, then f o d is also a metric on X.
• Given a injective function f from any set A to a metric space (X,d), d(f(x), f(y)) defines a metric on 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 n by m matrices over a finite field is a metric space with respect to the rank distance d(X,Y) = rank(Y-X).

## Notions of metric space equivalence

Comparing two metric spaces one can distinguish various degrees of equivalence. To preserve at least the topological structure induced by the metric, these require at least the existence of a continuous function between them (morphism preserving the topology of the metric spaces).

Given two metric spaces (M1, d1) and (M2, d2):
• 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 similar if there exists a positive constant k > 0 and a bijective function f, called similarity such that f : M1M2 and d2(f(x), f(y)) = k d1(x, y) for all x, y in M1.
• They are called isometric if there exists a bijective isometry between them. In this case, the two spaces are essentially identical. An isometry is a function f : M1M2 which preserves distances: d2(f(x), f(y)) = d1(x, y) for all x, y in M1. Isometries are necessarily injective.
• They are called similar (of the second type) if there exists a bijective function f, called similarity such that f : M1M2 and d2(f(x), f(y)) = d2(f(u), f(v)) if and only if d1(x, y) = d1(u, v) for all x, y,u, v in M1.
In case of Euclidean space with usual metric the two notions of similarity are equivalent.

## 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 precompact or totally bounded if for every r > 0 there exist finitely many open balls of radius r whose union covers 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 compactness depends only on the topology, while boundedness depends on the metric.

Note that in the context of intervals in the space of real numbers and occasionally regions in a Euclidean space Rn 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 (a subspace). 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[1] Hausdorff spaces[2] 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) : sS}
Then d(x, S) = 0 if and only if x belongs to the closure of S. Furthermore, we have the following generalization of the triangle inequality:
d(x,S) ≤ d(x,y) + d(y,S)
which in particular shows that the map is continuous.

## Product metric spaces ; normed product metrics

The following construction is useful to remember:

If are metric spaces, and N is any norm on Rn, then

is a metric space, where the normed product metric is defined by

,

and the induced topology agrees with the product topology.

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

.

### Continuity of distance

It is worth noting that in the case of a single space , the distance map (from the definition) is uniformly continuous with respect to any normed product metric (and in particular, continuous with respect to the product topology of ).

## Quotient metric spaces

If M is a metric space with metric d, and ~ is an equivalence relation on M, then we can endow the quotient set M/~ with the following (pseudo)metric. Given two equivalence classes [x] and [y], we define

where the infimum is taken over all finite sequences and with , , . In general this will only define a pseudometric, i.e. does not necessarily imply that [x]=[y]. However for nice equivalence relations (e.g., those given by gluing together polyhedra along faces), it is a metric. Moreover if M is a compact space, then the induced topology on M/~ is the quotient topology.

The quotient metric d is characterized by the following universal property. If is a short map between metric spaces (that is, for all x, y) satisfying f(x)=f(y) whenever then the induced function , given by , is a short map

## References

1. ^ Rudin, Mary Ellen. A new proof that metric spaces are paracompact. Proceedings of the American Mathematical Society, Vol. 20, No. 2. (Feb., 1969), p. 603.
2. ^ metric spaces are Hausdorff on PlanetMath

Mathematics (colloquially, maths or math) is the body of knowledge centered on such concepts as quantity, structure, space, and change, and also the academic discipline that studies them. Benjamin Peirce called it "the science that draws necessary conclusions".
SET may stand for:
• Sanlih Entertainment Television, a television channel in Taiwan
• Secure electronic transaction, a protocol used for credit card processing,

Distance is a numerical description of how far apart objects are at any given moment in time. In physics or everyday discussion, distance may refer to a physical length, a period of time, or an estimation based on other criteria (e.g. "two counties over").
In mathematics, a metric or distance function is a function which defines a distance between elements of a set. A set with a metric is called a metric space. A metric induces a topology on a set but not all topologies can be generated by a metric.

An essential property of a Euclidean space is its flatness. Other spaces exist in geometry that are not Euclidean.
In mathematics, the Euclidean distance or Euclidean metric is the "ordinary" distance between two points that one would measure with a ruler, which can be proven by repeated application of the Pythagorean theorem.
line can be described as an ideal zero-width, infinitely long, perfectly straight curve (the term curve in mathematics includes "straight curves") containing an infinite number of points. In Euclidean geometry, exactly one line can be found that passes through any two points.
non-Euclidean geometry describes hyperbolic and elliptic geometry, which are contrasted with Euclidean geometry. The essential difference between Euclidean and non-Euclidean geometry is the nature of parallel lines.
General relativity (GR) (aka general theory of relativity (GTR)) is the geometrical theory of gravitation published by Albert Einstein in 1915/16.[1] It unifies special relativity, Newton's law of universal gravitation, and the insight that gravitational
In topology and related areas of mathematics a topological property or topological invariant is a property of a topological space which is invariant under homeomorphisms.
In topology and related fields of mathematics, a set U is called open if, intuitively speaking, starting from any point x in U one can move by a small amount in any direction and still be in the set U.
In topology and related branches of mathematics, a closed set is a set whose complement is open.

## Definition of a closed set

In a metric space, a set is closed if every limit point of the set is a point in the set.

Topological spaces are mathematical structures that allow the formalization of concepts such as convergence, connectedness and continuity.
Maurice René Fréchet

Maurice René Fréchet
Born September 2 1878
Maligny, France
Died May 4 1973 (aged 96)

In mathematics, a tuple is a finite sequence (also known as an "ordered list") of objects, each of a specified type. A tuple containing n objects is known as an "n-tuple".
SET may stand for:
• Sanlih Entertainment Television, a television channel in Taiwan
• Secure electronic transaction, a protocol used for credit card processing,

In mathematics, a metric or distance function is a function which defines a distance between elements of a set. A set with a metric is called a metric space. A metric induces a topology on a set but not all topologies can be generated by a metric.
If and only if, in logic and fields that rely on it such as mathematics and philosophy, is a logical connective between statements which means that the truth of either one of the statements
triangle inequality is the theorem stating that for any triangle, the measure of a given side must be less than or equal to the sum of the other two sides but greater than or equal to the difference between the two sides.
In mathematics, a pseudometric space is a generalization of a metric space, where the requirement of distinguishability is removed. A pseudometric space is a special case of a hemimetric space, on which the requirement of symmetry is imposed.
In mathematics, a quasimetric space generalizes the idea of a metric space by removing the requirement of symmetry of the metric. A quasimetric space is a special case of a hemimetric space, to which the requirement of indistinguishability is added.
In mathematics, a hemimetric space is a generalization of a metric space, obtained by removing the requirements of identity of indiscernibles and of symmetry. It is thus a generalization of both a quasimetric space and a pseudometric space, while being a special case of a prametric
In mathematics, a semimetric space generalizes the concept of a metric space by not requiring the condition of satisfying the triangle inequality. Thus, a semimetric space is a special case of a prametric space, being defined by a symmetric, discernible prametric.
In mathematics, a prametric space generalizes the concept of a metric space by not requiring the conditions of symmetry, indiscernability and the triangle inequality. Prametric spaces occur naturally as maps between metric spaces.
In mathematics, a ball is the inside of a sphere; both concepts apply not only in the three-dimensional space but also for lower and higher dimensions, and for metric spaces in general.

## Metric spaces

Let M be a metric space.

Topological spaces are mathematical structures that allow the formalization of concepts such as convergence, connectedness and continuity.
In topology and related fields of mathematics, a set U is called open if, intuitively speaking, starting from any point x in U one can move by a small amount in any direction and still be in the set U.