HOME

TheInfoList



OR:

In
mathematics Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
, a metric space is a
set Set, The Set, SET or SETS may refer to: Science, technology, and mathematics Mathematics *Set (mathematics), a collection of elements *Category of sets, the category whose objects and morphisms are sets and total functions, respectively Electro ...
together with a notion of ''
distance Distance is a numerical or occasionally qualitative measurement of how far apart objects or points are. In physics or everyday usage, distance may refer to a physical length or an estimation based on other criteria (e.g. "two counties over"). ...
'' between its elements, usually called
points Point or points may refer to: Places * Point, Lewis, a peninsula in the Outer Hebrides, Scotland * Point, Texas, a city in Rains County, Texas, United States * Point, the NE tip and a ferry terminal of Lismore, Inner Hebrides, Scotland * Point ...
. The distance is measured by a
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
called a metric or distance function. Metric spaces are the most general setting for studying many of the concepts of
mathematical analysis Analysis is the branch of mathematics dealing with continuous functions, limit (mathematics), limits, and related theories, such as Derivative, differentiation, Integral, integration, measure (mathematics), measure, infinite sequences, series (m ...
and
geometry Geometry (; ) is, with arithmetic, one of the oldest branches of mathematics. It is concerned with properties of space such as the distance, shape, size, and relative position of figures. A mathematician who works in the field of geometry is c ...
. The most familiar example of a metric space is
3-dimensional Euclidean space Three-dimensional space (also: 3D space, 3-space or, rarely, tri-dimensional space) is a geometric setting in which three values (called ''parameters'') are required to determine the position of an element (i.e., point). This is the informal ...
with its usual notion of distance. Other well-known examples are a
sphere A sphere () is a Geometry, geometrical object that is a solid geometry, three-dimensional analogue to a two-dimensional circle. A sphere is the Locus (mathematics), set of points that are all at the same distance from a given point in three ...
equipped with the
angular distance Angular distance \theta (also known as angular separation, apparent distance, or apparent separation) is the angle between the two sightlines, or between two point objects as viewed from an observer. Angular distance appears in mathematics (in pa ...
and the
hyperbolic plane In mathematics, hyperbolic geometry (also called Lobachevskian geometry or Bolyai– Lobachevskian geometry) is a non-Euclidean geometry. The parallel postulate of Euclidean geometry is replaced with: :For any given line ''R'' and point ''P'' ...
. A metric may correspond to a metaphorical, rather than physical, notion of distance: for example, the set of 100-character Unicode strings can be equipped with the
Hamming distance In information theory, the Hamming distance between two strings of equal length is the number of positions at which the corresponding symbols are different. In other words, it measures the minimum number of ''substitutions'' required to chan ...
, which measures the number of characters that need to be changed to get from one string to another. Since they are very general, metric spaces are a tool used in many different branches of mathematics. Many types of mathematical objects have a natural notion of distance and therefore admit the structure of a metric space, including
Riemannian manifold In differential geometry, a Riemannian manifold or Riemannian space , so called after the German mathematician Bernhard Riemann, is a real manifold, real, smooth manifold ''M'' equipped with a positive-definite Inner product space, inner product ...
s,
normed vector space 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" i ...
s, and
graph Graph may refer to: Mathematics *Graph (discrete mathematics), a structure made of vertices and edges **Graph theory, the study of such graphs and their properties *Graph (topology), a topological space resembling a graph in the sense of discre ...
s. In
abstract algebra In mathematics, more specifically algebra, abstract algebra or modern algebra is the study of algebraic structures. Algebraic structures include groups, rings, fields, modules, vector spaces, lattices, and algebras over a field. The term ''a ...
, the ''p''-adic numbers arise as elements of the completion of a metric structure on the
rational numbers In mathematics, a rational number is a number that can be expressed as the quotient or fraction of two integers, a numerator and a non-zero denominator . For example, is a rational number, as is every integer (e.g. ). The set of all rationa ...
. Metric spaces are also studied in their own right in metric geometry and analysis on metric spaces. Many of the basic notions of
mathematical analysis Analysis is the branch of mathematics dealing with continuous functions, limit (mathematics), limits, and related theories, such as Derivative, differentiation, Integral, integration, measure (mathematics), measure, infinite sequences, series (m ...
, including
ball A ball is a round object (usually spherical, but can sometimes be ovoid) with several uses. It is used in ball games, where the play of the game follows the state of the ball as it is hit, kicked or thrown by players. Balls can also be used f ...
s, completeness, as well as
uniform A uniform is a variety of clothing worn by members of an organization while participating in that organization's activity. Modern uniforms are most often worn by armed forces and paramilitary organizations such as police, emergency services, se ...
, Lipschitz, and
Hölder continuity Hölder: * ''Hölder, Hoelder'' as surname * Hölder condition * Hölder's inequality * Hölder mean * Jordan–Hölder theorem In abstract algebra, a composition series provides a way to break up an algebraic structure, such as a group or a modul ...
, can be defined in the setting of metric spaces. Other notions, such as continuity,
compactness In mathematics, specifically general topology, compactness is a property that seeks to generalize the notion of a closed and bounded subset of Euclidean space by making precise the idea of a space having no "punctures" or "missing endpoints", i ...
, and
open Open or OPEN may refer to: Music * Open (band), Australian pop/rock band * The Open (band), English indie rock band * ''Open'' (Blues Image album), 1969 * ''Open'' (Gotthard album), 1999 * ''Open'' (Cowboy Junkies album), 2001 * ''Open'' (YF ...
and
closed set In geometry, topology, and related branches of mathematics, a closed set is a set whose complement is an open set. In a topological space, a closed set can be defined as a set which contains all its limit points. In a complete metric space, a cl ...
s, can be defined for metric spaces, but also in the even more general setting of
topological space In mathematics, a topological space is, roughly speaking, a geometrical space in which closeness is defined but cannot necessarily be measured by a numeric distance. More specifically, a topological space is a set whose elements are called points ...
s.


Definition and illustration


Motivation

To see the utility of different notions of distance, consider the
surface of the Earth Earth is the third planet from the Sun and the only astronomical object known to harbor life. While large volumes of water can be found throughout the Solar System, only Earth sustains liquid surface water. About 71% of Earth's surface ...
as a set of points. We can measure the distance between two such points by the length of the shortest path along the surface, "
as the crow flies __NOTOC__ The expression ''as the crow flies'' is an idiom for the most direct path between two points, rather similar to "in a beeline". This meaning is attested from the early 19th century, and appeared in Charles Dickens's 1838 novel '' Oliv ...
"; this is particularly useful for shipping and aviation. We can also measure the straight-line distance between two points through the Earth's interior; this notion is, for example, natural in
seismology Seismology (; from Ancient Greek σεισμός (''seismós'') meaning "earthquake" and -λογία (''-logía'') meaning "study of") is the scientific study of earthquakes and the propagation of elastic waves through the Earth or through other ...
, since it roughly corresponds to the length of time it takes for seismic waves to travel between those two points. The notion of distance encoded by the metric space axioms has relatively few requirements. This generality gives metric spaces a lot of flexibility. At the same time, the notion is strong enough to encode many intuitive facts about what distance means. This means that general results about metric spaces can be applied in many different contexts. Like many fundamental mathematical concepts, the metric on a metric space can be interpreted in many different ways. A particular metric may not be best thought of as measuring physical distance, but, instead, as the cost of changing from one state to another (as with
Wasserstein metric In mathematics, the Wasserstein distance or Kantorovich– Rubinstein metric is a distance function defined between probability distributions on a given metric space M. It is named after Leonid Vaseršteĭn. Intuitively, if each distribution is ...
s on spaces of
measure Measure may refer to: * Measurement, the assignment of a number to a characteristic of an object or event Law * Ballot measure, proposed legislation in the United States * Church of England Measure, legislation of the Church of England * Mea ...
s) or the degree of difference between two objects (for example, the
Hamming distance In information theory, the Hamming distance between two strings of equal length is the number of positions at which the corresponding symbols are different. In other words, it measures the minimum number of ''substitutions'' required to chan ...
between two strings of characters, or the Gromov–Hausdorff distance between metric spaces themselves).


Definition

Formally, a metric space is an
ordered pair In mathematics, an ordered pair (''a'', ''b'') is a pair of objects. The order in which the objects appear in the pair is significant: the ordered pair (''a'', ''b'') is different from the ordered pair (''b'', ''a'') unless ''a'' = ''b''. (In con ...
where is a set and is a metric on , i.e., a
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
d\,\colon M \times M \to \mathbb satisfying the following axioms for all points x,y,z \in M: # The distance from a point to itself is zero: d(x, x) = 0. Intuitively, it never costs anything to travel from a point to itself. # (Positivity) The distance between two distinct points is always positive: \textx \neq y\textd(x, y)>0. # (
Symmetry Symmetry (from grc, συμμετρία "agreement in dimensions, due proportion, arrangement") in everyday language refers to a sense of harmonious and beautiful proportion and balance. In mathematics, "symmetry" has a more precise definit ...
) The distance from to is always the same as the distance from to : d(x, y) = d(y, x). This excludes asymmetric notions of "cost" which arise naturally from the observation that it's harder to walk uphill than downhill. # The
triangle inequality In mathematics, the triangle inequality states that for any triangle, the sum of the lengths of any two sides must be greater than or equal to the length of the remaining side. This statement permits the inclusion of degenerate triangles, but ...
holds: d(x, z) \leq d(x, y) + d(y, z). This is a natural property of both physical and metaphorical notions of distance: you can arrive at from by taking a detour through , but this will not make your journey any faster than the shortest path. If the metric is unambiguous, one often refers by
abuse of notation In mathematics, abuse of notation occurs when an author uses a mathematical notation in a way that is not entirely formally correct, but which might help simplify the exposition or suggest the correct intuition (while possibly minimizing errors an ...
to "the metric space ".


Simple examples


The real numbers

The
real number In mathematics, a real number is a number that can be used to measure a ''continuous'' one-dimensional quantity such as a distance, duration or temperature. Here, ''continuous'' means that values can have arbitrarily small variations. Every real ...
s with the distance function d(x,y) = , y - x , given by the
absolute difference The absolute difference of two real numbers x and y is given by , x-y, , the absolute value of their difference. It describes the distance on the real line between the points corresponding to x and y. It is a special case of the Lp distance for a ...
form a metric space. Many properties of metric spaces and functions between them are generalizations of concepts in
real analysis In mathematics, the branch of real analysis studies the behavior of real numbers, sequences and series of real numbers, and real functions. Some particular properties of real-valued sequences and functions that real analysis studies include converg ...
and coincide with those concepts when applied to the real line.


Metrics on Euclidean spaces

The Euclidean plane \R^2 can be equipped with many different metrics. The
Euclidean distance In mathematics, the Euclidean distance between two points in Euclidean space is the length of a line segment between the two points. It can be calculated from the Cartesian coordinates of the points using the Pythagorean theorem, therefor ...
familiar from school mathematics can be defined by d_2((x_1,y_1),(x_2,y_2))=\sqrt. The ''taxicab'' or ''Manhattan'' distance is defined by d_1((x_1,y_1),(x_2,y_2))=, x_2-x_1, +, y_2-y_1, and can be thought of as the distance you need to travel along horizontal and vertical lines to get from one point to the other, as illustrated at the top of the article. The ''maximum'', L^\infty, or ''
Chebyshev distance In mathematics, Chebyshev distance (or Tchebychev distance), maximum metric, or L∞ metric is a metric defined on a vector space where the distance between two vectors is the greatest of their differences along any coordinate dimension. It is na ...
'' is defined by d_\infty((x_1,y_1),(x_2,y_2))=\max\. This distance doesn't have an easy explanation in terms of paths in the plane, but it still satisfies the metric space axioms. In fact, these three distances, while they have distinct properties, are similar in some ways. Informally, points that are close in one are close in the others, too. This observation can be quantified with the formula d_\infty(p,q) \leq d_2(p,q) \leq d_1(p,q) \leq 2d_\infty(p,q), which holds for every pair of points p, q \in \R^2. A radically different distance can be defined by setting d(p,q)=\begin0, & \textp=q, \\ 1, & \text\end In this ''discrete metric'', all distinct points are 1 unit apart: none of them are close to each other, and none of them are very far away from each other either. Intuitively, the discrete metric no longer remembers that the set is a plane, but treats it just as an undifferentiated set of points. All of these metrics make sense on \R^n as well as \R^2.


Subspaces

Given a metric space and a
subset In mathematics, Set (mathematics), set ''A'' is a subset of a set ''B'' if all Element (mathematics), elements of ''A'' are also elements of ''B''; ''B'' is then a superset of ''A''. It is possible for ''A'' and ''B'' to be equal; if they are ...
A \subseteq M, we can consider to be a metric space by measuring distances the same way we would in . Formally, the ''induced metric'' on is a function d_A:A \times A \to \R defined by d_A(x,y)=d(x,y). For example, if we take the two-dimensional sphere as a subset of \R^3, the Euclidean metric on \R^3 induces the straight-line metric on described above. Two more useful examples are the open interval and the closed interval thought of as subspaces of the real line.


History

In 1906
Maurice Fréchet Maurice may refer to: People *Saint Maurice (died 287), Roman legionary and Christian martyr *Maurice (emperor) or Flavius Mauricius Tiberius Augustus (539–602), Byzantine emperor *Maurice (bishop of London) (died 1107), Lord Chancellor and Lo ...
introduced metric spaces in his work ''Sur quelques points du calcul fonctionnel'' in the context of
functional analysis Functional analysis is a branch of mathematical analysis, the core of which is formed by the study of vector spaces endowed with some kind of limit-related structure (e.g. Inner product space#Definition, inner product, Norm (mathematics)#Defini ...
: his main interest was in studying the real-valued functions from a metric space, generalizing the theory of functions of several or even infinitely many variables, as pioneered by mathematicians such as
Cesare Arzelà Cesare Arzelà (6 March 1847 – 15 March 1912) was an Italian mathematician who taught at the University of Bologna and is recognized for his contributions in the theory of functions, particularly for his characterization of sequences of continu ...
. The idea was further developed and placed in its proper context by
Felix Hausdorff Felix Hausdorff ( , ; November 8, 1868 – January 26, 1942) was a German mathematician who is considered to be one of the founders of modern topology and who contributed significantly to set theory, descriptive set theory, measure theory, and ...
in his magnum opus ''Principles of Set Theory'', which also introduced the notion of a (Hausdorff) topological space. General metric spaces have become a foundational part of the mathematical curriculum. Prominent examples of metric spaces in mathematical research include Riemannian manifolds and normed vector spaces, which are the domain of
differential geometry Differential geometry is a mathematical discipline that studies the geometry of smooth shapes and smooth spaces, otherwise known as smooth manifolds. It uses the techniques of differential calculus, integral calculus, linear algebra and multili ...
and
functional analysis Functional analysis is a branch of mathematical analysis, the core of which is formed by the study of vector spaces endowed with some kind of limit-related structure (e.g. Inner product space#Definition, inner product, Norm (mathematics)#Defini ...
, respectively.
Fractal geometry In mathematics, a fractal is a geometric shape containing detailed structure at arbitrarily small scales, usually having a fractal dimension strictly exceeding the topological dimension. Many fractals appear similar at various scales, as illus ...
is a source of some exotic metric spaces. Others have arisen as limits through the study of discrete or smooth objects, including scale-invariant limits in
statistical physics Statistical physics is a branch of physics that evolved from a foundation of statistical mechanics, which uses methods of probability theory and statistics, and particularly the Mathematics, mathematical tools for dealing with large populations ...
,
Alexandrov space In geometry, Alexandrov spaces with curvature ≥ ''k'' form a generalization of Riemannian manifolds with sectional curvature ≥ ''k'', where ''k'' is some real number. By definition, these spaces are locally compact complete length spaces where t ...
s arising as Gromov–Hausdorff limits of sequences of Riemannian manifolds, and boundaries and
asymptotic cone In mathematics, an ultralimit is a geometric construction that assigns to a sequence of metric spaces ''Xn'' a limiting metric space. The notion of an ultralimit captures the limiting behavior of finite configurations in the spaces ''Xn'' and uses ...
s in
geometric group theory Geometric group theory is an area in mathematics devoted to the study of finitely generated groups via exploring the connections between algebraic properties of such group (mathematics), groups and topology, topological and geometry, geometric pro ...
. Finally, many new applications of finite and discrete metric spaces have arisen in
computer science Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to Applied science, practical discipli ...
.


Basic notions

A distance function is enough to define notions of closeness and convergence that were first developed in
real analysis In mathematics, the branch of real analysis studies the behavior of real numbers, sequences and series of real numbers, and real functions. Some particular properties of real-valued sequences and functions that real analysis studies include converg ...
. Properties that depend on the structure of a metric space are referred to as ''metric properties''. Every metric space is also a
topological space In mathematics, a topological space is, roughly speaking, a geometrical space in which closeness is defined but cannot necessarily be measured by a numeric distance. More specifically, a topological space is a set whose elements are called points ...
, and some metric properties can also be rephrased without reference to distance in the language of topology; that is, they are really
topological properties In topology and related areas of mathematics, a topological property or topological invariant is a property of a topological space that is invariant under homeomorphisms. Alternatively, a topological property is a proper class of topological spac ...
.


The topology of a metric space

For any point in a metric space and any real number , the ''open ball'' of radius around is defined to be the set of points that are at most distance from : B_r(x)=\. This is a natural way define a set of points that are relatively close to . Therefore, a set N \subseteq M is a ''neighborhood'' of (informally, it contains all points "close enough" to ) if it contains an open ball of radius around for some . An ''open set'' is a set which is a neighborhood of all its points. It follows that the open balls form a base for a topology on . In other words, the open sets of are exactly the unions of open balls. As in any topology,
closed set In geometry, topology, and related branches of mathematics, a closed set is a set whose complement is an open set. In a topological space, a closed set can be defined as a set which contains all its limit points. In a complete metric space, a cl ...
s are the complements of open sets. Sets may be both open and closed as well as neither open nor closed. This topology does not carry all the information about the metric space. For example, the distances , , and defined above all induce the same topology on \R^2, although they behave differently in many respects. Similarly, \R with the Euclidean metric and its subspace the interval with the induced metric are
homeomorphic In the mathematical field of topology, a homeomorphism, topological isomorphism, or bicontinuous function is a bijective and continuous function between topological spaces that has a continuous inverse function. Homeomorphisms are the isomorphi ...
but have very different metric properties. Conversely, not every topological space can be given a metric. Topological spaces which are compatible with a metric are called ''metrizable'' and are particularly well-behaved in many ways: in particular, they are
paracompact In mathematics, a paracompact space is a topological space in which every open cover has an open refinement that is locally finite. These spaces were introduced by . Every compact space is paracompact. Every paracompact Hausdorff space is normal, ...
Hausdorff space In topology and related branches of mathematics, a Hausdorff space ( , ), separated space or T2 space is a topological space where, for any two distinct points, there exist neighbourhoods of each which are disjoint from each other. Of the many ...
s (hence
normal Normal(s) or The Normal(s) may refer to: Film and television * ''Normal'' (2003 film), starring Jessica Lange and Tom Wilkinson * ''Normal'' (2007 film), starring Carrie-Anne Moss, Kevin Zegers, Callum Keith Rennie, and Andrew Airlie * ''Norma ...
) and
first-countable In topology, a branch of mathematics, a first-countable space is a topological space satisfying the "first axiom of countability". Specifically, a space X is said to be first-countable if each point has a countable neighbourhood basis (local base) ...
. The
Nagata–Smirnov metrization theorem The Nagata–Smirnov metrization theorem in topology characterizes when a topological space is metrizable. The theorem states that a topological space X is metrizable if and only if it is regular, Hausdorff and has a countably locally finite (t ...
gives a characterization of metrizability in terms of other topological properties, without reference to metrics.


Convergence

Convergence of sequences in Euclidean space is defined as follows: : A sequence converges to a point if for every there is an integer such that for all , . Convergence of sequences in a topological space is defined as follows: : A sequence converges to a point if for every open set containing there is an integer such that for all , x_n \in U. In metric spaces, both of these definitions make sense and they are equivalent. This is a general pattern for
topological properties In topology and related areas of mathematics, a topological property or topological invariant is a property of a topological space that is invariant under homeomorphisms. Alternatively, a topological property is a proper class of topological spac ...
of metric spaces: while they can be defined in a purely topological way, there is often a way that uses the metric which is easier to state or more familiar from real analysis.


Completeness

Informally, a metric space is ''complete'' if it has no "missing points": every sequence that looks like it should converge to something actually converges. To make this precise: a sequence in a metric space is ''Cauchy'' if for every there is an integer such that for all , . By the triangle inequality, any convergent sequence is Cauchy: if and are both less than away from the limit, then they are less than away from each other. If the converse is true—every Cauchy sequence in converges—then is complete. Euclidean spaces are complete, as is \R^2 with the other metrics described above. Two examples of spaces which are not complete are and the rationals, each with the metric induced from \R. One can think of as "missing" its endpoints 0 and 1. The rationals are missing all the irrationals, since any irrational has a sequence of rationals converging to it in \R (for example, its successive decimal approximations). These examples show that completeness is ''not'' a topological property, since \R is complete but the homeomorphic space is not. This notion of "missing points" can be made precise. In fact, every metric space has a unique ''completion'', which is a complete space that contains the given space as a
dense Density (volumetric mass density or specific mass) is the substance's mass per unit of volume. The symbol most often used for density is ''ρ'' (the lower case Greek letter rho), although the Latin letter ''D'' can also be used. Mathematically ...
subset. For example, is the completion of , and the real numbers are the completion of the rationals. Since complete spaces are generally easier to work with, completions are important throughout mathematics. For example, in abstract algebra, the ''p''-adic numbers are defined as the completion of the rationals under a different metric. Completion is particularly common as a tool in
functional analysis Functional analysis is a branch of mathematical analysis, the core of which is formed by the study of vector spaces endowed with some kind of limit-related structure (e.g. Inner product space#Definition, inner product, Norm (mathematics)#Defini ...
. Often one has a set of nice functions and a way of measuring distances between them. Taking the completion of this metric space gives a new set of functions which may be less nice, but nevertheless useful because they behave similarly to the original nice functions in important ways. For example,
weak solution In mathematics, a weak solution (also called a generalized solution) to an ordinary or partial differential equation is a function for which the derivatives may not all exist but which is nonetheless deemed to satisfy the equation in some precisel ...
s to
differential equation In mathematics, a differential equation is an equation that relates one or more unknown functions and their derivatives. In applications, the functions generally represent physical quantities, the derivatives represent their rates of change, an ...
s typically live in a completion (a
Sobolev space In mathematics, a Sobolev space is a vector space of functions equipped with a norm that is a combination of ''Lp''-norms of the function together with its derivatives up to a given order. The derivatives are understood in a suitable weak sense t ...
) rather than the original space of nice functions for which the differential equation actually makes sense.


Bounded and totally bounded spaces

A metric space is ''bounded'' if there is an such that no pair of points in is more than distance apart. The least such is called the ' of . The space is called ''precompact'' or ''
totally bounded 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 ...
'' if for every there is a finite
cover Cover or covers may refer to: Packaging * Another name for a lid * Cover (philately), generic term for envelope or package * Album cover, the front of the packaging * Book cover or magazine cover ** Book design ** Back cover copy, part of co ...
of by open balls of radius . Every totally bounded space is bounded. To see this, start with a finite cover by -balls for some arbitrary . Since the subset of consisting of the centers of these balls is finite, it has finite diameter, say . By the triangle inequality, the diameter of the whole space is at most . The converse does not hold: an example of a metric space that is bounded but not totally bounded is \R^2 (or any other infinite set) with the discrete metric.


Compactness

Compactness is a topological property which generalizes the properties of a closed and bounded subset of Euclidean space. There are several equivalent definitions of compactness in metric spaces: # A metric space is compact if every open cover has a finite subcover (the usual topological definition). # A metric space is compact if every sequence has a convergent subsequence. (For general topological spaces this is called sequential compactness and is not equivalent to compactness.) # A metric space is compact if it is complete and totally bounded. (This definition is written in terms of metric properties and doesn't make sense for a general topological space, but it is nevertheless topologically invariant since it is equivalent to compactness.) One example of a compact space is the closed interval . Compactness is important for similar reasons to completeness: it makes it easy to find limits. Another important tool is
Lebesgue's number lemma In topology, Lebesgue's number lemma, named after Henri Lebesgue, is a useful tool in the study of compact metric spaces. It states: :If the metric space (X, d) is compact and an open cover of X is given, then there exists a number \delta > 0 such ...
, which shows that for any open cover of a compact space, every point is relatively deep inside one of the sets of the cover.


Functions between metric spaces

Unlike in the case of topological spaces or algebraic structures such as
group A group is a number of persons or things that are located, gathered, or classed together. Groups of people * Cultural group, a group whose members share the same cultural identity * Ethnic group, a group whose members share the same ethnic iden ...
s or
ring Ring may refer to: * Ring (jewellery), a round band, usually made of metal, worn as ornamental jewelry * To make a sound with a bell, and the sound made by a bell :(hence) to initiate a telephone connection Arts, entertainment and media Film and ...
s, there is no single "right" type of structure-preserving function between metric spaces. Instead, one works with different types of functions depending on one's goals. Throughout this section, suppose that (M_1,d_1) and (M_2,d_2) are two metric spaces. The words "function" and "map" are used interchangeably.


Isometries

One interpretation of a "structure-preserving" map is one that fully preserves the distance function: : A function f:M_1 \to M_2 is ''distance-preserving'' if for every pair of points and in , d_2(f(x),f(y))=d_1(x,y). It follows from the metric space axioms that a distance-preserving function is injective. A bijective distance-preserving function is called an ''isometry''. One perhaps non-obvious example of an isometry between spaces described in this article is the map f:(\R^2,d_1) \to (\R^2,d_\infty) defined by f(x,y)=(x+y,x-y). If there is an isometry between the spaces and , they are said to be ''isometric''. Metric spaces that are isometric are essentially identical.


Continuous maps

On the other end of the spectrum, one can forget entirely about the metric structure and study
continuous maps In mathematics, a continuous function is a function such that a continuous variation (that is a change without jump) of the argument induces a continuous variation of the value of the function. This means that there are no abrupt changes in va ...
, which only preserve topological structure. There are several equivalent definitions of continuity for metric spaces. The most important are: * Topological definition. A function f\,\colon M_1\to M_2 is continuous if for every open set in , the
preimage In mathematics, the image of a function is the set of all output values it may produce. More generally, evaluating a given function f at each element of a given subset A of its domain produces a set, called the "image of A under (or through) ...
f^(U) is open. *
Sequential continuity In mathematics, a continuous function is a function such that a continuous variation (that is a change without jump) of the argument induces a continuous variation of the value of the function. This means that there are no abrupt changes in value ...
. A function f\,\colon M_1\to M_2 is continuous if whenever a sequence converges to a point in , the sequence f(x_1),f(x_2),\ldots converges to the point in . : (These first two definitions are ''not'' equivalent for all topological spaces.) * ε–δ definition. A function f\,\colon M_1\to M_2 is continuous if for every point in and every there exists such that for all in we have d_1(x,y) < \delta \implies d_2(f(x),f(y)) < \varepsilon. A ''
homeomorphism In the mathematical field of topology, a homeomorphism, topological isomorphism, or bicontinuous function is a bijective and continuous function between topological spaces that has a continuous inverse function. Homeomorphisms are the isomorphi ...
'' is a continuous map whose inverse is also continuous; if there is a homeomorphism between and , they are said to be ''homeomorphic''. Homeomorphic spaces are the same from the point of view of topology, but may have very different metric properties. For example, \R is unbounded and complete, while is bounded but not complete.


Uniformly continuous maps

A function f\,\colon M_1\to M_2 is ''
uniformly continuous In mathematics, a real function f of real numbers is said to be uniformly continuous if there is a positive real number \delta such that function values over any function domain interval of the size \delta are as close to each other as we want. In ...
'' if for every real number there exists such that for all points and in such that d(x,y)<\delta, we have d_2(f(x),f(y)) < \varepsilon. The only difference between this definition and the ε–δ definition of continuity is the order of quantifiers: the choice of δ must depend only on ε and not on the point . However, this subtle change makes a big difference. For example, uniformly continuous maps take Cauchy sequences in to Cauchy sequences in . This implies that the image of a complete space under a uniformly continuous map is complete. In other words, uniform continuity preserves some metric properties which are not purely topological. On the other hand, the
Heine–Cantor theorem In mathematics, the Heine–Cantor theorem, named after Eduard Heine and Georg Cantor, states that if f \colon M \to N is a continuous function between two metric spaces M and N, and M is compact, then f is uniformly continuous. An important specia ...
states that if is compact, then every continuous map is uniformly continuous. In other words, uniform continuity cannot distinguish any non-topological features of compact metric spaces.


Lipschitz maps and contractions

A
Lipschitz map In mathematical analysis, Lipschitz continuity, named after German mathematician Rudolf Lipschitz, is a strong form of uniform continuity for functions. Intuitively, a Lipschitz continuous function is limited in how fast it can change: there exis ...
is one that stretches distances by at most a bounded factor. Formally, given a real number , the map f\,\colon M_1\to M_2 is -''Lipschitz'' if d_2(f(x),f(y))\leq K d_1(x,y)\quad\text\quad x,y\in M_1. Lipschitz maps are particularly important in metric geometry, since they provide more flexibility than distance-preserving maps, but still make essential use of the metric. For example, a curve in a metric space is rectifiable (has finite length) if and only if it has a Lipschitz reparametrization. A 1-Lipschitz map is sometimes called a ''nonexpanding'' or ''
metric map In the mathematical theory of metric spaces, a metric map is a function between metric spaces that does not increase any distance (such functions are always continuous). These maps are the morphisms in the category of metric spaces, Met (Isbell 1 ...
''. Metric maps are commonly taken to be the morphisms of the
category of metric spaces In category theory, Met is a category that has metric spaces as its objects and metric maps (continuous functions between metric spaces that do not increase any pairwise distance) as its morphisms. This is a category because the composition of tw ...
. A -Lipschitz map for is called a ''
contraction Contraction may refer to: Linguistics * Contraction (grammar), a shortened word * Poetic contraction, omission of letters for poetic reasons * Elision, omission of sounds ** Syncope (phonology), omission of sounds in a word * Synalepha, merged ...
''. The
Banach fixed-point theorem In mathematics, the Banach fixed-point theorem (also known as the contraction mapping theorem or contractive mapping theorem) is an important tool in the theory of metric spaces; it guarantees the existence and uniqueness of fixed points of certai ...
states that if is a complete metric space, then every contraction f:M \to M admits a unique fixed point. If the metric space is compact, the result holds for a slightly weaker condition on : a map f:M \to M admits a unique fixed point if d(f(x), f(y)) < d(x, y) \quad \mbox \quad x \ne y \in M_1.


Quasi-isometries

A
quasi-isometry 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. T ...
is a map that preserves the "large-scale structure" of a metric space. Quasi-isometries need not be continuous. For example, \R^2 and its subspace \Z^2 are quasi-isometric, even though one is connected and the other is discrete. The equivalence relation of quasi-isometry is important in
geometric group theory Geometric group theory is an area in mathematics devoted to the study of finitely generated groups via exploring the connections between algebraic properties of such group (mathematics), groups and topology, topological and geometry, geometric pro ...
: the
Švarc–Milnor lemma In the mathematical subject of geometric group theory, the Švarc–Milnor lemma (sometimes also called Milnor–Švarc lemma, with both variants also sometimes spelling Švarc as Schwarz) is a statement which says that a group G, equipped with ...
states that all spaces on which a group acts geometrically are quasi-isometric. Formally, the map f\,\colon M_1\to M_2 is a ''quasi-isometric embedding'' if there exist constants and such that \frac d_2(f(x),f(y))-B\leq d_1(x,y)\leq A d_2(f(x),f(y))+B \quad\text\quad x,y\in M_1. It is a ''quasi-isometry'' if in addition it is ''quasi-surjective'', i.e. there is a constant such that every point in M_2 is at distance at most from some point in the image f(M_1).


Notions of metric space equivalence

Given two metric spaces (M_1, d_1) and (M_2, d_2): *They are called homeomorphic (topologically isomorphic) if there is a
homeomorphism In the mathematical field of topology, a homeomorphism, topological isomorphism, or bicontinuous function is a bijective and continuous function between topological spaces that has a continuous inverse function. Homeomorphisms are the isomorphi ...
between them (i.e., a continuous
bijection In mathematics, a bijection, also known as a bijective function, one-to-one correspondence, or invertible function, is a function between the elements of two sets, where each element of one set is paired with exactly one element of the other s ...
with a continuous inverse). If M_1=M_2 and the identity map is a homeomorphism, then d_1 and d_2 are said to be topologically equivalent. *They are called uniformic (uniformly isomorphic) if there is a
uniform isomorphism In the mathematical field of topology a uniform isomorphism or is a special isomorphism between uniform spaces that respects uniform properties. Uniform spaces with uniform maps form a category. An isomorphism between uniform spaces is called a un ...
between them (i.e., a uniformly continuous bijection with a uniformly continuous inverse). *They are called bilipschitz homeomorphic if there is a bilipschitz bijection between them (i.e., a Lipschitz bijection with a Lipschitz inverse). *They are called isometric if there is a (bijective)
isometry In mathematics, an isometry (or congruence, or congruent transformation) is a distance-preserving transformation between metric spaces, usually assumed to be bijective. The word isometry is derived from the Ancient Greek: ἴσος ''isos'' mea ...
between them. In this case, the two metric spaces are essentially identical. *They are called quasi-isometric if there is a
quasi-isometry 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. T ...
between them.


Metric spaces with additional structure


Normed vector spaces

A
normed vector space 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" i ...
is a vector space equipped with a ''
norm Naturally occurring radioactive materials (NORM) and technologically enhanced naturally occurring radioactive materials (TENORM) consist of materials, usually industrial wastes or by-products enriched with radioactive elements found in the envir ...
'', which is a function that measures the length of vectors. The norm of a vector is typically denoted by \lVert v \rVert. Any normed vector space can be equipped with a metric in which the distance between two vectors and is given by d(x,y)=\lVert x-y \rVert. The metric is said to be ''induced'' by the norm \lVert\rVert. Conversely, if a metric on a
vector space In mathematics and physics, a vector space (also called a linear space) is a set whose elements, often called ''vectors'', may be added together and multiplied ("scaled") by numbers called '' scalars''. Scalars are often real numbers, but can ...
is * translation invariant: d(x,y) = d(x+a,y+a) for every , , and in ; and * : d(\alpha x, \alpha y) = , \alpha, d(x,y) for every and in and real number ; then it is the metric induced by the norm \lVert x \rVert = d(x,0). A similar relationship holds between
seminorm In mathematics, particularly in functional analysis, a seminorm is a vector space norm that need not be positive definite. Seminorms are intimately connected with convex sets: every seminorm is the Minkowski functional of some absorbing disk and ...
s and pseudometrics. Among examples of metrics induced by a norm are the metrics , , and on \R^2, which are induced by the
Manhattan norm A taxicab geometry or a Manhattan geometry is a geometry whose usual distance function or Metric (mathematics), metric of Euclidean geometry is replaced by a new metric in which the distance between two points is the sum of the absolute differences ...
, the
Euclidean norm Euclidean space is the fundamental space of geometry, intended to represent physical space. Originally, that is, in Euclid's ''Elements'', it was the three-dimensional space of Euclidean geometry, but in modern mathematics there are Euclidean s ...
, and the
maximum norm In mathematical analysis, the uniform norm (or ) assigns to real- or complex-valued bounded functions defined on a set the non-negative number :\, f\, _\infty = \, f\, _ = \sup\left\. This norm is also called the , the , the , or, when the ...
, respectively. More generally, the
Kuratowski embedding In mathematics, the Kuratowski embedding allows one to view any metric space as a subset of some Banach space. It is named after Kazimierz Kuratowski. The statement obviously holds for the empty space. If (''X'',''d'') is a metric space, ''x''0 i ...
allows one to see any metric space as a subspace of a normed vector space. Infinite-dimensional normed vector spaces, particularly spaces of functions, are studied in
functional analysis Functional analysis is a branch of mathematical analysis, the core of which is formed by the study of vector spaces endowed with some kind of limit-related structure (e.g. Inner product space#Definition, inner product, Norm (mathematics)#Defini ...
. Completeness is particularly important in this context: a complete normed vector space is known as a
Banach space In mathematics, more specifically in functional analysis, a Banach space (pronounced ) is a complete normed vector space. Thus, a Banach space is a vector space with a metric that allows the computation of vector length and distance between vector ...
. An unusual property of normed vector spaces is that
linear transformation In mathematics, and more specifically in linear algebra, a linear map (also called a linear mapping, linear transformation, vector space homomorphism, or in some contexts linear function) is a mapping V \to W between two vector spaces that pre ...
s between them are continuous if and only if they are Lipschitz. Such transformations are known as
bounded operator In functional analysis and operator theory, a bounded linear operator is a linear transformation L : X \to Y between topological vector spaces (TVSs) X and Y that maps bounded subsets of X to bounded subsets of Y. If X and Y are normed vector s ...
s.


Length spaces

A
curve In mathematics, a curve (also called a curved line in older texts) is an object similar to a line (geometry), line, but that does not have to be Linearity, straight. Intuitively, a curve may be thought of as the trace left by a moving point (ge ...
in a metric space is a continuous function \gamma: ,T\to M. The
length Length is a measure of distance. In the International System of Quantities, length is a quantity with dimension distance. In most systems of measurement a base unit for length is chosen, from which all other units are derived. In the Interna ...
of is measured by L(\gamma)=\sup_ \left\. In general, this supremum may be infinite; a curve of finite length is called ''rectifiable''. Suppose that the length of the curve is equal to the distance between its endpoints—that is, it's the shortest possible path between its endpoints. After reparametrization by arc length, becomes a ''
geodesic In geometry, a geodesic () is a curve representing in some sense the shortest path ( arc) between two points in a surface, or more generally in a Riemannian manifold. The term also has meaning in any differentiable manifold with a connection. ...
'': a curve which is a distance-preserving function. A geodesic is a shortest possible path between any two of its points. A ''geodesic metric space'' is a metric space which admits a geodesic between any two of its points. The spaces (\R^2,d_1) and (\R^2,d_2) are both geodesic metric spaces. In (\R^2,d_2), geodesics are unique, but in (\R^2,d_1), there are often infinitely many geodesics between two points, as shown in the figure at the top of the article. The space is a ''
length space In the mathematical study of metric spaces, one can consider the arclength of paths in the space. If two points are at a given distance from each other, it is natural to expect that one should be able to get from the first point to the second alon ...
'' (or the metric is ''intrinsic'') if the distance between any two points and is the infimum of lengths of paths between them. Unlike in a geodesic metric space, the infimum does not have to be attained. An example of a length space which is not geodesic is the Euclidean plane minus the origin: the points and can be joined by paths of length arbitrarily close to 2, but not by a path of length 2. An example of a metric space which is not a length space is given by the straight-line metric on the sphere: the straight line between two points through the center of the earth is shorter than any path along the surface. Given any metric space , one can define a new, intrinsic distance function on by setting the distance between points and to be infimum of the -lengths of paths between them. For instance, if is the straight-line distance on the sphere, then is the great-circle distance. However, in some cases may have infinite values. For example, if is the
Koch snowflake The Koch snowflake (also known as the Koch curve, Koch star, or Koch island) is a fractal curve and one of the earliest fractals to have been described. It is based on the Koch curve, which appeared in a 1904 paper titled "On a Continuous Curv ...
with the subspace metric induced from \R^2, then the resulting intrinsic distance is infinite for any pair of distinct points.


Riemannian manifolds

A
Riemannian manifold In differential geometry, a Riemannian manifold or Riemannian space , so called after the German mathematician Bernhard Riemann, is a real manifold, real, smooth manifold ''M'' equipped with a positive-definite Inner product space, inner product ...
is a space equipped with a Riemannian
metric tensor In the mathematical field of differential geometry, a metric tensor (or simply metric) is an additional structure on a manifold (such as a surface) that allows defining distances and angles, just as the inner product on a Euclidean space allows ...
, which determines lengths of
tangent vectors In mathematics, a tangent vector is a vector that is tangent to a curve or surface at a given point. Tangent vectors are described in the differential geometry of curves in the context of curves in R''n''. More generally, tangent vectors are eleme ...
at every point. This can be thought of defining a notion of distance infinitesimally. In particular, a differentiable path \gamma:
, T The comma is a punctuation mark that appears in several variants in different languages. It has the same shape as an apostrophe or single closing quotation mark () in many typefaces, but it differs from them in being placed on the baseline ...
\to M in a Riemannian manifold has length defined as the integral of the length of the tangent vector to the path: L(\gamma)=\int_0^T , \dot\gamma(t), dt. On a connected Riemannian manifold, one then defines the distance between two points as the infimum of lengths of smooth paths between them. This construction generalizes to other kinds of infinitesimal metrics on manifolds, such as sub-Riemannian and Finsler metrics. The Riemannian metric is uniquely determined by the distance function; this means that in principle, all information about a Riemannian manifold can be recovered from its distance function. One direction in metric geometry is finding purely metric ( "synthetic") formulations of properties of Riemannian manifolds. For example, a Riemannian manifold is a space (a synthetic condition which depends purely on the metric) if and only if its
sectional curvature In Riemannian geometry, the sectional curvature is one of the ways to describe the curvature of Riemannian manifolds. The sectional curvature ''K''(σ''p'') depends on a two-dimensional linear subspace σ''p'' of the tangent space at a poi ...
is bounded above by . Thus spaces generalize upper curvature bounds to general metric spaces.


Metric measure spaces

Real analysis makes use of both the metric on \R^n and the
Lebesgue measure In measure theory, a branch of mathematics, the Lebesgue measure, named after French mathematician Henri Lebesgue, is the standard way of assigning a measure to subsets of ''n''-dimensional Euclidean space. For ''n'' = 1, 2, or 3, it coincides wit ...
. Therefore, generalizations of many ideas from analysis naturally reside in metric measure spaces: spaces that have both a
measure Measure may refer to: * Measurement, the assignment of a number to a characteristic of an object or event Law * Ballot measure, proposed legislation in the United States * Church of England Measure, legislation of the Church of England * Mea ...
and a metric which are compatible with each other. Formally, a ''metric measure space'' is a metric space equipped with a
Borel regular measure Borel may refer to: People * Borel (author), 18th-century French playwright * Borel (1906–1967), pseudonym of the French actor Jacques Henri Cottance * Émile Borel (1871 – 1956), a French mathematician known for his founding work in the areas ...
such that every ball has positive measure. For example Euclidean spaces of dimension , and more generally -dimensional Riemannian manifolds, naturally have the structure of a metric measure space, equipped with the
Lebesgue measure In measure theory, a branch of mathematics, the Lebesgue measure, named after French mathematician Henri Lebesgue, is the standard way of assigning a measure to subsets of ''n''-dimensional Euclidean space. For ''n'' = 1, 2, or 3, it coincides wit ...
. Certain
fractal In mathematics, a fractal is a geometric shape containing detailed structure at arbitrarily small scales, usually having a fractal dimension strictly exceeding the topological dimension. Many fractals appear similar at various scales, as illu ...
metric spaces such as the Sierpiński gasket can be equipped with the α-dimensional
Hausdorff measure In mathematics, Hausdorff measure is a generalization of the traditional notions of area and volume to non-integer dimensions, specifically fractals and their Hausdorff dimensions. It is a type of outer measure, named for Felix Hausdorff, that ass ...
where α is the
Hausdorff dimension In mathematics, Hausdorff dimension is a measure of ''roughness'', or more specifically, fractal dimension, that was first introduced in 1918 by mathematician Felix Hausdorff. For instance, the Hausdorff dimension of a single point is zero, of a ...
. In general, however, a metric space may not have an "obvious" choice of measure. One application of metric measure spaces is generalizing the notion of
Ricci curvature In differential geometry, the Ricci curvature tensor, named after Gregorio Ricci-Curbastro, is a geometric object which is determined by a choice of Riemannian or pseudo-Riemannian metric on a manifold. It can be considered, broadly, as a measure ...
beyond Riemannian manifolds. Just as and
Alexandrov space In geometry, Alexandrov spaces with curvature ≥ ''k'' form a generalization of Riemannian manifolds with sectional curvature ≥ ''k'', where ''k'' is some real number. By definition, these spaces are locally compact complete length spaces where t ...
s generalize scalar curvature bounds,
RCD space RCD may refer to: Science and technology * Residual-current device, a safety device that breaks an electrical circuit * Rabbit calicivirus disease, a disease caused by the Rabbit haemorrhagic disease virus * Registered clock driver chips, part of ...
s are a class of metric measure spaces which generalize lower bounds on Ricci curvature.


Further examples and applications


Graphs and finite metric spaces

A if its induced topology is the
discrete topology In topology, a discrete space is a particularly simple example of a topological space or similar structure, one in which the points form a , meaning they are '' isolated'' from each other in a certain sense. The discrete topology is the finest to ...
. Although many concepts, such as completeness and compactness, are not interesting for such spaces, they are nevertheless an object of study in several branches of mathematics. In particular, (those having a
finite Finite is the opposite of infinite. It may refer to: * Finite number (disambiguation) * Finite set, a set whose cardinality (number of elements) is some natural number * Finite verb, a verb form that has a subject, usually being inflected or marked ...
number of points) are studied in
combinatorics Combinatorics is an area of mathematics primarily concerned with counting, both as a means and an end in obtaining results, and certain properties of finite structures. It is closely related to many other areas of mathematics and has many appl ...
and
theoretical computer science Theoretical computer science (TCS) is a subset of general computer science and mathematics that focuses on mathematical aspects of computer science such as the theory of computation, lambda calculus, and type theory. It is difficult to circumsc ...
. Embeddings in other metric spaces are particularly well-studied. For example, not every finite metric space can be isometrically embedded in a Euclidean space or in
Hilbert space In mathematics, Hilbert spaces (named after David Hilbert) allow generalizing the methods of linear algebra and calculus from (finite-dimensional) Euclidean vector spaces to spaces that may be infinite-dimensional. Hilbert spaces arise natural ...
. On the other hand, in the worst case the required distortion (bilipschitz constant) is only logarithmic in the number of points. For any undirected connected graph , the set of vertices of can be turned into a metric space by defining the
distance Distance is a numerical or occasionally qualitative measurement of how far apart objects or points are. In physics or everyday usage, distance may refer to a physical length or an estimation based on other criteria (e.g. "two counties over"). ...
between vertices and to be the length of the shortest edge path connecting them. This is also called ''shortest-path distance'' or ''geodesic distance''. In
geometric group theory Geometric group theory is an area in mathematics devoted to the study of finitely generated groups via exploring the connections between algebraic properties of such group (mathematics), groups and topology, topological and geometry, geometric pro ...
this construction is applied to the
Cayley graph In mathematics, a Cayley graph, also known as a Cayley color graph, Cayley diagram, group diagram, or color group is a graph that encodes the abstract structure of a group. Its definition is suggested by Cayley's theorem (named after Arthur Cayle ...
of a (typically infinite)
finitely-generated group In algebra, a finitely generated group is a group ''G'' that has some finite generating set ''S'' so that every element of ''G'' can be written as the combination (under the group operation) of finitely many elements of ''S'' and of inverses of s ...
, yielding the
word metric In group theory, a word metric on a discrete group G is a way to measure distance between any two elements of G . As the name suggests, the word metric is a metric on G , assigning to any two elements g , h of G a distance d(g,h) that mea ...
. Up to a bilipschitz homeomorphism, the word metric depends only on the group and not on the chosen finite generating set.


Distances between mathematical objects

In modern mathematics, one often studies spaces whose points are themselves mathematical objects. A distance function on such a space generally aims to measure the dissimilarity between two objects. Here are some examples: * Functions to a metric space. If is any set and is a metric space, then the set of all
bounded function In mathematics, a function ''f'' defined on some set ''X'' with real or complex values is called bounded if the set of its values is bounded. In other words, there exists a real number ''M'' such that :, f(x), \le M for all ''x'' in ''X''. A fun ...
s f \colon X \to M (i.e. those functions whose image is a
bounded subset :''"Bounded" and "boundary" are distinct concepts; for the latter see boundary (topology). A circle in isolation is a boundaryless bounded set, while the half plane is unbounded yet has a boundary. In mathematical analysis and related areas of mat ...
of M) can be turned into a metric space by defining the distance between two bounded functions and to be d(f,g) = \sup_ d(f(x),g(x)). This metric is called the
uniform metric In mathematical analysis, the uniform norm (or ) assigns to real- or complex-valued bounded functions defined on a set the non-negative number :\, f\, _\infty = \, f\, _ = \sup\left\. This norm is also called the , the , the , or, when the ...
or supremum metric. If is complete, then this
function space In mathematics, a function space is a set of functions between two fixed sets. Often, the domain and/or codomain will have additional structure which is inherited by the function space. For example, the set of functions from any set into a vect ...
is complete as well; moreover, if is also a topological space, then the subspace consisting of all bounded
continuous Continuity or continuous may refer to: Mathematics * Continuity (mathematics), the opposing concept to discreteness; common examples include ** Continuous probability distribution or random variable in probability and statistics ** Continuous ...
functions from to is also complete. When is a subspace of \R^n, this function space is known as a
classical Wiener space In mathematics, classical Wiener space is the collection of all continuous functions on a given domain (usually a subinterval of the real line), taking values in a metric space (usually ''n''-dimensional Euclidean space). Classical Wiener space i ...
. *
String metric In mathematics and computer science, a string metric (also known as a string similarity metric or string distance function) is a metric that measures distance ("inverse similarity") between two text strings for approximate string matching or com ...
s and
edit distance In computational linguistics and computer science, edit distance is a string metric, i.e. a way of quantifying how dissimilar two strings (e.g., words) are to one another, that is measured by counting the minimum number of operations required to tr ...
s. There are many ways of measuring distances between strings of characters, which may represent sentences in
computational linguistics Computational linguistics is an Interdisciplinarity, interdisciplinary field concerned with the computational modelling of natural language, as well as the study of appropriate computational approaches to linguistic questions. In general, comput ...
or
code word In communication, a code word is an element of a standardized code or protocol. Each code word is assembled in accordance with the specific rules of the code and assigned a unique meaning. Code words are typically used for reasons of reliability, ...
s in
coding theory Coding theory is the study of the properties of codes and their respective fitness for specific applications. Codes are used for data compression, cryptography, error detection and correction, data transmission and data storage. Codes are stud ...
. ''Edit distances'' attempt to measure the number of changes necessary to get from one string to another. For example, the
Hamming distance In information theory, the Hamming distance between two strings of equal length is the number of positions at which the corresponding symbols are different. In other words, it measures the minimum number of ''substitutions'' required to chan ...
measures the minimal number of substitutions needed, while the
Levenshtein distance In information theory, linguistics, and computer science, the Levenshtein distance is a string metric for measuring the difference between two sequences. Informally, the Levenshtein distance between two words is the minimum number of single-charact ...
measures the minimal number of deletions, insertions, and substitutions; both of these can be thought of as distances in an appropriate graph. *
Graph edit distance In mathematics and computer science, graph edit distance (GED) is a measure of similarity (or dissimilarity) between two graphs. The concept of graph edit distance was first formalized mathematically by Alberto Sanfeliu and King-Sun Fu in 1983. A ma ...
is a measure of dissimilarity between two
graphs Graph may refer to: Mathematics *Graph (discrete mathematics), a structure made of vertices and edges **Graph theory, the study of such graphs and their properties *Graph (topology), a topological space resembling a graph in the sense of discre ...
, defined as the minimal number of graph edit operations required to transform one graph into another. *
Wasserstein metric In mathematics, the Wasserstein distance or Kantorovich– Rubinstein metric is a distance function defined between probability distributions on a given metric space M. It is named after Leonid Vaseršteĭn. Intuitively, if each distribution is ...
s measure the distance between two
measure Measure may refer to: * Measurement, the assignment of a number to a characteristic of an object or event Law * Ballot measure, proposed legislation in the United States * Church of England Measure, legislation of the Church of England * Mea ...
s on the same metric space. The Wasserstein distance between two measures is, roughly speaking, the cost of transporting one to the other. * The set of all by
matrices Matrix most commonly refers to: * ''The Matrix'' (franchise), an American media franchise ** ''The Matrix'', a 1999 science-fiction action film ** "The Matrix", a fictional setting, a virtual reality environment, within ''The Matrix'' (franchis ...
over some
field Field may refer to: Expanses of open ground * Field (agriculture), an area of land used for agricultural purposes * Airfield, an aerodrome that lacks the infrastructure of an airport * Battlefield * Lawn, an area of mowed grass * Meadow, a grass ...
is a metric space with respect to the
rank Rank is the relative position, value, worth, complexity, power, importance, authority, level, etc. of a person or object within a ranking, such as: Level or position in a hierarchical organization * Academic rank * Diplomatic rank * Hierarchy * H ...
distance d(A,B) = \mathrm(B - A). * The
Helly metric In game theory, the Helly metric is used to assess the distance between two strategies. It is named for Eduard Helly. Consider a game \Gamma=\left\langle\mathfrak,\mathfrak,H\right\rangle, between player I and II. Here, \mathfrak and \mathfrak ...
in
game theory Game theory is the study of mathematical models of strategic interactions among rational agents. Myerson, Roger B. (1991). ''Game Theory: Analysis of Conflict,'' Harvard University Press, p.&nbs1 Chapter-preview links, ppvii–xi It has appli ...
measures the difference between
strategies Strategy (from Greek στρατηγία ''stratēgia'', "art of troop leader; office of general, command, generalship") is a general plan to achieve one or more long-term or overall goals under conditions of uncertainty. In the sense of the "art ...
in a game.


Hausdorff and Gromov–Hausdorff distance

The idea of spaces of mathematical objects can also be applied to subsets of a metric space, as well as metric spaces themselves. Hausdorff and Gromov–Hausdorff distance define metrics on the set of compact subsets of a metric space and the set of compact metric spaces, respectively. Suppose is a metric space, and let be a subset of . The ''distance from to a point of '' is, informally, the distance from to the closest point of . However, since there may not be a single closest point, it is defined via an
infimum In mathematics, the infimum (abbreviated inf; plural infima) of a subset S of a partially ordered set P is a greatest element in P that is less than or equal to each element of S, if such an element exists. Consequently, the term ''greatest low ...
: d(x,S) = \inf\. In particular, d(x, S)=0 if and only if belongs to the closure of . Furthermore, distances between points and sets satisfy a version of the triangle inequality: d(x,S) \leq d(x,y) + d(y,S), and therefore the map d_S:M \to \R defined by d_S(x)=d(x,S) is continuous. Incidentally, this shows that metric spaces are
completely regular In topology and related branches of mathematics, Tychonoff spaces and completely regular spaces are kinds of topological spaces. These conditions are examples of separation axioms. A Tychonoff space refers to any completely regular space that is ...
. Given two subsets and of , their ''Hausdorff distance'' is d_H(S,T) = \max \. Informally, two sets and are close to each other in the Hausdorff distance if no element of is too far from and vice versa. For example, if is an open set in Euclidean space is an ε-net inside , then d_H(S,T)<\varepsilon. In general, the Hausdorff distance d_H(S,T) can be infinite or zero. However, the Hausdorff distance between two distinct compact sets is always positive and finite. Thus the Hausdorff distance defines a metric on the set of compact subsets of . The Gromov–Hausdorff metric defines a distance between (isometry classes of) compact metric spaces. The ''Gromov–Hausdorff distance'' between compact spaces and is the infimum of the Hausdorff distance over all metric spaces that contain and as subspaces. While the exact value of the Gromov–Hausdorff distance is rarely useful to know, the resulting topology has found many applications.


Miscellaneous examples

* Given a metric space and an increasing
concave function In mathematics, a concave function is the negative of a convex function. A concave function is also synonymously called concave downwards, concave down, convex upwards, convex cap, or upper convex. Definition A real-valued function f on an in ...
f \colon [0,\infty) \to [0,\infty) such that if and only if , then d_f(x,y)=f(d(x,y)) is also a metric on . If for some real number , such a metric is known as a snowflake of . * The tight span of a metric space is another metric space which can be thought of as an abstract version of the convex hull. * The British Rail metric (also called the "post office metric" or the "SNCF metric") on a
normed vector space 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" i ...
is given by d(x,y) = \lVert x \rVert + \lVert y \rVert for distinct points x and y, and d(x,x) = 0. More generally \lVert \cdot \rVert 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 The name alludes to the tendency of railway journeys to proceed via London (or Paris) irrespective of their final destination. * The
Robinson–Foulds metric The Robinson–Foulds or symmetric difference metric, often abbreviated as the RF distance, is a simple way to calculate the distance between phylogenetic trees. It is defined as ( + ) where is the number of partitions of data implied by the first ...
used for calculating the distances between
Phylogenetic tree A phylogenetic tree (also phylogeny or evolutionary tree Felsenstein J. (2004). ''Inferring Phylogenies'' Sinauer Associates: Sunderland, MA.) is a branching diagram or a tree showing the evolutionary relationships among various biological spec ...
s in
Phylogenetics In biology, phylogenetics (; from Greek language, Greek wikt:φυλή, φυλή/wikt:φῦλον, φῦλον [] "tribe, clan, race", and wikt:γενετικός, γενετικός [] "origin, source, birth") is the study of the evolutionary his ...


Constructions


Product metric spaces

If (M_1,d_1),\ldots,(M_n,d_n) are metric spaces, and is the
Euclidean norm Euclidean space is the fundamental space of geometry, intended to represent physical space. Originally, that is, in Euclid's ''Elements'', it was the three-dimensional space of Euclidean geometry, but in modern mathematics there are Euclidean s ...
on \mathbb R^n, then \bigl(M_1 \times \cdots \times M_n, d_\times\bigr) is a metric space, where the
product metric In mathematics, a product metric is a metric on the Cartesian product of finitely many metric spaces (X_1,d_),\ldots,(X_n,d_) which metrizes the product topology In topology and related areas of mathematics, a product space is the Cartesian ...
is defined by d_\times\bigl((x_1,\ldots,x_n),(y_1,\ldots,y_n)\bigr) = N\bigl(d_1(x_1,y_1),\ldots,d_n(x_n,y_n)\bigr), and the induced topology agrees with the
product topology In topology and related areas of mathematics, a product space is the Cartesian product of a family of topological spaces equipped with a natural topology called the product topology. This topology differs from another, perhaps more natural-seemin ...
. By the equivalence of norms in finite dimensions, a topologically equivalent metric is obtained if is the
taxicab norm A taxicab geometry or a Manhattan geometry is a geometry whose usual distance function or Metric (mathematics), metric of Euclidean geometry is replaced by a new metric in which the distance between two points is the sum of the absolute differences ...
, a
p-norm In mathematics, the spaces are function spaces defined using a natural generalization of the -norm for finite-dimensional vector spaces. They are sometimes called Lebesgue spaces, named after Henri Lebesgue , although according to the Bourbaki ...
, the
maximum norm In mathematical analysis, the uniform norm (or ) assigns to real- or complex-valued bounded functions defined on a set the non-negative number :\, f\, _\infty = \, f\, _ = \sup\left\. This norm is also called the , the , the , or, when the ...
, or any other norm which is non-decreasing as the coordinates of a positive -tuple increase (yielding the triangle inequality). Similarly, a metric on the topological product of countably many metric spaces can be obtained using the metric d(x,y)=\sum_^\infty \frac1\frac. The topological product of uncountably many metric spaces need not be metrizable. For example, an uncountable product of copies of \mathbb is not
first-countable In topology, a branch of mathematics, a first-countable space is a topological space satisfying the "first axiom of countability". Specifically, a space X is said to be first-countable if each point has a countable neighbourhood basis (local base) ...
and thus isn't metrizable.


Quotient metric spaces

If is a metric space with metric , and \sim is an
equivalence relation In mathematics, an equivalence relation is a binary relation that is reflexive, symmetric and transitive. The equipollence relation between line segments in geometry is a common example of an equivalence relation. Each equivalence relation ...
on , then we can endow the quotient set M/\!\sim with a pseudometric. The distance between two equivalence classes /math> and /math> is defined as d'( = \inf\, where the
infimum In mathematics, the infimum (abbreviated inf; plural infima) of a subset S of a partially ordered set P is a greatest element in P that is less than or equal to each element of S, if such an element exists. Consequently, the term ''greatest low ...
is taken over all finite sequences (p_1, p_2, \dots, p_n) and (q_1, q_2, \dots, q_n) with p_1 \sim x, q_n \sim y, q_i \sim p_, i=1,2,\dots, n-1. In general this will only define a pseudometric, i.e. d'( =0 does not necessarily imply that /math>. However, for some equivalence relations (e.g., those given by gluing together polyhedra along faces), d' is a metric. The quotient metric d' is characterized by the following
universal property In mathematics, more specifically in category theory, a universal property is a property that characterizes up to an isomorphism the result of some constructions. Thus, universal properties can be used for defining some objects independently fro ...
. If f\,\colon(M,d)\to(X,\delta) is a metric (i.e. 1-Lipschitz) map between metric spaces satisfying whenever x \sim y, then the induced function \overline\,\colon \to X, given by \overline( =f(x), is a metric map \overline\,\colon (M/\sim,d')\to (X,\delta). The quotient metric does not always induce the
quotient topology In topology and related areas of mathematics, the quotient space of a topological space under a given equivalence relation is a new topological space constructed by endowing the quotient set of the original topological space with the quotient t ...
. For example, the topological quotient of the metric space \N \times ,1/math> identifying all points of the form (n, 0) is not metrizable since it is not
first-countable In topology, a branch of mathematics, a first-countable space is a topological space satisfying the "first axiom of countability". Specifically, a space X is said to be first-countable if each point has a countable neighbourhood basis (local base) ...
, but the quotient metric is a well-defined metric on the same set which induces a
coarser topology In topology and related areas of mathematics, the set of all possible topologies on a given set forms a partially ordered set. This order relation can be used for comparison of the topologies. Definition A topology on a set may be defined as the ...
. Moreover, different metrics on the original topological space (a disjoint union of countably many intervals) lead to different topologies on the quotient. A topological space is
sequential In mathematics, a sequence is an enumerated collection of objects in which repetitions are allowed and order matters. Like a set, it contains members (also called ''elements'', or ''terms''). The number of elements (possibly infinite) is called t ...
if and only if it is a (topological) quotient of a metric space.


Generalizations of metric spaces

There are several notions of spaces which have less structure than a metric space, but more than a topological space. *
Uniform space In the mathematical field of topology, a uniform space is a set with a uniform structure. Uniform spaces are topological spaces with additional structure that is used to define uniform properties such as completeness, uniform continuity and unifo ...
s are spaces in which distances are not defined, but uniform continuity is. *
Approach space In topology, a branch of mathematics, approach spaces are a generalization of metric spaces, based on point-to-set distances, instead of point-to-point distances. They were introduced by Robert Lowen in 1989, in a series of papers on approach theor ...
s are spaces in which point-to-set distances are defined, instead of point-to-point distances. They have particularly good properties from the point of view of
category theory Category theory is a general theory of mathematical structures and their relations that was introduced by Samuel Eilenberg and Saunders Mac Lane in the middle of the 20th century in their foundational work on algebraic topology. Nowadays, cate ...
. * Continuity spaces are a generalization of metric spaces and
poset In mathematics, especially order theory, a partially ordered set (also poset) formalizes and generalizes the intuitive concept of an ordering, sequencing, or arrangement of the elements of a Set (mathematics), set. A poset consists of a set toget ...
s that can be used to unify the notions of metric spaces and
domain Domain may refer to: Mathematics *Domain of a function, the set of input values for which the (total) function is defined **Domain of definition of a partial function **Natural domain of a partial function **Domain of holomorphy of a function * Do ...
s. There are also numerous ways of relaxing the axioms for a metric, giving rise to various notions of generalized metric spaces. These generalizations can also be combined. The terminology used to describe them is not completely standardized. Most notably, in
functional analysis Functional analysis is a branch of mathematical analysis, the core of which is formed by the study of vector spaces endowed with some kind of limit-related structure (e.g. Inner product space#Definition, inner product, Norm (mathematics)#Defini ...
pseudometrics often come from
seminorm In mathematics, particularly in functional analysis, a seminorm is a vector space norm that need not be positive definite. Seminorms are intimately connected with convex sets: every seminorm is the Minkowski functional of some absorbing disk and ...
s on vector spaces, and so it is natural to call them "semimetrics". This conflicts with the use of the term in
topology In mathematics, topology (from the Greek language, Greek words , and ) is concerned with the properties of a mathematical object, geometric object that are preserved under Continuous function, continuous Deformation theory, deformations, such ...
.


Extended metrics

Some authors define metrics so as to allow the distance function to attain the value ∞, i.e. distances are non-negative numbers on the
extended real number line In mathematics, the affinely extended real number system is obtained from the real number system \R by adding two infinity elements: +\infty and -\infty, where the infinities are treated as actual numbers. It is useful in describing the algebra ...
. Such a function is also called an ''extended metric'' or "∞-metric". Every extended metric can be replaced by a finite metric which is topologically equivalent. This can be done using a
subadditive In mathematics, subadditivity is a property of a function that states, roughly, that evaluating the function for the sum of two elements of the domain always returns something less than or equal to the sum of the function's values at each element. ...
monotonically increasing bounded function which is zero at zero, e.g. d'(x, y) = d(x, y) / (1 + d(x, y)) or d''(x, y) = \min(1, d(x, y)).


Metrics valued in structures other than the real numbers

The requirement that the metric take values in ,\infty) can be relaxed to consider metrics with values in other structures, including: * Ordered fields, yielding the notion of a generalised metric. * More general directed sets. In the absence of an addition operation, the triangle inequality does not make sense and is replaced with an ultrametric space, ultrametric inequality. This leads to the notion of a ''generalized ultrametric''. These generalizations still induce a
uniform structure In the mathematical field of topology, a uniform space is a set with a uniform structure. Uniform spaces are topological spaces with additional structure that is used to define uniform properties such as completeness, uniform continuity and unifor ...
on the space.


Pseudometrics

A ''pseudometric'' on X is a function d: X \times X \to \R which satisfies the axioms for a metric, except that instead of the second (identity of indiscernibles) only d(x,x)=0 for all ''x'' is required. In other words, the axioms for a pseudometric are: # d(x, y) \geq 0 # d(x,x)=0 # d(x,y)=d(y,x) # d(x,z)\leq d(x,y) + d(y,z). In some contexts, pseudometrics are referred to as ''semimetrics'' because of their relation to
seminorm In mathematics, particularly in functional analysis, a seminorm is a vector space norm that need not be positive definite. Seminorms are intimately connected with convex sets: every seminorm is the Minkowski functional of some absorbing disk and ...
s.


Quasimetrics

Occasionally, a quasimetric is defined as a function that satisfies all axioms for a metric with the possible exception of symmetry. The name of this generalisation is not entirely standardized. # d(x, y) \geq 0 # d(x,y)=0 \iff x=y # d(x,z) \leq d(x,y) + d(y,z) Quasimetrics are common in real life. For example, given a set of mountain villages, the typical walking times between elements of form a quasimetric because travel uphill takes longer than travel downhill. Another example is the length of car rides in a city with one-way streets: here, a shortest path from point to point goes along a different set of streets than a shortest path from to and may have a different length. A quasimetric on the reals can be defined by setting d(x,y)=\begin x-y & \textx\geq y,\\ 1 & \text \end The 1 may be replaced, for example, by infinity or by 1 + \sqrt or any other
subadditive In mathematics, subadditivity is a property of a function that states, roughly, that evaluating the function for the sum of two elements of the domain always returns something less than or equal to the sum of the function's values at each element. ...
function of . This quasimetric describes the cost of modifying a metal stick: it is easy to reduce its size by filing it down, but it is difficult or impossible to grow it. Given a quasimetric on , one can define an -ball around to be the set \. As in the case of a metric, such balls form a basis for a topology on , but this topology need not be metrizable. For example, the topology induced by the quasimetric on the reals described above is the (reversed)
Sorgenfrey line In mathematics, the lower limit topology or right half-open interval topology is a topology defined on the set \mathbb of real numbers; it is different from the standard topology on \mathbb (generated by the open intervals) and has a number of inte ...
.


Metametrics or partial metrics

In a ''metametric'', all the axioms of a metric are satisfied except that the distance between identical points is not necessarily zero. In other words, the axioms for a metametric are: # d(x,y)\geq 0 # d(x,y)=0 \implies x=y # d(x,y)=d(y,x) # d(x,z)\leq d(x,y)+d(y,z). Metametrics appear in the study of Gromov hyperbolic metric spaces and their boundaries. The ''visual metametric'' on such a space satisfies d(x,x)=0 for points x on the boundary, but otherwise d(x,x) is approximately the distance from ''x'' to the boundary. Metametrics were first defined by Jussi Väisälä. In other work, a function satisfying these axioms is called a ''partial metric'' or a ''dislocated metric''.


Semimetrics

A semimetric on X is a function d: X \times X \to \R that satisfies the first three axioms, but not necessarily the triangle inequality: # d(x,y)\geq 0 # d(x,y)=0 \iff x=y # d(x,y)=d(y,x) Some authors work with a weaker form of the triangle inequality, such as: : The ρ-inframetric inequality implies the ρ-relaxed triangle inequality (assuming the first axiom), and the ρ-relaxed triangle inequality implies the 2ρ-inframetric inequality. Semimetrics satisfying these equivalent conditions have sometimes been referred to as ''quasimetrics'', ''nearmetrics'' or inframetrics. The ρ-inframetric inequalities were introduced to model
round-trip delay time In telecommunications, round-trip delay (RTD) or round-trip time (RTT) is the amount of time it takes for a signal to be sent ''plus'' the amount of time it takes for acknowledgement of that signal having been received. This time delay includes p ...
s in the
internet The Internet (or internet) is the global system of interconnected computer networks that uses the Internet protocol suite (TCP/IP) to communicate between networks and devices. It is a '' network of networks'' that consists of private, pub ...
. The triangle inequality implies the 2-inframetric inequality, and the
ultrametric inequality In mathematics, an ultrametric space is a metric space in which the triangle inequality is strengthened to d(x,z)\leq\max\left\. Sometimes the associated metric is also called a non-Archimedean metric or super-metric. Although some of the theorems ...
is exactly the 1-inframetric inequality.


Premetrics

Relaxing the last three axioms leads to the notion of a premetric, i.e. a function satisfying the following conditions: # d(x,y)\geq 0 # d(x,x)=0 This is not a standard term. Sometimes it is used to refer to other generalizations of metrics such as pseudosemimetrics or pseudometrics; in translations of Russian books it sometimes appears as "prametric". A premetric that satisfies symmetry, i.e. a pseudosemimetric, is also called a distance. Any premetric gives rise to a topology as follows. For a positive real r, the centered at a point p is defined as :B_r(p)=\. A set is called ''open'' if for any point ''p'' in the set there is an centered at ''p'' which is contained in the set. Every premetric space is a topological space, and in fact a
sequential space In topology and related fields of mathematics, a sequential space is a topological space whose topology can be completely characterized by its convergent/divergent sequences. They can be thought of as spaces that satisfy a very weak axiom of count ...
. In general, the themselves need not be open sets with respect to this topology. As for metrics, the distance between two sets A and ''B'', is defined as :d(A,B)=\underset\inf d(x,y). This defines a premetric on the
power set In mathematics, the power set (or powerset) of a set is the set of all subsets of , including the empty set and itself. In axiomatic set theory (as developed, for example, in the ZFC axioms), the existence of the power set of any set is po ...
of a premetric space. If we start with a (pseudosemi-)metric space, we get a pseudosemimetric, i.e. a symmetric premetric. Any premetric gives rise to a
preclosure operator In topology, a preclosure operator, or Čech closure operator is a map between subsets of a set, similar to a topological closure operator, except that it is not required to be idempotent. That is, a preclosure operator obeys only three of the four ...
cl as follows: :cl(A)=\.


Pseudoquasimetrics

The prefixes ''pseudo-'', ''quasi-'' and ''semi-'' can also be combined, e.g., a pseudoquasimetric (sometimes called hemimetric) relaxes both the indiscernibility axiom and the symmetry axiom and is simply a premetric satisfying the triangle inequality. For pseudoquasimetric spaces the open form a basis of open sets. A very basic example of a pseudoquasimetric space is the set \ with the premetric given by d(0,1) = 1 and d(1,0) = 0. The associated topological space is the
Sierpiński space In mathematics, the Sierpiński space (or the connected two-point set) is a finite topological space with two points, only one of which is closed. It is the smallest example of a topological space which is neither trivial nor discrete. It is named ...
. Sets equipped with an extended pseudoquasimetric were studied by
William Lawvere Francis William Lawvere (; born February 9, 1937) is a mathematician known for his work in category theory, topos theory and the philosophy of mathematics. Biography Lawvere studied continuum mechanics as an undergraduate with Clifford Truesdel ...
as "generalized metric spaces".; From a categorical point of view, the extended pseudometric spaces and the extended pseudoquasimetric spaces, along with their corresponding nonexpansive maps, are the best behaved of the metric space categories. One can take arbitrary products and coproducts and form quotient objects within the given category. If one drops "extended", one can only take finite products and coproducts. If one drops "pseudo", one cannot take quotients. Lawvere also gave an alternate definition of such spaces as
enriched categories In category theory, a branch of mathematics, an enriched category generalizes the idea of a category by replacing hom-sets with objects from a general monoidal category. It is motivated by the observation that, in many practical applications, the ...
. The ordered set (\mathbb,\geq) can be seen as a
category Category, plural categories, may refer to: Philosophy and general uses * Categorization, categories in cognitive science, information science and generally *Category of being * ''Categories'' (Aristotle) *Category (Kant) *Categories (Peirce) * ...
with one
morphism In mathematics, particularly in category theory, a morphism is a structure-preserving map from one mathematical structure to another one of the same type. The notion of morphism recurs in much of contemporary mathematics. In set theory, morphisms a ...
a\to b if a\geq b and none otherwise. Using as the
tensor product In mathematics, the tensor product V \otimes W of two vector spaces and (over the same field) is a vector space to which is associated a bilinear map V\times W \to V\otimes W that maps a pair (v,w),\ v\in V, w\in W to an element of V \otimes W ...
and 0 as the
identity Identity may refer to: * Identity document * Identity (philosophy) * Identity (social science) * Identity (mathematics) Arts and entertainment Film and television * ''Identity'' (1987 film), an Iranian film * ''Identity'' (2003 film), ...
makes this category into a
monoidal category In mathematics, a monoidal category (or tensor category) is a category \mathbf C equipped with a bifunctor :\otimes : \mathbf \times \mathbf \to \mathbf that is associative up to a natural isomorphism, and an object ''I'' that is both a left and r ...
R^*. Every (extended pseudoquasi-)metric space (M,d) can now be viewed as a category M^* enriched over R^*: * The objects of the category are the points of . * For every pair of points and such that d(x,y)<\infty, there is a single morphism which is assigned the object d(x,y) of R^*. * The triangle inequality and the fact that d(x,x)=0 for all points derive from the properties of composition and identity in an enriched category. * Since R^* is a poset, all
diagrams A diagram is a symbolic representation of information using visualization techniques. Diagrams have been used since prehistoric times on walls of caves, but became more prevalent during the Enlightenment. Sometimes, the technique uses a three- ...
that are required for an enriched category commute automatically.


Metrics on multisets

The notion of a metric can be generalized from a distance between two elements to a number assigned to a multiset of elements. A
multiset In mathematics, a multiset (or bag, or mset) is a modification of the concept of a set that, unlike a set, allows for multiple instances for each of its elements. The number of instances given for each element is called the multiplicity of that e ...
is a generalization of the notion of a
set Set, The Set, SET or SETS may refer to: Science, technology, and mathematics Mathematics *Set (mathematics), a collection of elements *Category of sets, the category whose objects and morphisms are sets and total functions, respectively Electro ...
in which an element can occur more than once. Define the multiset union U=XY as follows: if an element occurs times in and times in then it occurs times in . A function on the set of nonempty finite multisets of elements of a set is a metric if # d(X)=0 if all elements of are equal and d(X) > 0 otherwise (
positive definiteness In mathematics, positive definiteness is a property of any object to which a bilinear form or a sesquilinear form may be naturally associated, which is positive-definite. See, in particular: * Positive-definite bilinear form * Positive-definite fun ...
) # d(X) depends only on the (unordered) multiset (
symmetry Symmetry (from grc, συμμετρία "agreement in dimensions, due proportion, arrangement") in everyday language refers to a sense of harmonious and beautiful proportion and balance. In mathematics, "symmetry" has a more precise definit ...
) # d(XY) \leq d(XZ)+d(ZY) (
triangle inequality In mathematics, the triangle inequality states that for any triangle, the sum of the lengths of any two sides must be greater than or equal to the length of the remaining side. This statement permits the inclusion of degenerate triangles, but ...
) By considering the cases of axioms 1 and 2 in which the multiset has two elements and the case of axiom 3 in which the multisets , , and have one element each, one recovers the usual axioms for a metric. That is, every multiset metric yields an ordinary metric when restricted to sets of two elements. A simple example is the set of all nonempty finite multisets X of integers with d(X)=\max (X)- \min (X). More complex examples are
information distance Information distance is the distance between two finite objects (represented as computer files) expressed as the number of bits in the shortest program which transforms one object into the other one or vice versa on a universal computer. This is an ...
in multisets; and
normalized compression distance Normalized compression distance (NCD) is a way of measuring the similarity between two objects, be it two documents, two letters, two emails, two music scores, two languages, two programs, two pictures, two systems, two genomes, to name a few. Suc ...
(NCD) in multisets.


See also

* * * * * *


Notes


Citations


References

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


External links

*
Far and near — several examples of distance functions
at
cut-the-knot Alexander Bogomolny (January 4, 1948 July 7, 2018) was a Soviet-born Israeli-American mathematician. He was Professor Emeritus of Mathematics at the University of Iowa, and formerly research fellow at the Moscow Institute of Electronics and Math ...
. Mathematical analysis Mathematical structures Topology Topological spaces Uniform spaces