Math Words Images Projects
Cubes, Squares, and Triangles
How can a measure of volume be related to ostensible measures of area?
And how can an arrangement of buttons clarify the situation?

Sometimes it takes me a long time to connect the dots. I've known the squares and cubes of many small numbers for a long time, but it was only recently that I noticed a special relationship among certain of those squares and cubes. And when I did, I was curious. Was it a special case or were there other, similar instances?

The specific squares and cubes whose relationship I first noticed were these:

53 = 152 - 102

Not only was the cube equal to the difference between two squares, but just look at the relationship of those root numbers! First off, I wondered if this could be generalized as follows:

x3 = (3x)2 - (2x)2

Well, that was quickly reduced to x=5. Boring! I already knew that. But if those coefficients were generalized, I asked myself, might it give a more interesting result? Let's try y and (y-1) as the coefficients:

x3 = (yx)2 - [(y - 1)x]2

First, let's put these terms in conventional (alphabetic) order, then see what happens.
(You can hover over each line to see an explanation of how it changed from above.)

x3 = (xy)2 - [x(y - 1)]2

x3 = x2y2 - x2(y - 1)2

x3 = x2y2 - x2 (y2 - 2y + 1)

x3 = x2y2 - (x2y2 - 2x2y + x2 )

x3 = x2y2 - x2y2 + 2x2y - x2

x3 = 2x2y - x2

x = 2y - 1
By the way, this can be reached through another path, starting with:
x3 = (x + y)2 - y2

and eventually using the quadratic formula. The details are left as an exercise for the reader.

Then, to solve for y in terms of x:

2y = x + 1

y =
x + 12

Now we can substitute this expression of y into our starting equation:

x3 = (yx)2 - [(y - 1)x]2
x3 = [
(x + 1)2
  x]2 - {[
(x + 1)2
- 1] x}2
x3 = [
x (x + 1)2
]2 - [
x (x - 1)2
]2

In other words, the cube of an integer is the difference between two squares:

[Actually, this relationship will hold true for any sort of number, positive or negative, rational fraction, transcendental, imaginary, or complex in any combination. It's just more fun -- and easier to grok -- with integers.]


So, now . . . How do triangles fit into all this?

Do you notice anything familiar about the inner part of that first term on the right-hand?

x (x + 1)2

If so, you're faster than I was. It wasn't until I was poking around to see if these patterns of numbers had anything to do with Pascal's Triangle that I came across a mention of triangle numbers.

What are triangle numbers? They're named that, not because of their relationship to Pascal's Triangle, but because they are the numbers of objects in triangular arrangements.

Note, however, that this sequence does appear within Pascal's Triangle. Can you spot it? Do you have any idea why it would show up this way?
That is, if you lay down one object (let's use buttons as our example, just to make this more readable), then lay down two buttons in a row below it, then three buttons below that, then four . . . to as many rows of buttons as you like . . . you will have a triangular arrangement that includes as many rows of buttons as the number of buttons in the longest row.

A triangle number is the total number of buttons in such an arrangement.

Let's look as a simple example, say five rows with five buttons in the longest row:

O
OO
OOO
OOOO
OOOOO

Count the buttons and you'll find we have fifteen buttons. Easy to count, when you have only a few rows, as here, but what if you have, say 287 rows? Fortunately, there's a formula for calculating the number of buttons (or whatever) in any such arrangement, no matter how large it may be.

How can we determine that formula? First, let's define the triangle number as a function, T(n), where n is the number of rows (and, of course, the number of buttons in the longest row):

T(n) = 1 + 2 + 3 + . . . + (n-2) + (n-1) + n

A common approach to resolving equations of this sort is to invert the right half and add the two equivalent expressions together, as follows:

  T(n) =    1   +       2   +      3    + . . . +  (n-2) +   (n-1) +     n
  T(n) =    n   +    (n-1) +   (n-2) + . . . +     3    +     2    +     1  
2T(n) = (n+1) + (n+1) + (n+1) + . . . + (n+1) + (n+1) + (n+1)

Note that each equation has exactly n terms on the right side. And since the terms on the right-hand side of that third equation are identical, that sum can be re-written as follows:

2 T(n) = n (n+1)

Dividing both sides by 2, then, gives us:

T(n) =
n (n + 1)2

A visual example might make this relationship more obvious. We'll have to use a specific number of buttons, of course. Returning to those five rows we used above, let's create two such triangular arrangements the same size, but one of them flipped upside-down. (We'll use red buttons for that second, inverted arrangement.)

OOOOOO
OOOOOO
OOOOOO
OOOOOO
OOOOOO

We still have five rows, just as before. However, each row now has, not a varying number of buttons, but exactly six buttons -- one button more than the number of rows.

With only a bit of cogitation, you'll see that this will hold true if we do this duplication-and-inversion trick with any number of rows. We'll have a rectangular arrangement with the original n rows, each row now having (n + 1) buttons for a total n(n + 1) buttons. And since the rectangle is made up of two identical triangles, we have half that many buttons in each of the triangles, as above:

T(n) =
n (n + 1)2

Look familiar? That triangle function of n is the same formula as the larger of the two terms that are squared in the equation for n3. And to complete the circle (“Oh, no -- he's bringing in circles now, too?”), let's see what the triangle number for (n-1) might be:

T(n - 1) =
(n - 1) [(n - 1) + 1]2

T(n - 1) =
(n - 1) n2

T(n - 1) =
n (n - 1)2

And there we have the formula for the smaller of the two terms in the equation for n3!

Thus, knowing the triangle function T(n), we can express the relationship of cubes to squares in terms of triangles as follows:

n3 = T2(n) - T2(n - 1)
--William A. B. Maloney, 16 September 2013
Contact the Webmaster