Skip over navigation
Cambridge University Faculty of Mathematics NRich logo
menu search
  • Teachers expand_more
    • Early years
    • Primary
    • Secondary
    • Post-16
    • Events
    • Professional development
  • Students expand_more
    • Primary
    • Secondary
    • Post-16
  • Parents expand_more
    • Early Years
    • Primary
    • Secondary
    • Post-16
  • Problem-Solving Schools
  • About NRICH expand_more
    • About us
    • Impact stories
    • Support us
    • Our funders
    • Contact us
  • search

Or search by topic

Number and algebra

  • The Number System and Place Value
  • Calculations and Numerical Methods
  • Fractions, Decimals, Percentages, Ratio and Proportion
  • Properties of Numbers
  • Patterns, Sequences and Structure
  • Algebraic expressions, equations and formulae
  • Coordinates, Functions and Graphs

Geometry and measure

  • Angles, Polygons, and Geometrical Proof
  • 3D Geometry, Shape and Space
  • Measuring and calculating with units
  • Transformations and constructions
  • Pythagoras and Trigonometry
  • Vectors and Matrices

Probability and statistics

  • Handling, Processing and Representing Data
  • Probability

Working mathematically

  • Thinking mathematically
  • Developing positive attitudes
  • Cross-curricular contexts

Advanced mathematics

  • Decision Mathematics and Combinatorics
  • Advanced Probability and Statistics
  • Mechanics
  • Calculus

For younger learners

  • Early Years Foundation Stage

Sums of Squares

Age 16 to 18
Challenge Level Yellow star
  • Problem
  • Getting Started
  • Student Solutions
  • Teachers' Resources

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.

You may also like

Absurdity Again

What is the value of the integers a and b where sqrt(8-4sqrt3) = sqrt a - sqrt b?

Old Nuts

In turn 4 people throw away three nuts from a pile and hide a quarter of the remainder finally leaving a multiple of 4 nuts. How many nuts were at the start?

Just Touching

Three semi-circles have a common diameter, each touches the other two and two lie inside the biggest one. What is the radius of the circle that touches all three semi-circles?

  • Tech help
  • Accessibility Statement
  • Sign up to our newsletter
  • Twitter X logo

The NRICH Project aims to enrich the mathematical experiences of all learners. To support this aim, members of the NRICH team work in a wide range of capacities, including providing professional development for teachers wishing to embed rich mathematical tasks into everyday classroom practice.

NRICH is part of the family of activities in the Millennium Mathematics Project.

University of Cambridge logo NRICH logo