| Grid | Rectangles | Squares |
|---|---|---|
| 1 by 1 | 1 | 1 |
| 2 by 2 | 9 | 5 |
| 3 by 3 | 36 | 14 |
| 4 by 4 | 100 | 30 |
| 5 by 5 | 225 | 55 |
Rectangles = C(m + 1, 2) x C(n + 1, 2). Squares = the sum of (m - k + 1)(n - k + 1) for k = 1, 2, 3, ...
Key takeaways: choose two vertical and two horizontal lines for rectangles, and add by side length for squares.