Total number of squares and rectangles (both) in the following figure is –

- (1)19
- (2)21
- (3)22
- (4)23
Answer
Why
Correct — option (2), 21.
The stem counts squares and rectangles together. A square is a rectangle, so every four-sided figure with right angles counts once, and there is no need to sort squares from rectangles.
Name the lines in the figure. Three shapes: a tall rectangle on the right, a big square on its left edge, and a small square inside the big square.
Two lines cut across them: the tall rectangle's left edge runs down through the middle of both squares, and the middle line runs from the big square's left side to the tall rectangle's right side.
Group 1 — the big square.
Cut into 4 cells by the two crossing lines.
Verticals: its left side, the crossing edge, its right side
Horizontals: its top, the middle line, its bottom
3 × 3 = 9
Running total = 9
Group 2 — the small square.
Cut into 4 cells by the same two lines.
3 × 3 = 9
Running total = 18
Group 3 — the tall rectangle.
Cut into an upper and a lower half by the middle line.
Upper half, lower half, whole = 3
Running total = 21
No rectangle crosses from one shape to another. Each square's sides end at its own corners, and only the middle line and the tall rectangle's left edge run on beyond a single shape.
The idea to remember: pick two vertical and two horizontal lines that actually meet; a shape cut into a 2 × 2 grid holds 9 rectangles.
Why the others are wrong
- (1)19 — 19 is two short of the 21 rectangles the lines close. Leaving out, for example, the upper and lower halves of the tall rectangle gives 19.
Each of the three groups has to be counted in full: 9 in the big square, 9 in the small square, and 3 in the tall rectangle, the whole plus its two halves.
- (3)22 — 22 is one more than the lines can close. A 22nd rectangle would have to join lines from two different shapes.
The middle line does reach from the big square to the tall rectangle's right side, but no second horizontal line does. The big square's top and bottom stop at its own right side, so no rectangle spans both shapes.
- (4)23 — 23 is two more than the 21 rectangles the lines close, and open figures cannot make up the difference.
The strips between the big square's right side and the tall rectangle's right side, above and below the middle line, are open: the big square's top and bottom lines end at its right side and do not continue to the tall rectangle's right side.
Concept
A rectangle in a line figure needs four drawn sides: two vertical lines and two horizontal lines that meet at all four corners.
In a grid of m vertical lines and n horizontal lines, each running the full width or height, choosing any 2 verticals and any 2 horizontals closes one rectangle. The count is C(m, 2) × C(n, 2).
A 2 × 2 grid has 3 lines each way, so it holds 3 × 3 = 9 rectangles: 4 cells, 4 halves and the whole. A shape cut once holds 3.
When shapes overlap, count each shape's grid separately, then check whether any rectangle uses lines from two shapes.
RPSC's 2021 syllabus lists "Shapes and their sub sections" under Mental Ability in Reasoning & Mental Ability.
Counting figures is combinatorics applied to a drawing. Choosing 2 lines out of 3 can be done in C(3, 2) = 3 ways, the same selection count that "Permutation and Combination" covers under Basic Numeracy.
The count depends on which lines are drawn and where they end, not on how large the shapes look.
Key facts
- Every square is a rectangle, so a count of squares and rectangles together counts each right-angled four-sided figure once.
- In a grid of m full-length vertical lines and n full-length horizontal lines, the number of rectangles is C(m, 2) × C(n, 2).
- A shape cut into a 2 × 2 grid holds 9 rectangles: 4 cells, 4 halves and the whole.
- A rectangle cut in two by one line holds 3 rectangles: the two parts and the whole.
- In this figure: big square 9, small square 9, tall rectangle 3, for a total of 21.
Counted from the figure as printed in the booklet.
Study next
Common traps
- Counting only the closed regions that are visible. Several of the 21 rectangles, such as each quarter of the big square, have parts of the small square inside them.
- Closing figures with lines that stop short. The squares' tops and bottoms end at the squares' right sides, so the strips beside them are open.
- Counting a figure twice by listing it under both squares and rectangles. The stem counts both together, so each figure is counted once.
A question can ask for the number of squares, rectangles or both in a figure of overlapping shapes, as this one does.
A question can also ask for the number of triangles, or draw a grid whose lines do not all run the full width.
Related PYQs
How many triangles are there in the following figure ?
- (1) 12
- (2) 14
- (3) 16
- (4) 18
Answer(3)
Same counting of shapes in a line figure. That question asks for the number of triangles (RPSC's key: 16); this one asks for squares and rectangles, which close with two vertical and two horizontal lines.
Practice
- practice — not a real PYQ
A rectangle is divided into 6 equal cells by two vertical lines and one horizontal line, each running from one side of the rectangle to the opposite side. How many rectangles (including squares) does the figure contain?
- (a)6
- (b)12
- (c)18
- (d)24
Answer(3) — There are 4 vertical lines and 3 horizontal lines, so C(4, 2) × C(3, 2) = 6 × 3 = 18.Option (1) counts only the cells; option (2) counts the rectangles within each row (6 + 6) and leaves out the 6 of full height; option (4) would need 4 pairs of horizontal lines, but 3 lines give only 3 pairs.
- practice — not a real PYQ
A square is divided into 9 equal smaller squares by two vertical and two horizontal lines drawn right across it. How many squares are there in the figure?
- (a)9
- (b)13
- (c)14
- (d)36
Answer(3) — Squares of side 1 cell: 9; side 2 cells: 4; side 3 cells: 1; total 14. Option (1) counts only the smallest squares; option (2) leaves out the whole square; option (4) is the number of all rectangles, C(4, 2) × C(4, 2).