Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Metric space
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Definition and illustration == === Motivation === [[File:Great-circle distance vs straight line distance.svg|thumb|A diagram illustrating the great-circle distance (in cyan) and the straight-line distance (in red) between two points {{mvar|P}} and {{mvar|Q}} on a sphere.]] To see the utility of different notions of distance, consider the [[surface of the Earth]] as a set of points. We can measure the distance between two such points by the length of the [[great-circle distance|shortest path along the surface]], "[[as the crow flies]]"; this is particularly useful for shipping and aviation. We can also measure the straight-line distance between two points through the Earth's interior; this notion is, for example, natural in [[seismology]], since it roughly corresponds to the length of time it takes for seismic waves to travel between those two points. The notion of distance encoded by the metric space axioms has relatively few requirements. This generality gives metric spaces a lot of flexibility. At the same time, the notion is strong enough to encode many intuitive facts about what distance means. This means that general results about metric spaces can be applied in many different contexts. Like many fundamental mathematical concepts, the metric on a metric space can be interpreted in many different ways. A particular metric may not be best thought of as measuring physical distance, but, instead, as the cost of changing from one state to another (as with [[Wasserstein metric]]s on spaces of [[measure (mathematics)|measure]]s) or the degree of difference between two objects (for example, the [[Hamming distance]] between two strings of characters, or the [[Gromov–Hausdorff convergence|Gromov–Hausdorff distance]] between metric spaces themselves). === Definition === Formally, a '''metric space''' is an [[ordered pair]] {{math|(''M'', ''d'')}} where {{mvar|M}} is a set and {{mvar|d}} is a '''metric''' on {{mvar|M}}, i.e., a [[Function (mathematics)|function]]<math display="block">d\,\colon M \times M \to \mathbb{R}</math>satisfying the following axioms for all points <math>x,y,z \in M</math>:{{sfn|Burago|Burago|Ivanov|2001|p=1}}{{sfn|Gromov|2007|p=xv}} # The distance from a point to itself is zero: <math display="block">d(x, x) = 0</math> # (Positivity) The distance between two distinct points is always positive: <math display="block">\text{If }x \neq y\text{, then }d(x, y)>0</math> # ([[Symmetric function|Symmetry]]) The distance from {{mvar|x}} to {{mvar|y}} is always the same as the distance from {{mvar|y}} to {{mvar|x}}: <math display="block">d(x, y) = d(y, x)</math> # The [[triangle inequality]] holds: <math display="block">d(x, z) \leq d(x, y) + d(y, z)</math>This is a natural property of both physical and metaphorical notions of distance: you can arrive at {{mvar|z}} from {{mvar|x}} by taking a detour through {{mvar|y}}, but this will not make your journey any shorter than the direct path. If the metric {{mvar|d}} is unambiguous, one often refers by [[abuse of notation]] to "the metric space {{mvar|M}}". By taking all axioms except the second, one can show that distance is always non-negative:<math display="block">0 = d(x, x) \leq d(x, y) + d(y, x) = 2 d(x, y)</math>Therefore the second axiom can be weakened to <math display="inline">\text{If }x \neq y\text{, then }d(x, y) \neq 0</math> and combined with the first to make <math display="inline">d(x, y) = 0 \iff x=y</math>.<ref>{{Cite book |last=Gleason |first=Andrew |title=Fundamentals of Abstract Analysis |publisher=[[Taylor & Francis]] |year=1991 |edition=1st |pages=223 |doi=10.1201/9781315275444|isbn=9781315275444 |s2cid=62222843 }}</ref> ===Simple examples=== ====The real numbers==== The [[real number]]s with the distance function <math>d(x,y) = | y - x |</math> given by the [[absolute difference]] form a metric space. Many properties of metric spaces and functions between them are generalizations of concepts in [[real analysis]] and coincide with those concepts when applied to the real line. ====Metrics on Euclidean spaces==== [[File:Minkowski_distance_examples.svg|thumb|Comparison of Chebyshev, Euclidean and taxicab distances for the hypotenuse of a 3-4-5 triangle on a chessboard]] The Euclidean plane <math>\R^2</math> can be equipped with many different metrics. The [[Euclidean distance]] familiar from school mathematics can be defined by <math display="block">d_2((x_1,y_1),(x_2,y_2))=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}.</math> The [[taxicab geometry|''taxicab'' or ''Manhattan'' distance]] is defined by <math display="block">d_1((x_1,y_1),(x_2,y_2))=|x_2-x_1|+|y_2-y_1|</math> and can be thought of as the distance you need to travel along horizontal and vertical lines to get from one point to the other, as illustrated at the top of the article. The ''maximum'', <math>L^\infty</math>, or ''[[Chebyshev distance]]'' is defined by <math display="block">d_\infty((x_1,y_1),(x_2,y_2))=\max\{|x_2-x_1|,|y_2-y_1|\}.</math> This distance does not have an easy explanation in terms of paths in the plane, but it still satisfies the metric space axioms. It can be thought of similarly to the number of moves a [[King (chess)|king]] would have to make on a [[chess]] [[Board game|board]] to travel from one point to another on the given space. In fact, these three distances, while they have distinct properties, are similar in some ways. Informally, points that are close in one are close in the others, too. This observation can be quantified with the formula <math display="block">d_\infty(p,q) \leq d_2(p,q) \leq d_1(p,q) \leq 2d_\infty(p,q),</math> which holds for every pair of points <math>p, q \in \R^2</math>. A radically different distance can be defined by setting <math display="block">d(p,q)=\begin{cases}0, & \text{if }p=q, \\ 1, & \text{otherwise.}\end{cases}</math> Using [[Iverson bracket]]s, <math display="block">d(p,q) = [p\ne q]</math> In this ''discrete metric'', all distinct points are 1 unit apart: none of them are close to each other, and none of them are very far away from each other either. Intuitively, the discrete metric no longer remembers that the set is a plane, but treats it just as an undifferentiated set of points. All of these metrics make sense on <math>\R^n</math> as well as <math>\R^2</math>. ====Subspaces==== Given a metric space {{math|(''M'', ''d'')}} and a [[subset]] <math>A \subseteq M</math>, we can consider {{mvar|A}} to be a metric space by measuring distances the same way we would in {{mvar|M}}. Formally, the ''induced metric'' on {{mvar|A}} is a function <math>d_A:A \times A \to \R</math> defined by <math display="block">d_A(x,y)=d(x,y).</math> For example, if we take the two-dimensional sphere {{math|S<sup>2</sup>}} as a subset of <math>\R^3</math>, the Euclidean metric on <math>\R^3</math> induces the straight-line metric on {{math|S<sup>2</sup>}} described above. Two more useful examples are the open interval {{open-open|0, 1}} and the closed interval {{closed-closed|0, 1}} thought of as subspaces of the real line.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)