Factoring Binomials (Difference of Squares)
A difference of squares is a two-term polynomial where both terms are perfect squares and they are being subtracted: , , . Every one of them factors the same way: .
The pattern works because multiplying makes the middle terms cancel — Outer gives and Inner gives , and they wipe each other out, leaving just . Factoring runs that product in reverse: spot the two squares, write one plus and one minus.
Spotting the pattern
Three things must be true: exactly two terms, a subtraction between them, and both terms perfect squares. In , the first term is (the square of ) and , so it qualifies with and .
Coefficients count too. is a perfect square because — take the square root of the coefficient and halve the exponent. So factors with and .
Once you have and , the answer writes itself: . The order of the two factors does not matter.
A sum of squares does not factor
The subtraction is not optional. is a sum of squares, and it does not factor over the real numbers. Try it: , and . No pair of binomials produces , because any middle terms either cancel (giving a difference) or survive (giving a trinomial).
On a test, "cannot be factored" is the correct answer for a sum of squares — writing for is the trap the question is checking for.
Check for a GCF first
Some binomials hide the pattern behind a common factor. is technically a difference of squares as written, but factoring the GCF of first gives , and then the difference of squares finishes it: .
GCF first, pattern second — that order keeps the numbers small and guarantees a completely factored answer.
Worked examples
Example 1: the basic pattern
Factor .
Answer:
Example 2: a coefficient on the squared term
Factor .
Answer:
Example 3: GCF first
Factor completely.
Answer:
Try one yourself
Common questions
Why do the middle terms cancel when I multiply ?
FOIL it: First gives , Outer gives , Inner gives , Last gives . The Outer and Inner terms are opposites, so they add to zero — leaving with no middle term.
Can be factored some other way?
Not with real numbers. A sum of squares has no real factoring — the check is quick: no two real binomials multiply to it. (In Algebra 2 you will factor it with imaginary numbers, but for now the answer is that it does not factor.)
How do I know if a term like is a perfect square?
Ask two questions: is the coefficient a perfect square, and is the exponent even? passes both. Something like fails, because is not a perfect square.
Does the order versus matter?
No. Multiplication is commutative, so both orders are the same answer. What matters is that one factor has a plus and the other has a minus between the same two terms.
Want the video version?
Allday Everyday Math has video lessons, practice, and an AI tutor for every topic, Pre-Algebra through Algebra 2.