Difference of Squares: Factor a Squared Difference into Two Binomials

By Vegard Gjerde Based on Masterful Learning 8 min read
difference-of-squares algebra math learning-strategies

Difference of Squares lets you replace a2b2a^2 - b^2 with the product (ab)(a+b)(a - b)(a + b), producing an equivalent expression for every value where the originals are defined. It applies whenever both terms are perfect squares and they are separated by subtraction — not addition. Recognizing this pattern and checking the sign between terms is a core factoring fluency skill built in the Unisium Study System.

This guide sits inside the Algebra study map, where you can see the neighboring moves, models, and next-step guides that connect this principle to the rest of algebra.

Unisium hero image for Difference of Squares showing the equation a² − b² = (a−b)(a+b).
The Difference of Squares identity a2b2=(ab)(a+b)a^2 - b^2 = (a - b)(a + b). Eligibility check before applying: the sign between the two terms is -, and both terms are recognizable perfect squares. (This is a pattern-recognition gate, distinct from the formal domain condition.)

On this page: The Principle | Conditions | Failure Modes | EE Questions | Retrieval Practice | Practice Ground | Solve a Problem | FAQ


The Principle

The move: Replace a subtraction of two perfect squares with the product of their sum and difference.

The invariant: This produces an equivalent expression with the same value for every allowed variable assignment — the factored form and the expanded form evaluate identically everywhere both are defined.

Pattern: a2b2(ab)(a+b)a^2 - b^2 \quad \longrightarrow \quad (a - b)(a + b)

Legal ✓Illegal ✗
x29    (x3)(x+3)x^2 - 9 \;\longrightarrow\; (x-3)(x+3)x2+9  ⟶̸  (x+3)(x3)x^2 + 9 \;\not\longrightarrow\; (x+3)(x-3)

The right-hand column shows the attempted move, not merely a non-example. Multiplying (x+3)(x3)(x+3)(x-3) returns x29x^2 - 9, not x2+9x^2 + 9 — the result is wrong, so the move is illegal for a sum of squares.


Conditions of Applicability

Condition: Defined where expressions are defined

Before applying, check: confirm the sign between the two terms is subtraction (not addition) and that each term is a recognizable perfect square.

  • The move is not legal if the sign is ++ — a sum of two squares does not match this identity; attempting to apply it produces the wrong expression.
  • The move is not legal if either term is not a perfect square — for example, x2y3x^2 - y^3 has y3y^3 in the second position, which is a perfect cube, not a perfect square.

Want the complete framework behind this guide? Read Masterful Learning.

This pattern is easiest to use once Factor Common Term is automatic, because both moves ask you to see structure rather than expand blindly. Compare it with Perfect Square Trinomial when deciding which special-product pattern is present, and use it next with Zero Product when the factorized result is part of an equation solve.


Common Failure Modes

Failure mode: apply the pattern to a2+b2a^2 + b^2 (sum of squares instead of difference) → the resulting product (ab)(a+b)(a - b)(a + b) expands back to a2b2a^2 - b^2, which is the wrong expression.

Debug: before factoring, verify the sign is -; if it is ++, this move does not apply.


Elaborative Encoding

Use these questions to build deep understanding. (See Elaborative Encoding for the full method.)

Within the Principle

  • What do the two binomial factors (ab)(a - b) and (a+b)(a + b) have in common structurally, and why are they called a conjugate pair?
  • Why do the middle terms cancel when you expand (ab)(a+b)(a - b)(a + b) back out?

For the Principle

  • How do you decide whether a given two-term expression is eligible for this move?
  • What test would you apply to 36x425y236x^4 - 25y^2 before invoking Difference of Squares?

Between Principles

  • How does Difference of Squares relate to the Distributive Property — specifically, which direction does each rule run?
  • How does this principle compare to Factor Common Term as a factoring strategy, and how do they chain together?

Generate an Example

  • Describe a two-term expression where the Difference of Squares pattern appears to apply but does not — and explain precisely what disqualifies it.

Retrieval Practice

Answer from memory, then click to reveal and check. (See Retrieval Practice for the full method.)

State the Difference of Squares move in one sentence: _____Replace a² − b² with (a − b)(a + b), producing an equivalent expression for all values where both sides are defined.
Write the canonical Difference of Squares pattern: _____a2b2=(ab)(a+b)a^2 - b^2 = (a - b)(a + b)
State the canonical condition: _____Defined where expressions are defined

Practice Ground

Use these exercises to build move-selection fluency. (See Self-Explanation for how to use worked examples effectively.)

Procedure Walkthrough

Starting from 2x41622x^4 - 162, reach fully factored form.

StepExpressionOperation
02x41622x^4 - 162
12(x481)2(x^4 - 81)Factor Common Term: GCF is 22
22(x29)(x2+9)2(x^2 - 9)(x^2 + 9)Difference of Squares on (x481)(x^4 - 81): x4=(x2)2x^4 = (x^2)^2, 81=9281 = 9^2, sign is -
32(x3)(x+3)(x2+9)2(x - 3)(x + 3)(x^2 + 9)Difference of Squares on (x29)(x^2 - 9): sign is -, eligible; (x2+9)(x^2 + 9) has sign ++ — pattern check fails, the move stops here

Drills

Format A — Forward step: apply the principle once

Apply the principle once.

x225x^2 - 25

Reveal

Difference of Squares: x2=x2x^2 = x^2, 25=5225 = 5^2

(x5)(x+5)(x - 5)(x + 5)


Apply the principle once.

4x294x^2 - 9

Reveal

Difference of Squares: 4x2=(2x)24x^2 = (2x)^2, 9=329 = 3^2

(2x3)(2x+3)(2x - 3)(2x + 3)


Apply the principle once.

136y21 - 36y^2

Reveal

Difference of Squares: 1=121 = 1^2, 36y2=(6y)236y^2 = (6y)^2

(16y)(1+6y)(1 - 6y)(1 + 6y)


Apply the principle once.

9a216b29a^2 - 16b^2

Reveal

Difference of Squares: 9a2=(3a)29a^2 = (3a)^2, 16b2=(4b)216b^2 = (4b)^2

(3a4b)(3a+4b)(3a - 4b)(3a + 4b)


Is this expression eligible for the Difference of Squares move? Explain.

x2+16x^2 + 16

Reveal

No. The sign between the two terms is ++, not -. This is a sum of two squares, and the Difference of Squares identity requires subtraction. Applying the pattern here would give (x4)(x+4)=x216(x - 4)(x + 4) = x^2 - 16, which is not x2+16x^2 + 16 — the move is illegal.


Is this expression eligible for the Difference of Squares move? Explain.

x2y3x^2 - y^3

Reveal

No. Although the sign is subtraction (which looks correct), y3y^3 is a perfect cube, not a perfect square. There is no integer-exponent polynomial expression pp such that p2=y3p^2 = y^3. Both terms must be perfect squares for this move to apply.

This is a near-miss: the sign is right, but the exponent in the second term disqualifies it.


Format E — Canonicalization: rewrite in fully factored form

Canonicalize: Rewrite 18x25018x^2 - 50 in fully factored form.

Reveal

Factor out the GCF first, then apply Difference of Squares:

18x250=2(9x225)=2(3x5)(3x+5)18x^2 - 50 = 2(9x^2 - 25) = 2(3x - 5)(3x + 5)


Canonicalize: Rewrite (x+1)24(x + 1)^2 - 4 in fully factored form.

Reveal

Treat a=(x+1)a = (x + 1) and b=2b = 2:

(x+1)24=(x+1)222=((x+1)2)((x+1)+2)=(x1)(x+3)(x + 1)^2 - 4 = (x + 1)^2 - 2^2 = ((x+1) - 2)((x+1) + 2) = (x - 1)(x + 3)


Canonicalize: Rewrite x41x^4 - 1 in fully factored form.

Reveal

Apply Difference of Squares twice:

x41=(x21)(x2+1)=(x1)(x+1)(x2+1)x^4 - 1 = (x^2 - 1)(x^2 + 1) = (x - 1)(x + 1)(x^2 + 1)

The factor (x2+1)(x^2 + 1) has sign ++ — it is not eligible for this move.


Canonicalize: Can x4+4y4x^4 + 4y^4 be factored using Difference of Squares? If not, explain why.

Reveal

No. The expression x4+4y4x^4 + 4y^4 is a sum of two terms, not a difference. The Difference of Squares identity requires the sign to be -. Since the sign here is ++, the move does not apply. This expression can be factored by a different technique, but not by Difference of Squares.


Canonicalize: Rewrite 16x4116x^4 - 1 in fully factored form.

Reveal

Recognize 16x4=(4x2)216x^4 = (4x^2)^2 and 1=121 = 1^2; sign is -, so apply Difference of Squares:

16x41=(4x21)(4x2+1)16x^4 - 1 = (4x^2 - 1)(4x^2 + 1)

Now inspect each factor. (4x2+1)(4x^2 + 1) has sign ++ — not eligible. (4x21)=(2x)212(4x^2 - 1) = (2x)^2 - 1^2 — eligible; apply again:

(4x21)(4x2+1)=(2x1)(2x+1)(4x2+1)(4x^2 - 1)(4x^2 + 1) = (2x - 1)(2x + 1)(4x^2 + 1)

(4x2+1)(4x^2 + 1) remains; the sign check stops the recursion there.


Solve a Problem

Apply what you’ve learned with Problem Solving.

Problem: Starting from (x+2)249(x + 2)^2 - 49, reach fully factored form using Difference of Squares.

Full solution
StepExpressionMove
0(x+2)249(x + 2)^2 - 49
1(x+2)272(x + 2)^2 - 7^2Eligibility check: 49=7249 = 7^2; sign is -; both terms are perfect squares — move is legal
2((x+2)7)((x+2)+7)((x+2) - 7)((x+2) + 7)Difference of Squares with a=(x+2)a = (x+2), b=7b = 7
3(x+27)(x+2+7)(x + 2 - 7)(x + 2 + 7)Remove inner parentheses
4(x5)(x+9)(x - 5)(x + 9)Arithmetic: 27=52 - 7 = -5, 2+7=92 + 7 = 9

FAQ

What is Difference of Squares?

Difference of Squares is a factoring identity: a2b2=(ab)(a+b)a^2 - b^2 = (a - b)(a + b). It converts a two-term expression — a subtraction of two perfect squares — into a product of two conjugate binomials. The identity holds for any algebraic expressions aa and bb wherever those expressions are defined.

When is Difference of Squares valid?

The move is valid when (1) the expression has exactly two terms, (2) both terms are perfect squares, and (3) the operation between them is subtraction. The sign check is critical: it is easy to misread a sum of squares and apply the pattern incorrectly.

What goes wrong if I apply this to a sum of squares?

Applying the pattern to a2+b2a^2 + b^2 gives (ab)(a+b)=a2b2(a - b)(a + b) = a^2 - b^2, which expands back to the wrong expression. A sum of two squares such as x2+9x^2 + 9 cannot be factored using this identity — the sign check fails before the move is even attempted.

How is Difference of Squares different from Factor Common Term?

Factor Common Term pulls out a shared factor from multiple terms — for example, 2x28=2(x24)2x^2 - 8 = 2(x^2 - 4). Difference of Squares then applies to the result: 2(x24)=2(x2)(x+2)2(x^2 - 4) = 2(x - 2)(x + 2). The two moves often chain together: GCF first, then Difference of Squares.

Can aa or bb be a compound expression?

Yes. The pattern works even when aa or bb is a polynomial or product, as long as both positions are perfect squares. For example, (x+1)24=((x+1)2)((x+1)+2)(x + 1)^2 - 4 = ((x+1) - 2)((x+1) + 2).

Does Difference of Squares apply to equations or inequalities?

No. Difference of Squares is a factoring identity for expressions, not an operation on equations or inequalities. It rewrites one expression into an equivalent product — it does not add, multiply, or modify both sides of a relation. Combine it with equation-operation rules (such as Zero Product Property or Additive Equality) when solving equations that contain a difference of squares.


How This Fits in Unisium

Factoring fluency depends on rapid move selection: recognizing which pattern applies, confirming the condition, and applying the transform correctly. Difference of Squares is one of the fastest-loaded patterns in algebra — but only when you have trained the habit of checking the sign between the two terms before applying. Unisium builds this fluency by sequencing many short state-transition drills so the recognition reflex develops before it is needed inside multi-step problems.

Explore further:

Ready to master Difference of Squares? Start practicing with Unisium or explore the full learning framework in Masterful Learning.

Masterful Learning book cover

Masterful Learning

The study system for physics, math, & programming that works: retrieval, connection, explanation, problem solving, and more.

Read the book (opens in new tab) ISBN 979-8-2652-9642-9

Ready to apply this strategy?

Join Unisium and start implementing these evidence-based learning techniques.

Start Learning with Unisium Read More Guides

Want the complete framework? This guide is from Masterful Learning.

Learn about the book →