Metric and metric space
A distance function satisfying positivity, symmetry, and the triangle inequality
Let be a nonempty set. A function is a metric on if for all :
- , and if and only if .
- .
- (triangle inequality).
The pair is called a metric space.
Metrics allow one to define balls, open sets, and notions of convergence and completeness.
Examples
- On , the Euclidean metric .
- The discrete metric: if and otherwise.
- On a normed vector space , is a metric.