Decision guideAlgebra IIntermediate9 min read

Difference of squares or perfect-square trinomial?

Recognize the pattern from term count, signs, square roots, and the middle coefficient—then expand to confirm rather than trusting appearance alone.

a2b2=(ab)(a+b)a2±2ab+b2=(a±b)2a^2-b^2=(a-b)(a+b)\qquad a^2\pm2ab+b^2=(a\pm b)^2
Decision guide

A practical comparison that turns a vague choice into a repeatable test.

Updated July 13, 2026
DecisionStart here

Two squared terms with subtraction suggest a difference of squares. Three terms suggest a perfect square only when the middle term is exactly ±2ab.

01

Difference of squares needs subtraction

Both terms must be perfect squares and the operation between them must be subtraction. A sum of squares does not factor into real linear factors by this pattern.

Identify the square roots, then write the conjugate pair with opposite signs.

9x225=(3x5)(3x+5)9x^2-25=(3x-5)(3x+5)
02

Perfect-square trinomials need the middle check

The first and last terms may be squares without the trinomial being a perfect square. Multiply their roots, double the product, and compare with the middle term.

The sign of the middle term chooses the sign inside the repeated binomial.

x210x+25=(x5)2x^2-10x+25=(x-5)^2
03

Factor the GCF before pattern matching

A common factor can hide the pattern or make the apparent square roots misleading. Remove it first and inspect what remains.

Patterns can repeat: after a difference of squares, one factor may itself factor again.

2x318x=2x(x29)=2x(x3)(x+3)2x^3-18x=2x(x^2-9)=2x(x-3)(x+3)
Worked exampleTest the middle term

Factor 4x² − 20x + 25.

14x2=2x,25=5\sqrt{4x^2}=2x,\qquad\sqrt{25}=5

Find the outer square roots.

22(2x)(5)=20x-2(2x)(5)=-20x

The doubled product matches the middle term.

34x220x+25=(2x5)24x^2-20x+25=(2x-5)^2

Use the negative sign from the middle term.

4(2x5)2=4x220x+25(2x-5)^2=4x^2-20x+25

Expand to verify.

Result(2x5)2\boxed{(2x-5)^2}
Watch for

Common mistakes

  1. Factoring a sum of squares as real conjugates.
  2. Checking only the first and last terms of a trinomial.
  3. Stopping before removing a common factor.
Keep

Three takeaways

  1. Count terms and inspect signs.
  2. Verify the ±2ab middle coefficient.
  3. Factor completely, not just once.