Factoring: Difference of Squares and Perfect-Square Trinomials
A difference of squares, a2 - b2, always factors into (a+b)(a-b). A perfect-square trinomial, a2 + 2ab + b2, always factors into (a+b)2. Spot the pattern and skip the guesswork.
Difference of squares works because of what happens when you multiply (a+b)(a-b) back out: the middle terms are +ab and -ab, and they cancel. You're left with just a2 - b2, nothing in the middle. That's why x2 - 49 factors instantly into (x+7)(x-7): 49 is 72, so you just write the sum and the difference of the roots. 9x2 - 64 works the same way once you see 9x2 = (3x)2 and 64 = 82, giving (3x+8)(3x-8) in one step.
Perfect-square trinomials come from squaring a binomial: (x+7)2 = x2 + 14x + 49. The middle term doesn't vanish this time, it's 2 times the product of the roots. So to spot the pattern, take half the x-coefficient and square it. In x2 + 10x + 25, half of 10 is 5, and 52 is 25 — the constant matches, confirming it's (x+5)2.
Both patterns save time because they let you skip the standard factoring hunt (find two numbers that multiply to c and add to b) and jump straight to the answer once you recognize the shape. They sit next to general trinomial factoring and the quadratic formula in the algebra toolkit: when a quadratic doesn't fit either special pattern, fall back to those slower methods.
Key terms
- Difference of squares
- An expression of the form a2 - b2, which always factors into (a+b)(a-b).
- Perfect-square trinomial
- A trinomial of the form a2 + 2ab + b2, which factors into (a+b)2.
- Sum of squares
- An expression of the form a2 + b2, which cannot be factored over the real numbers.
- Root
- A value that, when squared, gives one of the terms being added or subtracted in the pattern.
Watch it explained
- How it worksHow does the middle term wipe itself out when (x + 7)(x - 7) gets multiplied back out?
- Worked exampleFind the factored form of 9x2 - 64 in one step.
- Worked exampleWalk me through factoring x2 + 10x + 25 by spotting the perfect-square pattern.
- Common mistakeWhy isn't x2 + 16 factorable over the real numbers when 16 is a perfect square?
Check yourself
End of topic.