Build your own lattice, watch its Voronoi cells, and hunt for the densest one
A general packing is an infinite list of sphere centres with nothing tying them together, and there is no obvious way to say anything about all of them at once. A lattice is the disciplined case: pick two vectors in the plane — or n vectors in n dimensions — and take every whole-number combination of them. The result is a set of points that looks identical from every one of its members, closed under addition and subtraction, and specified completely by the handful of numbers in the basis.
That discipline buys an enormous simplification. The density of an infinite lattice packing is not a limit that has to be coaxed out of ever-larger windows; it is a ratio of two quantities you can compute from the basis in a line of arithmetic. And the restriction costs surprisingly little: the densest packing known in almost every dimension is a lattice, including the two arrangements that were finally proven optimal in 2016. The exceptions are scattered and stubborn — in dimensions 10, 11 and 13 the record holders are not lattices — but a lattice is where any search starts.
Everything a planar lattice packing does is decided by two numbers. The determinant is the area of the parallelogram spanned by the basis, and because every fundamental cell contains exactly one lattice point, it is the area each sphere gets to itself. The minimum distance is the length of the shortest nonzero lattice vector, and half of it is the largest radius the spheres can take without overlapping. Divide one by the other and the density falls out: π(d/2)² ÷ det. A third readout, the kissing number, counts how many neighbours sit at exactly that minimum distance — 2 for a generic lattice, 4 for the square, and 6 only for the hexagonal one.
78.54% of the target π/√12 ≈ 90.69%. Every basis you can reach with two vectors gives a lattice; only one shape is optimal.
The dashed parallelogram is the fundamental cell: exactly one lattice point per cell, so its area — the determinant — is the area each sphere gets to itself. Green segments mark the contacts at the minimum distance, and the discs have radius half that distance, the largest that never overlap. Density is πr² over the cell area, and it is capped at π/√12.
Try it: Drag either arrowhead and watch all four readouts move together. Then press Shear basis: v₁ becomes v₁ + v₂, the arrows swing to a completely different pair, the dashed cell stretches into a long thin sliver — and the determinant, the minimum distance, the density and the kissing number do not change by so much as a digit. The basis is a name, not the object. Finish with Optimise from the bad skew and watch a 35% packing climb to 90.69%.
That invariance is worth pausing on, because it is the reason the subject is tractable at all. Two bases describe the same lattice exactly when one is converted into the other by an integer matrix with determinant ±1 — and there are infinitely many such matrices, so every lattice has infinitely many names. Shearing produces longer and longer vectors that keep generating the identical set of points. The repair is lattice reduction: in the plane, Lagrange’s algorithm repeatedly subtracts the shorter vector from the longer one and provably terminates at the shortest basis there is, which is what the Reduce button runs. Above dimension four the same problem gets hard enough that modern cryptography is built on the assumption that nobody can solve it.
Give each lattice point the region of the plane closer to it than to any other. For a lattice these Voronoi cells are exact and easy: a point is closer to the origin than to a neighbour v precisely when it lies on the near side of the perpendicular bisector, so the cell is the intersection of the half-planes x·v ≤ |v|²/2, one for every neighbour close enough to bite. The cells are all congruent translates of one another, they tile the plane with no gaps and no overlaps, and each has area equal to the determinant. The inscribed circle is the sphere of the packing, touching each wall at its midpoint — which is exactly why the radius is half the minimum distance.
Four sides: the corners of a square reach much further from the centre than the walls do, and every one of those corners is wasted area.
A cell wall is the perpendicular bisector of the segment joining two neighbouring points, so the number of walls is the number of neighbours close enough to matter — four for the square lattice, six for the hexagonal one. Because the cells tile the plane exactly, the density of the whole infinite packing is settled inside a single cell: circle area over cell area, nothing else.
Try it: Morph from square to hexagonal and watch the cells grow two extra walls as the corners of the square get sliced off. The amber region is the waste — cell area the circle cannot reach — and it falls from 21.46% to 9.31%. Then drag a basis vector by hand: the walls appear and vanish as neighbours move in and out of range, and the count of walls is always the kissing number.
This turns a global question into a local one. Density is circle area over cell area, so making a packing dense means making the typical cell small — and the cell can never shrink below the smallest plane-tiling shape that still contains the circle. Among all polygons that tile the plane, the regular hexagon is the one closest to a circle, with area 2√3 r² against the square’s 4r². Its corners reach 2/√3 ≈ 1.155 times the radius, while a square’s corners reach √2 ≈ 1.414 times — and every bit of that overreach is wasted.
Three dimensions has a short list of arrangements that matter, and every solid element on the periodic table picks one of them. Spheres on the integer grid give simple cubic, touching six neighbours and filling only π/6 ≈ 52.36% of space. Drop an extra sphere in the middle of each cube and you get body-centred cubic, eight contacts and π√3/8 ≈ 68.02%. Put the extra spheres on the faces instead and you reach face-centred cubic: twelve contacts, π/√18 ≈ 74.05%, and the arrangement Kepler singled out in 1611.
Try it: Step through the four cells — the spheres never change size, so you are watching the cage around them grow. Then select FCC or HCP and switch to Stacking layers. Both are made of the same close-packed sheets; the third sheet either sits over the untouched hollows (A B C) or drops straight back above the first (A B A), and the two densities are identical.
Hexagonal close-packed is the one entry on the list that is not a lattice — its points are not closed under subtraction, and it takes two interleaved copies of a lattice to describe it. That is not a technicality: it is the reason Kepler’s conjecture stayed open for centuries. Gauss settled the lattice case in 1831, proving that no lattice in three dimensions beats face-centred cubic. Ruling out the packings with no repeating structure at all took until Hales in 1998, with a proof so large it was not formally verified until 2014. And because each close-packed layer can independently go into either set of hollows, there are uncountably many distinct packings all tied at π/√18 — the densest packing of space is a whole continuum of them.
The determinant is doing one job: it is the volume per lattice point. Lay a window of side L over the lattice and count the points inside. Multiply by the determinant and you get an estimate of the window’s area — bad at first, because a small window is all boundary, and steadily better as the edge’s share of the picture fades like 1/L. In the limit the count is exactly area ÷ determinant, which is the statement that each point is responsible for one cell’s worth of space and no more.
Sweep the slider end to end. The determinant moves by a factor of 16 and the minimum distance by a factor of 4; the density does not move at all. In n dimensions the sphere volume scales by sⁿ and the determinant scales by sⁿ too, so they cancel exactly — a packing has no size, only a shape.
A small window is dominated by its edge: whether a lattice point lands just inside or just outside is an accident of where the frame falls, and the ratio jumps around. As the window grows, the boundary’s share fades like 1/L and the count settles onto area ÷ determinant. That is the sense in which the determinant is the area per point — and it is why one sphere per fundamental cell is all the bookkeeping a lattice packing needs.
Try it: Grow the window and watch the ratio thrash below a few cells and then flatten onto 1. Switch lattices and it converges to the same place from a different determinant. Then sweep the scale slider: the determinant swings by a factor of 16 and the minimum distance by a factor of 4, while the density sits perfectly still.
Scale invariance is the last piece of bookkeeping, and it is what makes the problem finite. Stretching a lattice by a factor s multiplies every distance by s, so the sphere volume grows by sⁿ — and the determinant grows by sⁿ too, because it is an n-dimensional volume. The two cancel exactly and the density is untouched. A lattice packing therefore has no size, only a shape, and the search for the densest packing in a given dimension is a search over shapes: a compact space of possibilities, not an unbounded one.
See also: The Packing Problem, where the same hexagonal cell settles the two-dimensional question; and E₈ and the Leech Lattice, where the basis has 8 and 24 vectors, the kissing numbers jump to 240 and 196,560, and these same three readouts still say everything.