Definition:Metric Space

Distance Function
A metric on a set $$X$$ is a function (called the distance function or simply distance) $$d: X \times X \to \R$$ which satisfies:


 * M0: $$\forall x, y \in X: d \left({x, y}\right) \ge 0$$
 * M1: $$\forall x, y \in X: d \left({x, y}\right) = 0 \iff x = y$$
 * M2: $$\forall x, y \in X: d \left({x, y}\right) = d \left({y, x}\right)$$
 * M3: $$\forall x, y, z \in X: d \left({x, y}\right) + d \left({y, z}\right) \ge d \left({x, z}\right)$$

These are sometimes referred to as the metric space axioms.

Triangle Inequality
Axiom M3 is often referred to as the triangle inequality, as it is a generalization of the Triangle Inequality which holds on the real number line and complex plane.

Metric Space
A metric space $$M = \left\{{A, d}\right\}$$ is a set $$A \ne \varnothing$$ together with a metric $$d: A \times A \to \R$$.

The elements of $$A$$ are called the points of the space.

Notation
Some authors use a variant of $$d$$ for a metric, for example $$\eth$$.