Mathwords logoMathwords

Sum of Squares — Definition, Formula & Examples

Sum of squares is an expression of the form a2+b2a^2 + b^2, representing two squared terms added together. Unlike the difference of squares, a sum of squares cannot be factored into real-number binomials.

For real-valued expressions aa and bb, the sum of squares a2+b2a^2 + b^2 is irreducible over the real numbers, meaning it has no factorization into polynomials of lower degree with real coefficients. Over the complex numbers, it factors as (a+bi)(abi)(a + bi)(a - bi).

Key Formula

a2+b2=(a+bi)(abi)a^2 + b^2 = (a + bi)(a - bi)
Where:
  • aa = First term or expression
  • bb = Second term or expression
  • ii = The imaginary unit, where $i^2 = -1$

How It Works

When you encounter a2+b2a^2 + b^2 while factoring, recognize that it cannot be broken down further using real numbers. Students often try to write (a+b)2(a + b)^2, but expanding that gives a2+2ab+b2a^2 + 2ab + b^2, which includes a cross term. If you need to factor a sum of squares, you must use complex numbers: a2+b2=(a+bi)(abi)a^2 + b^2 = (a + bi)(a - bi). In statistics, "sum of squares" refers to (xixˉ)2\sum (x_i - \bar{x})^2, which measures how spread out data values are from their mean.

Worked Example

Problem: Factor x2+9x^2 + 9 completely.
Step 1: Identify the expression as a sum of squares with a=xa = x and b=3b = 3, since 9=329 = 3^2.
x2+32x^2 + 3^2
Step 2: Since a sum of squares does not factor over the reals, use the complex factorization.
x2+9=(x+3i)(x3i)x^2 + 9 = (x + 3i)(x - 3i)
Answer: Over the reals, x2+9x^2 + 9 is irreducible. Over the complex numbers, x2+9=(x+3i)(x3i)x^2 + 9 = (x + 3i)(x - 3i).

Why It Matters

Recognizing an irreducible sum of squares prevents wasted effort when factoring polynomials in algebra and precalculus. The complex factorization is essential for finding all roots of polynomials in courses that cover the Fundamental Theorem of Algebra.

Common Mistakes

Mistake: Factoring a2+b2a^2 + b^2 as (a+b)2(a + b)^2.
Correction: Expanding (a+b)2(a + b)^2 gives a2+2ab+b2a^2 + 2ab + b^2, not a2+b2a^2 + b^2. The extra 2ab2ab term means these are not equivalent. A sum of squares has no real factorization.