Algebra guide
How to Factor Polynomials
This guide walks through every method you need for algebra and precalculus, with fully worked examples, a quick test that tells you whether a trinomial can be factored at all, and practice problems with answers.
Quick answer
To factor a polynomial, rewrite it as a product of simpler polynomials that multiply back to the original. Always start by pulling out the greatest common factor (GCF). Then count the terms: two terms suggest a difference of squares or cubes, three terms suggest a trinomial method, and four terms suggest factoring by grouping. Keep factoring each piece until nothing more can be factored, then multiply back to check.
How to Factor a Polynomial in 5 Steps
- Factor out the GCF. Find the largest number and variable power that divides every term, and pull it out in front.
- Count the terms in what is left inside the parentheses.
- Pick the method that matches. Two terms: difference of squares, sum or difference of cubes. Three terms: trinomial methods or a perfect square pattern. Four terms: grouping.
- Factor completely. Check every new factor and factor again if you can.
- Check your answer by multiplying the factors back together.
Here is the whole process on one example: 6x3 + 9x2 − 15x. The GCF is 3x, which leaves 3x(2x2 + 3x − 5). The trinomial inside factors as (2x + 5)(x − 1), so the final answer is 3x(2x + 5)(x − 1).
What Does It Mean to Factor a Polynomial?
Factoring a polynomial means writing it as a product of polynomials of lower degree. It is multiplication run in reverse. Multiplying (x + 3)(x + 4) gives x2 + 7x + 12, so factoring x2 + 7x + 12 means finding (x + 3)(x + 4) again.
It works just like factoring whole numbers. The number 12 factors as 2 × 2 × 3, and those prime numbers cannot be broken down further. Polynomials have the same idea:
- Factor: any polynomial that divides the original with no remainder. In x2 + 7x + 12, both x + 3 and x + 4 are factors.
- Prime polynomial: a polynomial that cannot be factored into lower-degree polynomials with integer coefficients, such as x2 + 4 or 2x2 + 3x + 4.
- Factored completely: the polynomial is written as a product of prime factors, and no factor can be broken down any further.
In most algebra classes, “factor” means factor over the integers: every coefficient in your answer should be a whole number. This guide follows that rule unless it says otherwise.
Which Factoring Method Should You Use?
After you take out the GCF, the number of terms points you to the right method. Use this table as a checklist.
| What you see | Method to try | Example |
|---|---|---|
| A factor shared by every term | GCF (always first) | 4x2 + 8x = 4x(x + 2) |
| 2 terms, both perfect squares, minus sign | Difference of squares | x2 − 9 = (x + 3)(x − 3) |
| 2 terms, both perfect cubes | Sum or difference of cubes | x3 − 27 = (x − 3)(x2 + 3x + 9) |
| 3 terms, leading coefficient 1 | Find two numbers (product c, sum b) | x2 + 7x + 12 = (x + 3)(x + 4) |
| 3 terms, leading coefficient not 1 | AC method | 6x2 + 11x − 10 = (3x − 2)(2x + 5) |
| 3 terms, first and last are squares | Perfect square trinomial | 9x2 + 12x + 4 = (3x + 2)2 |
| 4 terms | Grouping | x3 + 3x2 + 2x + 6 = (x + 3)(x2 + 2) |
| Degree 3 or higher, nothing above works | Rational root theorem and synthetic division | x3 − 6x2 + 11x − 6 = (x − 1)(x − 2)(x − 3) |
Method 1: Factor Out the Greatest Common Factor (GCF)
The greatest common factor is the largest expression that divides every term of the polynomial. Factoring it out is always the first step, because it makes every other method easier and is the step students skip most often.
To find the GCF, take the greatest common factor of the coefficients and the lowest power of each variable that appears in every term. Then divide each term by the GCF and write the results inside parentheses.
Example: factor 6x3 + 9x2 − 15x. The coefficients 6, 9 and 15 share a greatest common factor of 3. Every term contains x, and the lowest power is x1. So the GCF is 3x. Divide each term by 3x: 6x3 ÷ 3x = 2x2, 9x2 ÷ 3x = 3x, and −15x ÷ 3x = −5. The result is 3x(2x2 + 3x − 5).
When the leading coefficient is negative, it is usually cleaner to factor out a negative GCF. For −4x2 + 8x, take out −4x to get −4x(x − 2), which leaves a positive leading term inside the parentheses.
Method 2: Factor Trinomials of the Form x2 + bx + c
When the leading coefficient is 1, you need two numbers that multiply to c and add to b. If those numbers are p and q, the trinomial factors as (x + p)(x + q).
Example: factor x2 + 7x + 12. List the factor pairs of 12: 1 and 12, 2 and 6, 3 and 4. Only 3 and 4 add to 7. The answer is (x + 3)(x + 4).
Example with negatives: factor x2 − 2x − 15. You need two numbers that multiply to −15 and add to −2. Because the product is negative, one number is positive and one is negative. The pair −5 and 3 works: −5 × 3 = −15 and −5 + 3 = −2. The answer is (x − 5)(x + 3).
Use the signs as a shortcut. If c is positive, both numbers share the sign of b. If c is negative, the numbers have opposite signs, and the larger one takes the sign of b.
Method 3: Factor ax2 + bx + c With the AC Method
When the leading coefficient a is not 1, guessing gets slow. The AC method turns the problem into a grouping problem with a clear set of steps.
- Multiply a × c.
- Find two numbers that multiply to a × c and add to b.
- Split the middle term into two terms using those numbers.
- Factor the four terms by grouping.
Example: factor 6x2 + 11x − 10. Here a = 6, b = 11 and c = −10, so a × c = −60. You need two numbers that multiply to −60 and add to 11: 15 and −4 work. Split the middle term: 6x2 + 15x − 4x − 10. Group the pairs: 3x(2x + 5) − 2(2x + 5). Both groups share (2x + 5), so the answer is (3x − 2)(2x + 5).
Check it by multiplying: (3x − 2)(2x + 5) = 6x2 + 15x − 4x − 10 = 6x2 + 11x − 10. It matches.
Method 4: Use the Special Factoring Patterns
Four patterns come up again and again. Spotting them saves a lot of work, so it is worth memorizing these formulas.
| Pattern | Formula | Example |
|---|---|---|
| Difference of squares | a2 − b2 = (a + b)(a − b) | 49x2 − 25 = (7x + 5)(7x − 5) |
| Perfect square trinomial | a2 + 2ab + b2 = (a + b)2 | 9x2 + 12x + 4 = (3x + 2)2 |
| Perfect square trinomial | a2 − 2ab + b2 = (a − b)2 | 4x2 − 20x + 25 = (2x − 5)2 |
| Difference of cubes | a3 − b3 = (a − b)(a2 + ab + b2) | x3 − 27 = (x − 3)(x2 + 3x + 9) |
| Sum of cubes | a3 + b3 = (a + b)(a2 − ab + b2) | 8x3 + 1 = (2x + 1)(4x2 − 2x + 1) |
Difference of squares. In 49x2 − 25, the first term is (7x)2 and the second is 52, with a minus sign between them. So a = 7x and b = 5, and the answer is (7x + 5)(7x − 5).
Perfect square trinomial. In 9x2 + 12x + 4, the first term is (3x)2 and the last is 22. Check the middle term: 2 × 3x × 2 = 12x. It matches, so the trinomial is (3x + 2)2.
Sum and difference of cubes. In x3 − 27, the terms are x3 and 33, so a = x and b = 3. Plug them into the formula to get (x − 3)(x2 + 3x + 9). A helpful memory aid for the signs is SOAP: the first sign is the Same as the original, the second is the Opposite, and the last is Always Positive.
The sum of squares does not factor. An expression like x2 + 4 has no factors with real coefficients, so it is prime. Only the difference of squares has a pattern.
Method 5: Factor by Grouping
Grouping is the go-to method for polynomials with four terms. Split the terms into two pairs, factor the GCF out of each pair, and look for a shared binomial.
Example: factor x3 + 3x2 + 2x + 6. Group the first two terms and the last two: (x3 + 3x2) + (2x + 6). Factor each pair: x2(x + 3) + 2(x + 3). Both pairs share (x + 3), so pull it out: (x + 3)(x2 + 2). The factor x2 + 2 is a sum, not a difference, so it does not factor further.
If the two binomials do not match, try a different pairing, or factor a negative out of the second pair. For example, x3 + 2x2 − 9x − 18 groups as x2(x + 2) − 9(x + 2), which gives (x + 2)(x2 − 9). The second factor is a difference of squares, so the complete answer is (x + 2)(x + 3)(x − 3).
Method 6: Factor Cubic and Higher-Degree Polynomials
For a cubic or higher-degree polynomial that has no GCF, no pattern and no grouping, find one root first, then divide it out.
The Rational Root Theorem and Synthetic Division
The rational root theorem says that any rational root of a polynomial with integer coefficients has the form p/q, where p is a factor of the constant term and q is a factor of the leading coefficient. The factor theorem adds that if r is a root, then (x − r) is a factor.
Example: factor x3 − 6x2 + 11x − 6. The constant term is −6 and the leading coefficient is 1, so the possible rational roots are ±1, ±2, ±3 and ±6. Test x = 1: 1 − 6 + 11 − 6 = 0. So x = 1 is a root, and (x − 1) is a factor.
Divide by (x − 1) with synthetic division. Write the coefficients 1, −6, 11, −6. Bring down the 1. Multiply by 1 and add to get −5. Multiply by 1 and add to get 6. Multiply by 1 and add to get 0, the remainder. The new coefficients 1, −5, 6 give the quotient x2 − 5x + 6, which factors as (x − 2)(x − 3). The complete answer is (x − 1)(x − 2)(x − 3).
Polynomials in Quadratic Form
Some degree-4 polynomials are quadratics in disguise. In x4 − 5x2 + 4, let u = x2. The expression becomes u2 − 5u + 4, which factors as (u − 1)(u − 4). Substitute back: (x2 − 1)(x2 − 4). Both are differences of squares, so the complete answer is (x − 1)(x + 1)(x − 2)(x + 2).
How to Tell If a Trinomial Can Be Factored
Before you spend time hunting for numbers, run the discriminant test. For ax2 + bx + c with integer coefficients, calculate b2 − 4ac:
- A perfect square (0, 1, 4, 9, 16 and so on): the trinomial factors over the integers.
- Positive but not a perfect square: it has real roots, but they are irrational, so it does not factor over the integers.
- Negative: it has no real roots and cannot be factored over the real numbers.
For 6x2 + 11x − 10, the discriminant is 112 − 4(6)(−10) = 121 + 240 = 361, which is 192, so it factors. For x2 + x − 1, the discriminant is 1 + 4 = 5, not a perfect square, so it is prime over the integers; the quadratic formula gives its roots as (−1 ± √5) ÷ 2. For 2x2 + 3x + 4, the discriminant is 9 − 32 = −23, so it cannot be factored over the reals at all.
How to Factor Completely
A polynomial is factored completely only when no factor can be broken down any further. Many problems need two or three methods in a row, and the most common lost mark is stopping one step too early.
Example: factor 2x4 − 32 completely. First take out the GCF of 2: 2(x4 − 16). Next, x4 − 16 is a difference of squares, (x2)2 − 42, so it becomes 2(x2 + 4)(x2 − 4). Then x2 − 4 is another difference of squares. The complete answer is 2(x2 + 4)(x + 2)(x − 2). The factor x2 + 4 is a sum of squares, so it stays as it is.
Another quick one: 3x3 − 12x has a GCF of 3x, giving 3x(x2 − 4), and the difference of squares finishes it: 3x(x + 2)(x − 2).
How to Check Your Answer
There are two quick checks. The first is to multiply the factors back together and compare the result with the original. The second is faster for long answers: pick a simple value such as x = 2 and plug it into both versions. If the results differ, there is a mistake.
For 6x3 + 9x2 − 15x = 3x(2x + 5)(x − 1), try x = 2. The original gives 48 + 36 − 30 = 54. The factored form gives 3(2) × 9 × 1 = 54. They match. One matching value does not prove the answer is right, but a mismatch always proves it is wrong, so this check catches most errors in seconds.
Why Factoring Polynomials Matters
Factoring is the key that opens many later topics in algebra, precalculus and calculus. It is how you solve polynomial equations: once x2 − 2x − 15 = 0 is written as (x − 5)(x + 3) = 0, the zero product property says x = 5 or x = −3. It is how you find the x-intercepts of a graph, since each linear factor marks a point where the graph crosses the x-axis.
Factoring also lets you simplify rational expressions by canceling common factors, the same way you reduce a fraction to lowest terms with the fraction calculator. For example, (x2 − 9) ÷ (x + 3) simplifies to x − 3 once the top is factored as (x + 3)(x − 3). And when a factor is linear, its graph is a straight line, which you can explore with the slope calculator.
Behind all of this sits the Fundamental Theorem of Algebra: every polynomial with real coefficients can be written as a product of linear factors and quadratic factors that have no real roots. Factoring is the practical skill of finding those pieces.
Common Factoring Mistakes
| Mistake | What goes wrong | Do this instead |
|---|---|---|
| Skipping the GCF | 4x2 + 8x − 12 looks hard, and the final answer is incomplete | Take out 4 first: 4(x2 + 2x − 3) = 4(x + 3)(x − 1) |
| Factoring a sum of squares | x2 + 9 is written as (x + 3)(x + 3) | A sum of squares is prime over the reals. (x + 3)2 = x2 + 6x + 9 |
| Stopping too early | x4 − 81 is left as (x2 + 9)(x2 − 9) | Keep going: (x2 + 9)(x + 3)(x − 3) |
| Sign errors in grouping | x3 + 2x2 − 9x − 18 is grouped as x2(x + 2) − 9(x − 2) | Factor −9 out of both terms: −9(x + 2) |
| Dropping the GCF at the end | 3x(x + 2)(x − 2) is written as (x + 2)(x − 2) | Keep the GCF in front of the final answer |
Practice Problems With Answers
Factor each polynomial completely. Cover the answers, work each one on paper, then check.
- 5x2 − 45. Answer: 5(x + 3)(x − 3).
- x2 − 10x + 21. Answer: (x − 3)(x − 7).
- 2x2 − 7x + 3. Answer: (2x − 1)(x − 3).
- 4x2 − 20x + 25. Answer: (2x − 5)2.
- 12x2 − 5x − 2. Answer: (3x − 2)(4x + 1).
- 27x3 − 8. Answer: (3x − 2)(9x2 + 6x + 4).
- 4x3 − 4x2 − x + 1. Answer: (x − 1)(2x + 1)(2x − 1).
- x3 − x2 − 14x + 24. Answer: (x − 2)(x − 3)(x + 4). Hint: test x = 2.
Frequently Asked Questions
What is the first step in factoring a polynomial?
Always factor out the greatest common factor (GCF) first. It simplifies the polynomial and often reveals a pattern. For example, 4x2 + 8x − 12 becomes 4(x2 + 2x − 3), and the trinomial inside factors easily as (x + 3)(x − 1).
Can every polynomial be factored?
No. Some polynomials are prime over the integers, such as x2 + x − 1 and x2 + 4. Over the real numbers, every polynomial can be broken into linear factors and quadratic factors with no real roots, but those factors may have irrational coefficients.
How do you factor a trinomial when a is not 1?
Use the AC method. Multiply a × c, find two numbers that multiply to that product and add to b, split the middle term with them, and factor by grouping. For 6x2 + 11x − 10, a × c = −60, the numbers are 15 and −4, and the answer is (3x − 2)(2x + 5).
How do you factor a cubic polynomial?
First check for a GCF, a sum or difference of cubes, or grouping. If none works, use the rational root theorem to find a root r, divide by (x − r) with synthetic division, and factor the quadratic that remains. For x3 − 6x2 + 11x − 6, x = 1 is a root, and the answer is (x − 1)(x − 2)(x − 3).
Can you factor a sum of squares like x2 + 9?
Not over the real numbers. A sum of two squares is prime in real-number algebra. Only a difference of squares factors: x2 − 9 = (x + 3)(x − 3). Using complex numbers, x2 + 9 = (x + 3i)(x − 3i), but most algebra courses do not expect that.
What is the difference between factoring and solving?
Factoring rewrites an expression as a product, while solving finds the values of x that make an equation true. Factoring is often the first step in solving: x2 − 2x − 15 factors as (x − 5)(x + 3), and setting each factor equal to zero solves x2 − 2x − 15 = 0 with x = 5 or x = −3.
How do I know if a quadratic can be factored?
Calculate the discriminant, b2 − 4ac. If it is a perfect square, the quadratic factors over the integers. If it is positive but not a perfect square, the roots are irrational. If it is negative, the quadratic cannot be factored over the real numbers.
What does “factor completely” mean?
It means every factor is prime and nothing can be factored further. For example, 2x4 − 32 is factored completely as 2(x2 + 4)(x + 2)(x − 2). Stopping at 2(x4 − 16) or 2(x2 + 4)(x2 − 4) leaves the answer incomplete.
Key Takeaways
- Factoring rewrites a polynomial as a product of lower-degree polynomials. It is multiplication in reverse.
- Always take out the GCF first, then choose a method by the number of terms.
- Two terms: difference of squares or sum and difference of cubes. Three terms: trinomial methods. Four terms: grouping.
- The discriminant b2 − 4ac tells you in advance whether a quadratic factors over the integers.
- For cubics and higher, find a root with the rational root theorem and divide it out with synthetic division.
- Factor completely, keep the GCF in the final answer, and check by multiplying back or plugging in a value.
Further reading: for more practice with the same methods, see OpenStax College Algebra, Section 1.5: Factoring Polynomials and Paul’s Online Math Notes: Factoring Polynomials.