Metric/Metric space/Definition

Metric space

Let be a set. A mapping is called a metric (or a distance function), if for all the following conditions hold:

  1. if and only if (positivity),
  2. (symmetry), and
  3. (triangle inequality).

A metric space is a pair , where is a set and is a metric.