Given a grid of $4\times4$ points, how many triangles with their vertices on the grid can be drawn?

In how many ways may $3$ points be selected?

When do $3$ vertices not form a triangle?

Carefully consider which combinations of don’t form triangles.

Triangles are formed by choosing any $3$ points that are not colinear. From a total of $\binom{16}{3}$ possible selected points, we exclude the combinations that form any straight lines:

• 10 lines pass through 4 points (4 horizontal, 4 vertical, 2 diagonals), hence $10 \binom{4}{3}.$
• 4 smaller diagonals passing through 3 points, hence $4\cdot1.$

In total we have $\binom{16}{3}-10\binom{4}{3}-4 = 516.$