metric space
A metric space is a set together with a notion of distance between its elements, called points, which is measured by a metric.
Formally,
a metric space is an ordered pair
- the distance from a point to itself is zero: $$d(x,x)=0$$
- (positivity) The distance between two distinct points is always positive: $$x\neq y \implies d(x,y)>0$$
- (symmetric) The distance from
to is always the same as the distance from to : $$d(x,y)=d(y,x)$$ - The triangle inequality holds: $$d(x,z)\leq d(x,y)+d(y,z)$$