Solution

Lines Through a Grid

Show the problem again

Consider the 16 points $(x, y)$ with $x, y \in \{0, 1, 2, 3\}$. How many distinct lines in the plane pass through at least two of these points? Give an integer.

Worked solution

The answer is 62. There are $\binom{16}{2} = 120$ pairs of points; a line through exactly $m$ points accounts for $\binom{m}{2}$ pairs. Lines through 4 points: 4 rows, 4 columns and the 2 main diagonals, 10 lines covering $10 \times 6 = 60$ pairs. Lines through exactly 3 points: the 4 diagonals of length 3 (slopes ±1, adjacent to the main diagonals), covering $4 \times 3 = 12$ pairs. No other slope reaches 3 points: slope ±2 or ±1/2 needs a span of 4 in one coordinate. The remaining $120 - 60 - 12 = 48$ pairs each lie on their own 2-point line. Total: $10 + 4 + 48 = 62$.

Source: Classic exercise in wide circulation; no traceable original source. Statement written for AxiomIQ.