Perfect Square Trinomial — Formula & Examples

#Algebra
TL;DR
A perfect square trinomial is a three-term expression that factors into the square of a binomial — a2+2ab+b2=(a+b)2a^2 + 2ab + b^2 = (a+b)^2 or a2−2ab+b2=(a−b)2a^2 - 2ab + b^2 = (a-b)^2. This article shows you the formula, how to recognise one on sight, how to factor it, the most common sign and middle-term mistakes, and six worked examples.
BT
Bhanzu TeamLast updated on June 13, 20269 min read

What Is a Perfect Square Trinomial?

A perfect square trinomial is a trinomial (a three-term polynomial) that equals the square of a binomial. In plain terms, it is what you get when you multiply a binomial like (a+b)(a + b) by itself: (a+b)2=a2+2ab+b2(a+b)^2 = a^2 + 2ab + b^2. Because the expression came from squaring one binomial, it factors straight back into that square.

Two examples make the idea concrete. The trinomial x2+6x+9x^2 + 6x + 9 is a perfect square because it equals (x+3)2(x+3)^2. The trinomial x2−10x+25x^2 - 10x + 25 is a perfect square because it equals (x−5)2(x-5)^2. Both have a squared first term, a squared last term, and a middle term that fits the pattern exactly. Not every trinomial qualifies — most do not — which is why the test below matters.

What Is the Perfect Square Trinomial Formula?

There are two forms, separated only by the sign of the middle term. Both come directly from squaring a binomial.

Positive middle term — from squaring a sum:

(a+b)2=a2+2ab+b2.(a + b)^2 = a^2 + 2ab + b^2.

Negative middle term — from squaring a difference:

(a−b)2=a2−2ab+b2.(a - b)^2 = a^2 - 2ab + b^2.

Here aa is the square root of the first term, bb is the square root of the last term, and 2ab2ab is the middle term. The sign of that middle term decides which form you have: a plus gives (a+b)2(a+b)^2, a minus gives (a−b)2(a-b)^2. The last term is always positive in a genuine perfect square trinomial, because b2b^2 — and (−b)2(-b)^2 — are both positive. This pattern is one of the standard algebraic identities every student meets before quadratics.

How Do You Know If A Trinomial Is A Perfect Square?

Run three quick checks.

First: is the leading term a perfect square (so its root is clean, like x2=x\sqrt{x^2} = x or 9x2=3x\sqrt{9x^2} = 3x)?

Second: is the constant term a perfect square?

Third: the one students skip — does the middle term equal 2ab2ab, twice the product of those two roots? For a quadratic written ax2+bx+cax^2 + bx + c, the algebraic version of that third test is the condition b2=4acb^2 = 4ac. If all three hold, the trinomial is a perfect square; if the middle term is off by even a little, it is not.

How Do You Factor a Perfect Square Trinomial?

Factoring is the formula run in reverse. Once a trinomial passes the test above, the factored form writes itself.

  1. Take the square root of the first term. That is your aa.

  2. Take the square root of the last term. That is your bb.

  3. Read the sign of the middle term. Plus gives (a+b)2(a+b)^2; minus gives (a−b)2(a-b)^2.

  4. Write the binomial squared and expand mentally to confirm the middle term lands on 2ab2ab.

For x2+14x+49x^2 + 14x + 49: a=xa = x, b=7b = 7, middle term is positive, so it factors as (x+7)2(x+7)^2. Check: 2⋅x⋅7=14x2 \cdot x \cdot 7 = 14x. The recognition does the work — there is no guessing of factor pairs, which is exactly why this pattern is worth memorising before you reach factoring trinomials of the general kind.

Examples of Perfect Square Trinomial

The set moves from a clean monic case, through the most common sign mistake, into a leading coefficient, two-variable terms, the reverse direction (find the missing term), and a "decide if it qualifies" check.

Example 1

Factor x2+8x+16x^2 + 8x + 16.

First term root: x2=x\sqrt{x^2} = x. Last term root: 16=4\sqrt{16} = 4. Middle-term check: 2⋅x⋅4=8x2 \cdot x \cdot 4 = 8x — matches.

x2+8x+16=(x+4)2.x^2 + 8x + 16 = (x + 4)^2.

Final answer: (x+4)2(x+4)^2.

Example 2

A common slip — factor x2−12x+36x^2 - 12x + 36.

Wrong attempt. A student sees the −12x-12x, takes the roots xx and 66, and — anchoring on the negative middle term — writes (x−6)(x+6)(x-6)(x+6), mixing the perfect-square pattern up with the difference-of-squares pattern. Expand it: (x−6)(x+6)=x2−36(x-6)(x+6) = x^2 - 36. There is no middle term at all. That cannot equal x2−12x+36x^2 - 12x + 36, so the factoring is wrong.

Correct. A perfect square trinomial factors into the same binomial twice, not a sum-and-difference pair. The negative middle term only flips the inner sign:

x2−12x+36=(x−6)2.x^2 - 12x + 36 = (x - 6)^2.

Check: (x−6)2=x2−12x+36(x-6)^2 = x^2 - 12x + 36, and 2⋅x⋅6=12x2 \cdot x \cdot 6 = 12x with the minus carried through.

Final answer: (x−6)2(x-6)^2.

Example 3

Factor 9x2−6x+19x^2 - 6x + 1.

The leading coefficient is not 1, but the term is still a perfect square: 9x2=3x\sqrt{9x^2} = 3x. Last term root: 1=1\sqrt{1} = 1. Middle-term check: 2⋅3x⋅1=6x2 \cdot 3x \cdot 1 = 6x — matches the magnitude, and the middle sign is negative.

9x2−6x+1=(3x−1)2.9x^2 - 6x + 1 = (3x - 1)^2.

Final answer: (3x−1)2(3x-1)^2.

Example 4

Factor 16a2−40ab+25b216a^2 - 40ab + 25b^2.

Two variables, but the same three checks apply. 16a2=4a\sqrt{16a^2} = 4a, 25b2=5b\sqrt{25b^2} = 5b, and 2⋅4a⋅5b=40ab2 \cdot 4a \cdot 5b = 40ab — matches, with a negative middle term.

16a2−40ab+25b2=(4a−5b)2.16a^2 - 40ab + 25b^2 = (4a - 5b)^2.

Final answer: (4a−5b)2(4a-5b)^2.

Example 5

Find the value of cc that makes x2+10x+cx^2 + 10x + c a perfect square trinomial.

This runs the pattern backward. The middle term 10x10x must equal 2ab=2⋅x⋅b2ab = 2 \cdot x \cdot b, so 2b=102b = 10 and b=5b = 5. The missing constant is b2b^2:

c=52=25,x2+10x+25=(x+5)2.c = 5^2 = 25, \qquad x^2 + 10x + 25 = (x+5)^2.

Final answer: c=25c = 25. (This is the exact move at the heart of completing the square — take half the middle coefficient, square it.)

Example 6

Is 4x2+8x+94x^2 + 8x + 9 a perfect square trinomial?

Check the roots: 4x2=2x\sqrt{4x^2} = 2x, 9=3\sqrt{9} = 3. The middle term would need to be 2⋅2x⋅3=12x2 \cdot 2x \cdot 3 = 12x. But the actual middle term is 8x8x, not 12x12x.

Final answer: No. The first and last terms are perfect squares, yet the middle term fails the 2ab2ab test, so the expression is not a perfect square trinomial. It does not factor into a squared binomial.

Why the Perfect Square Pattern Earns Its Place

"Why memorise a pattern when I can just factor the normal way?"

The pattern is not a convenience — it is the structural backbone of two later methods, and it was the bridge that let early algebraists solve quadratics at all.

  • Completing the square. The whole technique works by forcing a trinomial into perfect-square form, exactly as in Example 5. Without recognising a2+2ab+b2a^2 + 2ab + b^2, the derivation of the quadratic formula has nothing to stand on. The 9th-century scholar al-Khwarizmi, whose work gave algebra its name, solved quadratics geometrically by literally completing a square — adding the right area to a figure until it became a clean square.

  • The quadratic formula. x=−b±b2−4ac2ax = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a} falls straight out of completing the square on the general quadratic. The discriminant condition for a repeated root, b2−4ac=0b^2 - 4ac = 0, is exactly the condition that the quadratic is a perfect square trinomial.

  • Difference of squares and beyond. Recognising a2+2ab+b2a^2 + 2ab + b^2 trains the eye for a2−b2=(a+b)(a−b)a^2 - b^2 = (a+b)(a-b) and other structured forms, which run through everything from simplifying rational expressions to factoring in calculus.

Where Students Trip Up on the Perfect Square Trinomial

Mistake 1: Skipping the middle-term check

Where it slips in: A trinomial has a perfect-square first term and a perfect-square last term, so the student declares it a perfect square without testing the middle.

Don't do this: Assume x2+18x+36x^2 + 18x + 36 is a perfect square just because x2x^2 and 3636 are squares.

The correct way: Test 2ab2ab first. Here 2⋅x⋅6=12x2 \cdot x \cdot 6 = 12x, not 18x18x — so it is not a perfect square trinomial.

Mistake 2: Mixing up the difference-of-squares pattern

Where it slips in: Seeing a negative middle term, the rusher reaches for the (a+b)(a−b)(a+b)(a-b) form instead of (a−b)2(a-b)^2.

Don't do this: Factor x2−12x+36x^2 - 12x + 36 as (x−6)(x+6)(x-6)(x+6). That product has no middle term and a negative constant.

The correct way: A perfect square trinomial factors into one binomial squared. The middle sign only sets the sign inside: x2−12x+36=(x−6)2x^2 - 12x + 36 = (x-6)^2. Difference of squares is a two-term expression with a minus — a different beast entirely.

Mistake 3: Losing the leading coefficient's root

Where it slips in: With a leading coefficient like 9x29x^2 or 16a216a^2, the student takes the root of x2x^2 only and forgets the coefficient.

Don't do this: Factor 9x2−6x+19x^2 - 6x + 1 as (x−1)2(x-1)^2, ignoring that 9x2=3x\sqrt{9x^2} = 3x, not xx.

The correct way: Square-root the entire leading term: 9x2−6x+1=(3x−1)29x^2 - 6x + 1 = (3x - 1)^2. The second-guesser usually catches this on expansion — which is exactly why expanding to verify is never wasted time.

Key Takeaways

  • A perfect square trinomial factors into a binomial squared: a2±2ab+b2=(a±b)2a^2 \pm 2ab + b^2 = (a \pm b)^2.

  • Identify one with three checks — first term a square, last term a square, and middle term equal to 2ab2ab (algebraically, b2=4acb^2 = 4ac).

  • Factor by taking the roots of the first and last terms and carrying the middle sign into (a±b)2(a \pm b)^2.

  • The most common mistake is skipping the middle-term check and labelling a near-miss like x2+18x+36x^2 + 18x + 36 as a perfect square.

  • The pattern is the engine behind completing the square and the quadratic formula — the repeated-root condition b2−4ac=0b^2 - 4ac = 0 is exactly when a quadratic is a perfect square trinomial.

Practice These Before Moving On

  1. Factor x2+20x+100x^2 + 20x + 100.

  2. Find the value of kk that makes x2−14x+kx^2 - 14x + k a perfect square trinomial.

  3. Decide whether 25x2+30x+925x^2 + 30x + 9 is a perfect square trinomial, and factor it if it is.

Answer to Question 1: (x+10)2(x+10)^2. Answer to Question 2: k=49k = 49, giving (x−7)2(x-7)^2. Answer to Question 3: yes — 25x2=5x\sqrt{25x^2} = 5x, 9=3\sqrt{9} = 3, and 2⋅5x⋅3=30x2 \cdot 5x \cdot 3 = 30x, so it factors as (5x+3)2(5x+3)^2. If Question 3 gave you trouble, return to the middle-term check in the identification section.

Want a live Bhanzu trainer to walk through more perfect square trinomial problems? Book a free demo class — online globally.

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What is the formula for a perfect square trinomial?
There are two: a2+2ab+b2=(a+b)2a^2 + 2ab + b^2 = (a+b)^2 and a2−2ab+b2=(a−b)2a^2 - 2ab + b^2 = (a-b)^2. The only difference is the sign of the middle term.
Can a perfect square trinomial have a negative constant term?
No. The last term is always positive, because it is the square of bb (and a square is never negative). A trinomial with a negative constant — like x2+5x−6x^2 + 5x - 6 — is never a perfect square.
Is x2+18x+36x^2 + 18x + 36 a perfect square trinomial?
No. Although x2x^2 and 3636 are perfect squares, the middle term would have to be 2⋅x⋅6=12x2 \cdot x \cdot 6 = 12x, not 18x18x. The middle-term test fails.
What is the difference between a perfect square trinomial and a difference of squares?
A perfect square trinomial has three terms and factors into a binomial squared, (a±b)2(a \pm b)^2. A difference of squares has two terms, a2−b2a^2 - b^2, and factors into (a+b)(a−b)(a+b)(a-b). Mixing them up is one of the most common factoring errors.
How does this connect to completing the square?
Completing the square deliberately turns a quadratic into a perfect square trinomial by adding the right constant — the square of half the middle coefficient. See completing the square for the full method.
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →