On this page
In school, distance is something you work out with Pythagoras. University mathematics turns the question around. It asks which properties a distance must have, and then accepts any rule that has them. A set together with such a rule is called a metric space. René Maurice Fréchet first addressed the idea of an abstract space with metric properties in 1906, and Felix Hausdorff coined the term in 1914, according to the Wikipedia article on metric spaces.
What are the three axioms of a metric space?
A metric on a set M is a function d that gives every pair of points x, y a real number d(x, y), with three rules for all x, y, z in M (the standard definition splits the first rule into two):
Identity: d(x, y) = 0 exactly when x = y. A point is at distance zero from itself and from nothing else.
Symmetry: d(x, y) = d(y, x). The trip there is as long as the trip back.
Triangle inequality: d(x, z) ≤ d(x, y) + d(y, z). A detour through y can never be shorter.
You might expect a fourth rule saying distances are never negative. You don't need one, because it follows from the other three: 0 = d(x, x) ≤ d(x, y) + d(y, x) = 2d(x, y), so d(x, y) ≥ 0.
Euclidean, taxicab and max: what do their circles look like?
On the plane, with points p = (x₁, y₁) and q = (x₂, y₂), here are three metrics you can check against the axioms yourself:
Euclidean: d₂(p, q) = √((x₁ − x₂)² + (y₁ − y₂)²), the straight-line distance.
Taxicab: d₁(p, q) = |x₁ − x₂| + |y₁ − y₂|, the distance driven on a grid of streets. Karl Menger named it taxicab geometry in a 1952 booklet.
Max (Chebyshev): d∞(p, q) = max(|x₁ − x₂|, |y₁ − y₂|). On a chessboard it gives the minimum number of moves a king needs to get from one square to another.
A "circle" is the set of points at distance 1 from the centre, so each metric draws its own. The Euclidean circle is round. The taxicab circle is a square turned 45°, a diamond with corners at (±1, 0) and (0, ±1). The max-metric circle is a square with sides parallel to the axes, corners at (±1, ±1). The diagram above shows all three nested: diamond inside disc inside square.
Worked example: how far apart are (1, 2) and (4, 6)?
Take P = (1, 2) and Q = (4, 6). The differences are 3 across and 4 up.
Euclidean: √(3² + 4²) = √25 = 5.
Taxicab: 3 + 4 = 7.
Max: the larger of 3 and 4, so 4.
Discrete (next section): P ≠ Q, so 1.
Notice that 4 ≤ 5 ≤ 7. In the plane, d∞ ≤ d₂ ≤ d₁ ≤ 2d∞ holds for every pair of points. That is exactly why the circles nest the way they do.
What is the discrete metric?
On any set at all, define d(x, y) = 0 if x = y and 1 otherwise. As the Wikipedia article puts it, in this discrete metric "all distinct points are 1 unit apart". Checking the triangle inequality is a good two-minute exercise. If x ≠ z, the left side is 1, and y cannot equal both x and z, so the right side is at least 1.
What is an open ball, and why does it change with the metric?
The open ball of radius r around x is B(x, r) = {y in M : d(x, y) < r}, the points strictly less than distance r from x. Many ideas about "nearness" in analysis are built from these balls: open sets, limits, continuity, and the Cauchy sequences we explained with 1/n and √2.
Swap the metric and the balls change shape. In the plane, B(0, 1) is an open disc, an open diamond or an open square. With the discrete metric, B(x, 1) is just {x}, while B(x, 2) is the whole set. The points did not move, but which of them count as "close" did. For a more surprising case, the p-adic numbers measure size by divisibility, so 1000 is close to 0 for p = 5.
How do you check that something is a metric?
Use this order when an exercise hands you a new formula:
Test d(x, x) = 0 and d(x, y) > 0 for x ≠ y. Watch for functions that vanish at distinct points.
Swap x and y and see if anything changes.
Attack the triangle inequality last. Try collinear or equal points first, because counterexamples like the squared distance above often show up there.
If a step fails, one concrete counterexample is a complete answer. If you are stuck on an axiom or a definition, the Fermi Concept Library covers every concept in mathematics. For practice, the Fermi Problem Library has a step-by-step solver that explains the reasoning rather than just printing an answer.



