Learn this topic first
Skip to the questions ↓Read this, then start. Tap a topic to open or close it.
Counting Figures
How many triangles are in a triangle with three lines drawn from the top? Most people say 4. The answer is 10, and by the end of today you will be able to prove it.
Label, then count by size
Start with a picture. A triangle has lines drawn from its top corner A down to the base. The lines cut the base into small pieces.
Beginner method: label the points on the base P0, P1, P2 ... Count triangles made of 1 piece, then 2 pieces, then 3, and so on. With 4 pieces: 4 + 3 + 2 + 1 = 10.
- Look at any triangle in the figure. Its sides can only lie on lines from A or on the base.Those are the only lines drawn.
- So one corner is A, and the other two corners are on the base.Two sides go down from A and meet the base.
- Choose any two base points, say P1 and P3. Join both to A: that is exactly one triangle.See the shaded triangle in the second picture.
- So triangles and pairs of base points match one to one.Every triangle gives a pair, every pair gives a triangle.
- k pieces give k + 1 base points, and the number of pairs is (k + 1)k/2.nC2 = n(n - 1)/2 with n = k + 1.
- Hence proved: triangles = k(k + 1)/2.
Squares in a grid
A chessboard has 64 small squares, but also 2 × 2 squares, 3 × 3 squares and so on up to the whole board. The question counts all of them.
Beginner method: count one size at a time. A k × k square is fixed by where its top-left corner sits. In the picture, the dots show every place a 2 × 2 square can start in a 4 × 4 grid: 3 × 3 = 9 places.
- A k × k square covers k columns and k rows, so its top-left corner can be in column 1 up to column n - k + 1.Any further right and it falls off the grid.
- In the same way the corner can be in row 1 up to row n - k + 1.
- Each (row, column) choice gives a different square: (n - k + 1) × (n - k + 1) squares of size k.Count the dots in the picture: 9 for size 2, 4 for size 3.
- Sizes go from k = 1 (value n2) to k = n (value 1).So the total is 12 + 22 + ... + n2.
- The sum of squares formula: (k + 1)3 - k3 = 3k2 + 3k + 1. Add this for k = 1 to n: the left side collapses to (n + 1)3 - 1.Every middle cube cancels.
- So 3(sum of k2) + 3n(n + 1)/2 + n = (n + 1)3 - 1, which simplifies to sum of k2 = n(n + 1)(2n + 1)/6.
- Hence proved.
Rectangles and squares in grids
Every rectangle has a top edge, a bottom edge, a left edge and a right edge. In a grid, the top and bottom lie on two of the horizontal lines, and the left and right lie on two of the vertical lines.
So instead of looking for rectangles, choose lines. A 3 × 4 grid has 4 horizontal lines and 5 vertical lines (always one more line than rows or columns).
- Pick any 2 horizontal lines and any 2 vertical lines.The thick lines in the picture.
- They cross in exactly 4 points, and those points are the corners of one rectangle.The shaded one.
- Going the other way, every rectangle gives back its 2 horizontal and 2 vertical edge lines.So nothing is counted twice and nothing is missed.
- Ways to pick 2 of the (m + 1) horizontal lines = (m + 1)C2, and 2 of the (n + 1) vertical lines = (n + 1)C2.
- Each pair of horizontal lines can go with each pair of vertical lines, so multiply.Multiplication rule.
- Hence proved: rectangles = (m + 1)C2 × (n + 1)C2.
Triangles in a triangle grid
Now the triangle is cut into rows of small triangles, like a pyramid of tiles. Some triangles point up, and some point down (upside-down). Beginners forget the upside-down ones.
Count them in two groups: upright triangles size by size, then upside-down triangles size by size. With 3 rows: upright 6 + 3 + 1 = 10, upside-down 3, total 13.
- An upright triangle of size k is fixed by its top corner.Once the top is chosen, the rest hangs below it.
- Its top corner can be any point in the top n - k + 1 rows of points, and row r has r points.The triangle must still fit above the base.
- So upright triangles of size k = 1 + 2 + ... + (n - k + 1).
- An upside-down triangle of size k needs k rows above its top edge and k rows from the top edge to its bottom corner.The top edge sits on row k or lower, the bottom corner on row n or higher.
- That leaves n - 2k + 1 usable rows, holding 1 + 2 + ... + (n - 2k + 1) positions.Zero when 2k > n.
- Add both groups for every size. Hence proved.
Mixed figures: triangles inside rectangles
When the figure is not a standard grid, there is no single formula. Use the labelling method: put a letter on every corner and crossing point, then list triangles by how many small pieces they use.
Rectangle with both diagonals: 4 small triangles meet at the centre, and each diagonal cuts the rectangle into 2 big triangles, so 4 more. Total 8.
- Rectangle: the diagonals cross at the centre O, making 4 small triangles.Size 1 = 4.
- Two neighbouring small triangles share a half-diagonal, and together they form a triangle whose third side is a full diagonal: 4 such pairs.Size 2 = 4.
- Three small pieces never make a triangle (they make a shape with 4 corners), and all four make the rectangle.Sizes 3 and 4 = 0.
- 4 + 4 = 8.
- For the square with midlines: 8 small, 4 made of two pieces, 4 half-squares = 16.Same steps, one more line in each direction.
- Hence proved.
Points, lines and diagonals
Some questions give points instead of a drawing: 'there are 8 points and no three are on one line; how many triangles?'
A straight line needs 2 points and a triangle needs 3 points. If no three points are on one line, every choice of 3 points makes a real triangle.
- A line is fixed by any 2 of the points, and different pairs give different lines because no three points share a line.So lines = nC2.
- A triangle is fixed by its 3 corners, and 3 points not on a line always make one.So triangles = nC3.
- Diagonals: each corner of the polygon joins to n - 1 other corners. 2 of those joins are sides, so n - 3 are diagonals.
- n corners × (n - 3) counts every diagonal twice, once from each end.Divide by 2.
- Hence proved: diagonals = n(n - 3)/2.
Formula sheet: every shape
One table for revision. Every row was proved in a section above, and each number in the Example column comes from a brute-force count by the computer, not from the formula.
Read the shape, find what you are counting, apply the formula, and compare with the worked number.
| Shape | Counting | Formula | Example |
|---|---|---|---|
| Triangle, lines from one corner, base in k pieces | Triangles | k(k + 1)/2 | k = 4: 10 |
| Same, plus c lines across parallel to the base | Triangles | (c + 1) × k(k + 1)/2 | k = 4, c = 1: 20 |
| n × n grid | Squares | n(n + 1)(2n + 1)/6 | 8 × 8: 204 |
| m × n grid | Squares | add (m - k + 1)(n - k + 1) | 3 × 4: 20 |
| m × n grid | Rectangles (squares included) | (m + 1)C2 × (n + 1)C2 | 3 × 4: 60 |
| m × n grid | Rectangles that are not squares | rectangles - squares | 4 × 4: 70 |
| Triangle cut into n rows | Triangles (up + upside-down) | 1, 5, 13, 27, 48 for n = 1 to 5 | 4 rows: 27 |
| Rectangle + both diagonals | Triangles | 8 | 8 |
| Square + diagonals + both midlines | Triangles | 16 | 16 |
| n points, no three on a line | Straight lines | nC2 | 8 points: 28 |
| n points, no three on a line | Triangles | nC3 | 8 points: 56 |
| Polygon with n sides | Diagonals | n(n - 3)/2 | hexagon: 9 |
| n × n × n cube | Cubes of all sizes | 13 + 23 + ... + n3 = (n(n + 1)/2)2 | 3 × 3 × 3: 36 |
- Rows 1 and 3 to 12 are proved in the sections above.Each section ends with its own proof.
- Lines across: each of the c + 1 horizontal lines (base included) works like its own base with the same k pieces, so the apex count repeats c + 1 times.
- Cube row: a k × k × k cube is fixed by its front-top-left corner, which has (n - k + 1) places along each of the 3 directions.The same corner idea as squares, in 3D.
- So there are (n - k + 1)3 cubes of size k, and adding k = 1 to n gives 13 + ... + n3.
- Hence proved.
- The base is cut into k = 4 pieces.3 inside lines make 4 pieces.
- By size: 4 + 3 + 2 + 1.Pieces of 1, 2, 3 and 4.
- 10.