# Distance Metric Space

A Distance Metric Space is a mathematical space consisting of a set [math]\displaystyle{ X }[/math] and a distance metric [math]\displaystyle{ d: X \times X \rightarrow \mathbb{R} }[/math] satisfying non-negativity, identity of indiscernibles, symmetry, and the triangle inequality.

**Context:**- It can range from being a Bounded Metric Space (if there is a maximum distance between two points in the space) to being an Unbounded Metric Space.
- It can range from being a Binary Vector Space, to being an Integer Vector Space, to being a Continuous Vector Space.
- ...
- It can be associated with a Cluster.
- It can be an Input to a Similarity Search Task, Metric Space Optimization Task.
- …

**Example(s):**- Finite-Dimensional Metric Spaces, such as:
- Euclidean Spaces (with Euclidean Distance Function [math]\displaystyle{ d(x, y) = \sqrt{\sum_{i=1}^n (x_i - y_i)^2} }[/math])
- Real Number Space [math]\displaystyle{ \mathbb{R} }[/math] (with Absolute Value Metric [math]\displaystyle{ d(x,y) = |y-x| }[/math])
- The plane [math]\displaystyle{ \mathbb{R}^2 }[/math] with various metrics:
- Euclidean Distance [math]\displaystyle{ d(x, y) = \sqrt{(x_1 - y_1)^2 + (x_2 - y_2)^2} }[/math]
- Manhattan Distance [math]\displaystyle{ d(x, y) = |x_1 - y_1| + |x_2 - y_2| }[/math] (also known as taxicab metric)

- Normed Vector Spaces, such as:
- L1 Norm Metric Space (with L1 Norm Distance Function [math]\displaystyle{ d(x,y) = \sum_{i=1}^n |x_i - y_i| }[/math])
- L2 Norm Metric Space (with L2 Norm Distance Function [math]\displaystyle{ d(x,y) = \sqrt{\sum_{i=1}^n (x_i - y_i)^2} }[/math])
- p Norm Metric Space (with p Norm Distance Function [math]\displaystyle{ d(x,y) = \left(\sum_{i=1}^n |x_i - y_i|^p\right)^{1/p} }[/math])

- Infinite-dimensional spaces, such as:
- The set of continuous functions on a closed interval [math]\displaystyle{ [a, b] }[/math] (with Sup Norm Metric [math]\displaystyle{ d(f,g) = \sup_{x \in [a,b]} |f(x) - g(x)| }[/math])
- The set of sequences of real numbers [math]\displaystyle{ l^p }[/math] (with lp Norm Metric [math]\displaystyle{ d(x, y) = \left(\sum_{i=1}^{\infty} |x_i - y_i|^p\right)^{1/p} }[/math])

- Discrete Metric Spaces, such as:
- Graph Space (with Graph Distance Function defined as the shortest path between two Graph Nodes)
- String Space (with Edit Distance Function [math]\displaystyle{ d(x,y) }[/math], representing the minimum number of operations needed to transform one string into another)

- ...

- Finite-Dimensional Metric Spaces, such as:
**Counter-Example(s):**- Pseudometric Spaces, where the distance between two distinct points can be zero.
- Quasi-metric Spaces, which do not necessarily satisfy the symmetry condition of the metric.

**See:**Topological Space, Bounded Metric Space, Unbounded Metric Space, Normed Vector Space, Pseudometric, Quasi-metric- ...

**See:**Affine Space, Integer Vector Space, Dimension, Set Measure Space, Topology Space, Topological Space, Angular Distance.

## References

### 2023

- (Wikipedia, 2023) ⇒ https://en.wikipedia.org/wiki/metric_space Retrieved:2023-11-29.
- In mathematics, a
**metric space**is a set together with a notion of*distance*between its elements, usually called points. The distance is measured by a function called a**metric**or**distance function**.Metric spaces are the most general setting for studying many of the concepts of mathematical analysis and geometry.The most familiar example of a metric space is 3-dimensional Euclidean space with its usual notion of distance. Other well-known examples are a sphere equipped with the angular distance and the hyperbolic plane. 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, 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 manifolds, normed vector spaces, and graphs. In abstract algebra, the

*p*-adic numbers arise as elements of the completion of a metric structure on the rational numbers. 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, including balls, completeness, as well as uniform, Lipschitz, and Hölder continuity, can be defined in the setting of metric spaces. Other notions, such as continuity, compactness, and open and closed sets, can be defined for metric spaces, but also in the even more general setting of topological spaces.

- In mathematics, a

### 2012

- (Wikipedia, 2012) ⇒ http://en.wikipedia.org/wiki/Metric_space
- QUOTE: In mathematics, a
**metric space**is a set where a notion of distance (called a metric) between elements of the set is defined.The metric space which most closely corresponds to our intuitive understanding of space is the 3-dimensional Euclidean space. In fact, the notion of "metric" is a generalization of the Euclidean metric arising from the four long-known properties of the Euclidean distance. The Euclidean metric defines the distance between two points as the length of the straight line segment connecting them.

Non-intuitive metric spaces occur in elliptic geometry and hyperbolic geometry. For example, the hyperboloid model of hyperbolic geometry is used in special relativity for a metric space of velocities.

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

- QUOTE: In mathematics, a
- http://en.wikipedia.org/wiki/Metric_space#Definition
- A
**metric space**is an ordered pair [math]\displaystyle{ (M,d) }[/math] where [math]\displaystyle{ M }[/math] is a set and [math]\displaystyle{ d }[/math] is a metric on [math]\displaystyle{ M }[/math], i.e., a function :[math]\displaystyle{ d \colon M \times M \rightarrow \mathbb{R} }[/math] such that for any [math]\displaystyle{ x, y, z \in M }[/math], the following holds:- [math]\displaystyle{ d(x,y) \ge 0 }[/math] (
*non-negative*), - [math]\displaystyle{ d(x,y) = 0\, }[/math] iff [math]\displaystyle{ x = y\, }[/math] (
*identity of indiscernibles*), - [math]\displaystyle{ d(x,y) = d(y,x)\, }[/math] (
*symmetry*) and - [math]\displaystyle{ d(x,z) \le d(x,y) + d(y,z) }[/math] (
*triangle inequality*) .

- [math]\displaystyle{ d(x,y) \ge 0 }[/math] (
- The first condition follows from the other three, since: : [math]\displaystyle{ 2d(x,y) = d(x,y) + d(y,x) \ge d(x,x) = 0. }[/math] The function [math]\displaystyle{ d }[/math] is also called
*distance function*or simply distance*. Often, [math]\displaystyle{ d }[/math] is omitted and one just writes [math]\displaystyle{ M }[/math] for a metric space if it is clear from the context what metric is used.*

- A

### 2009

- (Wordnet, 2009) ⇒ http://wordnet.princeton.edu/perl/webwn
- a set of points such that for every pair of points there is a nonnegative real number called their distance that is symmetric and satisfies the ...

- http://en.wiktionary.org/wiki/metric_space
- Any space whose elements are points, and between any two of which a non-negative real number can be defined as the distance between the points …

### 2003

- (van Wijk, 2003) ⇒ Jarke J. van Wijk. (2003). “Image based Flow Visualization for Curved Surfaces.” In: Visualization, (VIS 2003).
- QUOTE: … This requires that the distortion from parametric space to geometric space is taken into account to achieve a … Now that we can produce texture aligned with vector fields on curved surfaces, we consider various... A flow field is defined by the superposition of a linear flow field and a...

### 1955

- (Kelley, 1955) ⇒ John L Kelley. (1955). “General Topology.
*D. van Nostrand Company.*