How to Factorize a Quadratic

Breaks ax² + bx + c into a product of linear factors. With whole-number coefficients and a perfect-square discriminant the roots are rational, so the factors have whole-number coefficients; otherwise the roots are shown as decimals.

This breaks ax2+bx+cax^2 + bx + c into a product of linear factors. The quadratic formula gives the two roots, and the factors are built from them.

ax2+bx+c=a(xx1)(xx2)ax^2 + bx + c = a(x - x_1)(x - x_2)

x1x_1 and x2x_2 are the roots of ax2+bx+c=0ax^2 + bx + c = 0. When a root is a fraction pq\dfrac{p}{q}, the factor (xpq)\left(x - \dfrac{p}{q}\right) can be multiplied by qq and written as (qxp)(qx - p), which keeps every coefficient whole.

When whole numbers are possible

If the discriminant D=b24acD = b^2 - 4ac is a perfect square then D\sqrt{D} in the quadratic formula is a whole number, so the roots are rational. With whole-number coefficients as well, the factorization comes out in whole numbers. Otherwise the roots are irrational, no whole-number factorization exists, and the roots are shown as decimals.

Example

Take 6x2+5x66x^2 + 5x - 6. Here D=25+144=169=132D = 25 + 144 = 169 = 13^2, a perfect square. The roots are 5±1312\dfrac{-5 \pm 13}{12}, which is 23\dfrac{2}{3} and 32-\dfrac{3}{2}. Rewriting them as (3x2)(3x - 2) and (2x+3)(2x + 3) gives 6x2+5x6=(3x2)(2x+3)6x^2 + 5x - 6 = (3x - 2)(2x + 3).

Notes

A negative discriminant means the expression cannot be split into linear factors over the real numbers.

With aa equal to 0 this is not a quadratic, so nothing is calculated.