Concept 8 of 9
Counting Rectangles: Choose Two Lines Each Way
Today's big idea
A rectangle is two lines down and two across, so multiply the two pair counts.
A rectangle is fixed by two of the vertical lines and two of the horizontal.
How it works
👀 What's going on?
Counting rectangles by eye works on a small grid and falls apart on a big one. There is a way to get the number without spotting a single rectangle, and it comes from looking at the lines instead of the boxes.
💡 Here's the trick
Look at the grid above. Every rectangle in it is fixed the moment you choose two of the lines running down and two of the lines running across. The grid has 4 lines down and 3 across. From 4 lines you can pick 6 different pairs, and from 3 lines you can pick 3. Every pair of pairs gives one rectangle, so there are 6 times 3, which is 18.
🪄 How to do it
- 1.Count the lines rather than the squares, as the grid above has 4 down and 3 across.
- 2.Turn each line count into pairs, because a count of k lines gives k times k minus 1, halved.
- 3.Multiply the two pair counts together.
✍️ Try it
How many rectangles of any size are in a 2 by 2 grid? And how many in a 4 by 3 grid?
A 2 by 2 grid has 3 lines each way. 3 lines give 3 pairs, so the answer is 3 times 3, which is 9. A 4 by 3 grid has 5 lines down and 4 across. That gives 10 pairs and 6 pairs, so the answer is 60.
⚠️ Watch out
You might be thinking squares are something separate from rectangles. Every square is a rectangle, so it is already inside this count. A 3 by 3 grid holds 14 squares but 36 rectangles, and answering 14 is answering a different question.
🌟 Why this matters
Windowpanes, tiled walls, chessboards and spreadsheet cells are all grids, and someone always wants to know how many blocks can be marked out on one. Counting the lines beats hunting for shapes as soon as the grid grows past a few squares.
Exam tip: Say the line counts aloud before multiplying, because miscounting lines by one changes the answer a lot.
Watch me solve one
Quanta solves it
“Watch how I think through one of these — then you try.”
THE PROBLEM
“How many rectangles of any size are in a grid 4 squares wide and 2 tall?”
- 1
Count lines, not squares
The grid has 5 lines running down and 3 lines running across. ▦
- 2
Turn each count into pairs
k lines give k × (k − 1) ÷ 2 pairs. So 5 lines give 10 pairs and 3 lines give 3.
- 3
Multiply
Each pair of pairs marks out exactly one rectangle, so 10 × 3 = 30. Squares are already inside that count.
- 4
Answer ✓
30 rectangles
Now you try one — same steps, different story 👇
See it in action
⚡ Time to play!
A rectangle is two lines down and two across. Count lines.
LINE PAIRER · ROUND 1 OF 3
Step 1 · count the lines, not the squares
Quick check
✅ VERIFICATION
How many rectangles of any size are in a 3 by 3 grid?
⚡ Finish the activity above first to answer.
Keep going!
Up next: Spot the Odd Figure
A turn is not a difference. Straighten them, then look.