The Ancient Puzzle of Packing Spheres: From Kepler’s Cannonballs to Viazovska’s Magic Function
A simple question about stacking oranges became a 400-year mathematical journey through geometry, number theory, high-dimensional lattices, modular forms, and computer-verified proof.
Imagine a fruit seller arranging oranges in a basket. The most natural method is familiar: place one layer of oranges in a honeycomb-like pattern, then place the next layer in the small hollows between them. This looks efficient, and anyone who has seen cannonballs stacked in a pyramid would guess that this is the best possible arrangement.
But mathematics is rarely satisfied with appearances.
In 1611, Johannes Kepler, better known for the laws of planetary motion, made a bold claim: this familiar pyramidal stacking is the densest possible way to pack equal spheres in three-dimensional space. In modern language, he conjectured that no arrangement of identical, non-overlapping spheres can fill more than
of ordinary three-dimensional space. That means even in the best possible arrangement, nearly 26% of space remains empty. The oranges may look tightly packed, but the gaps are unavoidable.
What makes the story remarkable is not the statement itself. It is easy enough for a school student to understand. The astonishing part is that proving it took almost four centuries.
The sphere-packing problem became one of the great bridges between visual intuition and rigorous proof. It begins with oranges, cannonballs, marbles, and soap bubbles, but it eventually leads to lattices, Fourier analysis, modular forms, error-correcting codes, high-dimensional geometry, and even computer-verified proofs.
What Is Sphere Packing?
Sphere packing asks a basic question:
In two dimensions, replace spheres with circles. The problem becomes: how can we place equal coins on a table so that they cover the largest possible fraction of the surface? The answer is the familiar hexagonal pattern, the same pattern seen in honeycombs.
In three dimensions, the analogous arrangement is the face-centered cubic packing or the hexagonal close packing. These are the patterns behind cannonball piles and many crystalline structures.
In higher dimensions, however, the problem becomes stranger. We cannot visualize an 8-dimensional or 24-dimensional sphere, but mathematicians can define one precisely: it is the set of points at a fixed distance from a center in a high-dimensional Euclidean space.
This abstraction is not just mathematical play. High-dimensional sphere packings are closely related to error-correcting codes, digital communication, signal processing, and data transmission. When information is sent through a noisy channel, one wants signals to be far enough apart so they are not confused. In geometric terms, this resembles placing non-overlapping spheres around codewords.
Thus, sphere packing is both ancient and modern. It belongs equally to Kepler’s astronomy and to the mathematics of digital communication.
The First Victories: Dimensions 2 and 3
The two-dimensional version was resolved first. Axel Thue announced a proof that the hexagonal circle packing is optimal. Later mathematicians refined and simplified the argument. The result is now classical: in the plane, the densest packing of equal circles has density
This is why honeycomb-like arrangements appear so often in nature and design. They are not merely beautiful; they are efficient.
The three-dimensional case was much harder. Kepler’s conjecture looked obvious, but “obvious” is not a proof. Over the centuries, many partial results appeared. Carl Friedrich Gauss proved that among lattice packings in three dimensions, the familiar close packing is optimal. But general packings need not be lattice packings. They may be irregular, disordered, or locally adapted in complicated ways.
The final proof came only in the late twentieth century through the work of Thomas C. Hales, with major contributions from Samuel Ferguson. Hales announced the proof in 1998, and the Annals of Mathematics published it in 2005. The proof was enormous, combining geometric reasoning with extensive computer calculations.
This raised a philosophical question: when a proof is so large and computer-assisted that no human referee can check every detail by hand, what does mathematical certainty mean?
Hales answered this through the Flyspeck project, a long effort to formally verify the proof using proof assistants. In 2017, the formal proof of the Kepler conjecture was published. This was not merely a victory for sphere packing. It was a landmark in the history of computer-verified mathematics.
The old cannonball puzzle had finally been settled, not by a short geometric trick, but by a collaboration between human insight and machine verification.
Lattices: Order in the Infinite
To understand the next part of the story, we need the idea of a lattice.
A lattice is a regular infinite grid of points. In two dimensions, the square grid and the triangular grid are examples. In three dimensions, the cubic grid is the simplest example. A lattice packing places sphere centers at the points of such a repeating grid.
Lattices are attractive because they impose order. Instead of searching through all possible chaotic arrangements, mathematicians can study highly structured patterns. But this also limits the search: the best overall packing may or may not be a lattice packing.
In low dimensions, lattices already give the best known answers. In high dimensions, however, the landscape is far more mysterious. Some dimensions have extraordinarily beautiful lattices. Two of them became legendary: the E8 lattice in dimension 8 and the Leech lattice in dimension 24.
These are not ordinary grids. They are among the most symmetric and exceptional objects in mathematics.
The Exceptional Worlds of E8 and the Leech Lattice
The E8 lattice lives in 8-dimensional space. Each sphere in this packing touches 240 neighboring spheres. The Leech lattice, in 24-dimensional space, is even more spectacular: each sphere touches 196,560 neighbors.
For comparison, in the ordinary three-dimensional cannonball packing, each sphere touches only 12 neighbors.
These numbers give a hint of the hidden order in higher-dimensional geometry. The E8 and Leech lattices are connected with Lie theory, number theory, finite simple groups, modular forms, coding theory, and mathematical physics. They appear in places where one would not expect sphere packing to appear at all.
For decades, mathematicians strongly suspected that E8 and the Leech lattice were optimal in dimensions 8 and 24. Numerical evidence was overwhelming. Yet evidence is not proof.
The missing ingredient was a special auxiliary function.
Cohn and Elkies: Building the Ceiling
In 2003, Henry Cohn and Noam Elkies developed a powerful linear programming method for sphere packing. The idea was subtle but beautiful.
To prove that a packing is optimal, one needs two things:
Show that a certain density is achievable. This says: “Here is a packing this dense.”
Show that no possible packing can do better. This says: “The ceiling cannot be crossed.”
The lattice gives the lower bound: here is a packing this dense. The difficult part is the upper bound: no possible packing can exceed this density.
Cohn and Elkies showed that certain functions, satisfying special Fourier-analytic conditions, could create such upper bounds. If one could find the perfect auxiliary function, the upper bound would exactly match the known packing density. Then optimality would follow.
Their method produced excellent numerical evidence in dimensions 8 and 24. It was as if the E8 and Leech lattice packings were standing just beneath a ceiling. But the exact mathematical form of that ceiling remained unknown.
The problem became a hunt for a “magic function.”
Viazovska’s Breakthrough: The Magic Function Appears
In 2016, Maryna Viazovska found the magic function for dimension 8.
Her proof was astonishingly short compared with the proof of the Kepler conjecture. It used modular forms, special analytic objects with deep symmetry properties. Modular forms had already played a central role in some of the greatest achievements of modern mathematics, including the proof of Fermat’s Last Theorem. In Viazovska’s hands, they unlocked the 8-dimensional sphere-packing problem.
The result was published in the Annals of Mathematics in 2017 under the title “The sphere packing problem in dimension 8.” It proved that no packing of unit balls in R8 can be denser than the E8 lattice packing.
Almost immediately, Viazovska joined Henry Cohn, Abhinav Kumar, Stephen D. Miller, and Danylo Radchenko to extend the method to dimension 24. Their paper proved that the Leech lattice is the densest sphere packing in R24, and that it is the unique optimal periodic packing.
This was one of the most dramatic moments in modern discrete geometry. A problem that had resisted decades of attack suddenly yielded to an unexpected synthesis of Fourier analysis, modular forms, and the extraordinary symmetry of special lattices.
What Exactly Was Solved?
It is important to be precise.
Viazovska and collaborators did not solve the sphere-packing problem in every dimension. They solved it exactly in dimensions 8 and 24. Together with earlier work, exact optimal sphere packings are now known in dimensions:
For most other dimensions, including dimension 4, the exact answer remains unknown.
This is surprising. We know the answer in dimension 24, but not in dimension 4. Mathematics does not always become harder in a straight line. Sometimes a higher-dimensional world is easier because it has extraordinary symmetry.
The E8 and Leech lattices are not merely good packings. They are exceptionally rigid, balanced, and symmetric. Their perfection makes them accessible to methods that fail in less symmetric dimensions.
Beyond Packing: Universal Optimality
After the 8D and 24D packing results, the story advanced further.
In 2022, Cohn, Kumar, Miller, Radchenko, and Viazovska proved an even stronger theorem: the E8 and Leech lattices are universally optimal.
Sphere packing asks one specific question: how close can points be placed while avoiding overlap? Universal optimality asks a much broader question. Suppose points repel each other according to many possible force laws. Which arrangement minimizes the total energy?
The 2022 theorem showed that E8 and the Leech lattice minimize energy for every completely monotonic potential function of squared distance, including examples such as Gaussian and inverse-power-type potentials.
In simple language: these lattices are not just best for packing spheres. They are best for a huge family of geometric optimization problems.
That is why mathematicians treat them almost like “perfect crystals” of high-dimensional space.
The High-Dimensional Frontier: When Exact Answers Are Too Hard
Most dimensions remain unsolved. Therefore, much modern work asks a different question:
A lower bound says: “At least this much density is possible.” An upper bound says: “No packing can exceed this density.”
In very high dimensions, spheres behave counterintuitively. Most of the volume of a high-dimensional ball lies near its surface. Randomness becomes powerful. Geometry becomes less like ordinary space and more like probability theory.
For many decades, one of the major lower-bound milestones was due to Claude Rogers in 1947. Rogers showed that in high dimensions, one can guarantee packings with density on the order of
Later work improved constants and special cases, but the broad asymptotic barrier stood for a long time.
In 2023, Marcelo Campos, Matthew Jenssen, Marcus Michelen, and Julian Sahasrabudhe made a major advance. They proved a new lower bound of approximately
This was the first asymptotically growing improvement over Rogers’ 1947 bound for general high dimensions. It showed that random and combinatorial methods could still extract new density from high-dimensional space.
Then came another major development. In 2025, Boaz Klartag introduced a method using a stochastically evolving ellipsoid. His result, published in Inventiones Mathematicae in 2026, proved that there exist lattice sphere packings in Rn with density at least
for a universal constant c > 0. This was a striking improvement for lattice packings.
In June 2026, Elisha B. Abuya, Nihar Gargava, and Yufei Zhao posted a further preprint showing that along infinitely many dimensions, lattice packings can reach density at least
This work builds on Klartag’s stochastic ellipsoid method and combines it with symmetry ideas related to earlier work by Akshay Venkatesh.
The frontier has therefore shifted. The central question is no longer only “Can we solve one more exact dimension?” It is also “How dense can we prove packings must exist in enormous dimensions?”
Formal Verification: A New Kind of Certainty
The sphere-packing problem has also become a testing ground for formal proof.
The Flyspeck project formally verified the Kepler conjecture in dimension 3. More recently, efforts began to formalize Viazovska’s proof in dimension 8 using the Lean theorem prover.
In April 2026, Sidharth Hariharan, Christopher Birkbeck, Seewoo Lee, Ho Kiu Gareth Ma, Bhavik Mehta, Auguste Poiroux, and Maryna Viazovska reported a milestone in formalizing the 8-dimensional proof. According to their account, a significant milestone was achieved in February 2026, involving formal verification of the result with assistance from an autoformalization system named Gauss.
This is historically important. In the past, mathematics relied almost entirely on human checking. Now, some of the deepest proofs are being translated into formal languages that computers can verify line by line.
Sphere packing, once a question about oranges and cannonballs, has become a proving ground for the future of mathematical certainty.
Why Should a Layperson Care?
Sphere packing matters because it captures a universal human problem: how to arrange things efficiently.
At the everyday level, it resembles stacking fruits, storing grains, arranging atoms, or packing materials. At the scientific level, it connects to crystallography, coding theory, optimization, information transmission, and statistical physics.
But its deeper appeal lies elsewhere.
The problem shows that simple questions can contain enormous depth. A child can understand the question, but generations of mathematicians may struggle to prove the answer. It also shows that beauty and usefulness can meet. The same structures that solve packing problems also appear in algebra, number theory, physics, and communication technology.
In mathematics, a great problem is not always valuable because it has immediate application. Sometimes it is valuable because it reveals hidden architecture.
The E8 lattice and the Leech lattice appear to be such architecture: rare, exceptional, and profoundly ordered.
Conclusion: The Puzzle Is Solved, and Not Solved
The sphere-packing story is both complete and unfinished.
Kepler’s three-dimensional conjecture is solved. The two-dimensional circle-packing problem is solved. Viazovska and collaborators solved the miraculous cases of dimensions 8 and 24. Universal optimality has revealed that E8 and the Leech lattice are even more special than sphere packing alone suggested.
Yet most dimensions remain mysterious. Dimension 4 is still open. So are dimensions 5, 6, 7, 9, 10, and almost all others. In very high dimensions, the exact answer may be far beyond current methods, but new lower bounds continue to push the frontier.
The story therefore ends where mathematics often ends: with a solved mystery opening several deeper mysteries.
The oranges in a basket have led us to modular forms, high-dimensional lattices, stochastic ellipsoids, and machine-checked proof. That is the charm of mathematics. It begins with something we can see, and then teaches us to think about worlds we cannot see at all.
Further Readings & References
- Kepler, J. Strena seu de nive sexangula [The Six-Cornered Snowflake]. 1611. Historical source; no DOI.
- Gauss, C. F. “Untersuchungen über die Eigenschaften der positiven ternären quadratischen Formen von Ludwig August Seeber.” Göttingische Gelehrte Anzeigen, 1831. Historical source; no DOI.
- Thue, A. “Über die dichteste Zusammenstellung von kongruenten Kreisen in einer Ebene.” Norske Vid. Selsk. Skr., 1910. Historical source; no DOI.
- Fejes Tóth, L. “Über die dichteste Kugellagerung.” Mathematische Zeitschrift 48, 676–684, 1943. DOI: 10.1007/BF01180035.
- Rogers, C. A. “Existence Theorems in the Geometry of Numbers.” Annals of Mathematics 48, 994–1002, 1947. DOI: 10.2307/1969382.
- Rogers, C. A. Packing and Covering. Cambridge University Press, 1964. Classic monograph; no DOI located.
- Leech, J. “Notes on Sphere Packings.” Canadian Journal of Mathematics 19, 251–267, 1967. DOI: 10.4153/CJM-1967-017-0.
- Conway, J. H.; Sloane, N. J. A. Sphere Packings, Lattices and Groups, 3rd ed. Springer, 1999. DOI: 10.1007/978-1-4757-6568-7.
- Kabatiansky, G. A.; Levenshtein, V. I. “On Bounds for Packings on a Sphere and in Space.” Problems of Information Transmission 14, 1–17, 1978. DOI not consistently assigned in standard records.
- Cohn, H.; Elkies, N. “New Upper Bounds on Sphere Packings I.” Annals of Mathematics 157, 689–714, 2003. DOI: 10.4007/annals.2003.157.689. arXiv: math/0110009.
- Hales, T. C. “A Proof of the Kepler Conjecture.” Annals of Mathematics 162, 1065–1185, 2005. DOI: 10.4007/annals.2005.162.1065.
- Hales, T. C.; Adams, M.; Bauer, G.; Dang, T. D.; Harrison, J.; Hoang, T. L.; Kaliszyk, C.; Magron, V.; McLaughlin, S.; Nguyen, T. T.; Nguyen, Q. T.; Nipkow, T.; Obua, S.; Pleso, J.; Rute, J.; Solovyev, A.; Ta, A. H. T.; Tran, T. N.; Trieu, D. T.; Urban, J.; Vu, K. K.; Zumkeller, R. “A Formal Proof of the Kepler Conjecture.” Forum of Mathematics, Pi 5, e2, 2017. DOI: 10.1017/fmp.2017.1.
- Venkatesh, A. “A Note on Sphere Packings in High Dimension.” International Mathematics Research Notices 2013, 1628–1642, 2013. DOI: 10.1093/imrn/rns096.
- Cohn, H.; Zhao, Y. “Sphere Packing Bounds via Spherical Codes.” Duke Mathematical Journal 163, 1965–2002, 2014. DOI: 10.1215/00127094-2738857. arXiv: 1212.5966.
- Viazovska, M. S. “The Sphere Packing Problem in Dimension 8.” Annals of Mathematics 185, 991–1015, 2017. DOI: 10.4007/annals.2017.185.3.7. arXiv: 1603.04246.
- Cohn, H.; Kumar, A.; Miller, S. D.; Radchenko, D.; Viazovska, M. “The Sphere Packing Problem in Dimension 24.” Annals of Mathematics 185, 1017–1033, 2017. DOI: 10.4007/annals.2017.185.3.8. arXiv: 1603.06518.
- Cohn, H.; Kumar, A.; Miller, S. D.; Radchenko, D.; Viazovska, M. “Universal Optimality of the E8 and Leech Lattices and Interpolation Formulas.” Annals of Mathematics 196, 983–1082, 2022. DOI: 10.4007/annals.2022.196.3.3. arXiv: 1902.05438.
- Campos, M.; Jenssen, M.; Michelen, M.; Sahasrabudhe, J. “A New Lower Bound for Sphere Packing.” arXiv, 2023. DOI: 10.48550/arXiv.2312.10026. arXiv: 2312.10026.
- Klartag, B. “Lattice Packing of Spheres in High Dimensions Using a Stochastically Evolving Ellipsoid.” Inventiones Mathematicae 244, 1251–1279, 2026. DOI: 10.1007/s00222-026-01412-w. arXiv: 2504.05042.
- Abuya, E. B.; Gargava, N.; Zhao, Y. “Stochastically Evolving Ellipsoids with Symmetries.” arXiv, 2026. DOI: 10.48550/arXiv.2606.05105. arXiv: 2606.05105.
- Hariharan, S.; Birkbeck, C.; Lee, S.; Ma, H. K. G.; Mehta, B.; Poiroux, A.; Viazovska, M. “A Milestone in Formalization: The Sphere Packing Problem in Dimension 8.” arXiv, 2026. DOI: 10.48550/arXiv.2604.23468. arXiv: 2604.23468.
Leave a Reply