Factoring review
There is an analogy between polynomials
and the way we write integers in base 10.
For example, the integer 253
is like the polynomial 2x2 + 5x + 3
(especially if you evaluate it when x = 10).
When you add integers,
you can arrange the digits in columns and add the columns;
when you add polynomials,
you can arrange the terms in columns and add the columns.
When you multiply integers,
you need to multiply each digit in one integer by each digit in the other;
when you multiply polynomials,
you need to multiply each term in one polynomial by each term in the other.
(In some ways, arithmetic with polynomials is easier to understand,
since there is no carrying.)
Factoring is running multiplication backwards.
To factor the integer 253,
you consider how you could get it by multiplying smaller integers;
the answer is that 253 = 11 × 23.
Similarly, to factor the polynomial
2x2 + 5x + 3,
you consider how you could get it by multiplying simpler polynomials;
the answer is that 2x2 + 5x + 3 =
(x + 1) ⋅ (2x + 3).
(This is not supposed to be obvious,
but you can check that it's true by multiplying.)
(We'll discuss later how you could come up with that answer.)
As the integers 11 and 23 are the factors of 253,
so the polynomials x + 1 and 2x + 3
are the factors of 2x2 + 5x + 3.
Common factors
The simplest technique for factoring is when one of the factors is a constant.
When you do this, here are some rules to follow,
which apply whenever the original polynomial has only rational coefficients
(otherwise it gets more complicated):
- There can only be one constant factor, which comes first.
- In each non-constant factor,
the leading coefficient should be positive.
- In each non-constant factor,
all of the coefficients should be integers.
- In each non-constant factor,
the coefficients should not have any common integer
factor greater than 1.
Here are some ways to factor 6x − 12
that violate these rules and so are wrong:
- 6x − 12 = 2(x − 2)3;
- 6x − 12 = −6(−x + 2);
- 6x − 12 = 12(½x − 1);
- 6x − 12 = 2(3x − 6).
All of these equations are identities (they're always true),
but they are not the proper way to factor 6x − 12.
The only proper way, following all of the rules above, is
6x − 12 = 6(x − 2).
Here are some more examples:
- Look for a factor common to each term:
2y + 20 =
2 ⋅ y + 2 ⋅ 10 =
2(y + 10).
- Sometimes it helps to factor the coefficients:
6t + 15 =
2 ⋅ 3 ⋅ t + 3 ⋅ 5 =
3(2t + 5).
- You can also try to factor out a variable that appears in every term:
5x3 + 3x2 =
5xxx + 3xx =
x2(5x + 3).
- A negative coefficient on the leading term
means that a minus sign appears out front:
8 − 2x = −2x + 8 =
−2x − −8 =
−2(x − 4).
- If the coefficients are fractional,
then their common denominator appears in the denominator out front:
½x + ⅔ =
3⁄6 ⋅ x + 4⁄6 =
⅙(3x + 4).
Sometimes the textbook is a little sloppy
about fractional and negative coefficients,
and it's true that the rules are somewhat arbitrary;
but you need to pick some rules and follow them consistently
in order to guarantee that everything will work out in a complicated problem.
Factoring by grouping
If the number of terms in a polynomial (call it n)
is even and greater than 2
(so n = 4, 6, 8, …),
then you may be able to factor it by grouping, if you're lucky.
Make sure that you've put the polynomial in standard form
and factored out any common factors first.
Then to try this method, divide the terms into two groups,
each with half of the terms (in order).
Then factor out a common factor from each group;
even if there's nothing to do, factor out 1.
(Or if you only have a minus sign to factor out, write it as −1.)
Then if you're lucky, the remaining polynomial in each group will be the same!
In that case, you can factor into
a polynomial with 2 terms and a polynomial with n∕2 terms.
For example, consider
3x3 −
3x2 − x + 1.
This has 4 terms, and 4 is even and greater than 2.
So we split this into two groups:
(3x3 − 3x2) +
(−x + 1).
In the first group, there's a common factor of 3x2;
specifically, 3x3 − 3x2 =
3x2(x − 1).
In the second group, there's a common factor of −1;
specifically, −x + 1 =
−(x − 1).
Since x − 1 appears in both groups, we're lucky!
So this factors as
(3x2 − 1)(x − 1).
In summary, 3x3 −
3x2 − x + 1 =
(3x3 − 3x2) +
(−x + 1) =
3x2(x − 1) −
1(x − 1) =
(3x2 − 1)(x − 1).
Factoring trinomials
If a polynomial has exactly three terms,
then you can try to factor it by any of several methods;
here I explain my favourite, sometimes called the ac method.
If the three terms are A, B, and C (in standard order),
then look at all of the ways
to write AC as a product of two monomials P and Q
(so that PQ = AC),
and see if this ever gives you B as their sum
(so that P + Q = B).
If so, then you can split B into the two terms P and Q,
getting an expression with 4 terms,
and you are guaranteed to be able to factor this by grouping.
For example, if you start with
2x2 − 7x + 6,
then A is 2x2,
B is −7x, and C is 6,
so that AC = 12x2,
and we look at how to multiply two monomials to get 12x2.
For example,
we could take P and Q to be 2x2 and 6 again,
but then they would add to 2x2 + 6,
not −7x.
To add to a single x-term,
we'd need P and Q to also be x-terms,
so maybe P = 2x and Q = 6x;
then PQ is still 12x2,
and now P + Q = 8x,
which is better but still not correct.
Since we want something with a negative coefficient,
P or Q (or both) must have a negative coefficient;
then since they multiply to something with a positive coefficient,
they must both have a negative coefficient.
So try P = −2x and Q = −6x;
then PQ is still 12x2,
and now P + Q = −8x,
which is even closer but still not perfect.
So look at all the ways to multiply two numbers to get 12,
which you can check by dividing 12 to see when you get a whole number:
12 ÷ 1 = 12, 12 ÷ 2 = 6,
12 ÷ 3 = 4, 12 ÷ 4 = 3,
12 ÷ 6 = 2, and 12 ÷ 12 = 1,
but dividing 12 by any other whole number leaves you with a fractional result.
You really only need the first 3 of these 6 options;
once you get to 12 ÷ 4,
you can see that 4 already appeared as the result of 12 ÷ 3,
so you just use the results that you already have.
In any case, 12 can be written as
1 × 12, 2 × 6, or 3 × 4,
so P and Q could be
−x and −12x,
−2x and −6x,
or −3x and −4x.
With the last of these, we finally get −7x as the sum,
so this will work!
Then 2x2 − 7x + 6 becomes
2x2 − 3x − 4x + 6,
which factors by grouping (I'll skip the steps here)
as (x − 2)(2x − 3).
An example like this,
where A is ax2,
B is bx, and C is c
(for some constants a, b, and c),
is so common that often people ignore the factors of x
and look for two numbers p and q
such that pq = ac
and p + q = b.
So you start by looking at how to factor ac,
which is why this is called the ac method.
(In the example above, this takes us straight to 12,
and we find that p and q are −3 and −4.)
But if you have terms with more variables in them,
then you need to be a little more general,
which is why I began with the full terms.
Special patterns
You should know that
(A + B)2 =
A2 + 2AB + B2.
So if you notice that the first and last terms of a binomial
are both perfect squares,
then you can check if the middle term is twice the product of the square roots,
and factor in this way.
For example, given 4x2 − 12x + 9,
if you notice that
4x2 is (2x)2 and 9 is 32,
then you can see if −12x is 2(2x)(3).
It's not, but only because of the minus sign,
so use 9 = (−3)2 instead.
Then −12x really is 2(2x)(−3),
so 4x2 − 12x + 9
factors as (2x − 3)2.
(However, this pattern is not necessary;
you can always use the ac method instead,
getting 6x for both P and Q in the example.)
You should also know that
(A − B)(A + B) =
A2 − B2.
So if you notice that one term of a binomial is a perfect square
and the other is the opposite of a perfect square (with the minus sign),
then you can use this pattern.
For example, given 4x2 − 9,
notice that
4x2 is (2x)2 and 9 is 32,
so that 4x2 − 9 =
(2x − 3)(2x + 3).
(This pattern isn't absolutely necessary either;
you can insert a term 0 in the middle and use the ac method;
so in the example, from 4x2 + 0 − 9,
this works P = 6x and Q = −6x.
But this is kind of subtle.)
Finally, you should know that
(A − B)(A2 + AB + B2) =
A3 − B3.
So if you notice that one term of a binomial is a perfect cube
and the other is a perfect cube (or equivalently the opposite of one),
then you can use this pattern.
For example, given 8x3 + 27,
notice that 8x3 is (2x)3
and 27 is 33, so that −27 is (−3)3.
Then 8x3 + 27 =
(2x)3 − (−3)3 =
((2x) − (−3))((2x)2 + (2x)(−3) + (−3)2) =
(2x + 3)(4x2 − 6x + 9).
This pattern is necessary
(unless you learn some more advanced techniques that can replace it).
These last two patterns (difference of squares and difference of cubes)
can be generalized to higher powers,
but we won't need that here.
Summary of factoring techniques
Here are the steps for factoring polynomials
in Beginning and Intermediate Algebra:
- If necessary, put the polynomial in standard form.
- If possible, pull out any factors common to all terms (§6.1).
- If there are four (or six, eight, etc) terms,
try factoring by grouping (§6.1).
- If there are three terms (or if you have a factor with three terms),
try factoring into two binomials (§§6.2&6.3)
or factoring as a perfect square (§6.4).
- If there are two terms (or if you now have factors with two terms),
try factoring as a sum or difference of squares or cubes (§6.4).
- Keep factoring the factors until you can factor no further
(§6.5).
These techniques will work
for all polynomials up to degree 2 and for some polynomials of higher degree.
For definiteness, here are the conditions that must be met
for a polynomial (with rational coefficients) to be completely factored:
- The first factor must be a constant,
except that (unless it is the only factor)
we leave it out if it is 1 or use just a minus sign if it is −1.
- Every other factor must be
a non-constant polynomial
with integer coefficients and a positive leading coefficient.
- No factor's coefficients
may have a common integer factor greater than 1.
- No factor may be a product of two non-constant polynomials.
The last of these is the one that
can be hard to check and may require fancy techniques to fix.
A product of two non-constant polynomials
is called a composite polynomial.
(The last rule above requires us to factor these polynomials further.)
A non-constant polynomial that is not composite
is called a prime polynomial.
(The constant polynomials are considered neither prime nor composite.)
Compare that a product of two whole numbers greater than 1
is called a composite number,
while a whole number greater than 1 that is not composite
is called a prime number.
(The whole numbers 0 and 1 are neither prime nor composite.
In this analogy,
the non-zero constant polynomials correspond to the whole number 1,
while the constant polynomial 0 corresponds to the whole number 0.)
Solving equations by factoring
Here are the steps for solving equations by factoring:
- Subtract the right-hand side of the equation away,
moving it to the left-hand side,
so that the right-hand side of the equation is zero.
- Simplify the left-hand side of the equation and factor it.
- Split the equation up
into several equations (with ‘or’ between them),
one equation for each factor, each factor set equal to zero.
- Solve these equations; throw out any which have no solution.
- If any solutions are repeated, count them only once.
- List all possible solutions
(as a list of statements with ‘or’ between them
or in a solution set if you prefer).
If you can figure out how to do the factoring step,
then this method will solve any polynomial equation in one variable,
as long as all of the solutions are rational numbers;
and it may help at other times as well.
Go back to the course homepage.
This web page was written by Toby Bartels, last edited on 2025 August 17.
Toby reserves no legal rights to it.
The permanent URI of this web page
is
https://tobybartels.name/MATH-1100/2025FA/factoring/.