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\). ✓
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.