Metric Space
A metric space is a set for which a distance function can be defined.
Not to be confused with a measure space.
Description
A metric space is a set X with a distance (or metric) function as d: X × X -> [0,∞).
The distance function must satisfy these conditions: for any points a, b, and c in X...
d(a,b) ≥ 0, and d(a,b) = 0 only if a = b
symmetry: d(a,b) = d(b,a)
triangle inequality: d(a,b) + d(b,c) ≥ d(a,c)
Comparison to Topological Spaces
Topological spaces are a similar concept that use 'closeness' rather than a distance function. There are however some advantages to using a metric space.
Within a metric space, a set is open if every point within the set can be perturbed in any direction and remain within the set. Clearly this is only ever not the case if a point is a limit point of a set, so an open set does not include any of its limit points while a closed set includes all of them.
The topological definition of openness relies on a neighborhood topology function, i.e. for a set A the neighborhood of point p is given by NA(p). A similar function can be defined for metric spaces; a ball containing all points less than r distance away from point p is the neighborhood Nr(p). This has a distinct advantage in that neighborhoods are always open. This is proven by demonstrating that for every point in a neighborhood, the neighborhood of that new point is a subset of the original neighborhood.
Consider the aforementioned neighborhood of p ∈ A, i.e. Nr(p)
Choose any point q ∈ Nr(p)
Let a = d(p,q)
Note that d(p,q) = a < r
Let r' = r - a
Define the neighborhood of q as Nr'(q)
Choose any point s ∈ Nr'(q)
Note that d(q,s) < r' = r - a
Via the triangle inequality, d(p,q) + d(q,s) ≥ d(p,s)
Since d(q,s) < r - a and d(p,q) = a, it follows that d(p,q) + d(q,s) < (r - a) + a = r
Altogether d(p,s) < r, proving that Nr'(q) ⊆ Nr(p)
