Counting Figures
🔒 Log in to trackCounting squares and rectangles
🔒 Log in to trackFor a grid of m columns and n rows of equal cells:
- Rectangles (squares included): choose 2 of the m + 1 vertical lines and 2 of the n + 1 horizontal lines → C(m+1, 2) × C(n+1, 2).
- Squares: count k × k squares for every size k: (m − k + 1)(n − k + 1), summed for k = 1 … min(m, n).
For an n × n grid the square count is 1² + 2² + … + n² (a 3 × 3 grid has 9 + 4 + 1 = 14 squares).
Detailed notes
What the question asks
The figure is usually a grid, like a chessboard or a window with bars, and you must count squares or rectangles. A rectangle is a four-sided shape with four right angles. A square is a rectangle whose four sides are equal. So every square is also a rectangle. When a question asks for rectangles, squares are included unless it says "rectangles that are not squares".
Counting squares in a grid
In a grid of m columns and n rows of equal cells, count squares size by size.
- 1 × 1 squares: m × n
- 2 × 2 squares: (m − 1)(n − 1)
- 3 × 3 squares: (m − 2)(n − 2) ... until one side reaches 1.
For a square grid of n × n this becomes .
Example: a chessboard (8 × 8) has squares. A 4 × 3 grid has 12 + 6 + 2 = 20 squares.
Counting rectangles in a grid
A rectangle is fixed the moment you choose its two vertical sides and two horizontal sides. A grid of m columns has m + 1 vertical lines, and n rows give n + 1 horizontal lines. So
Example: a 3 × 2 grid has 4 vertical and 3 horizontal lines: C(4, 2) × C(3, 2) = 6 × 3 = 18 rectangles.
A single strip of m cells has rectangles (choose a start cell and an end cell).
Rectangles that are not squares = R − S.
Tilted squares
Joining the middles of the four sides of a square makes a tilted square (a diamond). Joining the middles again makes another upright square, and so on. Each tilted square counts once. Grid lines passing through a diamond cut it into triangles, not squares, so do not invent extra squares there.
Irregular grids
Plus signs, L-shapes and grids with missing lines break the formula. Then:
- Count the 1 × 1 cells.
- Look for each bigger size and check that all four sides are drawn.
- For rectangles, pick each cell as the top-left corner and count how far you can extend right and down.
Special cases
- A line missing from the middle of a grid kills every rectangle that needs it as a side.
- Cells must be equal for the square formula. If they are not, count by hand.
- The outer boundary counts as one rectangle (and one square if it is square).
Quick revision
| Figure | Squares | Rectangles |
|---|---|---|
| n × n grid | 1² + 2² + … + n² | [n(n+1)/2]² |
| m × n grid | Σ (m−k+1)(n−k+1) | C(m+1,2) × C(n+1,2) |
| Strip of m cells | m | m(m+1)/2 |
- 2 × 2 → 5 squares, 9 rectangles; 3 × 3 → 14 squares, 36 rectangles; 4 × 4 → 30 squares, 100 rectangles.
- Every square is a rectangle.
- Irregular figure: check all four sides of every candidate.
Types of questions asked
Every way this subtopic shows up in exams — how to recognise it, the formula or logic to use, and a solved example.
Type 1: Squares in a gridvery common3 practice Q
A chessboard-like grid; the question asks for squares.
- Note m columns and n rows.
- Add (m−k+1)(n−k+1) for k = 1, 2, … up to the smaller side.
- For n × n use 1² + 2² + … + n².
Why: a k × k square fits in (m−k+1) places across and (n−k+1) places down.
Example: How many squares are there in a 4 × 4 grid?
1 + 4 + 9 + 16 = 30.
Type 2: Rectangles in a gridcommon4 practice Q
A grid of cells; the question asks for rectangles (squares included).
- Count vertical lines (m + 1) and horizontal lines (n + 1).
- Rectangles = C(m+1, 2) × C(n+1, 2).
- For a single strip of m cells: m(m+1)/2.
Why: choosing 2 vertical and 2 horizontal lines fixes exactly one rectangle.
Example: How many rectangles are there in a grid of 4 columns and 3 rows?
Vertical lines 5 → C(5,2) = 10. Horizontal lines 4 → C(4,2) = 6. Rectangles = 10 × 6 = 60.
Type 3: Squares with a tilted (diamond) square insidecommon3 practice Q
A square or grid with lines joining the middles of the sides, forming a diamond, sometimes repeated.
- Count the upright squares of the grid.
- Add each tilted square whose four sides are fully drawn.
- Do not count triangles formed where grid lines cut the diamond.
Why: a tilted square is a square too, but grid lines through it only make triangles.
Example: A square is divided into 4 equal squares by its two midlines, and the midpoints of its four sides are joined to form a diamond. How many squares are there?
Upright squares: 4 small + 1 big = 5. Tilted square: 1. Total = 6.
Type 4: Irregular grids (plus, L-shape, missing lines)occasional3 practice Q
Cells joined in a cross, L or step shape, or a grid with a line missing.
- Count single cells.
- For each bigger shape, check all four sides are drawn.
- For rectangles, fix a top-left cell and extend right/down while the region stays filled.
Why: the grid formula assumes every line runs the full width; here it does not.
Example: Five equal squares form a plus sign (one in the centre, one on each side). How many rectangles are there?
Single cells: 5. Two-cell rectangles: 4 (centre with each arm). Three-cell rectangles: 2 (the full row and the full column). Total = 11.
Formulas
Pick two vertical and two horizontal lines.
n × n grid: 1² + 2² + … + n².
Shortcut tricks
⚡ Line-pair trick
A rectangle is decided by its two vertical sides and two horizontal sides — so count line pairs, never shapes.
Example: Q. How many rectangles are in a 3 × 2 grid?
Sol. Vertical lines 4 → C(4,2) = 6; horizontal lines 3 → C(3,2) = 3. 6 × 3 = 18.
R = C(vertical lines, 2) × C(horizontal lines, 2).
Where students lose marks
Forgetting that every square is also a rectangle.
Using the number of cells instead of the number of lines in C( , 2).
Missing the larger squares (2 × 2, 3 × 3) in a grid.
Practice sets — 16 questions
Sets of 10, mixed across the question types above. Each answer comes with a step-by-step explanation.
Topic test · 10 questions
Suggested time 7 min · wrong answers go to your mistake notebook automatically.