# Counting Squares, Rectangles, Routes and Handshakes

> Count without missing any or counting twice, using sizes, sums, routes on a grid and handshake patterns.

From Selective School Maths on WhizzNotes, free study notes for NSW students: https://whizznotes.com/selective-school-maths/counting-problems/. Updated 3 November 2026.
Year 11 and Year 12 boxes go deeper than the Year 10 text around them.

### Story time: The chessboard question
Ivy's grandpa points at a chessboard. "How many squares can you see?"

"64," she says straight away. Grandpa shakes his head. "Look again. The whole board is a square too. So is every 2 by 2 block."

Ivy realises she needs a **system**. She counts the 1 by 1 squares, then the 2 by 2 squares, then the 3 by 3, and so on, up to the one 8 by 8 square. The total is 204! Counting questions are all about being organised so you do not miss any or count any twice.

**In short:** Counting problems are solved by counting in an organised way so nothing is missed or counted twice. Count squares one size at a time, and when $n$ people all shake hands once, there are $\frac{n(n - 1)}{2}$ handshakes.

## Before you start

- Square numbers: $1, 4, 9, 16, 25, 36, 49, 64$.
- Adding a series quickly: $1 + 2 + \dots + 6 = 21$ (see Shortcuts for Adding a Series).
- Making an organised list or table.

## Counting squares in a grid

### Key idea: Count by size
In a 4 by 4 grid:

| Size | How many |
|---|---|
| 1 by 1 | $4 \times 4 = 16$ |
| 2 by 2 | $3 \times 3 = 9$ |
| 3 by 3 | $2 \times 2 = 4$ |
| 4 by 4 | $1 \times 1 = 1$ |

Total: $16 + 9 + 4 + 1 = 30$ squares. For an $n$ by $n$ grid, add the square numbers from $1^2$ up to $n^2$.

For a chessboard (8 by 8): $1 + 4 + 9 + 16 + 25 + 36 + 49 + 64 = 204$.

## Counting rectangles

A rectangle is fixed by choosing **2 of the vertical lines** and **2 of the horizontal lines**.

### Worked example: A 3 by 2 grid
A grid 3 squares wide and 2 squares tall has 4 vertical lines and 3 horizontal lines.

Ways to choose 2 vertical lines from 4: $3 + 2 + 1 = 6$. Ways to choose 2 horizontal lines from 3: $2 + 1 = 3$.

Rectangles: $6 \times 3 = 18$.

### Exam tip: Choosing 2 from a row of lines
From $n$ lines, the number of pairs is $1 + 2 + \dots + (n - 1)$. From 4 lines: 6 pairs. From 5 lines: 10 pairs.

Squares are rectangles too, so they are included in this count.

## Counting routes on a grid

How many ways from X to Y moving only **right** or **down** along the lines?

*Diagram: A grid 3 squares wide and 2 tall. Each corner shows how many routes reach it from X moving only right or down: the top row and left column are 1, then 2, 3, 4 in the middle row and 3, 6, 10 in the bottom row. Y at the bottom right has 10*
*Each corner is the sum of the corner above and the corner to its left. There are 10 routes to Y.*

### Key idea: Add the two ways in
Write 1 at every corner on the top row and the left column (there is only one way to reach each). Every other corner gets the **sum** of the number above it and the number to its left. The number at Y is the answer.

## Handshakes

Seven friends meet, and each shakes hands with every other person once. How many handshakes?

The first person shakes 6 hands. The second has already shaken with the first, so 5 new ones. Then 4, 3, 2, 1, 0.

$$6 + 5 + 4 + 3 + 2 + 1 = 21$$

### Key idea: Handshake shortcut
With $n$ people: $\frac{n \times (n - 1)}{2}$ handshakes. For 7 people: $\frac{7 \times 6}{2} = 21$.

### Watch out: Do not double count
$7 \times 6 = 42$ counts every handshake twice, once from each person. That is why we halve it.

The same pattern counts games in a round robin (every team plays every other team once) and lines joining dots.

## Multiplying choices

If you choose a shirt (3 kinds) **and** shorts (4 kinds), there are $3 \times 4 = 12$ outfits. "And" means multiply.

### Challenge: Selective level: is it even possible?
Can 45 budgies go into 10 cages so that every cage has a different number and none is empty? The smallest possible total is $1 + 2 + \dots + 10 = 55$. That is more than 45, so it is **impossible**.

How many triangles of all sizes are in a triangle split into 4 small triangles (one upside-down in the middle)? There are 4 small ones and 1 big one: 5 triangles.

How many 2-digit numbers can be made from the digits 1, 2, 3 and 4 with no digit repeated? 4 choices for the tens and then 3 for the ones: $4 \times 3 = 12$.

**Mind map**

```text
Counting
  Squares
    Count each size
    1 + 4 + 9 + 16
  Rectangles
    Pick 2 vertical lines
    Pick 2 horizontal lines
    Multiply
  Routes
    1s on the edges
    Add above and left
  Handshakes
    n(n - 1) ÷ 2
  Choices
    And means multiply
```

## Quick summary

- Count squares one size at a time. A 4 by 4 grid has $16 + 9 + 4 + 1 = 30$.
- A rectangle is two vertical lines and two horizontal lines. Multiply the number of pairs of each.
- Routes moving only right and down: put 1s along the top and left, then add the number above and to the left.
- Handshakes among $n$ people: $\frac{n(n - 1)}{2}$.
- Making one choice and another: multiply the number of options.

## Quiz

Try these questions from the chapter quiz.

1. How many squares of all sizes are in a 2 by 2 grid?
   - A. 4
   - B. 5
   - C. 6
   - D. 8
   - Answer: B. 5. Four 1 by 1 squares and one 2 by 2 square.

2. How many squares of all sizes are in a 3 by 3 grid?
   - A. 9
   - B. 13
   - C. 14
   - D. 16
   - Answer: C. 14. $9 + 4 + 1 = 14$.

3. 4 friends each shake hands once with every other friend. How many handshakes?
   - A. 4
   - B. 6
   - C. 8
   - D. 12
   - Answer: B. 6. $3 + 2 + 1 = 6$.

The whole chapter quiz is on the page, for signed-in students: https://whizznotes.com/selective-school-maths/counting-problems/#quiz
