Geometry

The ball that is largest in five dimensions

A disc of radius one has area π, a ball of radius one volume 4π/3, and in each further dimension the unit ball grows — until five, where its volume is 5.264, after which it shrinks towards nothing. The recursion that shows it is the ring dissection of the disc, done one dimension at a time, and the shrinking is not the ball getting small: it is almost all of a high-dimensional cube lying outside the ball, and almost all of the ball lying in a thin rind at its surface.

Worth reading first: A circle unrolled into a triangle · A band of a sphere is a band of its cylinder.

A circle unrolled found the area of a disc by cutting it into rings and straightening them, and the slice that has to match found the ball’s volume one dimension up. That second essay ended with a sequence it quoted and did not explain: the volumes of the balls of radius one in dimensions one, two, three and on, which rise to a maximum at five dimensions and then fall towards nothing.

This essay explains the sequence. It needs one idea — the rings again — and it ends with three pictures of high-dimensional space that are true, checkable and almost impossible to believe.

The volume of the unit ball and the area of its sphere, dimension by dimension. Unit ball volumes for dimensions 0 to 20, largest at 5 (5.2638); sphere areas largest at 7 (33.0734).
Fig. 1 The volume of the ball of radius 1 in each dimension from 0 to 20 (solid bars) and the area of the sphere that bounds it (outlines). The volume rises to 5.2638 in five dimensions and the surface to 33.0734 in seven, and both then fall; the ball in twenty dimensions has volume 0.02581.

In one dimension the “ball” of radius one is the interval from −1-1 to 11, of length 22. In two it is the disc, of area π≈3.14\pi \approx 3.14. In three it is the ordinary ball, 43π≈4.19\tfrac43\pi \approx 4.19. In four it is 12π2≈4.93\tfrac12\pi^2 \approx 4.93, in five 815π2≈5.26\tfrac{8}{15}\pi^2 \approx 5.26, in six 16π3≈5.17\tfrac16\pi^3 \approx 5.17 — and from there down, to 0.0260.026 in twenty dimensions and about 10−4010^{-40} in a hundred.

The rings, one dimension at a time

The recursion that produces these numbers is the ring dissection again, used in a way that jumps two dimensions at once.

Split the coordinates of nn-dimensional space into the first two and the other n−2n - 2. A point of the unit ball projects onto the first two coordinates as a point of the unit disc, at some distance ρ\rho from the centre. Above that point, the rest of the ball is the set of the other n−2n - 2 coordinates whose squares add up to at most 1−ρ21 - \rho^2: an (n−2)(n-2)-dimensional ball of radius 1−ρ2\sqrt{1 - \rho^2}. Its volume is Vn−2 (1−ρ2)(n−2)/2V_{n-2}\,(1 - \rho^2)^{(n-2)/2}.

So the nn-ball is a stack of (n−2)(n-2)-balls over the disc, and its volume is the disc’s area weighted by their volumes. Cut the disc into rings, as the first essay did: the ring at radius ρ\rho and width dρd\rho has area 2πρ dρ2\pi\rho\,d\rho, and every point on it carries the same (n−2)(n-2)-ball. Adding up,

Vn=Vn−2∫01(1−ρ2)(n−2)/2  2πρ dρ=Vn−2⋅2πn.V_n = V_{n-2} \int_0^1 (1 - \rho^2)^{(n-2)/2}\; 2\pi\rho\, d\rho = V_{n-2} \cdot \frac{2\pi}{n}.

The integral is elementary — the factor 2ρ dρ2\rho\,d\rho is exactly the change in ρ2\rho^2 — and the whole recursion is that one line. Starting from V0=1V_0 = 1, a point, and V1=2V_1 = 2, the interval, it produces every other volume: V2=πV_2 = \pi, V3=43πV_3 = \tfrac43\pi, V4=12π2V_4 = \tfrac12\pi^2, and so on. The figure computes them this way and checks every one against an independent formula through the gamma function.

Why five

The recursion explains the peak without any computation. Each step multiplies the volume two dimensions back by 2π/n2\pi/n, which is more than one when nn is less than 2π≈6.282\pi \approx 6.28 and less than one after that. So the volumes in even dimensions rise, 1,π,12π2,16π31, \pi, \tfrac12\pi^2, \tfrac16\pi^3, up to dimension six and then fall; the odd ones rise up to dimension five and then fall. Between the two sequences the largest volume is at five.

The bounding sphere’s surface area has its own recursion, and its values are as tidy as the volumes: the circle’s length is 2π2\pi, the ordinary sphere’s area 4π4\pi, the three-dimensional sphere that bounds the four-dimensional ball has volume 2π22\pi^2, and the largest of them, bounding the ball in seven dimensions, is 1615π3≈33.07\tfrac{16}{15}\pi^3 \approx 33.07 — the most surface any unit sphere has. A ball of radius rr in nn dimensions has volume VnrnV_n r^n, and its rate of growth with the radius is its surface, nVnrn−1n V_n r^{n-1} — the same onion argument by which a disc’s area grows by its circumference. So the unit sphere’s area is S=nVnS = nV_n, and since (n+2)Vn+2=2πVn(n+2)V_{n+2} = 2\pi V_n, the surface two dimensions up is 2π2\pi times the volume here, and the surface peaks exactly two dimensions after the volume, at seven.

The unit ball's volume and surface as smooth functions of the dimension. Volume π^(n/2)/Γ(n/2+1), largest at n = 5.257; surface largest at n = 7.257.
Fig. 2 The unit ball’s volume, π^(n/2) ÷ Γ(n/2 + 1), and its sphere’s area, n times that, drawn as smooth functions of the dimension with the whole-number dimensions marked. The volume is largest at n = 5.2570 and the area at n = 7.2570, exactly two further on.

The recursion can be solved in closed form. With the gamma function, the continuous extension of the factorial, the volume is πn/2/Γ(n/2+1)\pi^{n/2}/\Gamma(n/2 + 1) — and that formula makes sense for every real nn, not only whole numbers. Drawn as a curve, the volume peaks at n≈5.257n \approx 5.257 and the surface at n≈7.257n \approx 7.257, exactly two apart as the recursion requires. The peak’s position is not a whole number and has no meaning of its own; what is meaningful is that the whole-number dimensions nearest to it are five and six, and five is the larger.

One more consequence of the closed form is too neat to omit. In even dimensions 2k2k the volume is πk/k!\pi^k/k!, and the sum of those over every kk is the exponential series at π\pi: eπ≈23.14e^{\pi} \approx 23.14. The even-dimensional unit balls, all of them together, have total volume eπe^\pi.

Where the π^(n/2) comes from

The powers of π\pi have a second derivation that explains why they come in halves, and it runs through the bell curve.

The integral of e−x2e^{-x^2} over the whole line is π\sqrt\pi, as one number under every bell showed. In nn dimensions the integral of e−(x12+⋯+xn2)e^{-(x_1^2 + \cdots + x_n^2)} over all of space is therefore πn/2\pi^{n/2}, because the integrand is a product of nn one-dimensional bells. The same integral can be computed in shells: the function depends only on the distance rr from the origin, the shell at radius rr has area Srn−1S r^{n-1}, and ∫0∞e−r2rn−1 dr=12Γ(n/2)\int_0^\infty e^{-r^2} r^{n-1}\,dr = \tfrac12\Gamma(n/2). Setting the two computations equal gives the sphere’s area, and dividing by nn gives the ball’s volume.

The ball’s volume is a Gaussian integral read two ways, once as a product over coordinates and once as a sum over shells. The πn/2\pi^{n/2} is the product of nn square roots of π\pi, one for each coordinate; the gamma function is what the shells contribute. And the reason the volume eventually falls is visible in that split: the product grows like πn/2\pi^{n/2}, geometrically, while Γ(n/2+1)\Gamma(n/2 + 1) grows like a factorial, faster than any geometric sequence.

The ball is not small

It is tempting to read the falling volumes as the ball shrinking. It is not. The unit ball’s volume is being measured against the unit cube, whose side is one — while the unit ball’s diameter is two, and the cube that just contains it has side two and volume 2n2^n. The fraction of that cube the ball fills is Vn/2nV_n/2^n: 79%79\% in two dimensions, 52%52\% in three, 0.25%0.25\% in ten, and 2.5×10−82.5 \times 10^{-8} in twenty.

So the right statement is not that the ball is small but that the cube is enormous and its corners hold nearly all of it. A cube in twenty dimensions has more than a million corners, each at distance 20≈4.5\sqrt{20} \approx 4.5 from the centre, while the ball reaches out only to distance 11. A ball of radius about n/(2πe)\sqrt{n/(2\pi e)} — a radius that grows with the dimension — has a volume that neither explodes nor vanishes; the unit ball is small only in the units of a cube whose corners run off into dimensions a ball does not reach.

That ratio is also why estimating a ball’s volume by throwing random points into the cube and counting hits, the method that estimates π\pi in two dimensions, fails completely in high dimension: in twenty dimensions almost no point lands inside, and the estimate is nought. The error that does not care how many dimensions is true of sampling a fixed function, and the ball’s indicator in a cube is the case where the thing being measured has itself almost vanished.

Where the volume is: near the surface, and near every axis’s middle

Two further pictures describe how the ball’s volume is arranged, and they seem to contradict each other.

How much of a ball lies near its surface, in several dimensions. Fraction of the unit ball's volume within ε of its surface, 1 − (1 − ε)^n, for n = 3, 10, 100, 1000.
Fig. 3 The share of the unit ball’s volume lying within a distance ε of its surface, in 3, 10, 100 and 1000 dimensions. In three dimensions the outer tenth holds 27%; in a hundred it holds 99.997%, and in a thousand the outer hundredth alone holds 99.996%.

Almost all the volume is near the surface. A ball of radius 1−ε1 - \varepsilon has (1−ε)n(1 - \varepsilon)^n of the unit ball’s volume, by scaling, so the shell of depth ε\varepsilon holds the rest, 1−(1−ε)n1 - (1-\varepsilon)^n. In three dimensions the outer tenth of the radius holds 27%27\% of the volume; in a hundred dimensions it holds all but three thousandths of a per cent; in a thousand, even the outer hundredth holds all but four thousandths of a per cent. A high-dimensional ball is almost entirely rind.

One coordinate of a random point of the ball, in several dimensions. Densities of the first coordinate of a uniform point in the unit ball of dimension 2, 3, 10, 50, 200.
Fig. 4 One coordinate of a point chosen evenly from the unit ball, in 2, 3, 10, 50 and 200 dimensions. In two dimensions its spread is a half-circle and in three a parabola; in high dimensions it closes on a narrow peak about 1/n1/\sqrt n wide, so a random point of the ball almost never has a large coordinate.

And almost every coordinate is small. Take one coordinate of a random point of the ball. Its spread is proportional to the volume of the slice of the ball at that coordinate, (1−t2)(n−1)/2(1 - t^2)^{(n-1)/2}, which in high dimensions is a narrow peak around nought, about 1/n1/\sqrt n wide. In three dimensions it is a parabola — not the flat spread that the band of a sphere gave for points on the surface, because the ball’s interior adds weight near the middle.

The two facts are consistent. The point’s distance from the centre is nearly 11, but that distance is the square root of the sum of nn squared coordinates, each of size about 1/n1/\sqrt n. The point is far from the centre along no axis in particular, and that is exactly what a sphere that is nearly all equator found for the surface: in high dimension every equator holds nearly everything.

The ball between the corner balls

The third picture is a puzzle with an answer that most people refuse at first.

Balls in the corners of a cube, and the ball between them that outgrows the cube. The ball between 2ⁿ corner balls of radius ½ in the cube [−1, 1]ⁿ has radius (√n − 1)/2: 0.207, 0.366, 0.500, 0.618, 0.725, 0.823, 0.914, 1.000, 1.081, 1.158, 1.232 for n = 2 to 12.
Fig. 5 Left, the square from −1 to 1 with a circle of radius 12\tfrac12 in each corner and the largest circle between them. Right, the radius of the ball between the 2n2^n corner balls of the cube in nn dimensions, (n−1)/2(\sqrt n - 1)/2: exactly 1 in nine dimensions, where it touches every face of the cube, and more than 1 from ten on.

Put a ball of radius 12\tfrac12 in each corner of the cube from −1-1 to 11, centred at the points whose coordinates are all ±12\pm\tfrac12. They touch each other and the cube’s faces. Now put the largest ball that fits between them, centred at the origin. The corner balls’ centres are at distance n/2\sqrt{n}/2 from the origin, so the middle ball has radius (n−1)/2(\sqrt n - 1)/2: 0.2070.207 in the plane, 0.3660.366 in space.

The middle ball grows with the dimension, and the cube does not. In four dimensions its radius is 12\tfrac12, the same as the corner balls’. In nine it is exactly 11 and the middle ball touches the centre of every face of the cube. In ten dimensions it pokes out through the faces, while still touching every one of the 1,0241{,}024 corner balls and fitting between them. The corner balls sit near the corners, which are far away, and leave a great deal of room along the axes, which is where the middle ball goes.

Two other balls, one on each side

“Ball” depends on how distance is measured, and the Euclidean ball is the middle member of a family whose other members behave in opposite ways.

Measure distance by the largest coordinate instead of the square root of the sum of squares, and the ball of radius one is the cube from −1-1 to 11, with volume 2n2^n — growing without bound. Measure it by the sum of the absolute values of the coordinates, and the ball is the cross-polytope, the octahedron’s relative, with volume 2n/n!2^n/n! — shrinking even faster than the Euclidean ball’s. Circles that are diamonds and squares drew the two-dimensional members of this family, where the three balls look like variations on one shape. In high dimension they are nothing alike: the cube’s volume is concentrated in its corners, the cross-polytope’s near its centre, and the Euclidean ball, between them, keeps its volume in a thin shell at a single distance.

The Euclidean ball’s volume πn/2/Γ(n/2+1)\pi^{n/2}/\Gamma(n/2 + 1) sits between 2n/n!2^n/n! and 2n2^n for every n≥2n \ge 2, and on a logarithmic scale roughly midway between them in high dimension. Every convex shape that is symmetric about its centre has a volume that can be squeezed between the volumes of such inscribed and circumscribed bodies, and how tight the squeeze can be made is the subject of John’s theorem on ellipsoids — one of the standard tools for estimating a high-dimensional volume that cannot be computed.

Computing a volume nobody can compute

The collapse of the ball-to-cube ratio is not only a curiosity. It is the obstacle to computing volumes in high dimension at all.

Computing the exact volume of a convex polytope given by its faces is hard in a precise sense — as hard as counting problems get — and so is approximating it by any deterministic method to within a factor that does not grow exponentially with the dimension. The obvious randomised method, throwing points into a box around the body and counting hits, fails for the reason the ball shows: in high dimension the body is a vanishing fraction of any box that contains it, and a feasible number of points never hits it.

Martin Dyer, Alan Frieze and Ravi Kannan found the way round in 1991. Instead of one box, use a chain of bodies, each only slightly larger than the last — for instance the body cut down by balls of radii growing by a factor of 1+1/n1 + 1/n — so that each fits inside the next with a large share of its volume. Estimate each ratio by sampling points from the larger body, which is done by a random walk that samples a distribution instead of by drawing from a box, and multiply the ratios. The number of steps grows only polynomially with the dimension, and the volume of a convex body can be approximated to any accuracy, with high probability, in polynomial time — by randomness, and by no known deterministic method. The shrinking ball is why the chain is needed: a single jump from the body to a box around it is a factor of the kind the figure’s bars show falling off a cliff.

What the figures cannot draw

Nothing beyond three dimensions is drawn. Every picture of a high-dimensional ball here is a number or a curve — a volume, a share, a radius — and the one geometric drawing is the two-dimensional square with its circles. That is not a limitation of these figures in particular; it is the reason the facts are surprising, since intuition is built from the drawable cases, in which the corner balls stay inside and the rind is thick.

The volumes are computed two ways and trusted to the digits printed. The recursion and the gamma function agree to nine significant figures at every dimension, and the shares and radii follow by formula. None of the figures samples the high-dimensional ball; the shares near the surface are exact consequences of scaling, not measurements.

Still open: how densely balls can pack

The volumes of balls are the denominators of the oldest problem about them: how large a fraction of space can be filled with non-overlapping balls of equal size. In three dimensions the answer, about 74%74\%, is the greengrocer’s pyramid of oranges, and was proved by Thomas Hales. In eight and twenty-four dimensions Maryna Viazovska proved in 2016, with others for twenty-four, that the answers are given by the exceptional lattices, the eight-dimensional one of which two hundred and forty directions describes. In every other dimension above three the best packing is not known.

What is known for large dimensions is a pair of bounds that are exponentially far apart. The best packings anyone can prove exist fill a fraction a little more than n 2−nn\,2^{-n} of space; the best upper bounds allow about 2−0.599n2^{-0.599n}. The true density of the best packing in high dimensions is not known to within an exponential factor, and whether the best packings are lattices, as in eight and twenty-four, or irregular, as some evidence suggests, is open. The volumes computed here are what those fractions are fractions of.

A disc of rings, in every dimension

The habit worth keeping is the dissection that did the work.

An earlier essay cut a disc into rings to find its area. The same rings, carrying at each radius not a length but a whole lower-dimensional ball, give the volume of every ball in every dimension, two dimensions at a time. The recursion that results is a single factor, 2π/n2\pi/n, and everything else follows from comparing that factor with one. An idea used once on a flat disc keeps working in every dimension, and what it computes there — a peak at five, a vanishing fraction of a cube, a ball that is almost all rind — is exactly what intuition built on the disc gets wrong.

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.

Concentration inequalityDimensionHypercubeNormal distributionPiRecursionSphereVolume