math geometry history number-theory

The Kepler Conjecture: How to Stack Cannonballs as Tightly as Possible

Stack a pile of oranges at the grocery store and you already know the answer to one of the longest-running problems in mathematics — you just don't know that you know it, and neither, for nearly 400 years, did anyone else with a proof.

The Concept

The Kepler Conjecture asks a deceptively simple question: what's the densest way to pack equal-sized spheres into space? Not a clever trick, not some exotic geometry — just spheres, like oranges or cannonballs or ball bearings, filling a volume as efficiently as possible.

The answer, it turns out, is exactly what a grocer does instinctively. Lay down a flat layer of spheres in the tightest possible arrangement — each one touching six neighbors, like circles packed on a table. Then add a second layer, nestling each new sphere into the pocket formed by three spheres below it. Keep going. This is called "cubic close packing" (or, in an equivalent variant, "hexagonal close packing"), and it fills about 74.05% of space with sphere material — leaving the rest as gaps. More precisely, the density works out to π divided by the square root of 18, or π/(3√2) ≈ 0.74048.

Johannes Kepler, the astronomer famous for describing how planets orbit the sun, proposed in 1611 that this arrangement was the best possible — that no packing, however clever, could beat it. He wasn't idly speculating. Kepler had been corresponding with the English mathematician Thomas Harriot, who himself had been asked by the explorer and courtier Sir Walter Raleigh for a fast way to estimate how many cannonballs were stacked in a pyramid on a ship's deck. Harriot worked out the counting formula, but got curious about a deeper question: was the pyramid stack actually the most efficient way to pile the balls? That question found its way to Kepler, who published his conjecture in a short pamphlet called The Six-Cornered Snowflake — a work ostensibly about why snowflakes have sixfold symmetry, but which also contains this offhand geometric claim that would outlive him by centuries.

Kepler stated the conjecture. He did not prove it. Nobody could, for a very long time.

Why It Matters

It's worth pausing on how strange this is. The claim sounds almost too obvious to need proving — of course stacking oranges the normal way is the best way, what else would you do? But "obviously true" and "provably true" are very different standards in mathematics, and the gap between them here turned out to be enormous.

Part of what makes the problem hard is that "densest packing" has to beat every conceivable arrangement, including wildly irregular ones with no repeating pattern at all. Proving your favorite arrangement is good is easy. Proving that literally nothing does better — including arrangements nobody has ever thought to try — is another matter entirely.

The stakes go well beyond tidy fruit displays. Sphere packing shows up anywhere you need to cram discrete "units" into space as efficiently as possible while keeping them separated: how atoms arrange themselves into crystal lattices in metals and minerals, how error-correcting codes place signal points so far apart in abstract space that noise can't confuse one for another, and how digital communication systems encode data to survive transmission errors. Cell phone signals, deep-space satellite data, and QR codes all lean on packing-style mathematics to keep information from getting garbled. The geometry of "keep things far apart from their nearest neighbors while wasting as little space as possible" is the same problem whether the "things" are cannonballs, atoms, or bits of code.

The Details

For three centuries, the Kepler Conjecture resisted every attempt at proof. Carl Friedrich Gauss made partial progress in 1831, proving that cubic close packing is the best among arrangements where the spheres sit on a regular lattice — but that left open the far harder possibility that some irregular, non-repeating packing might sneak past 74.05% density. Ruling out every possible irregular arrangement is what made the general problem so brutally difficult. In 1900, when David Hilbert drew up his famous list of 23 unsolved problems to guide twentieth-century mathematics, the Kepler Conjecture was folded into problem 18 as an open challenge.

Progress crept forward. In 1953, the Hungarian mathematician László Fejes Tóth showed that the problem, while still infinite in principle, could in theory be reduced to checking a very large but finite number of specific cases — arrangements of a limited number of spheres clustered around a central one. That was a crucial conceptual breakthrough: it meant a proof was possible in principle, even if the amount of casework required was far beyond what a human could do by hand.

Enter computers, and Thomas Hales. Beginning in 1988 and building on Fejes Tóth's approach, Hales spent a decade developing an approach that used linear programming — an optimization technique — to bound the density of every conceivable local arrangement of spheres around a central sphere. Working with his graduate student Samuel Ferguson, Hales announced a proof in 1998. It was massive: roughly 250 pages of traditional mathematical argument combined with several gigabytes of computer code and data, checking thousands of individual cases that would have been impossible to verify by hand.

That scale created a new problem. When Hales submitted the proof to the journal Annals of Mathematics, a panel of twelve reviewers spent four years checking it and came back with an unusual verdict: they were "99% certain" the proof was correct, but could not certify it with complete confidence, because no human could feasibly re-check every line of the computer calculations. The journal published the proof in 2005 with an unprecedented editorial caveat about that residual uncertainty.

Rather than let that asterisk stand, Hales set out to remove it entirely. In 2003 he launched the Flyspeck project — "Formal Proof of Kepler" — an effort to encode the entire proof, both the human-written mathematics and the computer calculations, into a formal proof-verification system that could check every logical step with the reliability of a computer rather than the fallibility of a human reader. Hales originally estimated the project would take about 20 person-years of work; it was completed in 2014, with the results published in 2017. The Kepler Conjecture had gone from a throwaway remark in a pamphlet about snowflakes to one of the first major theorems in mathematics whose proof exists as much in machine-checkable code as in human prose.

There's a pleasing twist to the story, too: cubic close packing isn't the only arrangement that achieves maximum density. Because of how the layers can be stacked — you can shift each successive layer in different ways relative to the ones below — there are actually infinitely many distinct arrangements that all tie for the same optimal 74.05% density. Kepler's conjecture doesn't crown a single unique champion; it draws a boundary that an infinite family of arrangements all touch simultaneously.

And the story didn't end with three-dimensional spheres. Mathematicians have long wondered about the analogous packing problem in higher dimensions — spaces with 4, 8, or even 24 dimensions, which sound abstract but turn out to matter enormously for coding theory and cryptography. In 2016, Ukrainian mathematician Maryna Viazovska stunned the field by proving the optimal sphere packing in 8 dimensions, using a special lattice called E8, in a remarkably short and elegant 23-page argument built on modular forms — a branch of mathematics with roots in number theory. Within weeks, she and collaborators extended the technique to solve the 24-dimensional case using another special structure called the Leech lattice. Viazovska won the Fields Medal, mathematics' highest honor, in 2022 largely for this work. Even more recently, mathematicians have used AI-assisted tools to help formally verify her proofs, echoing the machine-verification story that closed out the original three-dimensional case.

Takeaways

  • The Kepler Conjecture — that stacking spheres the way a grocer stacks oranges is the densest possible packing — was proposed in 1611 and not proven until 1998, a gap of almost 400 years.
  • The optimal density is π/(3√2), about 74.05% of space filled, and infinitely many distinct stacking arrangements achieve this same maximum.
  • Thomas Hales's proof combined traditional mathematics with massive computer calculation, which forced mathematicians to grapple with a new question: how do you fully trust a proof too large for any human to check by hand?
  • The Flyspeck project's formal, machine-verified proof (completed 2014) removed all doubt — and pointed toward a future where computers help certify, not just discover, mathematical truth.
  • The same packing question in higher dimensions connects to cutting-edge cryptography and coding theory, and was dramatically advanced by Maryna Viazovska's 2016 Fields Medal-winning work on 8 and 24 dimensions.

Resources: - Kepler conjecture — Wikipedia - Mathematical mysteries: Kepler's conjecture — Plus Magazine - Sphere Packing Solved in Higher Dimensions — Quanta Magazine