The most beautiful formula not enough people understand

By 3Blue1Brown

Share:

Key Concepts

  • High-Dimensional Geometry: The study of shapes and spaces beyond three dimensions, increasingly relevant in fields like machine learning.
  • Volume of an n-Dimensional Sphere: A formula to calculate the volume of a sphere in any number of dimensions.
  • Gamma Function (Γ): A generalization of the factorial function, crucial for extending the volume formula to non-integer dimensions.
  • Counterintuitive Scaling: High-dimensional cubes behave differently than spheres; their corners dominate volume, leading to unexpected results as dimension increases.
  • Concentration of Volume: In high dimensions, the volume of a sphere becomes concentrated near its surface.

Puzzle Introduction & 2D/3D Analogies

The discussion begins with two puzzles illustrating the challenges and counterintuitive nature of high-dimensional geometry. The first puzzle explores probability: the probability that the sum of the squares of two uniformly chosen random numbers between -1 and 1 is less than or equal to 1 is π/4 in 2D, and π/6 in 3D – calculated by comparing the volume of a unit sphere to a bounding cube. This pattern extends to higher dimensions, raising the question of the volume of a 100-dimensional unit ball. The relevance of this concept is highlighted by its application in machine learning, where data is often represented as points in high-dimensional spaces, such as those found in Large Language Models (LLMs).

The second puzzle involves finding the radius of the largest circle (or sphere) that can fit inside a square (or cube) tangent to the corner circles (or spheres). The radius is √2 - 1 in 2D and √3 - 1 in 3D, but surprisingly, this radius grows larger than the edge of the bounding cube in higher dimensions, demonstrating that high-dimensional cubes behave counterintuitively. This isn’t a problem with spheres, but with the scaling of cube corners.

Deriving the Volume Formula & the Role of the Gamma Function

The speaker explains the derivation of the volume formula for an n-dimensional sphere, drawing inspiration from Archimedes’ method for calculating the surface area of a sphere. This involves a recursive approach, akin to a “knight’s move” between dimensions, and integrating to find the volume. The volume of a zero-dimensional ball (a point) is defined as one, with a boundary of zero. Donald Knuth demonstrated that even in this base case, the formula holds true programmatically.

The general formula is expressed as a constant multiplied by r<sup>n</sup>, where the constant involves π and the factorial of half the dimension (n/2)!. A challenge arises with odd dimensions, as factorials of half-integers are undefined. To maintain consistency, the speaker proposes defining (1/2)! as √(π)/2, which aligns with the broader generalization of the factorial function through the Gamma function (Γ). The Gamma function extends factorials to real and complex numbers and is also used in Gaussian integration. The final formula is (π<sup>(n/2)</sup>) / (Γ(n/2 + 1)) * r<sup>n</sup>.

Surprising Behavior in High Dimensions & Volume Concentration

Examining the numerical behavior of the formula reveals a surprising trend: the volume of an n-dimensional sphere initially increases with dimension but decreases after the fifth dimension. A 100-dimensional ball has a volume of approximately 2.37 x 10<sup>-40</sup>, an infinitesimally small value. This is because, in high dimensions, almost all of the volume is concentrated near the sphere’s surface. In 10,000 dimensions, nearly all the volume resides within a tiny region near the boundary – scaling down the sphere by 99% reduces the volume to approximately 2 x 10<sup>-44</sup> of the original.

This concentration is explained by the integration factor in the volume calculation, which dominates as the dimension increases, causing the volume to shrink rapidly. An analogy is drawn to a square pyramid, where the volume is proportional to the base area and height. Compared to a unit cube, the sphere becomes disproportionately smaller as the dimension increases, reinforcing the idea that the corners of the cube dominate the volume in high dimensions.

Conclusion

The exploration of the volume formula for n-dimensional spheres reveals a beautiful and counterintuitive result: as dimensions increase, the volume shrinks dramatically, concentrating near the surface. Understanding this requires stepping back to appreciate the underlying mathematical principles and the power of generalizations like the Gamma function. The formula, while seemingly abstract, has practical implications in fields like machine learning and highlights the unique behavior of geometry in high-dimensional spaces. The speaker concludes by promoting a virtual career fair (3b1b.co/talent) and showcasing visualizations of higher-dimensional spheres, alongside a reference to a related Numberphile video.

Chat with this Video

AI-Powered

Hi! I can answer questions about this video "The most beautiful formula not enough people understand". What would you like to know?

Chat is based on the transcript of this video and may not be 100% accurate.

Related Videos

Ready to summarize another video?

Summarize YouTube Video