First things first, what is a lattice point?
It's just a point on a grid of points. Think of a sheet of graph paper.
An ant walks directly from (0, 0) to (24, 18). How many lattice points does it walk through while traveling?
The ant walks to a point that's 24 over and 18 up, except he goes in a straight line.
Think of the ant's route as the hypotenuse of a right triangle with legs 24 and 18.
In a right triangle, the hypotenuse is the square root of the sum of the squares of the legs.
This is usually represented as c2 = a2 + b2 In this case, c2 = 242 + 182 = 900
c = sqrt(900) = 30
.