Metric space
Let
be a set. A mapping
is called a metric
(or a distance function),
if for all
the following conditions hold:
if and only if
(positivity),
(symmetry),
and
(triangle inequality).
A metric space is a pair
, where
is a set and
is a metric.