On this page
Draw a polygon whose corners sit on whole-number points of the plane. Stretch it by 2, by 3, by 100, and ask how many lattice points (points with integer coordinates) land inside or on it each time. The count is always a polynomial in the stretch factor, and its coefficients tell you the shape's area and its boundary.
What is an Ehrhart polynomial?
For a polytope P with lattice-point corners, L(P, t) is the number of lattice points in tP, the copy of P scaled by t (Wikipedia: Ehrhart polynomial). Eugène Ehrhart showed in 1962 that L(P, t) is a polynomial in t of degree d, where d is the dimension of P (same source). In the plane, d = 2, so every lattice polygon has a quadratic counting polynomial.
A book-length treatment is Matthias Beck and Sinai Robins, Computing the Continuous Discretely: Integer-Point Enumeration in Polyhedra (Springer, second edition 2015).
Why is the unit square's polynomial (t + 1)²?
Take the square with corners (0,0), (1,0), (1,1), (0,1). Scaled by t, it becomes the square from 0 to t in each direction. Each coordinate can be any of the t + 1 whole numbers 0, 1, ..., t, so there are (t + 1)² lattice points.
The same argument in d dimensions gives (t + 1)^d for the unit cube (Wikipedia: Ehrhart polynomial). Expanded, the square's version is t² + 2t + 1.
How do you work out the Ehrhart polynomial of a triangle?
Take the triangle with vertices (0,0), (2,0) and (0,1). Its long edge lies on x + 2y = 2, so tT is the set of points with x ≥ 0, y ≥ 0 and x + 2y ≤ 2t. Count row by row:
t = 1: row y = 0 has x = 0, 1, 2 (3 points); row y = 1 has x = 0 (1 point). Total 4.
t = 2: rows y = 0, 1, 2 have 5, 3 and 1 points. Total 9.
t = 3: rows y = 0, 1, 2, 3 have 7, 5, 3 and 1 points. Total 16.
In general the rows hold the odd numbers 1, 3, 5, ..., 2t + 1, and the sum of the first t + 1 odd numbers is (t + 1)². So L(T, t) = (t + 1)², and the three counts above check it.
How do the coefficients give area and boundary points?
For a lattice polytope, the leading coefficient of L(P, t) is the volume of P, and the constant term is 1 for a closed convex polytope (Wikipedia: Ehrhart polynomial). The second coefficient adds up the faces one dimension down, each counted with half weight; for a polygon each edge contributes half the number of lattice steps along it (same source). Summed over all edges, the steps equal b, the number of lattice points on the boundary. So for any lattice polygon:
L(t) = At² + (b/2)t + 1.
For our triangle, A = 1 and the boundary points are (0,0), (1,0), (2,0) and (0,1), so b = 4 and L(t) = t² + 2t + 1, as counted.
Now set t = 1. The left side counts every point once: i interior points plus b boundary points. So i + b = A + b/2 + 1, which rearranges to A = i + b/2 − 1. That is Pick's theorem, first described by Georg Alexander Pick in 1899 (Wikipedia: Pick's theorem). Ehrhart theory can be seen as a higher-dimensional generalisation of it (Wikipedia: Ehrhart polynomial).
What does Ehrhart reciprocity say about interior points?
Ehrhart–Macdonald reciprocity says the number of lattice points strictly inside tP is (−1)^d L(P, −t) (Wikipedia: Ehrhart polynomial).
For the triangle, d = 2 and L(T, −t) = (1 − t)² = (t − 1)². Check t = 3: the interior points of 3T are (1,1), (2,1), (3,1) and (1,2), which is 4 = (3 − 1)². At t = 1 the formula gives 0, and indeed the small triangle has no interior lattice points. The other 12 of the 16 points lie on the boundary: 3 times b.
How do you find the Ehrhart polynomial of any lattice polygon?
Find the area A with the shoelace formula.
For each edge from (x1, y1) to (x2, y2), the number of lattice steps is gcd(|x2 − x1|, |y2 − y1|); add them to get b.
Write L(t) = At² + (b/2)t + 1.
Check t = 1 against a hand count.
Get interior points of tP from L(−t), and confirm Pick's theorem at t = 1.
Row-by-row counting also drives the Gauss circle problem on lattice points in a circle, and the constant term 1 links to the Euler characteristic of surfaces. If the gcd step or the shoelace formula is shaky, the Fermi Concept Library covers every concept in mathematics, so you can fill that gap before trying a pentagon or a tetrahedron yourself.



