Search

Search papers and lessons

Euclidean Lattice

Level 2 · 11 min read

A Euclidean lattice is every whole-number combination of a few independent vectors, a repeating grid whose cell area is the determinant of those vectors.

On this page

  • Colour = topic mix
  • Linear algebra
  • Discrete math
  • ReadReady to readNot yet

TL;DR

A Euclidean lattice is the set of points you reach by taking whole-number combinations of a few vectors that point in independent directions. Those vectors form a basis, and the lattice is a regular grid that repeats the same pattern everywhere, possibly stretched and tilted. The determinant of the basis gives the area that each lattice point owns.

Builds on: Vector Space, Linear Independence, Determinant · Leads to: sphere packing, crystal structure, and lattice-based cryptography

Where it's used

Cryptography. Some encryption schemes designed to resist quantum computers rest on a hard problem about lattices: given a messy basis, find a short nonzero vector in the lattice. In 2024 the US standards body NIST published ML-KEM, a key-exchange standard built on this kind of problem.

Crystals. The atoms in a perfect crystal sit at positions that form a lattice. Salt, copper and diamond all have such arrangements, and crystal lattices are the core object of crystallography. Auguste Bravais classified the 14 three-dimensional lattice types in the 1840s.

Packing and coding. How densely spheres fit together, and how to send digital information through noisy channels with lattice codes, both come down to which lattice fits points most tightly. Sphere packing is the classic case.

How it works

Start with two arrows in the plane: b1=(2,0)b_1 = (2, 0) and b2=(1,2)b_2 = (1, 2). They point in different directions, so they are linearly independent and form a basis.

  1. Pick whole-number weights. Choose the whole numbers z1=1z_1 = 1 and z2=1z_2 = 1. Form z1b1+z2b2=(2,0)+(1,2)=(3,2)z_1 b_1 + z_2 b_2 = (2, 0) + (1, 2) = (3, 2). Check: first coordinate 2+1=32 + 1 = 3, second 0+2=20 + 2 = 2.
  2. Try other weights. Choose z1=−1z_1 = -1 and z2=2z_2 = 2. Then −1⋅(2,0)+2⋅(1,2)=(−2,0)+(2,4)=(0,4)-1 \cdot (2, 0) + 2 \cdot (1, 2) = (-2, 0) + (2, 4) = (0, 4). Check: −2+2=0-2 + 2 = 0 and 0+4=40 + 4 = 4.
  3. Try non-whole weights. Choose z1=0.5z_1 = 0.5 and z2=0z_2 = 0. This gives 0.5⋅(2,0)=(1,0)0.5 \cdot (2, 0) = (1, 0). The point (1,0)(1, 0) is not in the lattice. To reach it we would need 2z2=02 z_2 = 0, so z2=0z_2 = 0, and 2z1+z2=12 z_1 + z_2 = 1, so z1=0.5z_1 = 0.5, which is not whole. Check: the second coordinate forces z2=0z_2 = 0, and then the first forces z1=0.5z_1 = 0.5.
  4. Collect all the points. Doing step 1 for every pair of whole numbers gives a set of points. The plot shows those with first coordinate between −6-6 and 66 and second between −3-3 and 33. They form a tilted grid. Check: the point (3,2)(3, 2) from step 1 is one of the marked points.
  5. Measure the cell. The parallelogram with corners 00, b1b_1, b1+b2b_1 + b_2 and b2b_2 has no lattice point inside it, and copies of it, shifted by lattice vectors, tile the plane. Its area is 44, computed from the determinant in the math section. So each lattice point owns 44 square units. Check: the plot has one point per 4 square units, which is a quarter point per unit of area.
−6−4−20246−3−2−10123xy
  • lattice points
Lattice points generated by b1 = (2, 0) and b2 = (1, 2) with whole-number weights. Each point owns an area of 4.

The math

Definition

Definition: Euclidean lattice

Let b1,…,bnb_1, \ldots, b_n be linearly independent vectors in Rn\mathbb{R}^n. The lattice they generate is the set L={z1b1+⋯+znbn:z1,…,zn∈Z}L = \{ z_1 b_1 + \cdots + z_n b_n : z_1, \ldots, z_n \in \mathbb{Z} \}, where Z\mathbb{Z} is the set of whole numbers, positive, negative and zero. The vectors b1,…,bnb_1, \ldots, b_n are a basis of LL.

The weights ziz_i are whole numbers, so a lattice is the set of all integer combinations of a basis. Independence is what makes it fill out an nn-dimensional grid rather than collapse into a smaller set.

Step 1 in symbols: combining with weights

Stack the basis vectors as the columns of a matrix B=[ b1  ⋯  bn ]B = [\, b_1 \; \cdots \; b_n \,]. The lattice is then L={Bz:z∈Zn}L = \{ B\mathbf{z} : \mathbf{z} \in \mathbb{Z}^n \}, where z\mathbf{z} is the column of weights. For the example,

B=(2102),B(z1z2)=(2z1+z22z2).B = \begin{pmatrix} 2 & 1 \\ 0 & 2 \end{pmatrix}, \qquad B \begin{pmatrix} z_1 \\ z_2 \end{pmatrix} = \begin{pmatrix} 2 z_1 + z_2 \\ 2 z_2 \end{pmatrix}.

Step 2 in symbols: testing a point

A point x\mathbf{x} belongs to LL exactly when z=B−1x\mathbf{z} = B^{-1} \mathbf{x} has whole-number entries. For a 2×22 \times 2 matrix, the inverse is 1ad−bc(d−b−ca)\frac{1}{ad - bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}. Here ad−bc=4ad - bc = 4, so

B−1=14(2−102).B^{-1} = \frac{1}{4} \begin{pmatrix} 2 & -1 \\ 0 & 2 \end{pmatrix}.

For x=(3,2)\mathbf{x} = (3, 2) we get B−1x=14(4,4)=(1,1)B^{-1}\mathbf{x} = \frac{1}{4}(4, 4) = (1, 1), which is whole, so (3,2)(3, 2) is in LL. For x=(1,0)\mathbf{x} = (1, 0) we get 14(2,0)=(12,0)\frac{1}{4}(2, 0) = (\tfrac12, 0), which is not whole, so (1,0)(1, 0) is not in LL.

Step 3 in symbols: the cell and the determinant

The parallelogram with sides b1b_1 and b2b_2 has area ∣det⁡B∣|\det B|, the absolute value of the Determinant. Here det⁡B=2⋅2−1⋅0=4\det B = 2 \cdot 2 - 1 \cdot 0 = 4. The same rule holds in any dimension: the volume of the cell spanned by a basis is ∣det⁡B∣|\det B|. This number is the covolume of the lattice.

Step 4 in symbols: changing the basis

Replace b2b_2 by b2+b1b_2 + b_1. This is B′=BUB' = BU with U=(1101)U = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}, a matrix of whole numbers with determinant 11. Every integer combination of the new basis is an integer combination of the old one, and the reverse holds too, so the lattice does not change. Its covolume does not change either, because det⁡B′=det⁡B⋅det⁡U=4⋅1=4\det B' = \det B \cdot \det U = 4 \cdot 1 = 4. Check: the new basis is (2,0)(2, 0) and (3,2)(3, 2), and 2⋅2−3⋅0=42 \cdot 2 - 3 \cdot 0 = 4.

Worked examples

Example
1. A lattice on the number line

Take the single vector b=3b = 3, so L={3z:z∈Z}L = \{ 3z : z \in \mathbb{Z} \}. Is 99 in LL? Is 44?

  1. For 99 we need a whole number zz with 3z=93z = 9.
  2. Dividing by 33 gives z=3z = 3.
  3. 33 is whole, so 99 is in LL.
  4. Check: 3⋅3=93 \cdot 3 = 9.
  5. For 44 we need 3z=43z = 4, so z=43z = \frac43, which is not whole. So 44 is not in LL.
  6. Interpretation: a one-dimensional lattice is the multiples of its basis vector. Its covolume is ∣3∣=3|3| = 3, so each point owns a length of 33.
Example
2. The standard case: a tilted grid

Use the basis b1=(2,0)b_1 = (2, 0) and b2=(1,2)b_2 = (1, 2). Is (5,2)(5, 2) in LL? Is (5,4)(5, 4)?

  1. Compute the first coordinate of z=B−1(5,2)\mathbf{z} = B^{-1}(5, 2): 14(2⋅5−1⋅2)=14⋅8=2\frac{1}{4}(2 \cdot 5 - 1 \cdot 2) = \frac{1}{4} \cdot 8 = 2.
  2. Compute the second coordinate: 14(0⋅5+2⋅2)=14⋅4=1\frac{1}{4}(0 \cdot 5 + 2 \cdot 2) = \frac{1}{4} \cdot 4 = 1.
  3. Both are whole, so (5,2)(5, 2) is in LL with weights (2,1)(2, 1).
  4. Check: 2(2,0)+1(1,2)=(4,0)+(1,2)=(5,2)2(2, 0) + 1(1, 2) = (4, 0) + (1, 2) = (5, 2).
  5. Now compute the first coordinate of B−1(5,4)B^{-1}(5, 4): 14(10−4)=14⋅6=1.5\frac{1}{4}(10 - 4) = \frac{1}{4} \cdot 6 = 1.5.
  6. The first coordinate is 1.51.5, not whole, so (5,4)(5, 4) is not in LL.
  7. Check: the weights (1.5,2)(1.5, 2) give 1.5(2,0)+2(1,2)=(3,0)+(2,4)=(5,4)1.5(2, 0) + 2(1, 2) = (3, 0) + (2, 4) = (5, 4), and no whole-number weights reach (5,4)(5, 4).
  8. Interpretation: membership is a test of whether two numbers come out whole. The marked points in the plot are exactly the points that pass it.
Example
3. Circles in a honeycomb

Put circles of radius 12\tfrac12 at the points of the hexagonal lattice with basis b1=(1,0)b_1 = (1, 0) and b2=(12,32)b_2 = (\tfrac12, \tfrac{\sqrt3}{2}). What fraction of the plane do the circles cover?

  1. Neighbouring centres are at distance 11. Check: ∣b2∣=14+34=1|b_2| = \sqrt{\tfrac14 + \tfrac34} = 1, and b1−b2=(12,−32)b_1 - b_2 = (\tfrac12, -\tfrac{\sqrt3}{2}) also has length 11.
  2. Each circle has area π(12)2=π4\pi (\tfrac12)^2 = \frac{\pi}{4}.
  3. The covolume is ∣det⁡B∣=∣1⋅32−12⋅0∣=32|\det B| = \left|1 \cdot \tfrac{\sqrt3}{2} - \tfrac12 \cdot 0\right| = \tfrac{\sqrt3}{2}, which is about 0.8660.866.
  4. Each lattice point owns a cell of area 32\tfrac{\sqrt3}{2}, and that cell holds one circle of area π4\tfrac{\pi}{4}.
  5. The covered fraction is π/43/2=π23\dfrac{\pi/4}{\sqrt3/2} = \dfrac{\pi}{2\sqrt3}.
  6. Numerically, π/(23)≈3.1416/3.4641≈0.9069\pi / (2\sqrt3) \approx 3.1416 / 3.4641 \approx 0.9069. Check: 3.4641×0.9069≈3.14163.4641 \times 0.9069 \approx 3.1416.
  7. Interpretation: about 90.7 percent of the plane is covered. This honeycomb is the densest possible arrangement of equal circles in the plane.

Try it: what fraction of the plane do the same circles cover when they sit on the square lattice with basis (1,0)(1, 0) and (0,1)(0, 1)? Answer: the covolume is 11, so the fraction is π/41=π4≈0.785\frac{\pi/4}{1} = \frac{\pi}{4} \approx 0.785, less than the honeycomb's 0.9070.907.

Common mistakes and tradeoffs

Mistake 1: "Any regular grid of points is a lattice." It is tempting to think any evenly spaced pattern counts. In fact a lattice must contain the zero point, because zero weights give zero. The points with both coordinates odd form an evenly spaced grid, but they do not include (0,0)(0, 0), so they are a shifted copy of a lattice, not a lattice.

Mistake 2: "The basis is part of the lattice, so different bases give different lattices." In fact one lattice has infinitely many bases. The bases (2,0),(1,2)(2, 0), (1, 2) and (2,0),(3,2)(2, 0), (3, 2) generate the same points, and both have covolume 44. The covolume is a property of the lattice, not of the basis.

Mistake 3: "Two vectors always make a lattice in the plane." If the vectors point the same way, such as (2,0)(2, 0) and (4,0)(4, 0), every combination lies on the horizontal axis. The set is a one-dimensional lattice and covers no area. A full lattice in nn dimensions needs nn independent vectors.

When to use it. Lattices fit anything that repeats periodically: crystals, dense packings, and codes. Their calculations are exact, because membership and area reduce to solving with integers and computing a determinant.

When not to use it. Data without a repeating pattern, such as the locations of cities, has no lattice structure, and forcing one onto it hides the real layout. In high dimensions, finding the shortest nonzero vector in a lattice from a bad basis becomes very hard. That hardness is what lattice-based cryptography relies on, so it is a feature there.

Alternatives. For non-periodic point sets, use general nearest-neighbour methods, or quasi-crystals, which have order without repetition.

History

Lattices appeared in number theory before they had a name. Lagrange and Gauss studied binary quadratic forms in the late 1700s and early 1800s, which amounts to counting whole-number points in a tilted grid. In the early 1830s Gauss proved that the densest lattice packing of spheres in three dimensions is the face-centred cubic arrangement. In the 1840s Auguste Bravais classified the 14 three-dimensional lattice types, which made lattices the basic language of crystallography. Hermann Minkowski's "geometry of numbers" in the 1890s used lattices and volumes to prove theorems about whole-number solutions. In 1996 Miklos Ajtai showed that hard lattice problems could support cryptography, and in 2024 NIST standardized a lattice-based key-exchange method.

Recap

  • A basis is a set of independent vectors. The lattice is every whole-number combination of them.
  • A point is in the lattice when the weights found by inverting the basis matrix are whole numbers.
  • The covolume ∣det⁡B∣|\det B| is the area each point owns, and it is the same for every basis of the lattice.
  • The hexagonal arrangement of circles is the densest planar packing, which leads into the packing question.

Read next: sphere packing density, which uses lattices to ask how densely spheres fit together.

Check yourself

QuestionWhat set of points is generated by the basis (3, 0) and (0, 3)?Show answer
It is the set of points (3z1,3z2)(3z_1, 3z_2) for whole numbers z1z_1 and z2z_2: a square grid with spacing 3, anchored at the origin.
QuestionThe lattice has basis (3, 0) and (1, 2). Is (7, 2) in it, and what is its covolume?Show answer
Solve (3z1+z2,2z2)=(7,2)(3z_1 + z_2, 2z_2) = (7, 2). The second coordinate gives z2=1z_2 = 1, and the first gives 3z1+1=73z_1 + 1 = 7, so z1=2z_1 = 2, which is whole. So (7,2)(7, 2) is in the lattice with weights (2,1)(2, 1). The covolume is ∣3⋅2−1⋅0∣=6|3 \cdot 2 - 1 \cdot 0| = 6.
QuestionWhy does the grid of points with both coordinates odd fail to be a lattice?Show answer
A lattice must contain the zero point, since zero weights give zero. The odd-odd points avoid zero, so the set is a shifted copy of a lattice, not a lattice itself.
QuestionA designer places sensors on a lattice with basis (2, 0) and (0, 5). How much area does each sensor own, and roughly how many fit in 100 square units?Show answer
Each sensor owns ∣2⋅5−0⋅0∣=10|2 \cdot 5 - 0 \cdot 0| = 10 square units. In 100 square units about 100/10=10100 / 10 = 10 sensors fit, one per cell.

Sources