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.
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}$$
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\). ✓
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
- Identify \(a = 4,\ b = -12,\ c = 9\).
- Compute \(b^{2} = (-12)^{2} = 144\).
- Compute \(4ac = 4 \cdot 4 \cdot 9 = 144\).
- 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
- Identify \(a = 9,\ b = 12,\ c = 4\).
- Compute \(b^{2} = 12^{2} = 144\).
- Compute \(4ac = 4 \cdot 9 \cdot 4 = 144\).
- 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
- Identify \(a = 1,\ b = 5,\ c = 6\).
- Compute \(b^{2} = 5^{2} = 25\).
- Compute \(4ac = 4 \cdot 1 \cdot 6 = 24\).
- Since \(25 \neq 24\), it is not a perfect square.
- 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.