← Exceptional Atlas

Sphere Packing & the Leech Lattice

Part 14 of 15. The 240 roots are the shortest vectors of an infinite lattice. That lattice achieves the maximum kissing number in 8D (240, proved 1979), the maximum packing density (π&sup4;/384, proved by Viazovska in 2016), and — through Construction A on the extended Hamming code — connects directly to error-correcting codes. The 24-dimensional cousin of that story is the Leech lattice, whose packing was proved optimal seven days after E₈'s.

A lattice is an infinite set

The E₈ root system is the minimum shell of a much larger object — an infinite, periodic, 8-dimensional discrete subgroup of ℝ8 called the E₈ lattice. The root system is the set of its shortest nonzero vectors; the rest of the lattice extends outward in shells of increasing squared length.

D₈¹ construction

In words: a vector is in the E₈ lattice iff either all 8 of its coordinates are integers or all 8 are half-integers (of the form n + ½ with n ∈ ℤ), and in either case the coordinate sum is an even integer. The integer part recovers the 112 roots of D8 — the (±1, ±1, 0, …, 0) vectors — while the half-integer part recovers the 128 vectors (±½, …, ±½) with an even number of minuses. Together: all 240 roots.

Shell structure

squared length klattice vectors in shellnotes
01the zero vector
2240the 240 roots (minimum shell)
42,160
66,720
817,520
1030,240
1260,480
1482,560
16140,400

Figure 1. Shell counts for the E₈ lattice. Each row counts lattice vectors of exactly that squared length.

Shell explorer

Squared length k: 2
View:

Showing the k = 2 shell (240 vectors).

Figure 2. E₈ lattice shells viewed two ways. Slide k through 2, 4, 6, 8, 10, 12, 14, 16 to step outward through successive shells. In parallel-coordinates mode, blue lines are integer-coordinate vectors and indigo lines are half-integer vectors. In Coxeter mode, grey dots show the 240 roots for reference; coloured dots show the selected shell projected onto the Coxeter plane. For shells beyond k = 2 a uniform stride sample (at most ~1.5k primitives) is drawn to keep the view responsive; the full shell count is always reported above.

The theta series

The theta series of a lattice Λ packs shell counts into a single generating function:

For E₈:

The displayed q is a norm-counting variable. In the standard modular convention Q = e2πiτ counts half the squared norm, so ΘE₈(τ) = 1 + 240Q + 2160Q2 + ⋯ = E4(τ), the weight-4 Eisenstein series. Equivalently, the displayed series is E4 after substituting Q = q2. This is not merely a bookkeeping device — the modular transformation properties are precisely what Viazovska's 2016 packing proof leverages.

Unimodularity

A lattice Λ is unimodular if its dual lattice Λ* equals Λ itself, where:

E₈ is unimodular. There is only 1 even unimodular lattice in 8 dimensions (E₈, uniquely so up to isometry), only 24 in dimension 24 (the Niemeier lattices, which include the Leech lattice), and none in dimensions 1–7. Even unimodularity is what makes the theta series a full modular form of weight n/2, and unimodularity forces E₈'s fundamental domain to have volume exactly 1.

The lower bound: E₈ gives 240

Normalise the 240 roots to unit length by dividing by √2. The resulting unit vectors have pairwise inner products in , all ≤ 1/2, so they form a valid kissing configuration: 240 unit spheres touching a central sphere in ℝ8. The 8D kissing number is therefore at least 240.

The upper bound: linear programming

The harder direction is proving that no 241 unit vectors in ℝ8 can all be mutually at angle ≥ 60°. Suppose we have N unit vectors with pairwise inner products at most 1/2, and let f: [−1, 1] → ℝ satisfy two conditions: (a) f(t) ≤ 0 for t ∈ [−1, 1/2], and (b) f has nonnegative Gegenbauer coefficients. Then:

This is the Delsarte bound. A 1979 argument by Odlyzko–Sloane and independently Levenshtein constructed a specific witness function for n = 8 whose bound comes out to exactly 240 — matching the E₈ lower bound:

Kissing bounds across dimensions

DimBest known kissingLP boundMatching?
122✓ trivial
266✓ classical
31212✓ 1953
42424✓ 2003 (Musin)
54044.99gap
67278.47gap
7126135.48gap
8240240✓ 1979 (Odlyzko–Sloane)
9272364.09gap
10336554.51gap
164,3208,313gap
24196,560196,560✓ 1979 (Odlyzko–Sloane)

Figure 3. Kissing number lower bound vs Delsarte LP upper bound. The only dimensions where the two match exactly are 1, 2, 3, 4, 8, and 24.

The gap, visualised

Dimension: 8

dim 8: best known = 240, LP bound = 240, gap = 0 (tight).

Figure 4. Kissing-number bounds across dimensions 2–24 (log scale). Blue: best known kissing configuration. Red: Delsarte LP upper bound. Use the slider to highlight a dimension; the corresponding table row above highlights in sync.

Why 8 and 24. For most dimensions the Delsarte bound exceeds the best lower bound. In dimensions 8 and 24 the LP bound is tight, owing to the self-dual lattices E8 and Leech.

Packing density is not kissing number

Kissing is local; packing is global: how densely can equal spheres fill ℝn? For a lattice packing, density = volume of one ball / volume of fundamental domain. E8 settled kissing in 1979; packing took 37 more years.

Computing E₈'s packing density from scratch

Step 1. Unit-ball volume in 8D.
Step 2. Packing radius from minimum vector length.

E₈'s minimum vectors have squared length 2, so length √2. Packing radius is half the minimum distance.

Step 3. Ball volume at the packing radius.
Step 4. Covolume of the E₈ lattice.

E₈ is unimodular: its fundamental parallelepiped has volume exactly 1.

Step 5. Packing density.

Density = (ball volume) / (covolume of lattice).

Figure 5. Computing E₈'s packing density in five elementary steps. The final answer is π&sup4;/384 ≈ 0.2537.

The Cohn–Elkies upper bound

The upper-bound side uses an analogue of the Delsarte bound, due to Cohn and Elkies (2003). If an admissible Schwartz-class function f has the right positivity conditions and f(x) ≤ 0 for |x| ≥ r, then:

Different choices of f give different upper bounds. To get the tightest, you optimise f over the space of admissible functions — an infinite-dimensional linear programming problem. For most dimensions the gap between this LP bound and the lattice lower bound remained open for decades.

Viazovska's magic function

In 2016, Maryna Viazovska constructed a specific admissible function f for n = 8 whose Cohn–Elkies bound equals π&sup4;/384 exactly. Her f has the form:

where φ is a specific combination of modular forms of weight 8 and 12, A is a specific linear operator, and the construction is engineered so that f satisfies admissibility and positivity and takes exactly the right values at the lattice points of E₈. The proof fills 23 pages in the Annals of Mathematics.

To see what "tuning f" feels like, the figure below gives a three-parameter toy version of the problem. Instead of the real function space (modular forms of weight 12 pulled back through a Laplace transform) you have a Gaussian-polynomial family f(r) = (a + br² + cr&sup4;) e−r²/2 whose Fourier transform &fhat;(k) = (a + b(1−k²) + c(k⁴−6k²+3)) e−k²/2 has a closed form, so both plots update live as you drag the sliders. The goal is an (a, b, c) that satisfies all the Cohn–Elkies constraints simultaneously: f nonpositive at every E₈ shell distance, &fhat; nonnegative everywhere, both f(0) and &fhat;(0) strictly positive. Three parameters are too few to reach Viazovska's tight bound, but the shape of the tuning problem is the same.

checking… f(r)   should be ≤ 0 at the red lattice dots(a + b r² + c r⁴) e−r²/2
checking… &fhat;(k)   should be ≥ 0 everywhere(a + b(1−k²) + c(k⁴−6k²+3)) e−k²/2
a1.000
b0.000
c0.000

Constraints

LP ratio f(0) / &fhat;(0)

Satisfy all 10 constraints to activate.

Figure 6. A three-parameter toy of the Viazovska tuning problem. Top: f(r) plotted over the first few E₈ shell distances; red dots mark the lattice points √2, √4, √6, √8 (green = constraint satisfied, red = violated). Bottom: its Fourier transform &fhat;(k), which must stay nonnegative over the whole plot, not just at the dots. The LP ratio panel activates only when every constraint holds. Reveal magic jumps to a precomputed (a, b, c) = (1, −½, 0) that satisfies the toy.

What was hard about Viazovska's proof. The LP bound itself was Cohn–Elkies 2003. The hard part was constructing an f for dimension 8 where the bound equals E8's density exactly. In this toy the feasible region is a narrow sliver; in Viazovska's construction it shrinks to a single point, which lands on E8.

Historical timeline

1611
Kepler conjectures the densest 3D packing is the face-centred cubic (~74%).
1905
Minkowski initiates the modern study of lattice packing.
1967
Leech constructs the Leech lattice in 24 dimensions.
1979
Odlyzko–Sloane and Levenshtein independently prove the 8D and 24D kissing numbers (240 and 196,560) are optimal.
1998
Hales proves the 3D packing density (FCC / 74%) is optimal, confirming Kepler's 1611 conjecture.
2003
Cohn and Elkies introduce the LP bound for packing density. For n = 8 and 24 the bound gets tantalisingly close to the lattice lower bound, but not equal.
2016 Mar 14
Viazovska posts The sphere packing problem in dimension 8 to arXiv. E₈ is optimal.
2016 Mar 21
Cohn, Kumar, Miller, Radchenko, and Viazovska prove the Leech lattice is optimal in 24D. Seven days later.
2022
Viazovska receives the Fields Medal, the second woman to do so.

Figure 7. Key dates in the sphere packing story, from Kepler's 1611 conjecture through Viazovska's 2016 proof and 2022 Fields Medal.

Two weeks. The 8D and 24D packing proofs arrived within seven days of each other in March 2016, both using modular-form infrastructure. Outside of dimensions 1, 2, 3, 8, and 24 — where the densest packing is known — every dimension is still open.

Packing and error correction as the same question

We now pivot from the geometric picture to a combinatorial one. A binary block code of length n is a subset C ⊆ {0, 1}n — a set of valid "codewords" out of all 2n possible binary strings. When you transmit a codeword over a noisy channel, some bits get flipped; the receiver's job is to figure out which codeword was originally sent. Good codes have the property that codewords are "spread out" in the Hamming metric: no two codewords share too many bits, so a small number of bit-flip errors can always be corrected by finding the nearest codeword to what the receiver saw.

Sphere packing asks a geometric version of the same question. A sphere packing is a set of points in ℝn whose pairwise distances are all at least some minimum value (so that unit spheres placed at each point don't overlap). When noise perturbs a packing point into an arbitrary vector in ℝn, the receiver decodes by finding the nearest packing point. Good packings have the property that packing points are spread out in the Euclidean metric.

The two problems become identical when you connect them through Construction A.

Construction A

Given a binary linear code C ⊆ {0, 1}n (equivalently, a linear subspace of 𝔽2n), define the lattice:

In words: a vector x ∈ ℤn is in the lattice Λ(C) iff its coordinates, read modulo 2, form a codeword of C. This is a real lattice — closed under addition, discrete, and periodic — because the set of codewords is itself closed under coordinate-wise XOR (equivalently, addition mod 2).

Let's check a tiny example. Take n = 2 and C = {00, 11} (the "repetition" code). Then:

which is exactly the D2 lattice we met earlier — the 2D lattice of even-coordinate-sum integer points. Construction A on the simplest binary code gives us the simplest nontrivial lattice, and the correspondence scales up cleanly.

The extended Hamming [8, 4, 4] code

Our worked example is the extended Hamming code, sometimes written [8, 4, 4] or H8. The name encodes three numbers: length n = 8, dimension k = 4 (so there are 24 = 16 codewords), and minimum Hamming distance d = 4 (so any two distinct codewords differ in at least 4 positions). It is self-dual: the code equals its orthogonal complement under the standard bilinear form on 𝔽28.

There are 16 codewords in total: the zero word, the all-ones word, and 14 codewords of weight 4 (i.e., with exactly 4 ones among 8 positions). Here they all are:

Click a codeword to see which E₈ lattice vectors it generates via Construction A.

Figure 8. All 16 codewords of the extended Hamming [8, 4, 4] binary code. Weight distribution: 1 codeword of weight 0, 14 of weight 4, 1 of weight 8. Click any codeword to pin it and see the Construction A vectors it produces below.

Click a codeword above to see the lattice vectors.

Figure 9. Lattice vectors coming from a single codeword. Construction A produces one lattice vector for every integer vector congruent to the codeword modulo 2. We show the minimum-squared-length vectors for the selected codeword (the "short" vectors that live on the first shell of the lattice).

Why the parameters line up

The extended Hamming code's three parameters — length 8, dimension 4, minimum distance 4 — combine to produce the E₈ lattice under Construction A in a way that is not coincidence. The argument, step by step:

  1. Construction A gives a lattice in ℤ8.
  2. The lattice's minimum squared length is min(4, d) where d is the code's minimum Hamming distance. For extended Hamming, d = 4, so the minimum squared length is 4.
  3. The number of minimum-length lattice vectors is the sum of (number of integer vectors with ±1 in the "one" positions of each codeword of weight exactly 4) plus (number of integer vectors of squared length 4 whose parity is the zero codeword — these are all-even vectors of squared length 4, e.g. (±2, 0, …, 0)).
  4. Count: 14 codewords of weight 4, each giving 24 = 16 sign choices = 224. Plus 8 positions × 2 signs = 16 from the zero codeword's ±2 vectors. Total: 224 + 16 = 240.
  5. Scale by 1/√2: minimum squared length drops from 4 to 2, matching E₈'s minimum shell.

Three descriptions of E₈. Roots (112 integer + 128 half-integer vectors), D8+ cosets, and Construction A on extended Hamming. All three are exactly the same lattice, arrived at from very different vocabularies: geometric, algebraic, combinatorial.

The lattice-code dictionary

Code sideLattice side
length ndimension n
minimum Hamming distance dminimum squared length min(d, 4)
2k codewordslattice modulo 2ℤn has 2k cosets
self-dual codeunimodular lattice
weight enumerator WC(x, y)theta series ΘΛ(q) (via substitution)
Hamming ball around a codewordVoronoi cell around a lattice point
decoder = nearest codeworddecoder = nearest lattice point
error correction capabilitypacking radius

Figure 10. The lattice-code dictionary. Every concept on the code side translates to a concept on the lattice side, and vice versa. The correspondence lets you move freely between coding theory and discrete geometry, applying techniques from either side to problems in the other.

Construction A, step by step

The formula Λ(C) = { x ∈ ℤn : (x mod 2) ∈ C } is abstract. Here it is made concrete. Pick a codeword from the extended Hamming code; the eight boxes below show each bit position. Where the codeword has a 1, the lattice coordinate must be odd (±1, ±3, …); where it has a 0, the coordinate must be even (0, ±2, …). Click Generate to draw a random minimum-shell vector compatible with the selected codeword.

Codeword:

Figure 11. Construction A in action. Each box represents one coordinate of ℤ8. Red boxes (codeword bit = 1) hold odd integers; blue boxes (bit = 0) hold even integers. The generated vector is a point in Λ(H8); after scaling by 1/√2 it becomes a minimum vector of E₈.

Error correction in action

The code's minimum Hamming distance d = 4 has a concrete operational meaning: any single bit-flip landed on a transmitted codeword can be undone by nearest-neighbour decoding, and any two bit-flips are at least detectable. The rule of thumb for a code of distance d is that it corrects up to ⌊(d−1)/2⌋ errors — here, 1 — because the Hamming balls of radius 1 around distinct codewords don't overlap. Click a bit in the "received" row to flip it and watch the decoder hunt for the nearest codeword.

sent
received
decoded
No noise yet — click any bit in the "received" row to flip it.

Figure 12. The extended Hamming [8, 4, 4] decoder. Click bits in the "received" row to inject errors; the decoder returns the codeword at minimum Hamming distance. With one flip the decoder always recovers the original; with two flips it may land closer to a wrong codeword (distance 4 means the nearest-codeword boundary sits at distance 2, not 1, so two flips can push you across).

Same story in the lattice. A noisy E₈-lattice point within Euclidean distance less than 1/√2 from the original round-trips back exactly: the packing radius of (scaled) E₈ is 1/√2, and every point inside that ball has a unique nearest lattice point. Push past 1/√2 and the Voronoi cells start overlapping — the geometric analogue of "2+ errors; decoding unreliable."

From 8 dimensions to 24

Construction A maps any binary code to a lattice. The extended Hamming code gives E₈ in 8 dimensions. What happens in 24 dimensions? The code is the binary Golay code — a [24, 12, 8] self-dual code with 4,096 codewords — and the target is the Leech lattice. But the parallel is not exact: Construction A on the Golay code alone is not sufficient.

Construction A on the Golay code yields a lattice with minimum squared length 4 — the right value — but it still contains ±2ei vectors inherited from the all-zero codeword, giving 194,352 minimum-length vectors instead of the Leech lattice's 196,560. The fix is Construction B: keep only vectors whose coordinate sum is divisible by 4, then adjoin a coset of half-integer vectors. The parity constraint kills the spurious ±2ei vectors and the result is the Leech lattice Λ24 exactly. Leech discovered it in 1967; its automorphism group turns out to contain three of the 26 sporadic simple groups.

E₈ and Leech, side by side

Figure 13. E₈ and Leech compared property by property. Click "Highlight differences" to dim the matching properties (both unimodular, both proved in 2016) and foreground the differences: dimension, minimum squared length, kissing number, root count, and group order. The bars show relative magnitude on a log scale.

No roots, and why that matters

The single most unusual property of the Leech lattice is that it has no vectors of squared length 2. In 24 dimensions there are exactly 24 even unimodular lattices (the Niemeier lattices). Twenty-three of them have a nontrivial root sublattice — some vectors of squared length 2. The twenty-fourth does not: the Leech lattice is the unique even unimodular 24-dimensional lattice with no roots. "No roots" forces the minimum squared length to jump from 2 to 4. The 196,560 minimum vectors all have squared length 4, which is why the packing density looks small in absolute terms but is still optimal in its dimension.

Why rootless matters. Roots force the automorphism group to contain a Weyl group. A rootless lattice gets its symmetry elsewhere; Leech's comes from the Golay code's automorphism group. The resulting Co0 contains three sporadic simple groups as quotients.

The Niemeier family

Root system# rootsNotes
D241104largest root count
D16 ⊕ E8720E₈ appears as a summand
E83720three orthogonal copies of E₈
A24600
⋮ (19 more)all with roots
(none)0Leech lattice Λ24

Figure 14. The 24 Niemeier lattices (abbreviated). Twenty-three have nontrivial roots; the 24th is Leech, which has none. E83 — the direct sum of three orthogonal copies of E₈ — is one of the rooted 23 and is not the same as Leech.

Leech and three copies of E₈

There is a real construction (due to Turyn, 1967) that builds the Leech lattice from three copies of E₈. You take E8 ⊕ E8 ⊕ E8 inside ℝ24 and enlarge it by adding "glue vectors" controlled by the hexacode — a [6, 3, 4] linear code over 𝔽4. The gluing produces exactly the conditions that kill all squared-length-2 vectors and promote the minimum to squared length 4. The E₈ pieces are the easy part; the gluing is the hard part.

The symmetry cascade

The automorphism group of the Leech lattice, Co0, has order ≈ 8.3 × 1018. In 1968 John Conway computed this group and discovered that its quotient by a centre of order 2 is a simple group, Co1, and that Co1 contains two further sporadic simple groups: Co2 (stabiliser of a type-4 vector) and Co3 (stabiliser of a type-6 vector). These three — Co1, Co2, Co3 — are three of the 26 sporadic finite simple groups. The chain continues: Leech lattice → Conway group → Mathieu group M24 → monstrous moonshine → the monster.

Takeaways