Intuition
Topology begins by asking what a distance really has to do. Very little, it turns out: three conditions are enough, and a great many different rules satisfy them.
Travel time between two towns is a kind of distance. It is zero only for a town and itself, and going by way of a third town is never quicker.
Metrics and metric spaces
A set is any collection of objects, and its members are called points. A metric on a set is a rule that gives a real number to each pair of points and satisfies the three conditions below for all points. The pair of the set and the rule is a metric space. Notice what is not asked for: distances are never required to be positive, and that is deliberate.
Reading the conditions
- The first condition runs both ways: a point is at distance zero from itself, and only from itself.
- The second says the rule cannot depend on which point is called the start.
- The third is the triangle inequality: a detour through is never shorter than going straight.
- on the real line is a metric, and so is for and 1 otherwise, on any set at all.
The third condition, drawn: going from to by way of is never shorter than going straight, which is . There are no axes here on purpose — a metric space has no coordinates, and is a rule on pairs of points rather than anything computed from a position. Nor do the lines carry arrowheads, for the same reason the second condition exists: a distance does not know which of the two points you started at.
Distances are never negative
Non-negativity is not one of the conditions because it does not have to be. Take the triangle inequality with the far point equal to the near one, so the left side is a distance from a point to itself and therefore zero. Symmetry makes the two terms on the right the same, so zero is at most twice the distance, and halving finishes it.
Proof steps
The first condition, applied with both points the same.
The triangle inequality, taking the far point to be itself.
Symmetry, which lets the second term on the right be rewritten.
Putting the three previous lines together: the left side is zero and the right is one distance twice.
Halving both sides, which an inequality between real numbers allows.
Applications
Practice
Test all three conditions
gives
But , so the triangle inequality fails.
Try it
Which rule is a metric on ?
Zero distance means one point
This half is the one doing the work.
Try it
Why does the definition ask for exactly when , rather than only ?
The triangle inequality bounds from above
The direct distance is at most the detour, and may be a great deal less.
Try it
In a metric space, and . What follows about ?
A metric need not measure anything familiar
whenever
Zero for a point and itself, one for anything else.
Try it
On any set, let when and otherwise. Is this a metric?
Try it
Why is not listed among the conditions?