The most beautiful formula not enough people understand
Overview
Grant Sanderson derives the volume of an n-dimensional ball from geometric probability, Archimedes’ area-preserving projection, and the recurrence Vₙ = (2π/n)Vₙ₋₂. Extending factorials with the gamma function gives Vₙ(r) = π^(n/2)rⁿ/Γ(n/2 + 1), revealing why unit-ball volume peaks near dimension five, then shrinks rapidly, while high-dimensional volume concentrates near the boundary and equator.
Key takeaways
- For a uniform random point in [−1, 1]ⁿ, the probability that the sum of squared coordinates is at most one equals the n-ball volume divided by 2ⁿ, directly connecting probability to high-dimensional geometry.
- Archimedes’ area-preserving projection leads to the recurrence Vₙ(r) = (2π/n)Vₙ₋₂(r), which generates ball volumes by stepping two dimensions at a time.
- The unified n-ball formula is Vₙ(r) = π^(n/2)rⁿ/Γ(n/2 + 1); the gamma function supplies the half-integer factorials needed for odd dimensions.
- Unit-ball volume peaks around dimension five and then falls; a 100D unit ball has volume only about 2.37 × 10⁻⁴⁰.
- High-dimensional volume concentrates near the boundary: reducing radius by 1% in 10,000 dimensions leaves only about 2 × 10⁻⁴⁴ of the original volume.
- The tiny high-dimensional ball-to-cube ratio means the 2ⁿ unit balls at the corners of a 2ⁿ-volume cube occupy a negligible fraction of its volume.
Chapters
- For independent uniform X and Y in [−1, 1], the event X² + Y² ≤ 1 is the unit disk inside a 2 × 2 square.
- The probability is the area ratio π/4, showing how a geometric picture can replace a more cumbersome integral.
- Adding a third coordinate turns the same question into the volume ratio of a unit sphere and a 2 × 2 × 2 cube.
- A list of 100 numbers can be treated as a point in 100-dimensional space, making sums of squared coordinates geometric questions.
- Embedding vectors for text chunks in systems such as ChatGPT, Claude, and Gemini are interpreted as points in high-dimensional spaces.
- The volume of a 100-dimensional unit ball gives the probability that 100 independent uniform coordinates in [−1, 1] have squared sum at most one.
- In a 2D square, four unit circles at the corners leave a central tangent circle of radius √2 − 1; in 3D, eight unit spheres give radius √3 − 1.
- For an n-dimensional cube with unit balls at its 2ⁿ corners, the central tangent ball has radius √n − 1.
- By dimension 10, that radius is about 2.16, exceeding the distance of 1 from the origin to a face of the cube.
- Grant Sanderson argues that spheres remain round by definition; high-dimensional cubes, whose corners recede roughly as √n, are the source of the counterintuitive picture.
- For a ball of radius r, increasing the radius by dr changes its volume by approximately its boundary measure multiplied by dr.
- In 2D, differentiating πr² gives circumference 2πr; in 3D, differentiating (4/3)πr³ gives surface area 4πr².
- Integration reverses the relationship and introduces a division by the dimension, as in the 1/2 and 1/3 factors.
- A 1D ball of radius r is a line segment of length 2r, so its volume in the generalized sense is 2r.
- Its boundary consists of two endpoints, giving a 0D boundary measure of 2 when points are counted.
- These low-dimensional cases supply useful base values for extending the volume formulas.
- Archimedes compares patches on a sphere with their projections onto an enclosing cylinder.
- Each patch stretches in one direction and is compressed by the same factor in the perpendicular direction, preserving area.
- Unwrapping a cylinder of radius r and height 2r gives a rectangle with sides 2πr and 2r, hence sphere area 4πr².
- A point on a 3D sphere can be selected by choosing z first, then choosing x and y on a circle whose radius depends on z.
- Projecting those changing cross-sections onto a cylinder cancels the stretch and compression factors, making the calculation behave like a product.
- For a 4D sphere, choosing two coordinates leaves a circle of options; the analogous projection is onto a product shaped like a disk times a circle.
- The 4D sphere’s boundary measure is the product of a 2D disk’s area, πr², and a circle’s circumference, 2πr.
- This gives the 4D boundary measure 2π²r³; integrating with respect to r yields 4D ball volume (π²/2)r⁴.
- The same projection principle generalizes: the boundary measure of an n-ball is 2πr times the volume of an (n−2)-ball.
- Combining the boundary relation with integration gives Vₙ(r) = (2π/n)Vₙ₋₂(r).
- The recurrence links dimensions two apart, allowing known 1D and 2D volumes to generate the odd- and even-dimensional sequences.
- For example, the 8D unit-ball volume follows from the 6D volume by multiplying by 2π/8, then repeating the same step.
- Taking the 0D unit ball to have volume 1 provides the even-dimensional recurrence with a natural base case.
- Repeated recurrence steps give Vₙ(r) = π^(n/2)rⁿ/(n/2)! for even n, but odd n require half-integer factorials.
- Extending factorials with the gamma function gives the unified formula Vₙ(r) = π^(n/2)rⁿ/Γ(n/2 + 1), including the 1D case.
- Unit-ball volumes rise from 1 in 0D to 2 in 1D, π in 2D, and about 4.93 in 4D, before decreasing after roughly 5D.
- The recurrence’s multiplier, 2π/n, explains the trend: it is greater than 1 at low dimensions and less than 1 once n exceeds 2π.
- A 100D unit ball has volume about 2.37 × 10⁻⁴⁰, so the probability that 100 uniform coordinates in [−1, 1] have squared sum below one is extraordinarily small.
- In very high dimensions, nearly all ball volume lies close to the boundary; for a 10,000D ball, shrinking the radius to 99% multiplies volume by 0.99¹⁰⁰⁰⁰, approximately 2 × 10⁻⁴⁴.
- Comparing a unit ball with a unit cube makes volume ratios dimensionless; in the corner-sphere setup, the 2ⁿ corner balls and the cube’s volume 2ⁿ cancel in the ratio.
- In high dimensions, most boundary measure concentrates near the equator, while cross-sections slightly above or below it contribute very little.
- Grant Sanderson closes by connecting the formula’s beauty to generalizing familiar ideas, then mentions a career-opportunities page at 3b1b.co/talent.
- In the office postscript, he explains that the opening animation shows latitude spheres in a 4D hypersphere from changing 3D projections.
Transcript excerpt
0:00 [applause and cheering] [applause] Thank you very much. It is good to be here. I don't know if you people realize what a beautiful campus you have and how you basically just study in heaven. Today I want to talk with you about what I think is one of the most underappreciated formulas. Not because those who know it don't appreciate it, but because not enough people know about this and more importantly, not enough people understand where it comes from. And this should be one of the gems. This should be the e to the pi eye of the mathematical community. But I really want you to come away knowing not just what it is uh but why it's true and what it represents. Now before I dive straight into it, I think the scene is best set if we start with two different puzzles. Okay. The first puzzle is just going to give us a sense of the meaning
0:49 of what we're about to do because it runs the risk of feeling pretty abstract. And then the second puzzle is going to be a kind of forewarning uh not to trust our intuitions. So, let's start with the first puzzle. This is our warm-up for today. We're going to start by imagining that there's a random number. I'm going to call it X. It's going to sit between negative 1, positive 1, chosen uniformly. X is going to have a friend. Another random number Y chosen between negative 1 and positive 1 uniformly. And we're going to ask a question, a probability question about both of these, which is what's the probability that if you square X and then you add it to the square of Y, you end up with something which is less than or equal to one. So, let me throw this
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, 3Blue1Brown.