# We have A(0,0) B(21,0), C(0,21).How to find number of points that have both coordinates integer numbers inside triangle ABC?

Jul 13, 2018

$\left(x , y\right)$ with $0 \le x \le 21$ and $0 \le y \le 21 - x$, with $x , y \setminus \in \setminus m a t h \boldsymbol{N}$

#### Explanation:

The triangle is delimited by the two axes and the line $y = - x + 21$.

So, both $x$ and $y$ range from $0$ to $21$, and every point in the triangle lies between the line and the $x$ axis.

So, if $x = 0$, we have $y = - \left(0\right) + 21$, and so every point like

$\left(0 , 0\right) , \left(0 , 1\right) , \ldots , \left(0 , 21\right)$

belong to the triangle.

if $x = 1$, we have $y = - 1 + 21 = 20$, and so every point like

$\left(1 , 0\right) , \left(1 , 1\right) , \ldots , \left(1 , 20\right)$

So, the following points are inside the triangle:

$\left(x , y\right)$ with $0 \le x \le 21$ and $0 \le y \le 21 - x$, with $x , y \setminus \in \setminus m a t h \boldsymbol{N}$