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 — $a^2 + 2ab + b^2 = (a+b)^2$ or $a^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)$ by itself: $(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 $x^2 + 6x + 9$ is a perfect square because it equals $(x+3)^2$. The trinomial $x^2 - 10x + 25$ is a perfect square because it equals $(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 = a^2 + 2ab + b^2.$$

Negative middle term — from squaring a difference:

$$(a - b)^2 = a^2 - 2ab + b^2.$$

Here $a$ is the square root of the first term, $b$ is the square root of the last term, and $2ab$ is the middle term. The sign of that middle term decides which form you have: a plus gives $(a+b)^2$, a minus gives $(a-b)^2$. The last term is always positive in a genuine perfect square trinomial, because $b^2$ — and $(-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 $\sqrt{x^2} = x$ or $\sqrt{9x^2} = 3x$)?

Second: is the constant term a perfect square?

Third: the one students skip — does the middle term equal $2ab$, twice the product of those two roots? For a quadratic written $ax^2 + bx + c$, the algebraic version of that third test is the condition $b^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 $a$.

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

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

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

For $x^2 + 14x + 49$: $a = x$, $b = 7$, middle term is positive, so it factors as $(x+7)^2$. Check: $2 \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 $x^2 + 8x + 16$.

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

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

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

Example 2

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

Wrong attempt. A student sees the $-12x$, takes the roots $x$ and $6$, and — anchoring on the negative middle term — writes $(x-6)(x+6)$, mixing the perfect-square pattern up with the difference-of-squares pattern. Expand it: $(x-6)(x+6) = x^2 - 36$. There is no middle term at all. That cannot equal $x^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:

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

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

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

Example 3

Factor $9x^2 - 6x + 1$.

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

$$9x^2 - 6x + 1 = (3x - 1)^2.$$

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

Example 4

Factor $16a^2 - 40ab + 25b^2$.

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

$$16a^2 - 40ab + 25b^2 = (4a - 5b)^2.$$

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

Example 5

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

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

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

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

Example 6

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

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

Final answer: No. The first and last terms are perfect squares, yet the middle term fails the $2ab$ 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 $a^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 = \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, $b^2 - 4ac = 0$, is exactly the condition that the quadratic is a perfect square trinomial.

  • Difference of squares and beyond. Recognising $a^2 + 2ab + b^2$ trains the eye for $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 $x^2 + 18x + 36$ is a perfect square just because $x^2$ and $36$ are squares.

The correct way: Test $2ab$ first. Here $2 \cdot x \cdot 6 = 12x$, not $18x$ — 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)$ form instead of $(a-b)^2$.

Don't do this: Factor $x^2 - 12x + 36$ as $(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: $x^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 $9x^2$ or $16a^2$, the student takes the root of $x^2$ only and forgets the coefficient.

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

The correct way: Square-root the entire leading term: $9x^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: $a^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 $2ab$ (algebraically, $b^2 = 4ac$).

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

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

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

Practice These Before Moving On

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

  2. Find the value of $k$ that makes $x^2 - 14x + k$ a perfect square trinomial.

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

Answer to Question 1: $(x+10)^2$. Answer to Question 2: $k = 49$, giving $(x-7)^2$. Answer to Question 3: yes — $\sqrt{25x^2} = 5x$, $\sqrt{9} = 3$, and $2 \cdot 5x \cdot 3 = 30x$, so it factors as $(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.

Book a Free Demo

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: $a^2 + 2ab + b^2 = (a+b)^2$ and $a^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 $b$ (and a square is never negative). A trinomial with a negative constant — like $x^2 + 5x - 6$ — is never a perfect square.
Is $x^2 + 18x + 36$ a perfect square trinomial?
No. Although $x^2$ and $36$ are perfect squares, the middle term would have to be $2 \cdot x \cdot 6 = 12x$, not $18x$. 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 \pm b)^2$. A difference of squares has two terms, $a^2 - b^2$, and factors into $(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 →