Copyright © University of Cambridge. All rights reserved.

'Sums of Squares' printed from https://nrich.maths.org/

Show menu

Hazel of Madras College, St Andrew's, Fife and David of Reading School, Berkshire both sent in good proofs of the first result. Hazel worked out some examples of her own and then made the conjecture that


$2(x^2 + y^2) = (x + y)^2 + (x - y)^2$

Hazel's proof was as follows:

$(x + y)^2 + (x - y)^2 = (x + y)(x + y) + (x - y)(x - y)$
$= x^2 + 2xy + y^2 + x^2 - 2xy + y^2$
$= 2x^2 + 2y^2$
$= 2(x^2 + y^2)$

So double the sum of two squares is always equal to the sum of two squares.

Robert of Newcastle-Under-Lyme School provided an excellent solution and managed to crack the second toughnut part of the problem .

Robert sensibly looked at some special cases with low numbers before making a conjecture that

$3(x^2+y^2+z^2) = (x+y+z)^2 +(z-x)^2 +(z-y)^2 +(y-x)^2$

His proof of the result was:

L.H side = $3x^2 + 3y^2 + 3z^2$

R.H side = $(x + y + z)^2 + (z^2 -2xz + x^2) + (z^2 - 2yz + y^2)+ (y^2 -2xy + x^2)$

$= (x + y + z)^2+2z^2 + 2y^2 + 2x^2 - 2xz - 2yz -2xy $

$ =(x^2 + y^2 +z^2 +2xy +2yz + 2xz)+ 2z^2 + 2y^2 + 2x^2 -2xz-2yz - 2xy $

$ = 3x^2 + 3y^2 + 3z^2 $

This proves the result.


Finally, Simon of Elizabeth College, Guernsey managed to prove an extended general version of the result incorporating the sum of n squares. This uses a lot of summations and notations that you would usually only encounter at A-level, so this part is for 16 and above!


Consider the case with n squares, say $a_1^2, a_2^2, \ldots, a_n^2$ multiplied by n equalling $x$ other squares.

Consider $$\left(\sum_{i=1}^{n} a_i\right)^2$$

$$\left(\sum_{i=1}^{n} a_i\right)^2 = 2\sum_{i=1}^{n} \sum_{j=i+1}^{n} a_ia_j + \sum_{i=1}^{n} a_i^2$$

Now consider $$ \sum_{r=1}^{n} {\sum_{s=r+1}^{n} (a_r-a_s)^2}$$

$$= \sum_{r=1}^{n} {\sum_{s=r+1}^{n} ( a_r^2 - 2a_ra_s + a_s^2 )}$$

$$= \sum_{r=1}^{n} {\sum_{s=r+1}^{n} a_r^2} - 2\sum_{r=1}^{n} {\sum_{s=r+1}^{n} a_ra_s} + \sum_{r=1}^{n} {\sum_{s=r+1}^{n} a_s^2}$$

Adding our first two functions $$\left(\sum_{i=1}^{n} a_i\right)^2 + \sum_{r=1}^{n} {\sum_{s=r+1}^{n} (a_r-a_s)^2}$$

$$=\sum_{i=1}^{n}a_i^2+\sum_{r=1}^{n}{\sum_{s=r+1}^{n} a_r^2}+\sum_{r=1}^{n}{\sum_{s=r+1}^{n}a_s^2}$$

Having shown that the `double' summation removes the extra terms in the form of $2a_ra_s$, I now need to show that $$n \left ( \sum_{r=1}^n {a_r^2} \right ) = \sum_{i=1}^{n}a_i^2+\sum_{r=1}^{n}{\sum_{s=r+1}^{n} a_r^2}+\sum_{r=1}^{n}{\sum_{s=r+1}^{n}a_s^2}$$

Focusing at the moment on

$$ \sum_{r=1}^{n}{\sum_{s=r+1}^{n} a_r^2}+\sum_{r=1}^{n}{\sum_{s=r+1}^{n}a_s^2} $$

we can see that for $n=1$ there will be $n-1$ terms coming from the left summation and none from the right. Looking at $n=2$ there will be $n-2$ terms on the left, and there will be one term on the right, which is $n-1$ in total. Now looking at the $n^{th}$ term we can see that there will be $n-n$ terms on the left and $n-1$ on the left which is $(n-n)+(n-1)=n-1$ in total. Therefore, we can say that

$$ \sum_{i=1}^{n}a_i^2+\sum_{r=1}^{n}{\sum_{s=r+1}^{n} a_r^2}+\sum_{r=1}^{n}{\sum_{s=r+1}^{n}a_s^2} $$

$$ = \sum_{i=1}^{n}a_i^2 + (n-1)\sum_{r=1}^{n}a_r^2 $$

$$ = n \left ( \sum_{r=1}^n {a_r^2} \right ) $$

Which is what we were trying to prove earlier.

To finalise the proof, we need to know how many terms there will be which equal the n multiplied by n square numbers. To to this I have summed the number of bracketed pairs.

$$\sum_{r=1}^{n} {\sum_{s=r+1}^{n} 1}$$

$$= \sum_{r=1}^{n} ( n - ( r + 1 ) + 1 )$$

$$= \sum_{r=1}^{n} ( n -r )$$

$$= \sum_{r=1}^{n} n - \sum_{r=1}^{n} r$$

$$= n^2 - \frac{n(n+1)}{2}$$

Since $T_{n-1} + T_{n} = n^2$, where $T_n$ is the $n^{th}$ triangle number, and $\frac{n(n+1)}{2}$ is the $n^{th}$ triangle number we, can see that

$$\sum_{r=1}^{n} {\sum_{s=r+1}^{n} 1} = T_{n-1}$$

Therefore, there will be $T_{n-1}$ bracketed pairs, plus the one large square, which is $T_{n-1}+1$ in total. Therefore, one can say that.

For n square numbers, multiplied by $n$, there will be $T_{n-1}+1$ other square numbers which equal the same value.


We can use this to determine how many `terms' there will be in our final equation. We can see that there will be $T_{n-1}+1$ terms, remembering to add the `largest' term containing all of the other terms. This leads us to the conclusion that $$n \left ( \sum_{r=1}^n {a_r^2} \right ) = \left(\sum_{i=1}^{n} a_i\right)^2 + \sum_{r=1}^{n} {\sum_{s=r+1}^{n} (a_r-a_s)^2}$$ which can be expressed in words as n square numbers, multiplied by $n$, will be equal to $T_{n-1}+1$ other square numbers.