<s>[INST] Factorising quadratics - coefficient of $x^2$ is greater than $1$ In factoring quadratics where the coefficient of $x^2$ is greater than $1$, I use the grouping method where we multiply the coefficient and constant together and then factor.
My question is can someone explain the math behind that?
Example:
$5x^2+11x+2,\quad  5\cdot2=10$
$5x^2+10x+x+2$
$5x(x+2)+1(x+2)$
$(5x+1)(x+2)$
 [/INST] Consider the factorization of $9x^2 - 18x - 16$.  To split the linear term, we must find two numbers with product $9 \cdot -16 = -144$ and sum $-18$.  They are $-24$ and $6$.  Hence,
\begin{align*}
9x^2 - 32x - 16 & = 9x^2 - 24x + 6x - 16 && \text{split the linear term}\\
                & = 3x(3x - 8) + 2(3x - 8) && \text{factor by grouping}\\
                & = (3x + 2)(3x - 8) && \text{extract the common factor}
\end{align*}
Observe that when you split the linear term, the product of the quadratic and constant coefficients is equal to the product to the two linear coefficients, that is, $9 \cdot -16 = -24 \cdot 6 = -144$.  
Suppose that $a, b, c, k, l, m, n$ are integers such that 
$$ax^2 + bx + c = (kx + l)(mx + n) \tag{1}$$
First, we show that 
\begin{align*}
a & = km \tag{2}\\
b & = kn + lm \tag{3}\\
c & = ln \tag{4}
\end{align*}
Since equation 1 is an algebraic identity, it holds for each value of the variable.  In particular, it holds for $x = 0, 1, -1$.  
If we substitute $0$ for $x$ in equation 1, we obtain
$$c = ln$$
Thus, equation 4 holds.  If we substitute $1$ for $x$ in equation 1, we obtain
\begin{align*}
a + b + c & = (k + l)(m + n)\\
          & = k(m + n) + l(m + n)\\
          & = km + kn + lm + ln
\end{align*}  
Since $c = ln$, we can cancel $c$ from the left hand side and $ln$ from the right hand side of the equation to obtain
$$a + b = km + kn + lm \tag{5}$$
If we substitute $-1$ for $x$ in equation 1, we obtain
\begin{align*}
a - b + c & = (-k + l)(-m + n)\\
          & = -k(-m + n) + l(-m + n)\\
          & = km - kn - lm + ln
\end{align*}
Since $c = ln$, we cancel $c$ from the left hand side and $ln$ from the right hand side of the equation to obtain
$$a - b = km - kn - ln \tag{6}$$
Adding equations 5 and 6 yields
$$2a = 2km$$
Dividing each side of the equation by $2$ yields
$$a = km$$
so equation 2 holds.  Since $a = km$, we can cancel $a$ from the left hand side and $km$ from the right hand side of equation 5 to obtain
$$b = kn + ln$$
so equation 3 holds.
Thus, if $a, b, c, k, l, m, n$ are integers such that equation 1 holds, then 
$$ac = (km)(ln) = klmn = (kn)(lm)$$
where $b = kn + ln$, so the product of the quadratic and constant coefficients is equal to the product of the two coefficients into which the linear coefficient splits.  
We then obtain the factorization
\begin{align*}
ax^2 + bx + c & = kmx^2 + (kn + lm)x + ln && \text{by equations 2, 3, and 4}\\
              & = kmx^2 + knx + lmx + ln && \text{split the linear term}\\
              & = kx(mx + n) + l(mx + n) && \text{factor by grouping}\\
              & = (kx + l)(mx + n) && \text{extract the common factor}
\end{align*}
Note that to check the factorization is correct, we multiply $(kx + l)(mx + n)$, in which we perform the steps of the factorization by splitting the linear term and grouping in reverse order. 
</s>