FACTORING BY GROUPING METHOD:   PROOF

This page is intended for advanced students and teachers.
Other people interested in the factor by grouping method should visit:
Factoring Trinomials of the form $\,ax^2 + bx + c\,$

THEOREM the factor by grouping method
Let $\,a\,$, $\,b\,$, and $\,c\,$ be integers, with $\,a\ne 0\,$ and $\,c\ne 0\,$.
The trinomial $\,ax^2 + bx + c\,$ is factorable over the integers
if and only if
there exist integers $\,f\,$ and $\,g\,$ such that $\,fg = ac\,$ and $\,f+g = b\,$.

Proof:
Suppose there exist integers $\,f\,$ and $\,g\,$ such that $\,fg = ac\,$ and $\,f + g = b\,$.
Then,

$ax^2 + bx + c$
    $\displaystyle= \frac{fg}c x^2 + (f+g)x + c$
    $\displaystyle= \frac{fg}c x^2 + fx + gx + c$
    $\displaystyle= \frac1c(fg x^2 + cfx + cgx + c^2)$
    $\displaystyle= \frac1c(fx + c)(gx + c)$

Since $\displaystyle\frac{fg}{c} = a\,$ and since $\,a\,$ is an integer, one of three things must happen:

In all three cases, one obtains the desired factorization with integer coefficients.

Conversely, suppose there exist integers $\,d\,$, $\,e\,$, $\,f\,$, and $\,g\,$
such that $\,ax^2 + bx + c = (dx + e)(fx + g) = (df)x^2 + (dg + ef)x + (eg)\,$.
Thus, $\,a = df\,$, $\,b = dg + ef\,$, and $\,c = eg\,$.
Define $\,F := dg\,$ and $\,G := ef\,$.
Then, $\,F\,$ and $\,G\,$ are both integers,
$\,F + G = dg + ef = b\,$, and
$\,FG = (dg)(ef) = (df)(eg) = ac\,$.

Q.E.D.