Difference of Squares

Definitionnoun phrase

What is a difference of squares?

A difference of squares is an expression of the form a2 − b2: one perfect square subtracted from another. It always factors as (a + b)(a − b). For example, x2 − 49 = (x + 7)(x − 7). A sum of squares, a2 + b2, does not factor over the real numbers.

In Spanish
diferencia de cuadrados
Also called
difference of two squares, a^2 – b^2, difference of perfect squares
Grade level
Algebra 1
Algebra 1Algebra 2CCSS HSA-SSE.A.2SATACTASVABACCUPLACERGED

Difference of Squares in a picture

Why a squared minus b squared equals (a + b)(a minus b)Left: an a by a square with a b by b corner cut out leaves a green strip and a blue piece. Right: the blue piece is moved beside the green one, forming a rectangle a + b long and a minus b wide. The areas are equal, so a squared minus b squared = (a + b)(a minus b). Example: 49 minus 9 = 10 times 4 = 40.b²aaa² − b²cut out the b² corneraba + ba − b(a + b)(a − b)move the blue pieceSame area, so a² − b² = (a + b)(a − b)Example: 49 − 9 = (7 + 3)(7 − 3) = 10 × 4 = 40
Cut the small square out of the big one and rearrange the leftover: it becomes an (a + b) by (a − b) rectangle.

Formal definition and notation

For any expressions a and b, the identity a2 − b2 = (a + b)(a − b) holds; an expression that matches the left side is called a difference of squares, and the factors a + b and a − b are conjugates. The identity is checked by multiplying: (a + b)(a − b) = a2 − ab + ab − b2 = a2 − b2.

Symbol Read it as Meaning
a2 − b2 a squared minus b squared the pattern to look for: two squares and a minus sign
(a + b)(a − b) a plus b times a minus b the factored form; the two factors are conjugates

Key facts

  • The middle terms cancel when you multiply the conjugates, which is why there is no x term: (x + 5)(x − 5) = x2 − 25.
  • Perfect squares to recognize: 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, and even powers such as x2, x4, y6.
  • Sometimes you can factor again: x4 − 16 = (x2 + 4)(x2 − 4), and then x2 − 4 = (x + 2)(x − 2).
  • It speeds up mental math: 51 × 49 = 502 − 12 = 2499.
  • Setting a difference of squares equal to 0 gives two opposite solutions: x2 − 36 = 0 means x = 6 or x = −6.

Difference of squares formula

Difference of squares formula
a2 − b2 = (a + b)(a − b)
a
the square root of the first term: for 9x2, a = 3x
b
the square root of the second term: for 25, b = 5

Check three things: exactly two terms, both perfect squares, and a minus sign between them. Factor out a common factor first if there is one.

Difference of Squares examples, step by step

Example 1: Basic pattern

Warm-up

Factor x2 − 81.

  1. Both terms are squares: x2 = (x)2 and 81 = 92, with a minus sign between them.
  2. So a = x and b = 9.
  3. x2 − 81 = (x + 9)(x − 9).

Answer: x2 − 81 = (x + 9)(x − 9).

Example 2: Coefficients and a common factor

Core

Factor completely: 12x2 − 75.

  1. Take out the GCF 3: 3(4x2 − 25).
  2. 4x2 = (2x)2 and 25 = 52.
  3. 3(2x + 5)(2x − 5).

Answer: 12x2 − 75 = 3(2x + 5)(2x − 5).

Example 3: Mental math shortcut

Test-style

Without a calculator, find 103 × 97.

  1. Write the numbers around 100: 103 = 100 + 3 and 97 = 100 − 3.
  2. (100 + 3)(100 − 3) = 1002 − 32.
  3. 10,000 − 9 = 9,991.

Answer: 103 × 97 = 9,991.

Common mistakes

✗ Mistakex2 − 16 = (x − 4)2.
✓ Insteadx2 − 16 = (x + 4)(x − 4). Check: (x − 4)2 = x2 − 8x + 16, not the same.

The factors must have opposite signs so the middle terms cancel. A squared binomial keeps a middle term.

✗ Mistakex2 + 25 = (x + 5)(x − 5).
✓ Instead(x + 5)(x − 5) = x2 − 25. x2 + 25 is a sum of squares and does not factor over the reals.

The pattern needs subtraction. Multiplying back always catches this error.

✗ Mistakex2 − 10 = (x + 5)(x − 5).
✓ Instead10 is not a perfect square; (x + 5)(x − 5) = x2 − 25.

Take square roots, not halves. Over the reals, x2 − 10 = (x + √10)(x − √10), but it has no integer factoring.

Not to be confused with

Difference of Squaresvs.Perfect square trinomial

A perfect square trinomial has three terms, x2 + 10x + 25 = (x + 5)2. A difference of squares has two terms and factors into two different binomials.

Difference of Squaresvs.Square of a difference

(a − b)2 = a2 − 2ab + b2 is a square of a difference. a2 − b2 is a difference of squares. They are not equal: with a = 5, b = 3, the first is 4 and the second is 16.

Quick check: 3 questions

Question 1 of 3

Which expression is a difference of squares?

Show answer and explanation

Answer: C. 25y2 = (5y)2 and 1 = 12, joined by a minus sign. x2 + 36 is a sum, 12 is not a perfect square, and x3 is not a square.

Question 2 of 3

Factor 49m2 − 64.

Show answer and explanation

Answer: B. a = 7m and b = 8, so (7m + 8)(7m − 8). (7m − 8)2 would add a −112m term, and the last two do not multiply back to 49m2 − 64.

Question 3 of 3

What are the solutions of x2 − 144 = 0?

Show answer and explanation

Answer: D. (x + 12)(x − 12) = 0, so x = −12 or 12. Choice A misses the negative root, B halved 144 instead of taking its square root, and C would be true only for x2 + 144 = 0.

Difference of Squares: frequently asked questions

How do you know if something is a difference of squares?

Check three things: there are exactly two terms, a minus sign between them, and each term is a perfect square (a square number like 49 or a variable to an even power like x2 or y4). If a common factor hides the squares, as in 2x2 − 18, factor it out first: 2(x2 − 9).

Can a sum of squares be factored?

Not over the real numbers. x2 + 9 has no factors with real coefficients, because x2 + 9 = 0 has no real solutions. Over the complex numbers it does factor, as (x + 3i)(x − 3i), which you meet in Algebra 2. In Algebra 1, call a sum of squares prime once any common factor is removed.

Why do the middle terms cancel?

Multiply the conjugates with FOIL: (a + b)(a − b) = a2 − ab + ab − b2. The Outer product −ab and the Inner product +ab are opposites, so they add to 0. Only the First and Last products, a2 and −b2, remain. That is exactly the difference of two squares.

Practice and tools

Sources

  1. OpenStax, Elementary Algebra 2e, 7.4 Factor Special Products
  2. Common Core State Standards, High School Algebra: Seeing Structure in Expressions (HSA-SSE.A.2)

Updated November 2026·Reviewed by the Effortless Math team·Standards: CCSS HSA-SSE.A.2

Cite this entry

Effortless Math Team. “Difference of Squares.” Effortless Math Dictionary. Updated November 2026. https://www.effortlessmath.com/math-dictionary/difference-of-squares/

Flashcard

TermDifference of Squaresa2 − b2
DefinitionTwo perfect squares subtracted; factors as (a + b)(a − b). x2 − 49 = (x + 7)(x − 7). Sums of squares do not factor.
Study the full deck

Browse all terms in the Math Dictionary · More algebra terms · Random term