Metric Spaces
A metric space is a set together with a rule for measuring distance between any two of its points. This rule is abstract enough to describe ordinary Euclidean distance, distances between functions, and many other notions of closeness.
Let be a set. A function is called a metric on if for all it satisfies the following three axioms:
The positivity axiom says that distance cannot be negative. It also says that the only way two points can have distance zero is when they are the same point:
The symmetry axiom means that the order of the two points does not matter:
The triangle inequality says that going from to directly is no longer than going through a third point :
On , the standard metric is
This is the usual straight-line distance between two points.
Proof. Positivity is clear since each is nonnegative. Moreover, exactly when every term is zero, which is equivalent to for every , hence . Symmetry follows from
For the triangle inequality, put and . By the Cauchy-Schwarz inequality,
Taking square roots gives .
On the space of continuous real-valued functions on , one natural metric is
This measures the largest vertical separation between the two functions on the interval.
Proof. Positivity follows from for every . If , then for every , so ; the converse is immediate. Symmetry follows from
For the triangle inequality, for every we have
Taking the maximum over gives .
On any set , the discrete metric is defined by
This metric only distinguishes whether two points are equal or different.
Proof. Positivity holds because only takes the values and , and by definition exactly when . Symmetry follows because the condition is symmetric in and , and so is the condition . For the triangle inequality, if , then and the inequality is immediate. If , then for any at least one of or must hold; otherwise . Hence
which proves the triangle inequality.
References
- [Rudin1976]Rudin, Walter. Principles of Mathematical Analysis. Third edition. McGraw-Hill, New York, 1976.