A metric space is a space of objects (called points) together with a distance function or metric :

which associates to each pair of points in a non-negative real number .

Further more, the metric must satisfy the following properties:

  • For any , we have
  • (Positivity) For any distinct , we have
  • (Symmetry) For any , we have
  • (triangle inequality) For any , we have

Example: Euclidean Space

see: Euclidean vector space

, the Euclidean space of dimension, use Euclidean distance as the metric.

Example: Taxicab Space

uses Manhattan distance as the metric (taxicab metric).

The metric satisfy the inequality

Example: Sup norm metric

see also: infinity norm

We can have metric space where

The metric satisfy the inequality

space

see also: p-norm

The above , , and metric spaces are special case of the metrics, where