Perfect Square Trinomial Calculator

Perfect Square Trinomial Calculator

Emerging AI Skill PRO

Enter Calculation

Formula

ax2+bx+c=(ax±c)2iffb2=4ac\text{a}\,x^{2} + \text{b}\,x + \text{c} = \left(\sqrt{\text{a}}\,x \pm \sqrt{\text{c}}\right)^{2} \quad\text{iff}\quad \text{b}^{2} = 4\,\text{a}\,\text{c}
Usage stats

Advertisement

Results

Perfect Square Trinomial
No ✗
Since b² ≠ 4ac, this trinomial is not a perfect square.
b² 25
4ac 24
Discriminant (b² − 4ac) 1
√a 1
√c 2.4495

Report an error on this page

What Is a Perfect Square Trinomial?

A perfect square trinomial is a quadratic expression that can be written as the square of a binomial, such as \((a + b)^2 = a^2 + 2ab + b^2\) or \((a - b)^2 = a^2 - 2ab + b^2\). For a general trinomial \(ax^2 + bx + c\), this happens precisely when its discriminant is zero — that is, when \(b^2 = 4ac\). This calculator takes the three coefficients and instantly tells you whether the trinomial is a perfect square, then gives you the factored form.

Algebra tile diagram of a perfect square trinomial forming a square
A perfect square trinomial arranges into a square with side length \((x + c)\), showing \(a^2 + 2ab + b^2 = (a + b)^2\).

How to Use the Calculator

Enter the coefficient a (the number in front of x²), b (the number in front of x), and c (the constant term). The tool computes \(b^2\) and \(4ac\), compares them, and reports "Yes" or "No." If it is a perfect square, the factored form \(\left(\sqrt{a}\,x \pm \sqrt{c}\right)^2\) is shown, with the sign matching that of \(b\).

The Formula Explained

Expanding \(\left(\sqrt{a}\,x + \sqrt{c}\right)^2\) gives \(a x^2 + 2\sqrt{ac}\,x + c\). Matching the middle coefficient requires \(b = 2\sqrt{ac}\), and squaring both sides gives \(b^2 = 4ac\). So checking \(b^2 = 4ac\) is exactly equivalent to checking that the quadratic has a repeated (double) root, which is the defining property of a perfect square trinomial.

$$\text{a}\,x^{2} + \text{b}\,x + \text{c} = \left(\sqrt{\text{a}}\,x \pm \sqrt{\text{c}}\right)^{2} \quad\text{iff}\quad \text{b}^{2} = 4\,\text{a}\,\text{c}$$
Advertisement
Comparison of b squared versus 4ac to test for a perfect square
The test \(b^2 = 4ac\): equal values confirm a perfect square trinomial.

Worked Example

Take \(x^2 + 6x + 9\). Here \(a = 1\), \(b = 6\), \(c = 9\). Then \(b^2 = 36\) and

$$4ac = 4 \times 1 \times 9 = 36$$

Since \(36 = 36\), it is a perfect square. With \(\sqrt{a} = 1\) and \(\sqrt{c} = 3\) and a positive middle term, it factors as \((x + 3)^2\). Verify: \((x + 3)^2 = x^2 + 6x + 9\). ✓

Advertisement

More Worked Examples

The test is whether \(b^{2} = 4ac\). When it holds (with \(a\) and \(c\) positive), the trinomial equals \((\sqrt{a}\,x \pm \sqrt{c})^{2}\), and the sign matches the sign of \(b\).

Example 1: 4x² − 12x + 9

  1. Identify \(a = 4,\ b = -12,\ c = 9\).
  2. Compute \(b^{2} = (-12)^{2} = 144\).
  3. Compute \(4ac = 4 \cdot 4 \cdot 9 = 144\).
  4. The values are equal, so it is a perfect square. \(\sqrt{4} = 2\) and \(\sqrt{9} = 3\), and \(b\) is negative, so the factored form is \((2x - 3)^{2}\).

Check: \((2x-3)^{2} = 4x^{2} - 12x + 9\).

Example 2: 9x² + 12x + 4

  1. Identify \(a = 9,\ b = 12,\ c = 4\).
  2. Compute \(b^{2} = 12^{2} = 144\).
  3. Compute \(4ac = 4 \cdot 9 \cdot 4 = 144\).
  4. The values are equal, so it is a perfect square. \(\sqrt{9} = 3\) and \(\sqrt{4} = 2\), and \(b\) is positive, so the factored form is \((3x + 2)^{2}\).

Check: \((3x+2)^{2} = 9x^{2} + 12x + 4\).

Example 3 (not a perfect square): x² + 5x + 6

  1. Identify \(a = 1,\ b = 5,\ c = 6\).
  2. Compute \(b^{2} = 5^{2} = 25\).
  3. Compute \(4ac = 4 \cdot 1 \cdot 6 = 24\).
  4. Since \(25 \neq 24\), it is not a perfect square.
  5. The discriminant is \(b^{2} - 4ac = 25 - 24 = \)1, which is positive, so there are two distinct real roots.

It still factors, just not as a square: \(x^{2} + 5x + 6 = (x+2)(x+3)\), with roots \(x = \frac{-5 \pm 1}{2}\), that is \(x = -2\) and \(x = -3\).

FAQ

What if a or c is negative? A standard real perfect square trinomial requires \(a\) and \(c\) to be non-negative so the square roots are real. The \(b^2 = 4ac\) test still flags the discriminant, but the binomial factoring shown assumes real roots.

Does the sign of b matter? Only for the factored form: a negative \(b\) gives \(\left(\sqrt{a}\,x - \sqrt{c}\right)^2\), a positive \(b\) gives \(\left(\sqrt{a}\,x + \sqrt{c}\right)^2\). The perfect-square test itself uses \(b^2\), so the sign does not affect whether it qualifies.

Why must b² equal 4ac exactly? Because a perfect square has a double root; any other value of the discriminant means two distinct roots (or none), so the trinomial cannot collapse into a single squared binomial.

Last updated:

Most popular in Math and Statistics

View all Math and Statistics calculators