Jump to content

Metric/Metric space/Definition

From Wikiversity
Metric space

Let M be a set. A mapping d:M×M→ℝ is called a metric (or a distance function) if for all x,y,z∈M the following conditions hold:

  1. d(x,y)=0 if and only if x=y (positivity),
  2. d(x,y)=d(y,x) (symmetry), and
  3. d(x,y)≤d(x,z)+d(z,y) (triangle inequality).

A metric space is a pair (M,d), where M is a set and d:M×M→ℝ is a metric.