Counting rectangles in a grid, step by step
A grid of dots, and every rectangle you can draw with its sides on the grid.
The question
A pegboard holds its pegs in a rectangle 3 pegs across and 4 pegs down — 12 pegs altogether. A rectangle is any four pegs that make its corners, sides along the rows and columns.How many rectangles are there?Why
How many rectangles are there?
Count the rectangles without drawing them
across:3 down:4
columns:3 rows:6
3×6=18
18
- Start from the pegs: 3 across and 4 down. A rectangle with sides on the grid needs two of the columns for its left and right edges, and two of the rows for its top and bottom.
- Choosing 2 of the 3 columns is C(3,2) = 3, and 2 of the 4 rows is C(4,2) = 6.
- Every pair of columns goes with every pair of rows, so multiply them: 3 × 6 = 18.
- So 18 rectangles — not the 6 little unit cells, which are only the smallest ones.
How it works.
- 01
Start from the pegs: 3 across and 4 down. A rectangle with sides on the grid needs two of the columns for its left and right edges, and two of the rows for its top and bottom.
- 02
Choosing 2 of the 3 columns is C(3,2) = 3, and 2 of the 4 rows is C(4,2) = 6.
- 03
Every pair of columns goes with every pair of rows, so multiply them: 3 × 6 = 18.
- 04
So 18 rectangles — not the 6 little unit cells, which are only the smallest ones.