Main menuGallery

Sums as shapes

This exhibit needs WebGL, which your browser or device doesn’t seem to support.
Try a recent Chrome, Edge, Firefox or Safari.

Sums as shapes

Every one of these sums has a formula — and the blocks show you why. Drag to orbit · scroll or pinch to zoom.

Odd numbers → a square

Which sum?

How far?

5

Animate

View

The numbers

Terms added
Blocks placed
Blocks in the whole sum
The formula
The shape it makes
Agree?

Learn

Where’s the maths? This is algebra — number patterns, and the hunt for the nth term, which is the part of Secondary maths where you look at a growing list of numbers and find one formula that gives you any total without adding anything up. The blocks on screen turn each sum into a shape, and the shape is the reason the formula works. Add the odd numbers 1 + 3 + 5 + … and each new one is an L-shaped collar that wraps neatly round the square you already had, so the running total can only ever be a square number. Lay the counting numbers 1 + 2 + 3 + … out as a staircase, slide a second staircase in upside down, and the two together make a plain rectangle whose sides you can read off — so one staircase is exactly half of it. Do the same trick in three dimensions with cubes and they flatten into a square whose side is that staircase total. Nothing here is checked by trying lots of numbers: you can see in one picture why the formula holds for every n at once, which is what people mean by a “proof without words”.

📘 On the Sec 1–4 syllabus
  • Sec 1 · N5 Algebraic expressions — 5.5 finding an algebraic expression for the nth term
  • Sec 2 · N6 Functions and graphs — 6.6 quadratic functions (n(n+1)/2 is quadratic in n)
  • Sec 2 · N5 Algebraic expressions — 5.9 expansion of algebraic products

Beyond the syllabus: proof by induction is A-Level.

Odd numbers make squares: 1 + 3 + 5 + … + (2n − 1) = n². The nth odd number is 2n − 1 — that is the nth-term formula for the sequence 1, 3, 5, 7, … Each L-shaped collar (its old name is a gnomon) is one row of k blocks plus one column of k − 1 blocks, so it holds 2k − 1 blocks, and it turns a k − 1 square into a k square. Algebraically that is the same statement: k² − (k − 1)² = 2k − 1.

The staircase: 1 + 2 + 3 + … + n = n(n + 1)/2. One staircase alone is an awkward shape, but two of them — one upright, one turned through half a turn — interlock into an n × (n + 1) rectangle with no gaps. So twice the sum is n(n + 1), and the sum itself is half of that. These are the triangular numbers 1, 3, 6, 10, 15, … Expanding the product gives (n² + n)/2, so the total is a quadratic in n: double n and the sum roughly quadruples. Carl Friedrich Gauss is said to have used the same pairing trick to add 1 to 100 in his head at the age of nine.

Cubes: 1³ + 2³ + … + n³ = (1 + 2 + … + n)². This one looks like a coincidence and is not. Write T(k) = 1 + 2 + … + k. The L-shaped collar that grows a square of side T(k − 1) into a square of side T(k) has area T(k)² − T(k − 1)², and expanding that difference of two squares gives (T(k) + T(k − 1)) × (T(k) − T(k − 1)) = k² × k = . So the whole of a k × k × k cube fits exactly into one collar — watch it unstack layer by layer as it flies across — and the finished square has side T(n) = n(n + 1)/2. The result is named after Nicomachus of Gerasa, about 100 AD.

  • Sums of the first n whole numbers grow like n² — a square.
  • Sums of the first n squares grow like n³.
  • Sums of the first n cubes grow like n⁴ — and here they are exactly a perfect square, which is why the third picture is flat.
Try this: choose Odd numbers, set n = 5 and press Step five times, saying the running total out loud as each collar lands: 1, 4, 9, 16, 25. Before the last press, predict the answer — you already know it is 5². Now switch to Cubes with the same n: 1 + 8 + 27 + 64 + 125 = 225, and 225 is 15² where 15 = 1 + 2 + 3 + 4 + 5. Finally, drag n up to 12 and check the table: can you write down the total for n = 20 without pressing anything?

Drag to orbit · scroll or pinch to zoom · Step adds one layer · the slider changes n.