Skip to content

Count triangles / squares / rectangles

4 lessons · 19 questions · 13 PYQs · ~60 s per question

The idea

Count the triangles, squares or rectangles whose every side lies on a drawn line. JIPMAT asks one each year: triangles in 2024 (Q23, 21 triangles) and 2026 (Q17, 11 triangles), squares and rectangles in 2025 (Q2).

Textbook vs exam method

Exam method

  1. Fan + cross lines. kk lines from one corner and tt lines crossing all of them give t(k2)t\binom{k}{2} triangles.
  2. Grids. squares size by size (4×44 \times 4: 16+9+4+1=3016 + 9 + 4 + 1 = 30); rectangles (m+12)(n+12)\binom{m+1}{2}\binom{n+1}{2}.
  3. Square with both diagonals and both midlines. 8 + 4 + 4 = 16 triangles.
  4. Anything else. split the figure into parts you know and count the triangles that cross between parts separately.

Worked examples

Example 1Sitter

Triangle with two lines from the top corner and one line across the middle.

Example 2Easy

Squares in a 4 by 4 grid.

Example 3Easy

Rectangles in a 4 by 2 grid.

Example 4Easy

JIPMAT 2026 Q17: a pentagon with lines from the top corner to the two lower corners and from the two side corners to the middle of the base.

Example 5Easy

Triangle with sides cut into three equal parts and parallels drawn.

Traps

  • Big ones missed: the triangle made of two or four pieces is still a triangle.
  • False triangles: a region with a bent side is not a triangle.
  • Double counting: list each triangle once by fixing an order of corners.

Formulas

squares in an n×n grid=12+22+⋯+n2\text{squares in an } n \times n \text{ grid} = 1^2 + 2^2 + \dots + n^2

squares in an m×n grid (m≥n)=∑k=1n(m−k+1)(n−k+1)\text{squares in an } m \times n \text{ grid } (m \ge n) = \sum_{k=1}^{n} (m-k+1)(n-k+1)

rectangles in an m×n grid=(m+12)(n+12)\text{rectangles in an } m \times n \text{ grid} = \binom{m+1}{2}\binom{n+1}{2}

k lines from one corner, t lines across them⇒t(k2) trianglesk \text{ lines from one corner}, \ t \text{ lines across them} \Rightarrow t\binom{k}{2} \text{ triangles}

In the exam

Shortcuts
  • Letter every corner and crossing point, then count the triangles by their highest corner (or left-most corner) so none is counted twice.
  • Count by size: smallest pieces first, then shapes made of 2, 3, 4 … pieces.
  • Grid of squares: count squares size by size; rectangles = choose two vertical and two horizontal lines.
~60 s per question at exam speed
When to skip: Skip a figure with 25+ triangles on the first pass if the options are close together; come back if time remains.
Next sub-topicPaper folding / cutting

Practise this free. Every mistake is saved and comes back until you fix it.

Start free