- Practice
- About 13 min
- 5 practice questions
Grid problem set: rectangles, squares and the traps to avoid
Work through exam-style grid problems quickly, using a table of totals and checks for the usual traps: counting lines instead of cells, forgetting squares are rectangles, and confusing width with height.
If something looks wrong, please tell us.
Grid questions are the most reliable source of marks in counting figures, because a formula gives the answer exactly. The risk is not the formula but the set-up. This lesson gives a short table of results to learn, then a problem set in which each problem hides a trap.
Results to know
| Grid n by n | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| Squares | 1 | 5 | 14 | 30 | 55 | 91 |
| Rectangles | 1 | 9 | 36 | 100 | 225 | 441 |
For a grid m cells wide and n cells high: rectangles = [m(m+1)/2] times [n(n+1)/2]. Squares = the sum over side lengths k of (m minus k plus 1)(n minus k plus 1), for k up to the smaller of m and n.
The traps
- Lines versus cells. The formula uses the number of cells. If the question gives lines, subtract 1 from each count first. A figure with 5 vertical and 4 horizontal lines has 4 by 3 cells.
- Squares are rectangles. A question asking for 'rectangles' includes squares unless it says 'not squares'.
- One size only. A question about squares 'of all sizes' needs every size, not just 1 by 1.
- Width and height. Keep the two counts apart; the formula is symmetric but the square count is not obvious if you mix them.
Cells, not lines. All sizes. Squares are rectangles.
Problem set
Problem 1. A grid is 5 cells wide and 3 cells high. Count its rectangles, squares, and rectangles that are not squares. Rectangles: 15 times 6 is 90. Squares: size 1 gives 15, size 2 gives 4 times 2, which is 8, and size 3 gives 3 times 1, which is 3. The total is 26. Not squares: 90 minus 26 is 64.
Problem 2. A figure is drawn with 5 vertical lines and 4 horizontal lines, forming a grid. How many rectangles does it contain? The grid has 4 by 3 cells, but the formula can also be applied directly to lines: choose 2 of 5 vertical lines (10 ways) and 2 of 4 horizontal lines (6 ways). Rectangles: 10 times 6 is 60.
Problem 3. In a grid 6 cells wide and 4 high, how many squares are there? Size 1: 24. Size 2: 5 times 3 is 15. Size 3: 4 times 2 is 8. Size 4: 3 times 1 is 3. Total 50.
Problem 4. How many rectangles in a 5 by 4 grid (5 wide, 4 high) have the top-left cell as their top-left corner? Such a rectangle is fixed by choosing how far right (5 ways) and how far down (4 ways). Answer: 5 times 4, which is 20.
Problem 5. How many rectangles in a 5 by 5 grid contain the centre cell? The centre is the third column and third row. The left edge can be chosen in 3 ways, the right edge in 3 ways, the top edge in 3 ways and the bottom edge in 3 ways. Answer: 3 times 3 times 3 times 3, which is 81.
Problem 6. In a grid 6 wide and 4 high, how many rectangles are exactly one cell high? Each of the 4 rows has C(7, 2), which is 21 horizontal choices, so the answer is 4 times 21, which is 84.
Key takeaways
- Convert lines to cells before using the formulas, or use the line form directly.
- Squares of all sizes: add by size.
- Rectangles containing a given cell: multiply the four edge choices.
Check your understanding
-
1. How many rectangles (squares included) are in a grid 5 cells wide and 3 cells high?
- 90
- 45
- 60
- 105
Show answer
Answer: A. C(6, 2) times C(4, 2) is 15 times 6, which is 90.
-
2. A figure has 7 vertical lines and 3 horizontal lines forming a grid. How many rectangles does it have?
- 42
- 21
- 63
- 84
Show answer
Answer: C. Choose 2 of the 7 vertical lines (21 ways) and 2 of the 3 horizontal lines (3 ways). 21 times 3 is 63.
-
3. How many squares of all sizes are in a grid 6 cells wide and 4 high?
- 24
- 50
- 40
- 90
Show answer
Answer: B. Size 1: 24. Size 2: 15. Size 3: 8. Size 4: 3. The total is 50.
-
4. In a grid 5 cells wide and 4 high, how many rectangles have the top-left cell as their top-left corner?
- 40
- 9
- 15
- 20
Show answer
Answer: D. The rectangle extends to the right by 1 to 5 cells and downward by 1 to 4 cells. 5 times 4 is 20.
-
5. How many rectangles in a 5 by 5 grid contain the centre cell?
- 36
- 25
- 81
- 100
Show answer
Answer: C. There are 3 choices for each of the left, right, top and bottom edges. 3 times 3 times 3 times 3 is 81.
Sign in to keep track of the lessons you finish.