Counting Rectangles in a Figure

Count every rectangle in a grid by numbering the columns and rows and multiplying the two totals, then extend the method to irregular figures with extra or missing lines.

--
Counting Rectangles in a Figure — Moosa Academy

Counting rectangles by eye goes wrong almost immediately — they overlap, nest inside each other, and squares count as rectangles too. Numbering the columns and rows and multiplying two totals replaces all that hunting with one product.

Theorem Number across, number down, multiply

Number of rectangles  = (sum across)  \times (sum down), where each sum runs  1 + 2 + 3 + \cdots over the columns and rows.

Across:  1 + 2 = 3
Down:  1 + 2 = 3
Multiply:  3 \times 3 = 9
 9 rectangles

Remember that a square is a rectangle, so all of them are included in the  9 .

Example A 3 × 2 grid

Three columns and two rows.

Across:  1 + 2 + 3 = 6
Down:  1 + 2 = 3
Multiply:  6 \times 3
 18 rectangles

The counting sequence is always  1, 2, 3, \ldots up to the number of columns, and separately up to the number of rows. Each sum is just a consecutive sum.

Concept Why the two totals multiply

Every rectangle is fixed by four lines: two vertical ones for its left and right edges, and two horizontal ones for its top and bottom. Those two choices are independent, so the counts multiply.

That makes it a combination problem as well. In a  3 \times 2 grid there are  4 vertical lines and  3 horizontal ones:

Choose  2 verticals from  4 :  C(4, 2) = 6
Choose  2 horizontals from  3 :  C(3, 2) = 3
Multiply:  6 \times 3 = 18 — the same answer

Both routes agree because  1 + 2 + \cdots + n is exactly  C(n+1, 2) . Use whichever feels quicker.

Concept Irregular figures

When the figure is not a clean grid — an extra line here, a missing one there — split the work in two:

1. Apply the formula to the regular part of the figure.
2. Add the rectangles created by any extra lines, or subtract those lost to a missing line.

The second step is the one that needs care: count only the rectangles that use the extra line as an edge, otherwise you will count the same rectangle twice.

Example One column split in two

A single row of three columns, where one end column is cut in half by a horizontal line.

Regular part — three columns, one row:  1 + 2 + 3 = 6
The split column contributes its two halves:  + 2
 6 + 2 = 8 rectangles

The two halves are new rectangles that did not exist before. The full-height column was already counted in the  6 , so it is not counted again.

Example Two more cases

a) A middle line that stops short

Three full-height columns:  1 + 2 + 3 = 6
The left column's two halves  (2) plus the right column's two halves  (2) :  + 4
 6 + 4 = 10 rectangles

b) A  2 \times 2 grid with one extra line

Regular part:  (1 + 2) \times (1 + 2) = 9
The extra line splits one top cell and adds three rectangles:  + 3
 9 + 3 = 12 rectangles

The three new rectangles in (b) are the ones using the extra line as an edge: the small half it creates, the other half of that cell, and the wider rectangle running from the new line across the rest of the top row.

Summary
  1. Count rectangles as (sum across)  \times (sum down), each sum running  1 + 2 + 3 + \cdots
  2. A  2 \times 2 grid gives  3 \times 3 = 9 ; a  3 \times 2 grid gives  6 \times 3 = 18 .
  3. Squares are rectangles, so they are already included.
  4. The totals multiply because the vertical and horizontal edge choices are independent.
  5. Equivalently, choose  2 lines from each direction:  C(v, 2) \times C(h, 2) .
  6. For an irregular figure, apply the formula to the regular part, then add only the rectangles that use the extra line as an edge.