Allday Education

Factoring Binomials (Perfect Squares)

A perfect-square trinomial is what you get when you square a binomial: (x+5)2=x2+10x+25(x + 5)^{2} = x^{2} + 10x + 25. Factoring one means recognizing that expansion and writing it back as a square: a2+2ab+b2=(a+b)2a^{2} + 2ab + b^{2} = (a + b)^{2} and a22ab+b2=(ab)2a^{2} - 2ab + b^{2} = (a - b)^{2}.

The fingerprint has three parts: the first term is a perfect square, the last term is a perfect square, and the middle term is exactly twice the product of their square roots. Verify all three and the factoring collapses to a single squared binomial.

The three-part check

Take x2+10x+25x^{2} + 10x + 25. First term: x2x^{2} is the square of xx. Last term: 25=5225 = 5^{2}. Middle term: 2x5=10x2 \cdot x \cdot 5 = 10x — matches. All three checks pass, so it factors as (x+5)2(x + 5)^{2}.

The middle-term check is the one that actually decides. x2+11x+25x^{2} + 11x + 25 has perfect squares on both ends, but 11x2x511x \neq 2 \cdot x \cdot 5, so it is not a perfect square and needs a different method (in this case, it does not factor nicely at all).

The sign of the middle term picks the sign in the answer: +2ab+2ab gives (a+b)2(a + b)^{2} and 2ab-2ab gives (ab)2(a - b)^{2}. The last term is positive either way — if the constant is negative, the trinomial is not a perfect square, period.

The area model below builds (x+3)2(x + 3)^{2} as a square with side x+3x + 3. The two off-diagonal rectangles are each 3x3x, and together they make the middle term 6x=2x36x = 2 \cdot x \cdot 3 — which is exactly why the pattern's middle term is 2ab2ab.

xx33
xxx2x^23x3x
333x3x99

Reading off the answer

Once the pattern checks out, the factored form uses the two square roots: the square root of the first term and the square root of the last term, joined by the middle term's sign, all squared. For x28x+16x^{2} - 8x + 16: roots are xx and 44, the middle sign is minus, so the answer is (x4)2(x - 4)^{2}.

Writing (x4)2(x - 4)^{2} or (x4)(x4)(x - 4)(x - 4) are both correct — the exponent form is just tidier.

Leading coefficients and why the pattern is worth spotting

The pattern extends to trinomials like 9x2+30x+259x^{2} + 30x + 25: the first term is (3x)2(3x)^{2}, the last is 525^{2}, and the middle is 23x5=30x2 \cdot 3x \cdot 5 = 30x. It factors to (3x+5)2(3x + 5)^{2}.

You could factor these by grouping instead, and you would get the same answer with more work. Recognizing the perfect-square shape saves time now and becomes essential later — completing the square and vertex form in the quadratics unit are built directly on this pattern.

Worked examples

Example 1: a positive middle term

Factor x2+12x+36x^{2} + 12x + 36.

Check the squaresx2=(x)2,36=62x^{2} = (x)^{2}, \quad 36 = 6^{2}
Check the middle term2x6=12x2 \cdot x \cdot 6 = 12x
Write the square with a plus sign(x+6)2(x + 6)^{2}

Answer: (x+6)2(x + 6)^{2}

Example 2: a negative middle term

Factor x218x+81x^{2} - 18x + 81.

Check the squaresx2=(x)2,81=92x^{2} = (x)^{2}, \quad 81 = 9^{2}
Check the middle term2x9=18x2 \cdot x \cdot 9 = 18x
The middle term is negative, so use a minus sign(x9)2(x - 9)^{2}

Answer: (x9)2(x - 9)^{2}

Example 3: a leading coefficient

Factor 9x2+30x+259x^{2} + 30x + 25.

Check the squares9x2=(3x)2,25=529x^{2} = (3x)^{2}, \quad 25 = 5^{2}
Check the middle term23x5=30x2 \cdot 3x \cdot 5 = 30x
Write the square(3x+5)2(3x + 5)^{2}

Answer: (3x+5)2(3x + 5)^{2}

Try one yourself

Common questions

How do I know a trinomial is a perfect square and not just a regular trinomial?

Run the three-part check: first term a perfect square, last term a perfect square, middle term equal to twice the product of the square roots. If any part fails, factor it as a regular trinomial instead — the pattern is a shortcut, not a requirement.

What if the constant term is negative?

Then it cannot be a perfect square, because squaring a binomial always produces a positive last term: (b)2=b2(-b)^{2} = b^{2}. A negative constant means the factors have opposite signs, so look at difference-of-squares or standard trinomial factoring.

Is (x4)2(x - 4)^{2} the same as (x4)(x4)(x - 4)(x - 4)?

Yes — the exponent just abbreviates the repeated factor. Expand either one and you get x28x+16x^{2} - 8x + 16 back.

How does this connect to the square-of-a-binomial lesson?

It is the same identity read in the other direction. Expanding turns (a+b)2(a + b)^{2} into a2+2ab+b2a^{2} + 2ab + b^{2}; factoring recognizes a2+2ab+b2a^{2} + 2ab + b^{2} and compresses it back to (a+b)2(a + b)^{2}. Master one and you have the other.

Want the video version?

Allday Everyday Math has video lessons, practice, and an AI tutor for every topic, Pre-Algebra through Algebra 2.

Try it for $1