# Factoring

You can use the distributive law to see that

$3\left(4n+5\right)=12n+15$,

and you can use FOIL to see that

$\begin{array}{l}\left(n+2\right)\left(n+3\right)=n\cdot n+n\cdot 3+2\cdot n+2\cdot 3\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}={n}^{2}+3n+2n+6\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}={n}^{2}+5n+6\end{array}$

## Factoring ${x}^{2}+bx+c$ when $b$ and $c$ are both positive

Example 1:

Factor ${n}^{2}+8n+15$.

The factoring can be done by finding two numbers whose sum is $8$ and product is $15$:

List pairs of numbers that have a product of $15$ and look for a pair that adds to $8$.

$\begin{array}{ccc}\left(1,15\right)& 1×15=15& 1+15=16\\ \left(3,5\right)& 3×5=15& 3+5=8\end{array}$

So, using $3$ and $5$ we can re-write the expression this way:

${n}^{2}+8n+15$

$={n}^{2}+3n+5n+15$ . . . . by re-writing $8n$ as $3n+5n$

$=\left({n}^{2}+3n\right)+\left(5n+15\right)$ …split the expression into two parts

$=n\left(n+3\right)+5\left(n+3\right)$ . . . .factor each part using the Distributive Property

$=\left(n+5\right)\left(n+3\right)$ . . . . . . . use the Distributive Property again to extract the factor $\left(n+3\right)$

So, the factored form of ${n}^{2}+8n+15$ is $=\left(n+5\right)\left(n+3\right)$.

Example 2:

Factor ${x}^{2}+37x+100$.

We need two numbers whose product is $100$ and sum is $37$.

$\begin{array}{l}100=\left(100\right)\left(1\right);100+1=101\\ 100=\left(50\right)\left(2\right);50+2=52\\ 100=\left(25\right)\left(4\right);25+4=29\\ 100=\left(20\right)\left(5\right);20+5=25\\ 100=\left(10\right)\left(10\right);10+10=20\end{array}$

It seems that $37$ never came up as a sum, so ${x}^{2}+37x+100$ cannot be factored (that is, it is an irreducible polynomial).

But do you see how you would factor ${x}^{2}+29x+100$?

## Factoring ${x}^{2}+bx+c$ when $b$ is negative, $c$ is positive

In this case, you need two negative numbers, so that their product is positive but their sum is negative.

Example 3:

Factor ${x}^{2}-7x+10$.

The negative factor pairs for $10$ are:

$\begin{array}{l}10=\left(-10\right)\left(-1\right);-10-1=-11\\ 10=\left(-5\right)\left(-2\right);-5-2=-7\end{array}$

So the polynomial can be factored as

${x}^{2}-7x+10=\left(x-2\right)\left(x-5\right)$.

## Factoring ${x}^{2}+bx+c$ when $c$ is negative

In this case, you need two numbers with opposite signs (so that their product is negative).

Example 4:

Factor ${x}^{2}+6x-16$.

Here we need to find two numbers with opposite signs which have $-16$ as a product and $6$ as a sum.

The factor pairs for $-16$ are:

$\begin{array}{l}-16=\left(-16\right)\left(1\right);-16+1=-15\\ -16=\left(-8\right)\left(2\right);-8+2=-6\\ -16=\left(-4\right)\left(4\right);-4+4=0\\ -16=\left(-2\right)\left(8\right);-2+8=6\\ -16=\left(-1\right)\left(16\right);-1+16=15\end{array}$

$-2$ and $8$ work. So we can factor the polynomial as

${x}^{2}+6x-16=\left(x-2\right)\left(x+8\right)$.

Example 5:

Factor ${x}^{2}-x-20$.

Here we need to find two numbers with opposite signs which have $-20$ as a product and $-1$ as a sum.

The factor pairs for $-20$ are:

$\begin{array}{l}-20=\left(-20\right)\left(1\right);-20+1=-19\\ -20=\left(-10\right)\left(2\right);-10+2=-8\\ -20=\left(-5\right)\left(4\right);-5+4=-1\\ -20=\left(-4\right)\left(5\right);-4+5=1\\ -20=\left(-2\right)\left(10\right);-2+10=8\\ -20=\left(-1\right)\left(20\right);-1+20=19\end{array}$

$-5$ and $4$ work. So we can factor the polynomial as

${x}^{2}-x-20=\left(x-5\right)\left(x+4\right)$.

## Factoring $a{x}^{2}+bx+c,a\ne 1$

Things get a little trickier in this case. We need to find two numbers whose product is equal to the product of the leading coefficient and the constant and whose sum is equal to the coefficient of the $x$ term.

Example:

Factor $14{x}^{2}-37x+5$.

Multiply the leading coefficient by the constant

$\left(14\right)\left(5\right)=70$

Find the factor pairs that multiply to $70$ and add to $-37$.

$-2$ and $-35$

Replace the middle term.

$14{x}^{2}-2x-35x+5$
Factor common factors in pairs and use the Distributive Property.

$\left(14{x}^{2}-2x\right)-\left(35x-5\right)$

$2x\left(7x-1\right)-5\left(7x-1\right)$

Again, use the Distributive Property.

$\left(7x-1\right)\left(2x-5\right)$