Mathwords logoReference LibraryMathwords

Difference of Squares

Difference of squares is a factoring pattern where a squared term minus another squared term can be written as the product of two binomials: one with a sum and one with a difference. The formula is a2b2=(a+b)(ab)a^2 - b^2 = (a + b)(a - b).

The difference of squares identity states that for any real numbers aa and bb, the expression a2b2a^2 - b^2 factors into the product (a+b)(ab)(a + b)(a - b). This can be verified by expanding the right side using the distributive property. The pattern applies whenever an expression can be written as the subtraction of two perfect squares, including cases where aa and bb are themselves algebraic expressions.

Key Formula

a2b2=(a+b)(ab)a^2 - b^2 = (a + b)(a - b)
Where:
  • aa = the first term, whose square appears on the left
  • bb = the second term, whose square is subtracted

Worked Example

Problem: Factor the expression 9x2259x^2 - 25.
Step 1: Identify whether each term is a perfect square. The first term is 9x2=(3x)29x^2 = (3x)^2 and the second term is 25=5225 = 5^2.
9x225=(3x)2529x^2 - 25 = (3x)^2 - 5^2
Step 2: Assign a=3xa = 3x and b=5b = 5 in the difference of squares formula.
a2b2=(a+b)(ab)a^2 - b^2 = (a + b)(a - b)
Step 3: Substitute into the formula to get the factored form.
(3x+5)(3x5)(3x + 5)(3x - 5)
Step 4: Check by expanding. Multiply using FOIL: 9x215x+15x25=9x2259x^2 - 15x + 15x - 25 = 9x^2 - 25. The middle terms cancel, confirming the answer.
(3x+5)(3x5)=9x225(3x + 5)(3x - 5) = 9x^2 - 25 \checkmark
Answer: 9x225=(3x+5)(3x5)9x^2 - 25 = (3x + 5)(3x - 5)

Why It Matters

The difference of squares pattern shows up throughout algebra and beyond. You use it when simplifying rational expressions, solving quadratic equations, and even in mental math—for example, computing 47×5347 \times 53 quickly by recognizing it as (503)(50+3)=25009=2491(50 - 3)(50 + 3) = 2500 - 9 = 2491. In higher math, the same idea generalizes to differences of higher powers.

Common Mistakes

Mistake: Trying to factor a sum of squares like a2+b2a^2 + b^2 as (a+b)(ab)(a + b)(a - b) or (a+b)2(a + b)^2.
Correction: The pattern only works for a difference (subtraction) of two squares. Over the real numbers, a2+b2a^2 + b^2 does not factor into binomials with real coefficients.
Mistake: Stopping too early when a factor is itself a difference of squares.
Correction: Always check whether the result can be factored further. For example, x416x^4 - 16 factors as (x2+4)(x24)(x^2 + 4)(x^2 - 4), and x24x^2 - 4 factors again into (x+2)(x2)(x + 2)(x - 2).

Related Terms