Calculating lattice points with integer coordinates

892 Views Asked by At

Given Point $A(-6,-5)$ and Point $B(24,19)$. Calculate the lattice points (include starting and ending points) in the line segment $AB$. How many lattice points between them ?

I know the formula from this link How to calculate the number of lattice points in the interior and on the boundary of these figures with vertices as lattice points?

But don't know how to calculate since

$24 - (-6)$ Divide $19 - (-5) = 30$ divide $24$ which couldn't get integer number

Any way to calculate such question?

1

There are 1 best solutions below

0
On

The slope of the line is $\frac {19-(-5)}{24-(-6)}=\frac {24}{30}$ If $\frac {24}{30}$ were in lowest terms there would not be any lattice points on the line segment between the ends. Because you can divide out a common factor of $6$ you can divide the line segment into $6$ parts. Each part rises $4$ and moves right $5$. As there are six segments there are five points between them.