Distance Functions, Metrics

From Department of Mathematics at UTSA
Revision as of 14:26, 25 October 2021 by Lila (talk | contribs) (Created page with "thumb|200px|An illustration comparing the [[Taxicab geometry|taxicab metric to the Euclidean metric on the plane: According to the taxicab metr...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
An illustration comparing the taxicab metric to the Euclidean metric on the plane: According to the taxicab metric the red, yellow, and blue paths have the same length (12). According to the Euclidean metric, the green path has length '"`UNIQ--postMath-00000001-QINU`"', and is the unique shortest path.

In mathematics, a metric or distance function is a function that gives a distance between each pair of point elements of a set. A set with a metric is called a metric space.Lua error in package.lua at line 80: module 'Module:No globals' not found. A metric induces a topology on a set, but not all topologies can be generated by a metric. A topological space whose topology can be described by a metric is called metrizable.

One important source of metrics in differential geometry are metric tensors, bilinear forms that may be defined from the tangent vectors of a differentiable manifold onto a scalar. A metric tensor allows distances along curves to be determined through integration, and thus determines a metric.

Definition

A metric on a set X is a function (called distance function or simply distance)

'"`UNIQ--postMath-00000002-QINU`"'

where '"`UNIQ--postMath-00000003-QINU`"' is the set of non-negative real numbers and for all '"`UNIQ--postMath-00000004-QINU`"', the following three axioms are satisfied:

1. '"`UNIQ--postMath-00000005-QINU`"' identity of indiscernibles
2. '"`UNIQ--postMath-00000006-QINU`"' symmetry
3. '"`UNIQ--postMath-00000007-QINU`"' triangle inequality

A metric (as defined) is a non-negative real-valued function. This, together with axiom 1, provides a separation condition, where distinct or separate points are precisely those that have a positive distance between them.

The requirement that '"`UNIQ--postMath-00000008-QINU`"' have a range of '"`UNIQ--postMath-00000009-QINU`"' is a clarifying (but unnecessary) restriction in the definition, for if we had any function '"`UNIQ--postMath-0000000A-QINU`"' that satisfied the same three axioms, the function could be proven to still be non-negative as follows (using axioms 1, 3, and 2 in that order):

'"`UNIQ--postMath-0000000B-QINU`"' which implies '"`UNIQ--postMath-0000000C-QINU`"'.

A metric is called an ultrametric if it satisfies the following stronger version of the triangle inequality where points can never fall 'between' other points:

'"`UNIQ--postMath-0000000D-QINU`"'

for all '"`UNIQ--postMath-0000000E-QINU`"'

A metric d on X is called intrinsic if any two points x and y in X can be joined by a curve with length arbitrarily close to d(x, y).

A metric d on a group G (written multiplicatively) is said to be Template:Em (resp. Template:Em) if we have

'"`UNIQ--postMath-0000000F-QINU`"' [resp. '"`UNIQ--postMath-00000010-QINU`"']

for all x, y, and z in G.

A metric '"`UNIQ--postMath-00000011-QINU`"' on a commutative additive group '"`UNIQ--postMath-00000012-QINU`"' is said to be Template:Em if '"`UNIQ--postMath-00000013-QINU`"' for all '"`UNIQ--postMath-00000014-QINU`"' or equivalently, if '"`UNIQ--postMath-00000015-QINU`"' for all '"`UNIQ--postMath-00000016-QINU`"' Every vector space is also a commutative additive group and a metric on a real or complex vector space that is induced by a norm is always translation invariant. A metric '"`UNIQ--postMath-00000017-QINU`"' on a real or complex vector space '"`UNIQ--postMath-00000018-QINU`"' is induced by a norm if and only if it is translation invariant and Template:Em, where the latter means that '"`UNIQ--postMath-00000019-QINU`"' for all scalars '"`UNIQ--postMath-0000001A-QINU`"' and all '"`UNIQ--postMath-0000001B-QINU`"' in which case the function '"`UNIQ--postMath-0000001C-QINU`"' defines a norm on '"`UNIQ--postMath-0000001D-QINU`"' and the canonical metric induced by '"`UNIQ--postMath-0000001E-QINU`"' is equal to '"`UNIQ--postMath-0000001F-QINU`"'

Notes

These conditions express intuitive notions about the concept of distance. For example, that the distance between distinct points is positive and the distance from x to y is the same as the distance from y to x. The triangle inequality means that the distance from x to z via y is at least as great as from x to z directly. Euclid in his work stated that the shortest distance between two points is a line; that was the triangle inequality for his geometry.

Examples

Template:Main

  • The discrete metric: if x = y then d(x,y) = 0. Otherwise, d(x,y) = 1.
  • The Euclidean metric is translation and rotation invariant.
  • The taxicab metric is translation invariant.
  • More generally, any metric induced by a norm is translation invariant.
  • If '"`UNIQ--postMath-00000020-QINU`"' is a sequence of seminorms defining a (locally convex) topological vector space E, then '"`UNIQ--postMath-00000021-QINU`"' is a metric defining the same topology. (One can replace '"`UNIQ--postMath-00000022-QINU`"' by any summable sequence '"`UNIQ--postMath-00000023-QINU`"' of strictly positive numbers.)
  • The normed space '"`UNIQ--postMath-00000024-QINU`"' is a Banach space where the absolute value is a norm on the real line '"`UNIQ--postMath-00000025-QINU`"' that induces the usual Euclidean topology on '"`UNIQ--postMath-00000026-QINU`"' Define a metric '"`UNIQ--postMath-00000027-QINU`"' on '"`UNIQ--postMath-00000028-QINU`"' by '"`UNIQ--postMath-00000029-QINU`"' for all '"`UNIQ--postMath-0000002A-QINU`"' Just like Template:Nowrap induced metric, the metric '"`UNIQ--postMath-0000002B-QINU`"' also induces the usual Euclidean topology on R. However, '"`UNIQ--postMath-0000002C-QINU`"' is not a complete metric because the sequence '"`UNIQ--postMath-0000002D-QINU`"' defined by '"`UNIQ--postMath-0000002E-QINU`"' is a [[Cauchy sequence|Template:Nowrap sequence]] but it does not converge to any point of R. As a consequence of not converging, this Template:Nowrap sequence cannot be a Cauchy sequence in '"`UNIQ--postMath-0000002F-QINU`"' (i.e. it is not a Cauchy sequence with respect to the norm '"`UNIQ--postMath-00000030-QINU`"') because if it was Template:Nowrap then the fact that '"`UNIQ--postMath-00000031-QINU`"' is a Banach space would imply that it converges (a contradiction).Lua error in package.lua at line 80: module 'Module:No globals' not found.
  • Graph metric, a metric defined in terms of distances in a certain graph.
  • The Hamming distance in coding theory.
  • Riemannian metric, a type of metric function that is appropriate to impose on any differentiable manifold. For any such manifold, one chooses at each point p a symmetric, positive definite, bilinear form L: Tp × TpR on the tangent space Tp at p, doing so in a smooth manner. This form determines the length of any tangent vector v on the manifold, via the definition '"`UNIQ--postMath-00000032-QINU`"'. Then for any differentiable path on the manifold, its length is defined as the integral of the length of the tangent vector to the path at any point, where the integration is done with respect to the path parameter. Finally, to get a metric defined on any pair {x, y} of points of the manifold, one takes the infimum, over all paths from x to y, of the set of path lengths. A smooth manifold equipped with a Riemannian metric is called a Riemannian manifold.
  • The Fubini–Study metric on complex projective space. This is an example of a Riemannian metric.
  • String metrics, such as Levenshtein distance and other string edit distances, define a metric over strings.
  • Graph edit distance defines a distance function between graphs.
  • The Wasserstein metric is a distance function defined between two probability distributions.
  • The Finsler metric is a continuous nonnegative function Template:Nowrap defined on the tangent bundle.

Equivalence of metrics

For a given set X, two metrics d1 and d2 are called topologically equivalent (uniformly equivalent) if the identity mapping Template:Block indent is a homeomorphism (uniform isomorphism).

For example, if '"`UNIQ--postMath-00000033-QINU`"' is a metric, then '"`UNIQ--postMath-00000034-QINU`"' and '"`UNIQ--postMath-00000035-QINU`"' are metrics equivalent to '"`UNIQ--postMath-00000036-QINU`"'

Template:See also

Norm induced metric

Template:Anchor Norms on vector spaces are equivalent to certain metrics, namely homogeneous, translation-invariant ones. In other words, every norm determines a metric, and some metrics determine a norm.

Given a normed vector space '"`UNIQ--postMath-00000037-QINU`"' we can define a metric '"`UNIQ--postMath-00000038-QINU`"' on '"`UNIQ--postMath-00000039-QINU`"' called the Template:Em or simply the Template:Em, by

'"`UNIQ--postMath-0000003A-QINU`"'

The metric '"`UNIQ--postMath-0000003B-QINU`"' is said to be Template:Em the norm '"`UNIQ--postMath-0000003C-QINU`"'

ConverselyLua error in package.lua at line 80: module 'Module:No globals' not found. if a metric '"`UNIQ--postMath-0000003D-QINU`"' on a vector space '"`UNIQ--postMath-0000003E-QINU`"' satisfies the properties

  • Translation invariance: '"`UNIQ--postMath-0000003F-QINU`"';
  • Absolute homogeneity: '"`UNIQ--postMath-00000040-QINU`"';

then a norm on '"`UNIQ--postMath-00000041-QINU`"' may be defined by

'"`UNIQ--postMath-00000042-QINU`"'

where the metric induced by this norm is the original given metric '"`UNIQ--postMath-00000043-QINU`"'

Similarly, a seminorm induces a pseudometric (see below), and a homogeneous, translation invariant pseudometric induces a seminorm.

Metrics on multisets

We can generalize the notion of a metric from a distance between two elements to a distance between two nonempty finite multisets of elements. A multiset is a generalization of the notion of a set such that an element can occur more than once. Define '"`UNIQ--postMath-00000044-QINU`"' if '"`UNIQ--postMath-00000045-QINU`"' is the multiset consisting of the elements of the multisets '"`UNIQ--postMath-00000046-QINU`"' and '"`UNIQ--postMath-00000047-QINU`"', that is, if '"`UNIQ--postMath-00000048-QINU`"' occurs once in '"`UNIQ--postMath-00000049-QINU`"' and once in '"`UNIQ--postMath-0000004A-QINU`"' then it occurs twice in '"`UNIQ--postMath-0000004B-QINU`"'. A distance function '"`UNIQ--postMath-0000004C-QINU`"' on the set of nonempty finite multisets is a metricLua error in package.lua at line 80: module 'Module:No globals' not found. if

  1. '"`UNIQ--postMath-0000004D-QINU`"' if all elements of '"`UNIQ--postMath-0000004E-QINU`"' are equal and '"`UNIQ--postMath-0000004F-QINU`"' otherwise (positive definiteness), that is, (non-negativity plus identity of indiscernibles)
  2. '"`UNIQ--postMath-00000050-QINU`"' is invariant under all permutations of '"`UNIQ--postMath-00000051-QINU`"' (symmetry)
  3. '"`UNIQ--postMath-00000052-QINU`"' (triangle inequality)

Note that the familiar metric between two elements results if the multiset '"`UNIQ--postMath-00000053-QINU`"' has two elements in 1 and 2 and the multisets '"`UNIQ--postMath-00000054-QINU`"' have one element each in 3. For instance if '"`UNIQ--postMath-00000055-QINU`"' consists of two occurrences of '"`UNIQ--postMath-00000056-QINU`"', then '"`UNIQ--postMath-00000057-QINU`"' according to 1.

A simple example is the set of all nonempty finite multisets '"`UNIQ--postMath-00000058-QINU`"' of integers with '"`UNIQ--postMath-00000059-QINU`"'. More complex examples are information distance in multisets;Lua error in package.lua at line 80: module 'Module:No globals' not found. and normalized compression distance (NCD) in multisets.Lua error in package.lua at line 80: module 'Module:No globals' not found.

Generalized metrics

There are numerous ways of relaxing the axioms of metrics, 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 pseudometrics often come from seminorms on vector spaces, and so it is natural to call them "semimetrics". This conflicts with the use of the term in topology.

Extended metrics

Some authors allow the distance function d to attain the value ∞, i.e. distances are non-negative numbers on the extended real number line. Such a function is called an extended metric or "∞-metric". Every extended metric can be transformed to a finite metric such that the metric spaces are equivalent as far as notions of topology (such as continuity or convergence) are concerned. This can be done using a subadditive 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)).

The requirement that the metric take values in Template:Closed-open can even be relaxed to consider metrics with values in other directed sets. The reformulation of the axioms in this case leads to the construction of uniform spaces: topological spaces with an abstract structure enabling one to compare the local topologies of different points.

Pseudometrics

Template:Main A pseudometric on X is a function which satisfies the axioms for a metric, except that instead of the second (identity of indiscernibles) only Template:Nowrap for all x is required. In other words, the axioms for a pseudometric are:

  1. d(x, y) ≥ 0
  2. d(x, x) = 0 (but possibly d(x, y) = 0 for some distinct values xy.)
  3. d(x, y) = d(y, x)
  4. d(x, z) ≤ d(x, y) + d(y, z).

In some contexts, pseudometrics are referred to as semimetrics because of their relation to seminorms.

Quasimetrics

Occasionally, a quasimetric is defined as a function that satisfies all axioms for a metric with the possible exception of symmetry.[1] The name of this generalisation is not entirely standardized.[2]

  1. d(x, y) ≥ 0 (positivity)
  2. d(x, y) = 0   if and only if   x = y (positive definiteness)
  3. d(x, y) = d(y, x) (symmetry, dropped)
  4. d(x, z) ≤ d(x, y) + d(y, z) (triangle inequality)

Quasimetrics are common in real life. For example, given a set X of mountain villages, the typical walking times between elements of X form a quasimetric because travel up hill takes longer than travel down hill. Another example is a taxicab geometry topology having one-way streets, where a path from point A to point B comprises a different set of streets than a path from B to A.

A quasimetric on the reals can be defined by setting

d(x, y) = xy if xy, and
d(x, y) = 1 otherwise. The 1 may be replaced by infinity or by .

The topological space underlying this quasimetric space is the Sorgenfrey line. This space describes the process of filing down a metal stick: it is easy to reduce its size, but it is difficult or impossible to grow it.

If d is a quasimetric on X, a metric d' on X can be formed by taking

d'(x, y) = Template:Sfrac(d(x, y) + d(y, x)).

Important cases of generalized metrics

In differential geometry, one considers a metric tensor, which can be thought of as an "infinitesimal" quadratic metric function. This is defined as a nondegenerate symmetric bilinear form on the tangent space of a manifold with an appropriate differentiability requirement. While these are not metric functions as defined in this article, they induce what is called a pseudo-semimetric function by integration of its square root along a path through the manifold. If one imposes the positive-definiteness requirement of an inner product on the metric tensor, this restricts to the case of a Riemannian manifold, and the path integration yields a metric.

In general relativity the related concept is a metric tensor (general relativity) which expresses the structure of a pseudo-Riemannian manifold. Though the term "metric" is used, the fundamental idea is different because there are non-zero null vectors in the tangent space of these manifolds, and vectors can have negative squared norms. This generalized view of "metrics", in which zero distance does not imply identity, has crept into some mathematical writing too:[3]


Licensing

Content obtained and/or adapted from:

  • Template:Harvtxt; Template:Harvtxt
  • Template:Harvtxt calls them "semimetrics". That same term is also frequently used for two other generalizations of metrics.
  • Template:Harvtxt: "This bilinear form is variously called the Lorentz metric, or Minkowski metric or metric tensor"; Template:Harvtxt: "We call this scalar product the Lorentz metric"