Lattice Points: Definition, Formula & Example

Lattice points are points in a coordinate system whose coordinates are integers. In a two-dimensional Cartesian plane, a point (x, y) is a lattice point when both x and y are integers.
Examples include:
(0, 0)
(3, 5)
(-2, 7)
(8, -4)
But:
(1.5, 3)
(√2, 4)
(2, 7/3)
are not lattice points because at least one coordinate is not an integer.
Lattice points connect coordinate geometry with arithmetic and number theory because their structure depends on integers, divisibility, greatest common divisors, and discrete counting.
What Is a Lattice Point?
In two dimensions, a lattice point has the form:
P = (x, y)
where:
x ∈ integers
and:
y ∈ integers
The entire integer grid:
Z²
can therefore be viewed as the collection of all two-dimensional lattice points.
For example:
(-3, 6)
is a lattice point because both coordinates are integers.
The point:
(-3, 6.2)
is not.
The fact that -3 is negative does not matter. Negative integers are still integers.
Lattice Points on the Cartesian Plane
On a standard coordinate plane, vertical and horizontal grid lines often mark integer values.
Their intersections create lattice points.
For example:
x = 2
and:
y = -3
intersect at:
(2, -3)
This is a lattice point.
Similarly:
x = -5
and:
y = 4
produce:
(-5, 4)
There are infinitely many such integer-coordinate intersections in every direction.
The Origin Is a Lattice Point
The origin is:
(0, 0)
Since zero is an integer:
(0,0) is a lattice point
This remains true even though both coordinates are zero.
The integer classification and sign rules behind coordinate calculations are covered by integer operations.
Lattice Points in Higher Dimensions
The idea extends beyond the plane.
A three-dimensional lattice point has:
(x, y, z)
with all three coordinates integers.
Examples:
(1, 4, -2)
(0, 0, 0)
(-3, 7, 5)
A point such as:
(2, 1/2, 8)
is not a three-dimensional lattice point because one coordinate is non-integer.
More generally, an n-dimensional lattice point belongs to:
Z^n
when every coordinate is an integer.
How to Identify a Lattice Point
To determine whether a point is a lattice point, inspect every coordinate.
Consider:
P = (7, -11)
Both coordinates are integers.
Therefore:
P is a lattice point
Now consider:
Q = (7, -11.5)
The second coordinate is not an integer.
Therefore:
Q is not a lattice point
Every coordinate must pass the integer test.
Example With a Rational Coordinate
Consider:
P = (4, 8/2)
Since:
8/2 = 4
the point simplifies to:
(4,4)
Therefore:
P is a lattice point
The coordinate need not initially be written as an integer. What matters is its exact value.
Example With an Improper Fraction
Consider:
P = (12/4, 15/5)
Each coordinate is written as an improper fraction or ordinary fraction, but both simplify to integers:
12/4 = 3
15/5 = 3
Therefore:
P = (3,3)
and:
P is a lattice point
Now consider:
Q = (7/2, 8/4)
Then:
7/2 = 3.5
8/4 = 2
Since the first coordinate is not an integer:
Q is not a lattice point
Irrational Coordinates Are Not Lattice Coordinates
A point containing an irrational number as a coordinate cannot be a standard integer lattice point.
For example:
(√2, 3)
is not a lattice point.
Likewise:
(π, 0)
is not.
The second coordinate may be an integer, but every coordinate must be integral.
Distance Between Lattice Points
Suppose two lattice points are:
A = (x₁, y₁)
B = (x₂, y₂)
Their Euclidean distance is:
d = √[(x₂ – x₁)² + (y₂ – y₁)²]
Even though both endpoints have integer coordinates, the distance does not need to be an integer.
Example
Let:
A = (1,2)
B = (4,6)
Coordinate differences:
Δx = 4 – 1 = 3
Δy = 6 – 2 = 4
Then:
d = √(3² + 4²)
= √(9 + 16)
= √25
= 5
So these two lattice points are exactly:
5 units apart
Lattice Point Distance Can Be Irrational
Consider:
A = (0,0)
B = (1,1)
Then:
d = √[(1-0)² + (1-0)²]
= √2
Since √2 is irrational:
the distance between two lattice points can be irrational
This is an important distinction: the coordinates must be integers, but derived measurements do not have to be.
Midpoint of Two Lattice Points
For:
A = (x₁,y₁)
and:
B = (x₂,y₂)
the midpoint is:
M = ((x₁+x₂)/2, (y₁+y₂)/2)
The midpoint is a lattice point only when both coordinate sums are even.
Example
Let:
A = (2,4)
B = (8,10)
Then:
M = ((2+8)/2, (4+10)/2)
= (10/2, 14/2)
= (5,7)
Therefore:
the midpoint is a lattice point
Midpoint That Is Not a Lattice Point
Let:
A = (1,2)
B = (4,8)
Then:
M = ((1+4)/2, (2+8)/2)
= (5/2, 10/2)
= (2.5,5)
Since:
2.5
is not an integer:
the midpoint is not a lattice point
Both endpoints can therefore be lattice points while their midpoint is not.
Lattice Points on a Horizontal Segment
Suppose a horizontal segment runs from:
(2,5)
to:
(8,5)
The integer x-values from 2 through 8 are:
2, 3, 4, 5, 6, 7, 8
Therefore the lattice points are:
(2,5)
(3,5)
(4,5)
(5,5)
(6,5)
(7,5)
(8,5)
There are:
7 lattice points
including both endpoints.
Lattice Points on a Vertical Segment
Consider:
(4,-2)
to:
(4,3)
The integer y-values are:
-2, -1, 0, 1, 2, 3
Therefore there are:
6 lattice points
on the segment, including endpoints.
Signed coordinate counting relies on ordinary integer intervals rather than decimal distance alone.
Number of Lattice Points on a Line Segment
Suppose two lattice points are:
A = (x₁,y₁)
B = (x₂,y₂)
Define:
Δx = |x₂ – x₁|
Δy = |y₂ – y₁|
Then the number of lattice points on the segment including both endpoints is:
L = GCD(Δx, Δy) + 1
This is one of the most useful formulas involving lattice points.
Why the GCD Appears
Suppose:
g = GCD(Δx,Δy)
Then the segment’s displacement can be divided into g equal integer-coordinate steps.
Each step is:
(Δx/g, Δy/g)
up to direction signs.
Because both step components are integers, each step lands on another lattice point.
Starting with one endpoint and taking g steps produces:
g + 1
lattice points including both endpoints.
Example: Lattice Points From (0,0) to (6,4)
Calculate:
Δx = 6
Δy = 4
Find:
GCD(6,4) = 2
Therefore:
L = 2 + 1
= 3
The points are:
(0,0)
(3,2)
(6,4)
So:
3 lattice points lie on the segment
including the endpoints.
Example: From (1,2) to (13,10)
Differences:
Δx = |13 – 1| = 12
Δy = |10 – 2| = 8
Find:
GCD(12,8) = 4
Therefore:
L = 4 + 1
= 5
The step vector is:
(12/4, 8/4)
= (3,2)
Starting from (1,2):
(1,2)
(4,4)
(7,6)
(10,8)
(13,10)
Therefore:
5 lattice points
lie on the segment.
Interior Lattice Points on a Segment
If only the lattice points strictly between the two endpoints are required:
Interior lattice points = GCD(Δx,Δy) – 1
Why?
The full count is:
GCD(Δx,Δy) + 1
Subtract the two endpoints:
GCD(Δx,Δy) + 1 – 2
which gives:
GCD(Δx,Δy) – 1
Example: Interior Lattice Points
For:
A = (0,0)
B = (12,8)
we have:
GCD(12,8) = 4
Total lattice points:
4 + 1 = 5
Interior points:
4 – 1 = 3
They are:
(3,2)
(6,4)
(9,6)
Therefore:
3 interior lattice points
lie strictly between the endpoints.
Segment With No Interior Lattice Points
Consider:
A = (0,0)
B = (5,2)
Then:
GCD(5,2) = 1
Total lattice points:
1 + 1 = 2
Interior lattice points:
1 – 1 = 0
Therefore only the two endpoints are lattice points.
A lattice segment whose coordinate differences are coprime contains no additional lattice point between its endpoints.
Primitive Lattice Segments
A line segment between two lattice points is sometimes called primitive when no other lattice point lies strictly between the endpoints.
This occurs exactly when:
GCD(|Δx|,|Δy|) = 1
For example, between:
(2,3)
and:
(7,5)
the differences are:
5 and 2
Since:
GCD(5,2) = 1
the segment is primitive.
Lattice Points in a Rectangle
Consider a rectangle with integer-coordinate corners:
(0,0)
(m,0)
(m,n)
(0,n)
where m and n are nonnegative integers.
If both boundary and interior lattice points are counted, the coordinate possibilities are:
x = 0,1,2,…,m
giving:
m + 1 choices
and:
y = 0,1,2,…,n
giving:
n + 1 choices
Therefore:
Total lattice points = (m + 1)(n + 1)
Rectangle Example
Consider corners:
(0,0)
(4,0)
(4,3)
(0,3)
The x-values are:
0,1,2,3,4
giving 5 choices.
The y-values are:
0,1,2,3
giving 4 choices.
Therefore:
Total lattice points = 5 × 4
= 20
So:
20 lattice points
lie on or inside the rectangle.
Interior Lattice Points of an Axis-Aligned Rectangle
For a rectangle from:
(0,0)
to:
(m,n)
the strictly interior x-values are:
1 through m-1
giving:
m – 1
choices.
The strictly interior y-values give:
n – 1
choices.
Therefore:
Interior lattice points = (m – 1)(n – 1)
when:
m,n ≥ 1
For a 4-by-3 rectangle:
Interior points = 3 × 2 = 6
Boundary Lattice Points of a Rectangle
For an m × n axis-aligned rectangle:
Boundary lattice points = 2m + 2n
For:
m = 4
n = 3
we get:
B = 2(4) + 2(3)
= 8 + 6
= 14
Check:
Interior + Boundary = 6 + 14 = 20
which matches the total lattice-point count.
Lattice Points in a Square
For an axis-aligned square with side length n and lattice-point vertices:
Total lattice points = (n + 1)²
For example, a square from:
(0,0)
to:
(5,5)
contains:
(5 + 1)²
= 36
lattice points on or inside it.
Strictly interior:
(5 – 1)²
= 16
Lattice Points and Pick’s Theorem
For a simple polygon whose vertices are lattice points, area can be related to interior and boundary lattice points by:
A = I + B/2 – 1
where:
A = area
I = number of interior lattice points
B = number of boundary lattice points
This relationship is known as Pick’s theorem.
Example
Suppose a lattice polygon has:
I = 6
and:
B = 8
Then:
A = 6 + 8/2 – 1
= 6 + 4 – 1
= 9
Therefore:
Area = 9 square units
Pick’s Theorem Rearrangements
From:
A = I + B/2 – 1
you can solve for interior points:
I = A – B/2 + 1
or boundary points:
B = 2(A – I + 1)
These forms are useful when two of the three quantities are known.
Example: Find Interior Lattice Points
Suppose:
A = 18
and:
B = 10
Then:
I = 18 – 10/2 + 1
= 18 – 5 + 1
= 14
Therefore:
I = 14
Lattice Points and Slopes
For two lattice points:
A = (x₁,y₁)
B = (x₂,y₂)
with:
x₂ ≠ x₁
the slope is:
m = (y₂-y₁)/(x₂-x₁)
Because both coordinate differences are integers, the slope is always rational.
For example:
A = (1,2)
B = (7,5)
Then:
m = (5-2)/(7-1)
= 3/6
= 1/2
So any nonvertical line through two distinct lattice points has a rational slope.
Irrational Slope and Multiple Lattice Points
A line with irrational slope cannot pass through two distinct lattice points.
Suppose two lattice points did lie on such a line.
Their slope would be:
integer / nonzero integer
which is rational.
That contradicts the assumption that the slope is irrational.
Therefore a line of irrational slope can contain at most one lattice point.
This illustrates a direct connection between lattice geometry and irrational numbers.
Rational Slope Does Not Guarantee Many Lattice Points on a Chosen Segment
A rational slope makes it possible for a line to pass through multiple lattice points, but a particular short segment may still contain only its endpoints.
For example:
(0,0)
to:
(2,1)
has slope:
1/2
but:
GCD(2,1) = 1
so no interior lattice point exists between those endpoints.
Extending the same line reaches:
(4,2)
(6,3)
and additional lattice points.
Lattice Point Counting and GCF
The segment formula:
L = GCF(|Δx|,|Δy|) + 1
shows why integer-factor methods are valuable in lattice geometry.
Suppose:
Δx = 84
Δy = 126
Their greatest common factor is:
42
Therefore:
L = 42 + 1
= 43
So the segment contains:
43 lattice points including its endpoints
No coordinate-by-coordinate search is necessary.
Lattice Points and LCM
The LCM addresses the smallest shared multiple of integers, while lattice-segment counting primarily depends on a GCD.
However, LCM can arise in periodic lattice constructions.
Suppose one coordinate pattern repeats every:
4 units
and another repeats every:
6 units
Both patterns realign after:
LCM(4,6) = 12
units.
Thus LCM can describe synchronization or repeated grid structure, while GCD controls how finely an integer displacement can be divided.
Least Common Multiple in Grid Patterns
The detailed least common multiple concept is especially useful when separate periodic coordinate conditions must occur simultaneously.
For example, suppose vertical markers appear every 6 grid units and another event occurs every 8 units.
Their first positive common alignment is:
LCM(6,8) = 24
This is different from counting lattice points along a single segment, where the greatest common divisor is normally the relevant quantity.
Improper Fractions in Coordinate Calculations
A coordinate formula can initially produce an improper fraction.
For example, a midpoint coordinate might be:
14/4
Simplify:
14/4 = 7/2 = 3.5
Since 3.5 is not an integer, that coordinate prevents the midpoint from being a lattice point.
By contrast:
18/6 = 3
is an integer despite being initially written as an improper fraction.
The simplified value determines lattice membership.
Lattice Points and Real Numbers
Every lattice-point coordinate is a real number because every integer is real.
But not every real number is an integer.
Therefore:
Lattice coordinates ⊂ real-number coordinates
The points:
(2,3)
and:
(-5,0)
belong to the lattice.
The point:
(π,√2)
belongs to the real plane but not to the integer lattice.
Lattice Points and Prime Numbers
Prime-number coordinates are allowed because primes are integers.
For example:
(5,7)
is a lattice point.
So is:
(-11,13)
The prime or composite classification of the coordinates does not affect lattice membership.
Only integrality matters.
Lattice Points and Factors
Suppose a displacement is:
(12,18)
The number of equal integer-coordinate steps possible depends on common factors of 12 and 18.
Common factors include:
1, 2, 3, 6
The greatest is 6.
So the smallest primitive step in the same direction is:
(12/6, 18/6)
= (2,3)
This produces six equal steps between the endpoints.
Lattice Points and Fraction Simplification
The slope between lattice points often benefits from fraction simplification.
Suppose:
Δy = 18
Δx = 12
Then:
m = 18/12
Simplify:
18/12 = 3/2
The reduced slope indicates that moving:
2 units horizontally
and:
3 units vertically
reaches the next lattice point along the same line.
This is closely related to dividing both coordinate differences by their GCD.
Common Lattice Point Mistake: Requiring Positive Coordinates
A lattice point may contain negative coordinates.
For example:
(-5,-8)
is a valid lattice point.
The definition requires integers, not positive integers.
Common Mistake: Assuming Decimal Notation Means Non-Lattice
A value such as:
3.0
is exactly the integer:
3
So:
(3.0, 5)
represents the same mathematical point as:
(3,5)
and is a lattice point.
But:
3.01
is not an integer.
The value, rather than merely its written notation, determines membership.
Common Mistake: Counting Only Interior Points
When using:
GCD(|Δx|,|Δy|) + 1
the formula includes both endpoints.
If the problem asks only for points strictly between the endpoints, use:
GCD(|Δx|,|Δy|) – 1
Confusing these formulas creates a difference of two points.
Common Mistake: Using LCM Instead of GCD on a Segment
To count evenly spaced lattice points along the segment joining two lattice endpoints, use:
GCD(|Δx|,|Δy|)
not LCM.
The GCD determines the greatest number of equal integer-coordinate subdivisions of the displacement.
How to Check a Lattice Segment Count
Suppose a segment goes from:
(2,1)
to:
(14,9)
Differences:
Δx = 12
Δy = 8
Then:
GCD(12,8) = 4
So:
Total lattice points = 5
The primitive step is:
(12/4,8/4)
= (3,2)
Starting at (2,1):
(2,1)
(5,3)
(8,5)
(11,7)
(14,9)
Exactly five lattice points appear.
The enumeration confirms the formula.
Frequently Asked Questions
What is a lattice point?
A lattice point is a point whose coordinates are all integers.
In two dimensions:
(x,y)
is a lattice point when both x and y are integers.
Is (0,0) a lattice point?
Yes. Zero is an integer.
Is (-3,5) a lattice point?
Yes. Negative integers are valid lattice coordinates.
Is (2.5,4) a lattice point?
No. The first coordinate is not an integer.
Is (√2,3) a lattice point?
No. √2 is irrational rather than an integer.
How many lattice points lie on a line segment between two lattice points?
If the endpoint differences are Δx and Δy:
L = GCD(|Δx|,|Δy|) + 1
including both endpoints.
How many interior lattice points lie on the segment?
Interior = GCD(|Δx|,|Δy|) – 1
Can the distance between two lattice points be irrational?
Yes.
For example, the distance from (0,0) to (1,1) is:
√2
Is the midpoint of two lattice points always a lattice point?
No. Both coordinate sums must be even for the midpoint coordinates to remain integers.
What is a primitive lattice segment?
It is a segment connecting lattice points with no additional lattice points strictly between them. This occurs when:
GCD(|Δx|,|Δy|) = 1
What is Pick’s theorem?
For a simple lattice polygon:
A = I + B/2 – 1
where I is the number of interior lattice points and B is the number on the boundary.
Final Example
Find all lattice points on the line segment from:
A = (-2,1)
to:
B = (10,9)
Calculate the coordinate differences:
Δx = |10 – (-2)|
= 12
Δy = |9 – 1|
= 8
Find:
GCD(12,8) = 4
Therefore:
Total lattice points = 4 + 1
= 5
The step vector is:
((10 – (-2))/4, (9 – 1)/4)
= (12/4, 8/4)
= (3,2)
Start from A and repeatedly add (3,2):
(-2,1)
(1,3)
(4,5)
(7,7)
(10,9)
Therefore:
The segment contains 5 lattice points
including:
3 interior lattice points
The central idea is simple: lattice points have integer coordinates, while the GCD of the coordinate differences reveals how many evenly spaced integer-coordinate points lie along a segment between them.



