Visual Sum of Cubes

This article discusses a pattern I noticed in ‘visual’ derivations of the formulas for and , which led me to a similar derivation for .

using two lines

There’s a well-known trick for adding . Leaving out a bunch of symbols, it looks like this:

In other words, we arrange the sum as a line, then add a flipped copy of the line, multiplying by to keep the total the same.

Since consecutive entries increase by in the first line but decrease by in the flipped line, the combined entries all have the same value.

So we have entries all of value , and can simply multiply to get the total.

using three triangles

Triangle arrangement of

I recently encountered1 a similar trick for the sum of squares , but this time using three triangles instead of two lines!

In other words, we arrange the sum as a triangle—one one (), followed by two twos (), and so on, to the last row of ’s ().

We then add two rotated copies of the triangle so we have all three orientations (i.e. the gets to be at each of the three corners), multiplying by to keep the total the same.

Every entry in the resulting triangle has the same value of 2, and there are (as derived above!) entries, so we simply multiply to get the total.

using four tetrahedra

Since this trick worked for using lines and using triangles, I wanted to see if any shape would work for the sum of cubes .

Pyramids?

The simplest way to arrange is as a pyramid, where the top layer is one one (), the second layer is two-by-two twos (), and so on, to the last layer of -by- ’s (). For example, for :

Pyramid arrangement of

But pyramids aren’t very symmetrical—the sides are triangles but the base is a square, so every symmetry leaves the at the top and doesn’t actually change the entries at all, meaning we can’t combine copies in a helpful way.

Octahedra?

If you double the pyramid, you get a much more symmetrical object—the octahedron. It represents (two pyramids, minus one th layer since it isn’t doubled). For example, for :

Octahedron arrangement of

This looks promising, since we can combine rotated copies of it as we did with lines and triangles. But this only helps if the combined entries all have the same value, and it turns out they don’t. For , for example:

Combining the three unique rotations of the octahedron

The combined entries aren’t all equal—for example, the top is but the center is .

Tetrahedra!

Doubling the pyramid didn’t work, so maybe we can cut it in half instead!

It turns out the entries of our pyramid are equivalent to the entries of two tetrahedra, minus the shared central triangle. We can visualize this for for example:

And the pattern holds for all :

We already know the formula for the triangle—it’s just from above!—and tetrahedra are much more symmetrical than pyramids, so we can try the rotated copies trick again:

In other words, we add three rotated copies of the tetrahedron so we have all four orientations (i.e. the gets to be at each of the four corners), multiplying by to keep the total the same.

Every entry in the resulting tetrahedron has the same value of 3, and there are entries4, so we simply multiply to get the total.

And lastly we just substitute the formula for the triangle (derived above!) and simplify the polynomial.

Summary

So there we have it, all the ‘visual’ sums of powers before you need more than three dimensions, which isn’t very visual for humans.

In the context of simplices, going from 2 line segments to 3 triangles to 4 tetrahedra is a nice pattern—line segments are 1-simplices, triangles are 2-simplices, and tetrahedra are 3-simplices.

The pattern can continue, using 5 four-dimensional 4-simplices to derive the formula for , and so on in increasingly high dimensions. But that might defeat the point of it being a ‘visual’ derivation.

…but also

If we write the formula for in terms of the formula for , an interesting identity emerges, known as Nicomachus’s Theorem:

We can express this visually, as in this image by Wikipedia user cmglee:

Visual proof that [source]

This is a much easier way to visually derive the formula for , but don’t worry I still had fun figuring out the tetrahedron way—the more, the merrier!

Addendum If you’re curious how I made the spinning diagrams in this article, I’ve since written an explanation.

  1. I learned about the triangle trick from a popular (by math standards) 2020 tweet, though it has certainly been discovered before

  2. We want to show that the three rotated triangles always combine as a triangle with all entries equal to . We’ll visualize this for , but the reasoning works for all :

    Base case First we notice that the top will always be a 1 in one triangle and an in the other two, so the top always adds up to .

    Inductive case Next we notice that moving from an arbitrary entry to a neighboring entry in any direction, we will always have:

    • In one triangle, we move away from the corner, so the value changes by
    • In another triangle, we move parallel to the corner, so the value doesn’t change
    • In the other triangle, we move towards the corner, so the value changes by

    Thus the combined change in value from an entry to its neighbor is always , i.e. the combined value is unchanged from one entry to the next.

    And since we can move neighbor-to-neighbor from the top to every entry in the triangle, the combined values must all be the same

  3. We want to show that the four rotated tetrahedra always combine as a tetrahedron with all entries equal to . We’ll use the same argument we used for triangles, so see above2 for more details.

    The top will always be a 1 in one tetrahedron and an in the other three, so the top always adds up to .

    Moving from an arbitrary entry to a neighboring entry in any direction, we will always have the new value in one tetrahedron differ by (moving away from the corner), two values stay the same (moving parallel to the corner), and one value differ by (moving towards the corner).

    Thus the combined change in value from an entry to its neighbor is always , i.e. the combined value is unchanged from one entry to the next, so they are all

  4. The number of entries in the tetrahedron is called a tetrahedral number.

    We can calculate it using our formulas for and , by noticing that the th layer of the tetrahedron is just a triangle with entries and summing all layers: