Definition:Metric Space

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

d : X × X → $$\mathbb{R}$$

which satisfies for all x, y, z in X


 * 1) d(x, y) ≥ 0
 * 2) d(x, y) = 0   if and only if   x = y
 * 3) d(x, y) = d(y, x)
 * 4) d(x, z) ≤ d(x, y) + d(y, z)