A metric space is a set together with a metric measuring how far apart its elements are. The elements can be positions, functions, or other objects: what matters is that the metric obeys the same basic rules. This lets one discuss convergence in a metric space, continuous maps, and Cauchy sequences without first assigning Cartesian coordinates. The useful abstraction is that many arguments require only comparisons of distances, rather than the particular objects being compared.
Even the same set can support several informative metrics. On the plane with Cartesian coordinates, write and . Three standard choices are Manhattan distance, Euclidean distance, and Chebyshev distance:They come from the L1 norm, Euclidean norm, and maximum norm, respectively, through . For and , Manhattan distance is , Euclidean distance is , and Chebyshev distance is . All three answers are correct for their respective metrics.
The choice encodes the question being asked. Manhattan distance models travel along a rectangular street grid. Euclidean distance measures unrestricted travel along a line segment. Chebyshev distance measures the time needed when two Cartesian coordinates can change simultaneously, each at speed at most one. Thus choosing a metric is part of modelling, rather than a consequence of knowing the endpoints. These examples have the same metric topology, but different metric path lengths and different collections of metric geodesics.
A historical reference for the general study of metric spaces is Maurice Fréchet's 1906 paper Sur quelques points du calcul fonctionnel, published in volume 22 of the Rendiconti del Circolo Matematico di Palermo. [ref]
https://link.springer.com/article/10.1007/BF03018603. Fréchet, Sur quelques points du calcul fonctionnel, 1906
Canonical example: Euclidean space.
New to topics? Read the docs here!