Distance (metric)
A function d(x,y) satisfying positivity, symmetry, and the triangle inequality.
Distance (metric)
Let be a set . A metric (or distance function) on is a function
such that for all :
- (Positive definiteness) iff .
- (Symmetry) .
- (Triangle inequality) .
Metrics quantify “closeness” abstractly. Most of analysis can be formulated in terms of a metric, including convergence , continuity , compactness , and completeness .
Examples:
- On , is a metric.
- On , (Euclidean distance) is a metric.
- On any set , the discrete metric if and otherwise is a metric.