We all know that the area of a circle is and the volume of a sphere is , but what about the volumes (or hypervolumes) of balls of higher dimension?
For a fun exercise I had my multivariable calculus class compute the volumes of various balls using multiple integrals. The surprising results inspired this post.
First some terminology. An -dimensional hypersphere (or -sphere) of radius is the set of points in satisfying (I’ll place the center at the origin for simplicity). For example, a 0-sphere is the two-point set on the real number line, a 1-sphere is a circle of radius in the plane, and a 2-sphere is a spherical shell of radius in 3-dimensional space.
An -dimensional ball (or -ball) is the region enclosed by an -sphere: the set of points in satisfying . For example, a 1-ball is the interval , a 2-ball is a disk in the plane, and a 3-ball is a solid ball in 3-dimensional space.
It is possible to define “volume” in —in it is length, in it is area, in it is ordinary volume, and in it is hypervolume. Let denote the volume of the -ball of radius .
It turns out that the volumes of -balls satisfy the following remarkable recursion relation. (I’ll prove this relation at the end of the post.)
It is not difficult to use this recurrence relation to obtain a formula for . In particular, when is even and when is odd . (If you know what the gamma function is you can express this as a single function, )
The volumes of the -balls in the first 15 dimensions are given in the following table.
If you look at the volumes of the unit balls you’ll see they increase at first, reaching a maximum in dimension 5. Then they decrease and tend to zero as the dimension goes to infinity. Strange!
First, what is special about dimension 5? Why is the maximum achieved in this dimension? It turns out that there is nothing special about dimension 5. Below is a GeoGebra applet that allows you to adjust the radii of the balls. As we can see, the maximum volume is not always attained by the ball in dimension 5. Indeed, as the radius increases, the maximum volume occurs in higher dimensions. As John Moeller points out, the powers of in the numerator try to make an increasing function, however the factorials in the denominator always dominate in the end.
Second, what is the intuition behind this limit of zero? One way to see this is to observe that to be on the boundary of the unit -ball, we must have , but for this to happen when is large, most of the ‘s must be very close to zero. For example, the line intersects the -sphere at . On the other hand, the corresponding corners of the hypercube that inscribes the sphere are at , units from the origin. Thus the sphere fills up less and less of the hypercube that contains it. (Notice that the circumscribed hypercube has volume , while inscribed hypercube has volume .)
My colleague informed me that this zero limit is related to the curse of dimensionality in statistics. Volume increases rapidly as dimension increases, so it requires many more data points to get a good estimate. As Wikipedia points out, “100 evenly-spaced sample points suffice to sample a unit interval with no more than 0.01 distance between points; an equivalent sampling of a 10-dimensional unit hypercube with a lattice with a spacing of 0.01 between adjacent points would require sample points.”
Now I will prove the recurrence relation that I gave above.
Clearly the relation is true for and . Suppose .
First recall that if a solid in -dimensional space is scaled by a factor of , then its volume increases by a factor of . In particular, this implies that
Observe that the intersection of the -plane with the -ball is a disk of radius centered at the origin (see image below). Use polar coordinates to describe points in this disk. Then the perpendicular cross section of the -ball at the point is an -ball of radius .
Thus we can compute by integrating over the disk. We do so using polar coordinates.