Count the number of rectangles in the given figure.
2025
Count the number of rectangles in the given figure.

- A.
10
- B.
20
- C.
22
- D.
18
Attempted by 16 students.
Show answer & explanation
Correct answer: D
To count every rectangle in a compound figure, first identify every "simplest" rectangle — the smallest region enclosed on all four sides by lines that are actually drawn. Every larger rectangle is then formed by merging two or more contiguous simplest rectangles, and is valid only if all four of its sides lie along lines drawn across the full width and height it claims. Grouping rectangles by how many simplest rectangles they are built from (1, 2, 3, ...) and adding each group's count avoids missing a larger rectangle or double-counting one that belongs to more than one merge.
The figure may be labelled as shown below.

The figure consists of a tall middle column of 4 stacked cells, with a 2-cell strip attached to its left at the height of the topmost cell, and another 2-cell strip attached to its right at the height of the bottommost cell. Grouping every rectangle by how many simplest cells it is built from gives:
Rectangles (vertices) | Components | Count |
|---|---|---|
ABQP, PQNO, BCDN, NDEM, MEFL, LFJK, FGHR, RHIJ | 1 | 8 |
ABNO, BCEM, NDFL, MEJK, FGIJ | 2 | 5 |
ACDO, BCFL, NDJK, LGIK | 3 | 4 |
BCJK | 4 | 1 |
Adding every group: 8 + 5 + 4 + 1 = 18 rectangles in total.
As an independent check, count the rectangles that stay within a single column strip: a line of n simplest cells contains n(n+1)/2 rectangles, so the top-left strip (2 cells) gives 3, the tall middle column (4 cells) gives 10, and the bottom-right strip (2 cells) gives 3 — 3 + 10 + 3 = 16 rectangles confined to one strip. Only two further rectangles are possible, and both must cross a strip boundary with all four sides on real drawn lines: the top-left strip merged with just the topmost cell of the middle column (since the left edge of that strip does not extend past its own height), and the bottommost cell of the middle column merged with just the bottom-right strip (for the same reason). No wider cross-boundary merge is possible. So the total is 16 + 2 = 18, confirming the count above.