A lattice point is a point $(x, y)$, with $x$ and $y$ both integers. For example, $(2,3)$ is a lattice point but $\left(4, \frac{1}{3}\right)$ is not. In the diagram, how many lattice points lie on the perimeter of the triangle?
(A) 16
(B) 18
(C) 20
(D) 23
(E) 30

![](https://cdn.mathpix.com/cropped/2024_04_20_6027bc27089ed4fc493cg-069.jpg?height=334&width=395&top_left_y=1660&top_left_x=1296)
To get from $(2,1)$ to $(12,21)$, we go 10 units to the right and 20 units up, so we go 2 units up every time we go 1 unit to the right. This means that every time we move 1 unit to the right, we arrive at a lattice point. So the lattice points on this segment are

$$
(2,1),(3,3),(4,5),(5,7),(6,9),(7,11),(8,13),(9,15),(10,17),(11,19),(12,21)
$$

(There cannot be more lattice points in between as we have covered all of the possible $x$ coordinates.)

To get from $(2,1)$ to $(17,6)$, we go 15 units to the right and 5 units up, so we go 3 units to the right every time we go 1 unit up. This means that every time we move 1 unit up, we arrive at a lattice point. So the lattice points on this segment are

$$
(2,1),(5,2),(8,3),(11,4),(14,5),(17,6)
$$

To get from $(12,21)$ to $(17,6)$, we go 5 units to the right and 15 units down, so we go 3 units down every time we go 1 unit to the right. This means that every time we move 1 unit to the right, we arrive at a lattice point. So the lattice points on this segment are

$$
(12,21),(13,18),(14,15),(15,12),(16,9),(17,12)
$$

In total, there are $11+6+6=23$ points on our three lists. But 3 points (the 3 vertices of the triangle) have each been counted twice, so there are in fact $23-3=20$ different points on our lists.

Thus, there are 20 lattice points on the perimeter of the triangle.

Answer: (C)