Counting Figures: Triangles, Squares and Rectangles
1. What must be counted?
Count every distinct closed boundary of the requested type that can be traced entirely along the drawn strokes. Include small figures and larger figures made by combining them. A crossing can become a vertex. A line passing through the interior does not destroy a figure. An undrawn or broken boundary cannot be completed in your imagination.
The same triangle traced clockwise and anticlockwise is one triangle. Two figures sharing a side can both count. Overlapping figures also count if each has its own complete boundary. Do not count an external image frame, a number label or a guide as a drawn side.
2. Definitions that prevent mistakes
| Figure | Required properties |
|---|---|
| Triangle | Three non-collinear vertices joined by three straight sides |
| Rectangle | Four right angles; opposite sides are parallel and equal |
| Square | A rectangle with four equal sides |
| Non-square rectangle | A rectangle whose adjacent sides have different lengths |
A square is a rectangle. If the question says “rectangles, including squares”, include them. If it says “non-square rectangles”, subtract the squares. This chapter explicitly states which convention to use. A diamond-shaped outline is a square only if its angles are right angles and its sides are equal; appearance alone is insufficient.
3. The systematic method
- Read the requested shape and any exclusion.
- Identify all intersections and useful endpoints.
- Group figures by size, orientation, location or a fixed apex.
- Count one group completely before moving to the next.
- Verify every boundary and record each figure once.
- Add group totals and perform a second check using a different grouping when possible.
Use temporary vertex labels such as A, B, C. Listing triangles by their three vertices prevents counting the same one from two starting corners. For rectangles, list the chosen top/bottom and left/right lines.
4. Triangles with a shared apex
Suppose n adjacent small triangles share one apex and lie along one straight base. There are n+1 rays from the apex to the base. Choose any two rays; the base segment between them closes one triangle.
Count = C(n+1,2) = n(n+1)/2 = 1+2+…+n.
Example: four smallest triangles in one fan give 4+3+2+1 = 10 triangles. The groups correspond to spans of one, two, three and four small base intervals. The total is not merely four.
This shortcut requires the same apex and a complete straight base across the rays. It does not apply to an arbitrary network of triangles.
5. A fan with several parallel levels
If the same n+1 rays meet k complete parallel crossbars, including the base, each level can serve as a base. All sloping lines meet only at the common apex, so every triangle is counted by choosing two rays and one level.
Count = k × n(n+1)/2.
Example: five rays and three crossbars give 3 × C(5,2) = 30 triangles. Count crossbars, not the spaces between them. Missing crossbar segments invalidate the simple multiplication; inspect the affected boundaries individually. Parallel crossbars cannot themselves form a triangle.
6. Complete triangular lattices
For the usual triangular mesh with n equal subdivisions per outer side and all three families of parallel lines complete:
Total triangles = floor[n(n+2)(2n+1)/8].
| n | Total |
|---|---|
| 1 | 1 |
| 2 | 5 |
| 3 | 13 |
| 4 | 27 |
| 5 | 48 |
| 6 | 78 |
A useful derivation counts upward triangles of side k: (n−k+1)(n−k+2)/2 for k=1,…,n. Downward triangles of side k contribute (n−2k+1)(n−2k+2)/2 for k=1,…,floor(n/2). Add both sums. For n=3, upward counts are 6+3+1=10 and downward count is 3, giving 13.
The formula depends on a complete lattice, not merely a triangular outer border. Our lattice drawings use a vertically compressed rendering; straight-line incidence and therefore the triangle count are preserved. Do not use that rendering to assume equilateral lengths for another type of question.
7. Squares in an n × n unit grid
An n × n grid has n rows and n columns of unit square cells. A square of side k cells can start in n−k+1 positions horizontally and the same number vertically.
Total squares = n²+(n−1)²+…+1² = n(n+1)(2n+1)/6.
A 3 × 3 grid contains 9 unit squares, 4 squares of side 2 and 1 outer square: 14 in total. A 4 × 4 grid contains 16+9+4+1=30. Count all sizes, not just visible cells.
8. Squares in an m × n rectangular grid
For m columns and n rows of unit square cells, squares of side k number (m−k+1)(n−k+1), where 1≤k≤min(m,n).
Total = sum of (m−k+1)(n−k+1).
Example: a 4-column, 3-row grid gives 4×3 + 3×2 + 2×1 = 20 squares. The shorter dimension limits the largest square. If cells are unequal rectangles, this square formula cannot be applied by counting cells alone; compare actual lengths. Horizontal and vertical strokes alone cannot form a tilted square.
9. Rectangles in a complete grid
A grid with m columns and n rows has m+1 vertical and n+1 horizontal boundary lines. Choose two distinct lines from each family.
Rectangles including squares = C(m+1,2)C(n+1,2) = m(m+1)n(n+1)/4.
Example: a 4 × 3 grid has C(5,2)C(4,2)=10×6=60 rectangles. Of these, 20 are squares, so 40 are non-square rectangles. Unequal spacing between complete parallel lines does not change the rectangle total, provided the two families remain perpendicular. It may change which rectangles are squares.
10. Rows, columns and lines are different
A diagram showing five vertical lines and four horizontal lines has four columns and three rows. Its rectangle count is C(5,2)C(4,2)=60. Do not substitute five and four as the cell counts.
A second check groups by width w and height h. There are (m−w+1)(n−h+1) rectangles of that size. Summing for all w=1,…,m and h=1,…,n gives the same formula. This is useful when a line-count shortcut feels uncertain.
11. Diagonals, tilted shapes and intersections
Extra diagonals can create new vertices and additional triangles. A square with both diagonals contains 4 small triangles around the centre and 4 triangles occupying half the square: 8 total. Counting only the four smallest misses half the answer.
Drawn diagonal strokes may support tilted squares or rectangles, but the four sides must all exist and meet at right angles. Do not assume every quadrilateral formed by diagonals is a rectangle. Also do not apply the plain-grid total to a diagram with extra eligible sloping boundaries without checking those orientations.
12. Missing segments and irregular figures
When part of a grid is erased, the full-grid formulas give a starting reference, not the answer. A small missing segment can invalidate several larger figures. Subtracting one for each removed segment is generally wrong.
For each candidate rectangle, inspect its four boundary intervals. A gap inside the rectangle does not matter; a gap on its boundary does. If subtracting invalid rectangles, remember that two gaps may invalidate the same rectangle, so a simple sum can double-subtract it. Direct enumeration is often safer for a small diagram.
For triangles, check the complete straight connection between each pair of chosen vertices. Three points on one line form no triangle. A path that bends cannot replace a straight triangle side.
13. Common exam traps
| Trap | Better check |
|---|---|
| Counting only the smallest pieces | Make a size-wise list |
| Missing inverted triangles | Separate upward and downward groups |
| Treating every diamond as a square | Verify equal lengths and right angles |
| Counting one figure twice | Use one ordered vertex set or boundary pair |
| Excluding squares from all rectangles | Read the question's convention |
| Applying a formula to a broken mesh | Confirm its assumptions first |
| Counting areas instead of closed outlines | Trace each complete boundary |
| Inferring unseen lines | Use only drawn strokes |
14. Revision card and practice plan
- Shared-apex fan, n small base intervals: n(n+1)/2.
- Same fan with k complete parallel levels: k n(n+1)/2.
- Complete triangular lattice: floor[n(n+2)(2n+1)/8].
- n × n unit-square grid: n(n+1)(2n+1)/6 squares.
- m × n unit-square grid: sum (m−k+1)(n−k+1) squares.
- Complete perpendicular m × n grid: m(m+1)n(n+1)/4 rectangles, including squares.
- Non-square rectangles: all rectangles minus squares.
Practise accurate grouping before using a timer. The 80 online questions comprise 20 triangle-fan questions, 20 square-grid questions, 20 rectangle questions, and 20 mixed questions on triangular lattices, diagonals and broken grids. Four focused exams contain 20 questions each; the complete exam contains all 80. The following 30 solved exercises sample these methods. In mixed-question explanations, area groups provide an audit of the counted figures; areas refer to the unit coordinates used to construct the diagram.
15. Illustrated practice
Practice 01
How many triangles are formed by the drawn strokes? Count every size and orientation. 3 rays share one apex, and 1 horizontal crossbar(s) join the outer rays (including the base).
A: 3 · B: 5 · C: 4 · D: 2
Practice 02
How many triangles are formed by the drawn strokes? Count every size and orientation. 7 rays share one apex, and 1 horizontal crossbar(s) join the outer rays (including the base).
A: 21 · B: 22 · C: 20 · D: 23
Practice 03
How many triangles are formed by the drawn strokes? Count every size and orientation. 3 rays share one apex, and 2 horizontal crossbar(s) join the outer rays (including the base).
A: 8 · B: 6 · C: 7 · D: 5
Practice 04
How many triangles are formed by the drawn strokes? Count every size and orientation. 7 rays share one apex, and 2 horizontal crossbar(s) join the outer rays (including the base).
A: 44 · B: 42 · C: 43 · D: 41
Practice 05
How many triangles are formed by the drawn strokes? Count every size and orientation. 7 rays share one apex, and 3 horizontal crossbar(s) join the outer rays (including the base).
A: 62 · B: 64 · C: 63 · D: 65
Practice 06
How many triangles are formed by the drawn strokes? Count every size and orientation. 7 rays share one apex, and 4 horizontal crossbar(s) join the outer rays (including the base).
A: 83 · B: 85 · C: 86 · D: 84
Practice 07
How many squares are formed by the drawn strokes? Count every size and orientation. The grid has 2 columns and 2 rows of unit square cells.
A: 5 · B: 7 · C: 6 · D: 4
Practice 08
How many squares are formed by the drawn strokes? Count every size and orientation. The grid has 5 columns and 2 rows of unit square cells.
A: 13 · B: 15 · C: 16 · D: 14
Practice 09
How many squares are formed by the drawn strokes? Count every size and orientation. The grid has 3 columns and 3 rows of unit square cells.
A: 16 · B: 13 · C: 14 · D: 15
Practice 10
How many squares are formed by the drawn strokes? Count every size and orientation. The grid has 7 columns and 3 rows of unit square cells.
A: 40 · B: 39 · C: 38 · D: 37
Practice 11
How many squares are formed by the drawn strokes? Count every size and orientation. The grid has 7 columns and 4 rows of unit square cells.
A: 61 · B: 59 · C: 60 · D: 62
Practice 12
How many squares are formed by the drawn strokes? Count every size and orientation. The grid has 7 columns and 6 rows of unit square cells.
A: 113 · B: 114 · C: 111 · D: 112
Practice 13
How many rectangles, including squares are formed by the drawn strokes? Count every size and orientation. The grid has 2 columns and 2 rows of unit square cells.
A: 9 · B: 8 · C: 11 · D: 10
Practice 14
How many non-square rectangles are formed by the drawn strokes? Count every size and orientation. The grid has 5 columns and 2 rows of unit square cells.
A: 33 · B: 30 · C: 32 · D: 31
Practice 15
How many rectangles, including squares are formed by the drawn strokes? Count every size and orientation. The grid has 3 columns and 3 rows of unit square cells.
A: 37 · B: 35 · C: 36 · D: 38
Practice 16
How many rectangles, including squares are formed by the drawn strokes? Count every size and orientation. The grid has 7 columns and 3 rows of unit square cells.
A: 170 · B: 169 · C: 168 · D: 167
Practice 17
How many rectangles, including squares are formed by the drawn strokes? Count every size and orientation. The grid has 7 columns and 4 rows of unit square cells.
A: 281 · B: 282 · C: 280 · D: 279
Practice 18
How many non-square rectangles are formed by the drawn strokes? Count every size and orientation. The grid has 7 columns and 6 rows of unit square cells.
A: 475 · B: 478 · C: 477 · D: 476
Practice 19
How many triangles are formed by the drawn strokes? Count every size and orientation. A complete triangular lattice has 2 equal subdivisions on each outer side. Include upward and downward pointing triangles.
A: 5 · B: 7 · C: 6 · D: 4
Practice 20
How many triangles are formed by the drawn strokes? Count every size and orientation. A complete triangular lattice has 3 equal subdivisions on each outer side. Include upward and downward pointing triangles.
A: 12 · B: 13 · C: 14 · D: 15
Practice 21
How many triangles are formed by the drawn strokes? Count every size and orientation. A complete triangular lattice has 4 equal subdivisions on each outer side. Include upward and downward pointing triangles.
A: 28 · B: 29 · C: 27 · D: 26
Practice 22
How many triangles are formed by the drawn strokes? Count every size and orientation. A complete triangular lattice has 5 equal subdivisions on each outer side. Include upward and downward pointing triangles.
A: 47 · B: 49 · C: 50 · D: 48
Practice 23
How many triangles are formed by the drawn strokes? Count every size and orientation. A complete triangular lattice has 6 equal subdivisions on each outer side. Include upward and downward pointing triangles.
A: 78 · B: 77 · C: 80 · D: 79
Practice 24
How many triangles are formed by the drawn strokes? Count every size and orientation. A 1 × 1 unit grid has BOTH diagonals of the entire outer square drawn. Include shapes using diagonal strokes.
A: 9 · B: 8 · C: 7 · D: 10
Practice 25
How many triangles are formed by the drawn strokes? Count every size and orientation. A 2 × 2 unit grid has BOTH diagonals of the entire outer square drawn. Include shapes using diagonal strokes.
A: 15 · B: 18 · C: 16 · D: 17
Practice 26
How many triangles are formed by the drawn strokes? Count every size and orientation. A 3 × 3 unit grid has BOTH diagonals of the entire outer square drawn. Include shapes using diagonal strokes.
A: 34 · B: 31 · C: 33 · D: 32
Practice 27
How many squares are formed by the drawn strokes? Count every size and orientation. A 2 × 2 unit grid has BOTH diagonals of the entire outer square drawn. Include shapes using diagonal strokes.
A: 5 · B: 6 · C: 7 · D: 4
Practice 28
How many rectangles, including squares are formed by the drawn strokes? Count every size and orientation. A 3 × 3 unit grid has BOTH diagonals of the entire outer square drawn. Include shapes using diagonal strokes.
A: 38 · B: 36 · C: 37 · D: 35
Practice 29
How many squares are formed by the drawn strokes? Count every size and orientation. This began as a 3 × 2 unit grid, but some internal segments have been removed. Only visible strokes may be used.
A: 8 · B: 7 · C: 6 · D: 5
Practice 30
How many rectangles, including squares are formed by the drawn strokes? Count every size and orientation. This began as a 4 × 3 unit grid, but some internal segments have been removed. Only visible strokes may be used.
A: 36 · B: 33 · C: 35 · D: 34
16. Answers and explanations
Answer 01
A — Every triangle uses the common apex, two of the 3 rays, and exactly one horizontal level. At each level there are C(3,2) = 3 triangles. Total = 1 × 3 = 3. Parallel levels cannot form another triangle without the apex.
Answer 02
A — Every triangle uses the common apex, two of the 7 rays, and exactly one horizontal level. At each level there are C(7,2) = 21 triangles. Total = 1 × 21 = 21. Parallel levels cannot form another triangle without the apex.
Answer 03
B — Every triangle uses the common apex, two of the 3 rays, and exactly one horizontal level. At each level there are C(3,2) = 3 triangles. Total = 2 × 3 = 6. Parallel levels cannot form another triangle without the apex.
Answer 04
B — Every triangle uses the common apex, two of the 7 rays, and exactly one horizontal level. At each level there are C(7,2) = 21 triangles. Total = 2 × 21 = 42. Parallel levels cannot form another triangle without the apex.
Answer 05
C — Every triangle uses the common apex, two of the 7 rays, and exactly one horizontal level. At each level there are C(7,2) = 21 triangles. Total = 3 × 21 = 63. Parallel levels cannot form another triangle without the apex.
Answer 06
D — Every triangle uses the common apex, two of the 7 rays, and exactly one horizontal level. At each level there are C(7,2) = 21 triangles. Total = 4 × 21 = 84. Parallel levels cannot form another triangle without the apex.
Answer 07
A — For side length k = 1 through 2, the number is (columns−k+1)(rows−k+1). Size-wise counts: 4 + 1 = 5. No sloping strokes are drawn, so no tilted square has a complete boundary.
Answer 08
D — For side length k = 1 through 2, the number is (columns−k+1)(rows−k+1). Size-wise counts: 10 + 4 = 14. No sloping strokes are drawn, so no tilted square has a complete boundary.
Answer 09
C — For side length k = 1 through 3, the number is (columns−k+1)(rows−k+1). Size-wise counts: 9 + 4 + 1 = 14. No sloping strokes are drawn, so no tilted square has a complete boundary.
Answer 10
C — For side length k = 1 through 3, the number is (columns−k+1)(rows−k+1). Size-wise counts: 21 + 12 + 5 = 38. No sloping strokes are drawn, so no tilted square has a complete boundary.
Answer 11
C — For side length k = 1 through 4, the number is (columns−k+1)(rows−k+1). Size-wise counts: 28 + 18 + 10 + 4 = 60. No sloping strokes are drawn, so no tilted square has a complete boundary.
Answer 12
D — For side length k = 1 through 6, the number is (columns−k+1)(rows−k+1). Size-wise counts: 42 + 30 + 20 + 12 + 6 + 2 = 112. No sloping strokes are drawn, so no tilted square has a complete boundary.
Answer 13
A — Choose two of 3 vertical and two of 3 horizontal grid lines: C(3,2) × C(3,2) = 9. Squares are rectangles and are included, so the answer is 9.
Answer 14
D — Choose two of 6 vertical and two of 3 horizontal grid lines: C(6,2) × C(3,2) = 45. The grid also contains 14 squares. Excluding them gives 45 − 14 = 31.
Answer 15
C — Choose two of 4 vertical and two of 4 horizontal grid lines: C(4,2) × C(4,2) = 36. Squares are rectangles and are included, so the answer is 36.
Answer 16
C — Choose two of 8 vertical and two of 4 horizontal grid lines: C(8,2) × C(4,2) = 168. Squares are rectangles and are included, so the answer is 168.
Answer 17
C — Choose two of 8 vertical and two of 5 horizontal grid lines: C(8,2) × C(5,2) = 280. Squares are rectangles and are included, so the answer is 280.
Answer 18
D — Choose two of 8 vertical and two of 7 horizontal grid lines: C(8,2) × C(7,2) = 588. The grid also contains 112 squares. Excluding them gives 588 − 112 = 476.
Answer 19
A — Check complete boundaries, including larger composite figures. Grouping valid figures by area (in the diagram’s unit coordinates), area: count = 1/2: 4, 2: 1. Add these counts to get 5. Crossings are vertices; a missing segment cannot be imagined. Each boundary is counted once.
Answer 20
B — Check complete boundaries, including larger composite figures. Grouping valid figures by area (in the diagram’s unit coordinates), area: count = 1/2: 9, 2: 3, 9/2: 1. Add these counts to get 13. Crossings are vertices; a missing segment cannot be imagined. Each boundary is counted once.
Answer 21
C — Check complete boundaries, including larger composite figures. Grouping valid figures by area (in the diagram’s unit coordinates), area: count = 1/2: 16, 2: 7, 9/2: 3, 8: 1. Add these counts to get 27. Crossings are vertices; a missing segment cannot be imagined. Each boundary is counted once.
Answer 22
D — Check complete boundaries, including larger composite figures. Grouping valid figures by area (in the diagram’s unit coordinates), area: count = 1/2: 25, 2: 13, 9/2: 6, 8: 3, 25/2: 1. Add these counts to get 48. Crossings are vertices; a missing segment cannot be imagined. Each boundary is counted once.
Answer 23
A — Check complete boundaries, including larger composite figures. Grouping valid figures by area (in the diagram’s unit coordinates), area: count = 1/2: 36, 2: 21, 9/2: 11, 8: 6, 25/2: 3, 18: 1. Add these counts to get 78. Crossings are vertices; a missing segment cannot be imagined. Each boundary is counted once.
Answer 24
B — Check complete boundaries, including larger composite figures. Grouping valid figures by area (in the diagram’s unit coordinates), area: count = 1/4: 4, 1/2: 4. Add these counts to get 8. Crossings are vertices; a missing segment cannot be imagined. Each boundary is counted once.
Answer 25
C — Check complete boundaries, including larger composite figures. Grouping valid figures by area (in the diagram’s unit coordinates), area: count = 1/2: 8, 1: 4, 2: 4. Add these counts to get 16. Crossings are vertices; a missing segment cannot be imagined. Each boundary is counted once.
Answer 26
D — Check complete boundaries, including larger composite figures. Grouping valid figures by area (in the diagram’s unit coordinates), area: count = 1/4: 4, 1/2: 12, 2: 8, 9/4: 4, 9/2: 4. Add these counts to get 32. Crossings are vertices; a missing segment cannot be imagined. Each boundary is counted once.
Answer 27
A — Check complete boundaries, including larger composite figures. Grouping valid figures by area (in the diagram’s unit coordinates), area: count = 1: 4, 4: 1. Add these counts to get 5. Crossings are vertices; a missing segment cannot be imagined. Each boundary is counted once.
Answer 28
B — Check complete boundaries, including larger composite figures. Grouping valid figures by area (in the diagram’s unit coordinates), area: count = 1: 9, 2: 12, 3: 6, 4: 4, 6: 4, 9: 1. Add these counts to get 36. Crossings are vertices; a missing segment cannot be imagined. Each boundary is counted once.
Answer 29
C — Check complete boundaries, including larger composite figures. Grouping valid figures by area (in the diagram’s unit coordinates), area: count = 1: 4, 4: 2. Add these counts to get 6. Crossings are vertices; a missing segment cannot be imagined. Each boundary is counted once.
Answer 30
D — Check complete boundaries, including larger composite figures. Grouping valid figures by area (in the diagram’s unit coordinates), area: count = 1: 8, 2: 9, 3: 4, 4: 7, 6: 3, 8: 2, 12: 1. Add these counts to get 34. Crossings are vertices; a missing segment cannot be imagined. Each boundary is counted once.
This is AI-generated information.