A slanted segment can contain integer-coordinate points even when most points on it have fractional coordinates. This original AMC 10 to AIME method exercise counts points along a line segment, rather than points inside a region. It uses divisibility to determine the smallest allowed step and makes the endpoint convention explicit.
Need help choosing a next step? Scan the contact QR code below or contact Hanlin on WeChat. Send AMC10-LATTICE-1126 and tell us your school year and question.
Subtract endpoint coordinates before taking a gcd
Let the endpoints be P=(-2,1) and Q=(10,9). Their coordinate differences are twelve and eight, whose greatest common divisor is four. Do not take a gcd of the raw endpoint coordinates: translating a picture changes those numbers but does not change the spacing of the lattice points along its segment.
Find the primitive direction vector
Dividing the differences by four gives the step (3,2). Its components are coprime, so it cannot be divided by another integer to produce a smaller integer direction vector. Starting at P, four such steps reach Q. The gcd counts the number of equal primitive intervals, not yet the number of points that mark them.
List the points to check the endpoint count
The points are (-2,1), (1,3), (4,5), (7,7) and (10,9). There are five points because four consecutive intervals have five boundaries. The open segment excludes both endpoints and therefore contains three lattice points. Including exactly one endpoint instead gives four. Each number answers a different wording, so the convention belongs in the final sentence.
Explain why no extra fractional step works
A point on the line can be written P+t(12,8). For both coordinates to be integers, 12t and 8t must be integers. Since their integer linear combination 12t-8t equals 4t, this forces 4t to be an integer. Within the closed segment, t is therefore one of 0,1/4,1/2,3/4,1, giving exactly the listed points.
Handle horizontal and vertical segments consistently
For distinct integer endpoints, the closed-segment count is gcd(abs(delta x),abs(delta y))+1. A horizontal segment has a zero vertical difference, and gcd(d,0)=d reproduces the familiar integer positions. Coincident endpoints should be treated separately as a single point, rather than using a direction argument that assumes a nonzero segment.
Keep this tool separate from area counting
The result counts lattice points on one boundary segment. It does not by itself count every lattice point inside a polygon. On a closed polygon, adding closed-edge counts would also count each shared vertex twice. MAA information is linked for competition context; the coordinates, derivation and example here are original practice material rather than an official problem or qualification claim.
Continue reading: AMC 10 to AIME Geometry: Count Interior Grid Points Without Including the Boundary.
Contact Hanlin
Planning a first attempt or reviewing a topic you find difficult? Scan the QR code and send AMC10-LATTICE-1126. Include your school year, country or competition region, experience and the question you want to discuss.

On your phone, use the button or save the QR image and scan it within WeChat.
Official information and further reading: Source 1
