✦ScienexySCIENCE KNOWLEDGE LIBRARY
General science · SCI-FORM-ALG-039

Sum of the First n Squares

The sum of the first n squares is the total obtained by adding the squares of all positive integers from 1 through n.

\(S_{n} = 1^{2} + 2^{2} + 3^{2} + ... + n^{2} = n(n + 1)(2n + 1)/6\)

What this formula means

Definition

The sum of the first n squares is the total obtained by adding the squares of all positive integers from 1 through n.

Interpretation

The formula calculates a quadratic-power summation directly and avoids the need to square and add every integer individually.

Mathematical Significance

It is a fundamental summation identity used in sequences, discrete mathematics, algebra and mathematical analysis.

Special Cases

First Square

S₁ = 1.

First Two Squares

S₂ = 1² + 2² = 5.

First Three Squares

S₃ = 1² + 2² + 3² = 14.

Zero Terms

If n = 0, the sum is 0 by the empty-sum convention.

Scientific principle

Principle

Polynomial Summation and Telescoping Identity

Derivation

StepExplanationExpression

1

Start with the identity obtained by expanding the difference of consecutive cubes.

(k + 1)³ - k³ = 3k² + 3k + 1

2

Sum both sides from k = 1 to n.

Σ[(k + 1)³ - k³] = 3Σk² + 3Σk + Σ1

3

The left side telescopes, leaving only the first and last cube terms.

(n + 1)³ - 1³ = 3Sₙ + 3[n(n + 1)/2] + n

4

Expand the left side and simplify the terms involving the sum of natural numbers.

n³ + 3n² + 3n = 3Sₙ + (3n² + 3n)/2 + n

5

Isolate the sum of squares.

3Sₙ = n³ + 3n²/2 + n/2

6

Factorise and divide by 3.

Sₙ = n(n + 1)(2n + 1)/6

Result

The sum of the squares of the first n positive integers is n(n + 1)(2n + 1)/6.

Variables and their meanings

SymbolMeaningDescription

Sₙ

Sum of squares

The total of the squares of the first n natural numbers.

n

Number of terms

The number of consecutive positive integers being squared.

k

Summation index

An integer that runs from 1 through n.

k²

Squared term

The square of the integer k.

SI units and conversions

Si Unit

Not applicable

Dimensional Formula

Not applicable

Unit Explanation

The formula is a mathematical summation. If the terms represent squared measurements, the resulting sum has the square of the original measurement unit.

Unit Conversions

No items supplied.

Conditions of use

  • The sequence must contain the squares of consecutive positive integers starting at 1.

  • n must be a non-negative integer.

  • Each integer must be squared before summation.

  • The formula represents a finite sum.

Limitations and assumptions

  • The formula does not directly apply to cubes or higher powers.

  • A sequence beginning at a different integer requires subtracting the appropriate earlier terms.

  • The formula assumes consecutive integer bases.

  • It does not calculate the sum of arbitrary squared values.

Step-by-step worked examples

ProblemGivenSolutionAnswer

Find the sum of the squares of the first 5 natural numbers.

  • n = 5

StepExplanationCalculation

1

Apply the sum-of-squares formula.

Sₙ = n(n + 1)(2n + 1)/6

2

Substitute n = 5.

S₅ = 5(6)(11)/6

3

Simplify.

S₅ = 5 × 11 = 55

4

Verify by direct addition.

1 + 4 + 9 + 16 + 25 = 55

55

Find 1² + 2² + 3² + ... + 10².

  • n = 10

StepExplanationCalculation

1

Substitute n = 10.

S₁₀ = 10(11)(21)/6

2

Simplify the fraction.

10/6 × 11 × 21

3

Evaluate.

110 × 21 / 6 = 385

385

Real-world applications

ApplicationExplanation

Discrete Mathematics

The formula is used in finite summations and the study of polynomial sequences.

Computer Science

It helps calculate operation counts in algorithms whose workloads involve squared iteration indices.

Statistics

Sums of squared integer values appear in mathematical calculations involving squared deviations and polynomial expressions.

Mathematical Modelling

The formula provides a direct method for evaluating cumulative squared quantities.

Formula Meaning

Definition

The sum of the first n squares is the total obtained by adding the squares of all positive integers from 1 through n.

Interpretation

The formula calculates a quadratic-power summation directly and avoids the need to square and add every integer individually.

Mathematical Significance

It is a fundamental summation identity used in sequences, discrete mathematics, algebra and mathematical analysis.

Special Cases

First Square

S₁ = 1.

First Two Squares

S₂ = 1² + 2² = 5.

First Three Squares

S₃ = 1² + 2² + 3² = 14.

Zero Terms

If n = 0, the sum is 0 by the empty-sum convention.

Sources and further reading

No source has been supplied for this item yet. Treat the claim as needing editorial verification.

← Back to Formula Hub · Suggest a correction or source