The sum of squares

Carlos Hurtado
3 min readDec 23, 2021

--

Although it is entirely possible to prove that

The series of squares

without any kind of visual aid, it is certainly useful to also prove it visually.

The visual aid

The sum of squares can be visually represented as follows:

Sum of squares from 1 to 4

Now, if additional squares are added so that every group of squares is the same height, then the visualization becomes that of four times the series of integers:

4 times the sum of integers from 1 to 4
Sum of integers from 1 to 4

This means that the series of squares may be described as n times the series of integers minus the number of red squares, where n is the upper bound of the summation:

Relationship between the sum of squares and the sum of integers

However, how is the number of red squares determined? Fortunately, each row of red squares are simply sums of integers:

Each row of red squares is a sum of integers
Sums of integers with 1, 2, and 3 upper bounds

What this means is that the number of red squares is actually the sum of the sum of integers:

Sum of the sum of integers from 1 to 3

This series is mathematically described as follows:

Mathematical description of the sum of the sum of integers

Recalling that the sum of integers (derived by Gauss) is determined by

Sum of integers

it follows that the sum of the sum of integers is given by

Sum of the sum of integers

Thus, the number of red squares is determined by

Number of red squares

Here, the upper bound needs to be n -1 because it is the limit of the red squares’ reach:

The upper bound of the red squares is n-1

Consequently, the sum of squares is mathematically described as

The sum of squares in terms of the sum of integers and the sum of the sum of integers

The last remaining endeavor is how to simplify the above expression. First, the right hand side left sum is solved:

With this simplification, the sum of squares can now be expressed as

Second, by realizing that

the sum of squares is now

Furthermore, the last sum can be modified again such that

and so, the sum of squares is modified accordingly:

--

--

Carlos Hurtado

Undergraduate student in Robotics and Digital Systems at ITESM. 💙 Math, science, and robotics. Lifelong learner.