Sum of Squares of n Natural Numbers

The sum of squares of the first \(n\) natural numbers refers to the following special sum,

\(\sum_{i=1}^n i^2 = \sum n^2 = 1^2 + 2^2 + 3^2 + \ldots + n^2\)

Up to the natural number \(n\).

Sum of Squares of n Natural Numbers Formula

We have the formula for the sum of squares of n natural numbers as follows: 

\(\sum_{i=1}^n i^2 = \sum n^2 = \frac{n(n+1)(2n+1)}{6}\)

This gives us the sum of squares of consecutive natural numbers \(1^2 + 2^2 + 3^2 + \ldots + n^2\) upto \(n\), for any natural number \(n\).

Variations of the Formula

We can have the following various sums based on the sum of squares of the first \(n\) natural numbers. 

Sum of the Squares of First n Even Natural Numbers

This sum is simply \(2^2 + 4^2 + 6^2 + \ldots + (2n)^2\) upto the \(n^{\text{th}}\) even natural number. 

We can arrive at the formula as follows:

\(
\begin{align}
\sum_{i=1}^n {(2i)}^2 &= 2^2 + 4^2 + 6^2 + \ldots + (2n)^2 \\
& = 2^2 (1^2) + 2^2 (2^2) + 2^2(3^2) + \ldots + 2^2 (n^2) \\
& = 2^2 (1^2 + 2^2 + 3^2 + \ldots + n^2)
\end{align}
\)

But we know that \(1^2 + 2^2 + 3^2 + \ldots + n^2\) is simply the sum of the squares of the first n natural numbers, which we know is \(\frac{n(n+1)(2n+1)}{6}\). Substituting this above, we get,

\(
\begin{align}
\sum_{i=1}^n {(2i)}^2 &= 2^2 (1^2 + 2^2 + 3^2 + \ldots + n^2) \\
& = 4 (\frac{n(n+1)(2n+1)}{6}) \\
& = \frac{2n(n+1)(2n+1)}{3}
\end{align}
\)

Thus, we have formula for sum of squares of first \(n\) even natural numbers,

\(\sum_{i=1}^n {(2i)}^2 =2^2 + 4^2 + 6^2 + \ldots +(2n)^2= \frac{2n(n+1)(2n+1)}{3}\)

Read More Sum of Even Numbers Formula

Sum of Squares of First n Odd Natural Numbers

This sum is simply written as \(1^2 + 3^2 + 5^2 + \ldots + (2n-1)^2\). 

This can also be simply written as \(\sum_{i=1}^n (2i-1)^2\) or \(\sum {(2n-1)}^2\).

We can derive the formula by noting the following, for the sums of squares of the first \(2n\) natural numbers. 

\(\sum_{i=1}^{2n} i^2 = 1^2 + 2^2 + 3^2 + \ldots + (2n)^2 = (1^2 + 3^2 + \ldots + (2n-1)^2) + (2^2 + 4^2 + \ldots + (2n)^2)\)

We simply rearranged the terms, to group odd and even natural numbers together. The sums on right are the sums of the squares of the first \(n\) odd and even numbers, respectively. Now we can write,

\(\sum_{i=1}^{2n} i^2 = 1^2 + 2^2 + 3^2 + \ldots + (2n)^2 = \sum_{i=1}^n (2i-1)^2 + \sum_{i=1}^n {(2i)}^2\)

This gives us, for the sum of the first \(n\) odd numbers, 

\(\sum_{i=1}^n (2i-1)^2 = \sum_{i=1}^{2n} i^2 – \sum_{i=1}^n {(2i)}^2\)

We know the formula for the sum of the squares of the first \(n\) numbers, so we just have to replace \(n\) with \(2n\) for the first part of RHS. 

We get, after replacing,

\(
\begin{align}
\sum_{i=1}^n (2i-1)^2 &= \frac{2n(2n+1)(4n+1)}{6} – \frac{2n(n+1)(2n+1)}{3} \\
& = \frac{n(2n+1)}{3} [(4n+1) – 2(n+1)] \\
& = \frac{n(2n+1)}{3} (2n -1) \\
& =\frac{(n(2n+1)(2n-1)}{3}
\end{align}
\)

Thus we have formula for sum of squares of first \(n\) odd numbers,

\(\sum_{i=1}^n (2i-1)^2 = \sum (2n-1)^2 = \frac{(n(2n+1)(2n-1)}{3}\)

Read More Sum of Odd Number Formula

Sum of Squares of Two Real Numbers

While this is not a direct application, it is still useful to know. Let \(x_1\) and \(x_2\) be the two real numbers whose squares we wish to add. We have,

\(x_1^2 + x_2^2 = (x_1 + x_2)^2 – 2{x_1}{x_2}\)

Sum of Squares of Three Real Numbers 

Let the three real numbers be \(x_1\), \(x_2\) and \(x_3\). We have, from elementary identities,

\(x_1^2 + x_2^2 + x_3^2 = (x_1+x_2+x_3)^2 – 2[(x_1x_2)+(x_2x_3)+(x_3x_1)]\)

Solved Examples

Question 1. Find the sum of the squares of the first 20 natural numbers.

Solution. We know that the formula for the sum of the squares of the first n natural numbers, the formula is,

\(\sum_{i=1}^n i^2 = \sum n^2 = \frac{n(n+1)(2n+1)}{6}\)

Substituting \(n=20\) for the above equation, we get,

\(\sum_{i=1}^{20} i^2 = \frac{20(20+1)(2(20)+1)}{6}\)

Upon simplification, we get, 

\(\sum_{i=1}^{20} i^2 = 2870\)

Question 2. Find the sum of the squares of the first 18 odd numbers.

Solution. We know that the sum of the squares of the first n odd numbers is,

\(\sum_{i=1}^n (2i-1)^2 = \sum (2n-1)^2 = \frac{(n(2n+1)(2n-1)}{3}\)

Substituting \(n=18\) in the above equation, we have,

\(\sum_{i=1}^{18} (2i-1)^2 = \frac{(18(2(18)+1)(2(18)-1)}{3}\)

Calculating, we have,

\(\sum_{i=1}^{18} (2i-1)^2 = 7770\)

FAQs

How to find sum of squares of n natural numbers?

We can find the sum of the squares of n natural numbers by a formula,
\(\sum_{i=1}^n i^2 = \sum n^2 = \frac{n(n+1)(2n+1)}{6}\)

What is the sum of the squares of the first 100 natural numbers?

The sum of the squares of the first 100 natural numbers can be obtained by substituting n=100 in the above formula.
We get the sum of the squares of the first 100 natural numbers as 338350.

What is difference in formula for sum of squares of first n natural numbers and sum of first n numbers?

The formula for sum of first \(n\) natural numbers is,
\(\sum n = \frac{n(n+1)}{2}\)
On the other hand, the sum of the squares of first \(n\) natural numbers is: 
\(\sum n^2 = \frac{n(n+1)(2n+1)}{6}\)

What is the sum of the first n odd numbers?

The formula for the sum of the first \(n\) odd numbers is simply \(n^2\).

Scroll to Top
Scroll to Top