The key idea. Take any square whose corners are grid dots. Going from one corner to the next means moving p steps across and q steps up, for some whole numbers p and q. That step is the hypotenuse of a right triangle with legs p and q, so by the theorem
side² = p² + q², and therefore area = p² + q².
So a grid square can have area A exactly when A can be written as the sum of two squares of whole numbers.
(i) Testing the four values.
(a) Area 2 — take p = 1, q = 1: 1 + 1 = 2 ✓. Draw the tilted square with corners (1, 0), (2, 1), (1, 2), (0, 1). Possible.
(b) Area 3 — we need p² + q² = 3. The only squares not exceeding 3 are 0 and 1, and 0 + 0, 0 + 1, 1 + 1 give 0, 1, 2 — never 3. Impossible.
(c) Area 4 — take p = 2, q = 0: 4 + 0 = 4 ✓. This is the ordinary 2 × 2 square sitting square-on to the grid. Possible.
(d) Area 5 — take p = 1, q = 2: 1 + 4 = 5 ✓. Draw the tilted square with corners (0, 0), (2, 1), (1, 3), (−1, 2). Possible.
So three of the four can be drawn, and area 3 cannot — a square of area 3 would need side √3, and √3 is not the hypotenuse of any right triangle with whole-number legs.
(ii) Which areas are possible on an unlimited grid?
Exactly the numbers of the form p² + q². Working through small values of p and q:
1, 2, 4, 5, 8, 9, 10, 13, 16, 17, 18, 20, 25, 26, 29, …
and the whole numbers up to 30 that are not achievable are
3, 6, 7, 11, 12, 14, 15, 19, 21, 22, 23, 24, 27, 28, 30.
Notice that every perfect square is there (take q = 0) and every double of a perfect square is there (take p = q), but plenty of numbers in between are missing.
A remark for the curious. There is a complete rule, found by Fermat — the same mathematician who appears in §2.6. A whole number is a sum of two squares exactly when every prime factor of the form 4k + 3 (that is, 3, 7, 11, 19, 23, …) appears an even number of times. That is why 3, 7, 21 and 6 fail while 9 = 3 × 3 and 18 = 2 × 9 succeed. The rule is well beyond Class 8, but the grid experiment is what it grew out of.
✦ (i) Areas 2, 4 and 5 can be drawn; area 3 cannot. (ii) Exactly those whole numbers expressible as p² + q² for whole numbers p and q — 1, 2, 4, 5, 8, 9, 10, 13, 16, 17, 18, 20, 25, 26, 29, … — while 3, 6, 7, 11, 12, 14, 15, 19, 21, 22, 23, 24, 27, 28 and 30 are impossible.