Geometry

Circles that are diamonds and squares

The theorem hands over a formula for distance. Take the formula as a definition, change the exponent in it, and the set of points one unit from the origin stops being round — while remaining, in every sense that matters, a circle.

Worth reading first: Two squares, four triangles, and no algebra · Distance is a picture.

The theorem says that the square on the hypotenuse is the sum of the squares on the other two sides. Read as a statement about triangles that is a theorem, with a proof and a picture. Read as a statement about the plane it is a definition — this is how far apart two points are — and a definition can be altered.

The unit ball at p = 2.00The set of points one unit from the origin, when distance is measured by the p-th power sum. At p = 1 it is a diamond, at p = 2 a circle, and as p grows it fills out a square.11p = 2the diagonal point is 0.707convex — so this is a distancedashed: p = 1dashed: p = 2dashed: p → ∞the set of points at distance one from the origin when distance is (|x|^p + |y|^p)^(1/p), at p = 2.00p = 1 is the diamond of city blocks, p = 2 the circle, and large p a square; the ball meets the diagonal at0.707 in each coordinate, which is where the exponent shows most
Fig. 1 The set of points one unit from the origin, when distance is the pth root of the sum of the pth powers. The slider moves the exponent; at 1 the set is a diamond, at 2 the familiar circle, and as the exponent grows it swells toward a square.

Every one of those curves is a circle in the only sense that matters to the definition underneath it: the set of points at distance one from a centre. What changes from frame to frame is not the geometry of the plane but the arithmetic used to measure it, and the fact that the round one is a special case rather than the truth is the whole content of this rung.

What the exponent is doing

Write the distance from the origin to (x,y)(x, y) as

(x,y)p=(xp+yp)1/p.\|(x,y)\|_p = \big(|x|^p + |y|^p\big)^{1/p}.

At p=2p = 2 that is the theorem. At p=1p = 1 it is x+y|x| + |y|, the total of the two coordinates, which is what a journey across a grid of streets costs. As pp grows without bound it tends to max(x,y)\max(|x|, |y|), the larger coordinate alone, and the intermediate values interpolate between the three.

The unit ball — the set of points at distance at most one — is what each choice looks like, and it is the more useful object, because the ball determines the norm completely: the distance to any point is however much the ball must be scaled to reach it.

The unit ball at p = 1.00The set of points one unit from the origin, when distance is measured by the p-th power sum. At p = 1 it is a diamond, at p = 2 a circle, and as p grows it fills out a square.11p = 1the diagonal point is 0.500convex — so this is a distancedashed: p = 2dashed: p → ∞the set of points at distance one from the origin when distance is (|x|^p + |y|^p)^(1/p), at p = 1.00p = 1 is the diamond of city blocks, p = 2 the circle, and large p a square; the ball meets the diagonal at0.500 in each coordinate, which is where the exponent shows most
Fig. 2 The exponent at one. Distance is the sum of the two coordinates, and the points one unit away form a diamond — the smallest of the family, because adding the coordinates is the harshest way of combining them.
The unit ball at p = 12.00The set of points one unit from the origin, when distance is measured by the p-th power sum. At p = 1 it is a diamond, at p = 2 a circle, and as p grows it fills out a square.11p → ∞the diagonal point is 0.944convex — so this is a distancedashed: p = 1dashed: p = 2the set of points at distance one from the origin when distance is (|x|^p + |y|^p)^(1/p), at p = 12.00p = 1 is the diamond of city blocks, p = 2 the circle, and large p a square; the ball meets the diagonal at0.944 in each coordinate, which is where the exponent shows most
Fig. 3 The exponent at twelve, which is already a square to within the width of the line. The limit is the maximum of the two coordinates, and the corner of the square is the point where they are equal.

The three balls are nested, and the nesting is not an accident of drawing: raising the exponent lowers each term xp|x|^p whenever x<1|x| < 1, so more of the plane fits inside, and the ball grows monotonically with pp. The diamond is inside the circle is inside the square, and every point of the plane is at its greatest distance under p=1p = 1 and its least under the maximum.

The place the exponents differ most is the diagonal, where both coordinates are equal. There the ball meets the line y=xy = x at 21/p2^{-1/p} in each coordinate: at p=1p = 1 that is one half, at p=2p = 2 it is about 0.7070.707, and at large pp it approaches one. Along the axes every ball passes through the same four points, because a single non-zero coordinate is unaffected by how the two are combined.

Distance across a grid of streets

The exponent one has a use, and it produces a fact about routes that the round case has no analogue for.

Pascal's triangle, 7 rowsEach entry is the sum of the two above it.111121133114641151010511615201561
Fig. 4 The number of shortest routes from one corner of a grid to another, which is what the entries of this triangle count. In city-block distance every monotone staircase between two points has exactly the same length, so the shortest route is not unique — and the count of them is a binomial coefficient.

Under the Euclidean norm, two points are joined by exactly one shortest path: the straight segment. Under the city-block norm every staircase that never backtracks has the same total length, so a journey five blocks east and three blocks north has (83)=56\binom{8}{3} = 56 shortest routes, all of length eight. That is a difference of kind, not of degree, and it is the reason the two norms behave differently under every argument that begins take the shortest path.

It has consequences beyond routing. A circle of radius rr in the city-block metric is a diamond of area 2r22r^2 rather than πr2\pi r^2, so the constant that plays the role of π\pi — the ratio of a circle’s circumference to its diameter — is 44 rather than 3.141593.14159\ldots, and the same computation under the maximum norm gives 44 again. Between the two the ratio dips, and it is smallest exactly at p=2p = 2, where it is π\pi. The roundest circle is the one that minimises its own circumference, which is one more statement of what makes a circle the shape it is.

Why the exponent may not go below one

The family looks as though it should extend downward, and it does not.

The unit ball at p = 0.60The set of points one unit from the origin, when distance is measured by the p-th power sum. At p = 1 it is a diamond, at p = 2 a circle, and as p grows it fills out a square.11p = 0.6the diagonal point is 0.315not convex — so this is not a distancedashed: p = 1dashed: p = 2the set of points at distance one from the origin when distance is (|x|^p + |y|^p)^(1/p), at p = 0.60p = 1 is the diamond of city blocks, p = 2 the circle, and large p a square; the ball meets the diagonal at0.315 in each coordinate, which is where the exponent shows most
Fig. 5 The exponent at six tenths. The curve is drawn from the same formula and it is not a unit ball: it caves inward, and the midpoint of two of its points lies outside it. That failure is the triangle inequality failing.

A distance is required to satisfy the triangle inequality — going by way of a third point is never shorter — and for a norm this is exactly the condition that the unit ball is convex. If the ball caves inward, two points on it have a midpoint outside it, which means the midpoint is further from the origin than either endpoint, and a straight route has been beaten by a detour.

The figure checks this rather than asserting it: it takes pairs of points on the curve, computes the norm of each midpoint, and reports the largest. Above p=1p = 1 the largest is one, attained where the two points coincide. Below p=1p = 1 it exceeds one, and the generator says so in as many words.

So p=1p = 1 is a genuine boundary, and it is the sharp one: the diamond is convex, with corners, and any further reduction of the exponent pushes the edges in. The quantity (xp+yp)1/p(|x|^p + |y|^p)^{1/p} is still perfectly well defined for p=1/2p = 1/2 — it is used, under the name of a quasi-norm — but it is not a distance, and every argument that relies on the triangle inequality is unavailable for it.

What is special about the square

Among the whole family, one member has a property no other has, and it is the property the theorem is really about.

The Pythagorean theorem by dissectionTwo squares of the same size. Each holds four copies of one right triangle. The space left over is a single tilted square on the left and two upright squares on the right.same four trianglessame four triangles
Fig. 6 The theorem, in the form that proves it: four copies of one triangle arranged two ways in the same square. The rearrangement works because a length can be turned without changing it, and turning is exactly what the other exponents do not permit.

Only p=2p = 2 is unchanged by rotation. Turn the plane through any angle and the circle maps to itself; turn it through 4545 degrees and the diamond becomes a square scaled by 2\sqrt{2}, and the distances between points have changed. A norm that survives rotation is the one in which turning a rigid object does not alter it, and every argument in plane geometry that moves a shape around silently assumes it.

Only p=2p = 2 comes from an inner product. The Euclidean norm is v,v\sqrt{\langle v, v\rangle} for the dot product, which is what allows a projection, a perpendicular and an angle to exist at all. The test for whether a norm comes from an inner product is the parallelogram law — the sum of the squares of a parallelogram’s diagonals equals the sum of the squares of its four sides — and among the p-norms only the second satisfies it. So the whole apparatus of angles, orthogonality and least squares is not available anywhere else in the family, which is worth knowing before reaching for a different exponent to be interesting with.

And only p=2p = 2 makes the theorem true. The relation a2+b2=c2a^2 + b^2 = c^2 is a statement about the norm of the two legs of a right triangle. Take the norm to be the city-block one and the corresponding statement is a+b=ca + b = c, which is false for every non-degenerate triangle and true for the degenerate ones. The theorem is not a fact that survives changing the definition; it is the definition, stated for the case where it is a theorem about triangles.

Where the other exponents earn their place

The family is not a curiosity. Three of its members are in daily use, and the reason in each case is the shape of the ball.

Counting differences. Restrict attention to points with coordinates 00 and 11 and the city-block distance counts how many coordinates differ — which is the Hamming distance that error-correcting codes are built on.

A closed walk on the 3-cube changing one place at a timeThe corners of a 3-dimensional cube with a path through every one of them exactly once, each step moving along an edge, and the last corner one step from the first.000000110112010311041115101610078 corners, 8 steps, and every step changes one placethe walk closes: 100 is one change from 000
Fig. 7 The corners of a cube, with a path between two of them. Every edge changes one coordinate, so the length of the shortest path between two corners is the number of coordinates in which they differ — city-block distance, restricted to the corners.

Corners select. The diamond has corners on the axes, and an optimisation that pushes a solution toward a ball of fixed size will land on a corner far more often than on a smooth patch. That is a fact about geometry rather than about any application: a linear objective on a diamond is minimised at a vertex, where all but one coordinate is zero.

The maximum bounds the worst case. A guarantee of the form no coordinate is off by more than this is a statement in the p=p = \infty norm, and it is what an approximation is judged by when the worst error is what matters rather than the average.

The three uses correspond to the three shapes — corners, roundness, flat sides — and choosing an exponent is choosing which of those a problem wants.

What it costs, and why it matters less than it looks

Anybody meeting this family for the first time might reasonably worry that changing the exponent changes everything. In finite dimensions it changes remarkably little, and the reason is visible in the nesting.

Every ball in the family sits between the diamond and the square, and the square is contained in the diamond scaled by two — in nn dimensions, scaled by nn. So any two of these norms differ by at most a bounded factor, which means a sequence that converges in one converges in all of them, a set that is bounded in one is bounded in all, and every notion built out of closeness alone is the same for all pp. The norms are, in the technical phrase, equivalent.

What is not the same is anything that depends on the shape rather than on the scale: which point of a set is nearest to another, whether a ball’s boundary has corners, whether a projection exists, and whether the shortest route is unique. Those are the properties the exponent is chosen for, and every one of them is visible in the drawn ball.

In infinite dimensions the equivalence fails completely — the factor nn has nowhere to go — and the exponents become genuinely different spaces with different theorems. That is where most of the analysis lives, and none of it can be drawn here.

The same three shapes, one dimension up

Nothing above depends on the plane, and the three-dimensional versions are objects with names.

OctahedronA octahedron drawn in projection with 8 faces.
Fig. 8 The unit ball of the city-block norm in three dimensions: the eight faces are the eight sign patterns of ±x±y±z=1\pm x \pm y \pm z = 1, and the six corners sit one unit along the axes, exactly where the diamond’s four corners sit in the plane.

The city-block ball is the octahedron, the Euclidean ball is the sphere, and the maximum-norm ball is the cube. The nesting is the same and so is the special position of the square exponent: the sphere is the only one of the three that a rotation leaves alone, and it is the only one whose surface has no flat piece and no corner.

That the octahedron and the cube are dual solids is not a coincidence either. The dual of a unit ball is the unit ball of the dual norm, and the exponents pp and qq are dual when 1/p+1/q=11/p + 1/q = 1 — which pairs 11 with \infty, and pairs 22 with itself. The Euclidean ball being self-dual is the same fact as the Euclidean norm coming from an inner product, seen from another side, and the octahedron sitting inside its own dual cube is a picture of the inequality between the two norms.

What the picture cannot show

Everything above is in two dimensions, where a ball is a curve and the whole family fits on one canvas. The corresponding pictures in three dimensions are an octahedron, a sphere and a cube, and the same nesting holds; beyond three there is nothing to look at, and it is precisely there that the family is used most.

The drawing also cannot show the triangle inequality, only its consequence. Convexity of the ball is equivalent to the inequality, but the figure can test the equivalence at a few thousand sampled pairs rather than establish it, and the argument that the two really are the same statement is four lines of algebra with no picture in it.

Nor is the drag a proof of the nesting. It moves through twenty-one exponents between one and six, and each frame is checked as it is drawn, but the claim is about a continuum. What the slider corroborates is that no exponent in that range does anything unexpected; what makes the nesting certain is that raising pp lowers xp|x|^p for every x<1|x| < 1, which is a statement about powers rather than about pictures.

The ladder from here

Below: the theorem itself, the shear proof and the converse. Sideways: the dot product, which is what the square case has and the others lack, and Hamming distance, which is the city-block norm wearing a different name. Above: the metrics that are not norms at all — the hyperbolic distance in which the parallel postulate fails is not of this family, and the spherical case where the theorem is simply false is the same departure taken in the other direction.

Which exponent a problem wants

Choosing one is a modelling decision, and the ball’s shape is what to choose it by.

If the coordinates are interchangeable and rotation is meaningful — positions in a plane, errors in two directions of the same kind — the ordinary distance is the one that respects the symmetry, and nothing else will.

If the coordinates are of different kinds, or if the total across them is what matters, the city-block sum is more honest: it adds costs rather than combining them geometrically, and it has no rotations to respect.

And if the requirement is that nothing be badly wrong anywhere, the maximum is the right measure, because it is the one that a single bad coordinate cannot hide in.

The three questions are about the problem rather than the mathematics, which is the point: the exponent is an assumption, and it should be visible as one.

A theorem that turned into a choice

The lasting point is what happened to the theorem on the way through this ladder. It began as a fact about right triangles that needed proving; it became a formula for distance; and once it was a formula, the exponent in it became a parameter, and the fact turned into the definition of the one case where it is a fact.

That trajectory is common and worth recognising. The determinant starts as a number attached to a matrix and becomes the definition of volume; the exponential starts as repeated multiplication and becomes the function that is its own slope. In each case what looks like a generalisation is really a promotion: the theorem is demoted to a special case and something that was implicit — here, the choice of how to combine coordinates — is promoted to a thing that can be varied and argued about.

What links here

Computed from the collection, not written here: the essays that point at this one.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A dashed tag is an object no other essay names yet.

ConvexityCounting argumentHamming distanceInner productNormPythagorean theoremTilingUnit circle