Source: algebrica.org — CC BY-NC 4.0 https://algebrica.org/factoring-quadratic-equations/
Introduction
A quadratic equation in standard form is written as:
Factoring the equation means rewriting the left-hand side as a product of linear factors with the same roots. When the discriminant $\Delta = b^2 - 4ac$ is non-negative, the equation admits two real roots $x_1$ and $x_2$, and the following identity holds:
The roots may coincide when $\Delta = 0$, in which case the factorization reduces to $a(x-x_0)^2$. When $\Delta < 0$ the polynomial is irreducible over $\mathbb{R}$ and admits a factorization only over $\mathbb{C}$, where the two roots are complex conjugates.
Derivation
Consider the quadratic polynomial associated with the equation:
Since $a \neq 0$, the leading coefficient can be factored out:
The coefficients of the monic polynomial inside the parentheses are linked to the roots through Viète's relations:
Substituting these expressions into the polynomial gives:
This establishes identity $(1)$. The roots of the equation are recovered by setting each linear factor equal to zero:
The factorization above is exact and follows directly from the values of the roots. When the roots are not known in advance, they are obtained from the quadratic formula and substituted into $(1)$. An alternative approach, useful when the coefficients are integers and the roots are rational, is the AC method, which factors the polynomial without computing the discriminant explicitly.
Example 1
Consider a polynomial with integer roots:
Here $a=1$, so identity $(1)$ reduces to $(x-x_1)(x-x_2)$. The roots can be found by inspection, looking for two numbers whose sum is $4$ and whose product is $3$. The pair $(1,\,3)$ satisfies both conditions, and the factorization is:
The associated equation has solutions $x_1 = 1$ and $x_2 = 3$.
Example 2
Consider a polynomial whose leading coefficient is different from one:
The discriminant is $\Delta = 49 - 24 = 25$, so the roots are real and distinct. Applying the quadratic formula:
which gives $x_1 = 3$ and $x_2 = \frac{1}{2}$.
Substituting these values into $(1)$ with $a = 2$:
The factor $2$ has been absorbed into the second linear term to produce a factorization with integer coefficients.
Example 3
Consider a polynomial whose discriminant vanishes, so that the two roots coincide:
The discriminant is $\Delta = 36 - 36 = 0$, and the unique root is $x_0 = 3$. The factorization is:
This is consistent with identity $(1)$, where $x_1 = x_2 = x_0$.
Example 4
Consider a polynomial whose discriminant is negative, so that the polynomial is irreducible over $\mathbb{R}$:
The discriminant is $\Delta = 4 - 20 = -16$, and the roots are the complex conjugate pair $x_{1,2} = -1 \pm 2i$.
The factorization holds only over $\mathbb{C}$: