Lattice points and Ehrhart polynomials
Count integral dilates of lattice polytopes, interpret reciprocity, and distinguish rational-vertex quasipolynomials.
On this page
The question for today
What you’ll understand
- Define the Ehrhart count and identify polynomial degree and leading coefficient.
- Use reciprocity to relate boundary-inclusive and interior counts.
- Recognize periodic coefficients for rational rather than lattice polytopes.
Euclidean volume describes the large-scale size of a region, while counting lattice points remembers arithmetic alignment with a coordinate grid. Dilating a lattice polytope by integer factors links these viewpoints: the count is exactly a polynomial, not merely approximately proportional to volume. Its lower-order terms record boundary information, and evaluating the polynomial at negative integers recovers interior counts through reciprocity. Rational vertices produce a related but distinct periodic phenomenon, which is easy to miss if one fits a polynomial to only a few small observations.
Integral vertices give an exact polynomial
A lattice polytope in real d-space has all vertices in the integer lattice. Assume it is full dimensional. Its Ehrhart function L_P(t) counts lattice points in tP for nonnegative integers t. Ehrhart’s theorem says this count agrees with a degree-d polynomial, whose leading coefficient is ordinary Euclidean volume and whose constant coefficient is one. The value at zero counts the single point in the zero dilation, even if zero was not originally inside P.
The degree reflects dimension, not the number of vertices. For an r-dimensional lattice polytope in a larger ambient space, use relative Euclidean r-volume normalized so that a fundamental cell of the induced lattice has volume one. Some authors call r! times this quantity normalized volume; that convention must be divided by r! for the Ehrhart leading coefficient. The ambient d-volume is zero and is not the relevant leading coefficient. Integer dilation is also essential: the theorem does not claim one polynomial count for all real scale factors. The exact polynomial property can be established through triangulations and generating functions; we will use the theorem and derive elementary examples directly.
Boundary and interior counts are related by reciprocity
For positive integers t, Ehrhart–Macdonald reciprocity says the number of integer points in the interior of tP is (−1)^d times L_P(−t). The negative argument is polynomial evaluation, not the instruction to count a geometrically reflected dilation. In dimension two the sign is positive, and the linear coefficient of the Ehrhart polynomial is half the number of lattice points on the polygon’s boundary. Pick’s theorem gives a direct way to recover this formula from area and boundary data.
In a lattice polygon, the number of boundary lattice segments along an edge is the gcd of its two coordinate differences. Summing these edge gcds counts boundary points without double-counting vertices. Consequently L_P(t) equals area times t squared, plus half the original boundary count times t, plus one. Interior counts reverse the sign of the linear term. These formulas provide sensitive checks: a wrong boundary convention can leave the leading area term correct while corrupting every smaller dilation.
Rational vertices introduce periodic coefficients
If the vertices are rational, a common denominator q makes qP a lattice polytope. The integer-dilate counting function is generally a quasipolynomial: one polynomial applies to each residue class of t modulo a period. A period divides a suitable common vertex denominator, although the minimal period can be smaller. It is therefore incorrect to insist that the denominator always equals the minimal period; period collapse is a genuine arithmetic phenomenon.
The simplest example is the interval from zero to one-half, whose count is floor(t/2) + 1. Even and odd t follow different linear formulas with the same leading slope. Conversely an invertible integer matrix with integer inverse preserves the lattice bijectively and leaves every dilation count unchanged. An arbitrary real shear or scaling preserves convex geometry but may move vertices off the lattice, so affine invariance of face counts does not imply affine invariance of Ehrhart counts.
Work it through
A small triangle with a square counting polynomial
For P = conv{(0, 0), (2, 0), (0, 1)}, find L_P(t) and check both total and interior counts at t = 2.
The triangle has area one. Its edge coordinate differences give gcd contributions two, one, and one, so there are four boundary lattice points in the original polygon.
The planar formula gives L_P(t) = t² + 2t + 1. At t = 2, direct horizontal rows in the triangle x + 2y ≤ 4 contain five, three, and one lattice points, totaling nine.
Reciprocity gives L_P(−2) = 4 − 4 + 1 = 1 interior point. Direct inspection identifies (1, 1), which satisfies x > 0, y > 0, and x + 2y < 4.
The Ehrhart polynomial is (t + 1)². At the second dilation it counts nine total lattice points and one interior lattice point.
The living notebook
Explore the model
Interactive lab · matrix
An integer shear preserves a lattice count
Pause and Reset, then set diagonal scale a = 1 and shear b = 1. Predict final area one and integer vertices. The inverse map (x, y) ↦ (x − y, y) is integer valued on integer points, so the second dilation of this parallelogram contains nine lattice points just like the second dilation of the unit square. Play to inspect the final cell; count correspondence is a hand calculation, not a lattice-enumeration feature of the lab.
- Area scale · det A
- 1.4
- Singular values · σmax, σmin
- 1.597, 0.876
- Condition number · κ₂(A)
- 1.823
The selected matrix is A = [[a,b],[0,1]]. Playback interpolates geometry between the identity and A; readouts always describe A. Its determinant is a and its singular values come from AᵀA. Positive a makes every supported matrix invertible. This two-dimensional family is not a general eigensolver or a learned network. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forA unimodular integer map preserves lattice counts, whereas a general affine deformation need not.
Pause & reason
Check your understanding
Your turn
Try it yourself
Derive the Ehrhart polynomial and the interior-count polynomial for the lattice rectangle [0, 2] × [0, 3]. Check both at t = 1 and interpret the boundary contribution.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Count choices of each integer coordinate separately, then compare the expansion with area and boundary data.
Compare with the solution
The inclusive count is (2t + 1)(3t + 1) = 6t² + 5t + 1. The area is six and the original boundary count is 2(2 + 3) = 10, matching the coefficient B/2 = 5. For positive t, the interior coordinates have 2t − 1 and 3t − 1 choices, giving 6t² − 5t + 1, also L_P(−t). At t = 1 the counts are twelve total and two interior points, namely (1, 1) and (1, 2).
Keep the idea
Take it with you
- Integral vertices give a polynomial for nonnegative integer dilations.
- Reciprocity evaluates that polynomial at negative integers to recover positive-dilation interior counts.
- Rational vertices generally give periodic coefficient formulas, and only lattice-preserving maps guarantee unchanged counts.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.