Factoring: expanding, read backwards
Common factors, trinomials, grouping, and the three patterns that come up again and again.
Expanding turns a product into a sum, and it is mechanical. Going the other way, turning a sum into a product, is called factoring, and it is the move that makes cancelling possible. Almost every simplification in calculus is a cancellation waiting for a factorisation.
Before any method, notice that a factorisation leaves a trace you can look for. If equals , then it must be zero whenever either bracket is zero. Print the values and see whether anything gives itself away.
Change the -5 to -7 and the 6 to 12 and run it again. Two rows are zero. What brackets do those two numbers suggest?
Zeros appear at and , which points at the factors and . Multiply them back out to confirm: . Scanning like that is a hint machine, not a method, because most factorisations do not have whole-number zeros. The methods follow.
Step one, always: the greatest common factor
The greatest common factor, or GCF, is the largest thing that divides every term: the largest number, and the lowest power of each letter that appears in all of them. Take it outside a bracket before anything else.
In the numbers 12, 18 and 6 share a factor 6, and every term has at least . So the GCF is , and the expression is . Divide each term by to get what stays inside, and check by multiplying back.
Trinomials with a leading coefficient of 1
A trinomial is a three-term polynomial. For , expanding gives , so the job is to find two numbers whose sum is and whose product is . Search for them if you like.
Change to b = 1, c = 6 and run it again: nothing is found, and that trinomial genuinely does not factor with whole numbers. Then try b = 7, c = 12.
By hand the search is short, because the product pins it down. For : the product 6 is positive and the sum is negative, so both numbers are negative. The negative pairs multiplying to 6 are and , and only the second adds to . So it factors as .
- positive and positive: both numbers positive.
- positive and negative: both numbers negative.
- negative: one of each sign, and the larger in size carries the sign of .
Trinomials with a leading coefficient that is not 1
For the same idea works with one extra step, usually called the ac method: find two numbers that multiply to and add to , use them to split the middle term into two, then factor the four terms in pairs.
Work all the way through.
- There is no common factor, so start on the method. Here , , .
- Compute . Look for two numbers multiplying to and adding to 7.
- The product is negative, so the numbers have opposite signs. Pairs multiplying to : , , , , , . The sums are , , , , , .
- The pair that adds to 7 is and .
- Split the middle term using them: . The terms still add to the original, since .
- Group the first two and the last two: .
- Take the GCF out of each group: .
- The bracket is now a common factor of both pieces, so take it out: .
- Check by expanding: .
Factoring by grouping
The pairing move in that example works on its own whenever there are four terms. groups as , which is , and then . Watch the sign: the second group was , so what comes out is , leaving and not .
That is not the end of it. The bracket is a difference of two squares, the first pattern in the table below, so it splits again into , and the complete factorisation is . Grouping is a step, not usually the last one: always look at what each bracket still contains.
The three patterns
| Name | Pattern | Example |
|---|---|---|
| Difference of squares | ||
| Difference of cubes | ||
| Sum of cubes |
The signs in the two cube patterns follow one rhythm. The sign in the small bracket is the same as the original. The sign in front of the middle term of the big bracket is the opposite. The last sign is always positive. Some readers remember it as "same, opposite, always positive".
A sum of squares, , does not factor at all using real numbers, so is as factored as it gets.
An identity claims equality at every value, so it can be tested at many values at once.
Change one a * b to 2 * a * b and run it again. The mismatch count jumps, which is what a wrong sign or a wrong coefficient looks like from the outside.
A worked example, every step
Factor completely.
- Common factor first. Both terms are divisible by 3, so .
- Look at the bracket. is a cube and is a cube, with a minus between them, so this is a difference of cubes with and .
- Apply the pattern : the small bracket is .
- The big bracket is .
- So far: .
- Can factor further? It would need two numbers multiplying to 4 and adding to 2, and the pairs and add to 5 and 4. So no, it is finished.
- Check at : the original is , and the factorisation gives .
Factor completely.
. The GCF is , because every term has a 2 and an , leaving . Then needs two numbers multiplying to and adding to 1: those are 3 and , giving . Check at : the original is , and the factorisation gives .