Sum of squares refers to the sum of the squares of numbers. It is basically the addition of squared numbers. The squared terms could be 2 terms, 3 terms, â€˜nâ€™ number of terms, first n even terms or odd terms, set of natural numbers or consecutive numbers, etc. This is basic math, used to perform the arithmetic operation of addition of squared numbers. In this article, we will come across the formula for addition of squared terms with respect to statistics, algebra, and for n number of terms.
Definition
In arithmetic, we often come across the sum of n natural numbers. There are various formulae and techniques for the calculation of the sum of squares. Let us write some of the forms with respect to two numbers, three numbers and n numbers.

In statistics, it is equal to the sum of the squares of variation between individual values and the mean, i.e.,
Î£(x_{i} + xÌ„)^{2}
Where x_{i }represents individual values and xÌ„ is the mean.
Sum of Squares Formulas and Proofs
 For Two Numbers:
The formula for addition of squares of any two numbers x and y is represented by;
x^{2 }+ y^{2} = (x + y)^{2}– 2ab ; x and y are real numbers 
Proof: From the algebraic Identities, we know;
(x + y)^{2} = x^{2 }+ y^{2 }+ 2ab
Therefore, we can write the above equation as;
x^{2}+y^{2} = (x + y)^{2} – 2ab
 For Three Numbers
The formula for addition of squares of any three numbers say x, y and z is represented by;
x^{2 }+ y^{2}+z^{2} = (x+y+z)^{2}2xy2yz2xz ; x,y and z are real numbers 
Proof: From the algebraic Identities, we know;
(x+y+z)^{2} = x^{2 }+ y^{2 }+ z^{2 }+ 2xy + 2yz + 2xz
Therefore, we can write the above equation as;
x^{2 }+ y^{2}+z^{2} = (x+y+z)^{2}2xy2yz2xz
 For n Natural Numbers
The family of natural numbers includes all the counting numbers, starting from 1 till infinity. If n consecutive natural numbers are 1, 2, 3, 4, …, n, then the sum of squared â€˜nâ€™ consecutive natural numbers is represented by: 1^{2} + 2^{2} + 3^{2} + … + n^{2}.
In short, it is denoted by the notation Î£n^{2}. The formula for the addition of squares of natural numbers is given below:
Î£n^{2} = n/6(n +1)(2n + 1) 
Sum of Squares of First n Even Numbers
The addition of squares of first even natural numbers is given by:
Î£(2n)^{2} = 2^{2} + 4^{2} + 6^{2} + 8^{2} + …+ (2n)^{2}
Proof:
Î£(2n)^{2 }= 2^{2}.1^{2} + 2^{2}.2^{2} + 2^{2}.3^{2} + 2^{2}.4^{2} +…+ 2^{2}.n^{2}
Î£(2n)^{2 }= 2^{2}(1^{2} + 2^{2} + 3^{2} + 4^{2} â€¦ + n^{2})
Î£(2n)^{2 }= 4[n/6(n +1)(2n + 1)] (Formula for sum of squared n natural numbers)
Î£(2n)^{2} = 2n/3 (n+1) (2n+1)
Sum of Squares of First n Odd Numbers
The addition of squares of first odd natural numbers is given by:
Î£(2n1)^{2} = 1^{2} + 3^{2} + 5^{2} + … + (2n – 1)^{2}
Proof:
Î£(2n1)^{2 }= 1^{2} + 2^{2} + 3^{2} + â€¦ + (2n – 1)^{2} + (2n)^{2} – [2^{2} + 4^{2} + 6^{2} + â€¦ + (2n)^{2}]
On applying the formula for the addition of squares of 2n natural numbers and of n even natural numbers, we get;
Î£(2n1)^{2 }= 2n/6 (2n + 1)(4n + 1) – (2n/3) (n+1)(2n+1)
Î£(2n1)^{2 }= n/3 [(2n+1)(4n+1)] – 2n/3 [(n+1)(2n+1)]
Taking out the common terms, we get;
Î£(2n1)^{2 }= n/3 (2n+1) [4n + 1 – 2n 2]
Î£(2n1)^{2 }= n/3 (2n+1) (2n 1) is the required expression.
Sum of: 
Formula 
Squares of two numbers 
x^{2 }+ y^{2} = (x+y)^{2}2ab 
Squares of three numbers 
x^{2 }+ y^{2}+z^{2} = (x+y+z)^{2}2xy2yz2xz 
Squares of first â€˜nâ€™ natural numbers 
Î£n^{2} = n/6(n +1)(2n + 1) 
Squares of first even natural numbers 
Î£(2n)^{2} = 2n/3 (n+1) (2n+1) 
Squares of first odd natural numbers 
Î£(2n1)^{2 }= n/3 (2n+1) (2n 1) 
Sum of Squares Examples
Q.1: Evaluate 4^{2} + 5^{2} by the help of formula and directly as well. Verify the answers.
Solution: We know;
x^{2 }+ y^{2} = (x+y)^{2}2ab
4^{2} + 5^{2} = (4 + 5)^{2} – 2.4.5
4^{2 }+ 5^{2} = 9^{2} – 40
4^{2} + 5^{2} = 81 – 40 = 41
Now, solving the given equation directly, we get;
4^{2} + 5^{2} = 16 + 25 = 41
Both answers are the same. Hence, verified.
Q.2: Find the addition of squares of the first 40 natural numbers.
Solution: The formula of sum of squared natural numbers is given by:
Î£n^{2} = n/6(n +1)(2n + 1)
Here, n = 40
Î£40^{2} = 40/6 (40 + 1)(2 x 40 + 1)
Î£40^{2 }= 20/3 (41)(81)
Î£40^{2 }= (20)(41)(27)
Î£40^{2 }= 22140