Solution

Tilted Squares

Show the problem again

Consider the 25 points $(x, y)$ with $x, y \in \{0, 1, 2, 3, 4\}$. How many squares (of any size and orientation) have all four vertices among these points? Give an integer.

Worked solution

The answer is 50. Every lattice square sits inside a smallest axis-parallel bounding square of some side $k$, and a bounding square of side $k$ contains exactly $k$ inscribed squares: for $j = 0, 1, \dots, k-1$, the square with vertices at distance $j$ along each side from the corners (the case $j = 0$ is the bounding square itself). A $k \times k$ bounding square can be placed in $(5 - k)^2$ positions. The total is $\sum_{k=1}^{4} k(5-k)^2 = 1 \cdot 16 + 2 \cdot 9 + 3 \cdot 4 + 4 \cdot 1 = 50$. Only 30 of these are axis-parallel.

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