A lattice point is a point with integer coordinates. Counting how many lie under a curve connects geometry, the floor function, and divisor sums in a single idea.
Draw the curve y=n/x for some positive integer n. How many points with positive integer coordinates lie on or below it?
This is not a geometry problem dressed up as number theory. It is number theory — because the lattice points under y=n/x are exactly the pairs (a,b) with ab≤n, which counts divisors.
What is a lattice point?
A lattice point is a point (x,y) where both x and y are integers.
The integer lattice is the grid Z2 — all points with integer coordinates. Counting lattice points in a region is a fundamental technique in number theory.
Lattice points in a rectangle
The number of lattice points (x,y) with 1≤x≤a and 1≤y≤b (positive integers) is simply a×b.
For non-integer bounds: lattice points with 1≤x≤X and 1≤y≤Y number ⌊X⌋×⌊Y⌋.
Lattice points under y=c/x
Fix a positive integer n. Count lattice points (x,y) with x,y≥1 and xy≤n.
Approach 1 — Sum by column. For each fixed x=1,2,…,n, the number of valid y is ⌊n/x⌋ (since y≤n/x).
Total:
D(n)=∑x=1n⌊xn⌋
What is this sum? For each pair (x,y) with xy≤n, we are counting 1. Equivalently, for each integer k≤n, we count the number of ways to write k=xy with x,y≥1 — which is the number of divisors d(k).
Therefore:
D(n)=∑x=1n⌊xn⌋=∑k=1nτ(k)
where τ(k) is the number of divisors of k.
This connection — lattice points under a hyperbola equal the sum of divisor counts — is the starting point of Dirichlet's Divisor Problem.
Symmetry across the diagonal
The hyperbola xy=n is symmetric about the line y=x.
For lattice points (x,y) with xy≤n:
Points with x<y pair with points with x>y (swap coordinates)
Points with x=y satisfy x2≤n, so x≤⌊n⌋
This symmetry gives a smarter way to count.
Approach 2 — Use symmetry. Let m=⌊n⌋.
Points with x≤m and y≤m (the "square" region): m2.
Points with x≤m and y>m — for each x≤m, y ranges from m+1 to ⌊n/x⌋. Count: ∑x=1m(⌊n/x⌋−m).
By symmetry, points with x>m and y≤m give the same count.
Therefore:
D(n)=2∑x=1m⌊xn⌋−m2
where m=⌊n⌋.
This formula is much faster to compute than summing all n terms.
Lattice points under y=cx (linear case)
Count lattice points (x,y) with x≥1, y≥1, y≤cx for rational c=p/q.
For each x: y ranges from 1 to ⌊px/q⌋. Total: ∑x=1n⌊px/q⌋.
This sum — called a Dedekind sum in its general form — appears in problems about counting integers with bounded ratios.
Lattice points in a triangle
Points (x,y) with x≥1, y≥1, x+y≤n:
For each x=1,…,n−1: y ranges from 1 to n−x−1, giving n−x−1 points (if positive).
Total: ∑x=1n−1(n−x−1)=2(n−1)(n−2).
This is (2n−1) — the triangular number pattern.
Worked problems
Problem 1. Compute k=1∑10τ(k) by counting lattice points.
D(10)=∑x=110⌊10/x⌋=10+5+3+2+2+1+1+1+1+1=27.
Check: τ(1)+⋯+τ(10)=1+2+2+3+2+4+2+4+3+4=27. ✓
Problem 2. Use the symmetry formula to compute D(10).
m=⌊10⌋=3.
∑x=13⌊10/x⌋=10+5+3=18.
D(10)=2×18−9=27. ✓
Problem 3. How many pairs (a,b) of positive integers satisfy ab≤20 and a≤b?
These are lattice points with xy≤20 and x≤y — the points on or below the diagonal.
m=⌊20⌋=4. Using symmetry: D(20)=2∑x=14⌊20/x⌋−16=2(20+10+6+5)−16=82−16=66.
Points with a≤b: 2D(20)+⌊20⌋=266+4=35.
(Add the diagonal points — those with a=b, i.e., a2≤20, giving a∈{1,2,3,4} — then halve.)
Problem 4. Prove: d∣n∑1=τ(n) by a lattice point argument.
The sum ∑d∣n1 counts divisors of n. Each divisor d corresponds to the lattice point (d,n/d) on the hyperbola xy=n. So τ(n) is the number of lattice points on xy=n with x,y≥1. ■
The deeper question: not just how many lattice points, but approximately how many — and how good the approximation is. That requires understanding the hyperbola's area, which is in Hyperbola Area Intuition.