Skip to main content

How to Factor Polynomials

Written by Awn · Published · 9 min read

Quick Answer

Here is how to factor polynomials. Take out the greatest common factor first. Then count the terms. Two terms may be a difference of squares or cubes. Three terms factor with two numbers that multiply and add correctly. Four terms usually need grouping. Keep going until nothing factors, then multiply back to check.

What Does Factoring a Polynomial Mean?

Factoring polynomials means writing them as a product. It is multiplying in reverse. Multiplying turns (x−6)(x+4)(x-6)(x+4) into x2−2x−24x^2-2x-24. Factoring turns it back.

Factored form is useful because you can see the roots. If (x−6)(x+4)=0(x-6)(x+4)=0, then x=6x=6 or x=−4x=-4.

How to Factor Polynomials Step by Step

  1. Put the terms in order, highest power first.
  2. Take out the greatest common factor (GCF).
  3. Count the terms that are left.
  4. Use the method for that number of terms.
  5. Look at each factor again.
  6. Multiply back to check.

How to factor polynomials: a chart from the GCF to two, three or four terms

Which Factoring Method Should You Use?

TermsLook forPattern
AnyGCFab+ac=a(b+c)ab+ac=a(b+c)
2Difference of squaresa2−b2=(a−b)(a+b)a^2-b^2=(a-b)(a+b)
2Difference of cubesa3−b3=(a−b)(a2+ab+b2)a^3-b^3=(a-b)(a^2+ab+b^2)
2Sum of cubesa3+b3=(a+b)(a2−ab+b2)a^3+b^3=(a+b)(a^2-ab+b^2)
3Perfect squarea2+2ab+b2=(a+b)2a^2+2ab+b^2=(a+b)^2
3TrinomialTwo numbers: multiply and add
4GroupingTwo pairs with a shared bracket

The factoring calculator shows which one it used.

Method 1: Greatest Common Factor

Factor 6x3+9x26x^3+9x^2.

  1. The biggest number in both is 3, and the biggest power in both is x2x^2.
  2. Divide each term by 3x23x^2: 2x2x and 3.
  3. Answer: 3x2(2x+3)3x^2(2x+3).

Method 2: Trinomials With 1 in Front

Factor x2−2x−24x^2-2x-24.

  1. Find two numbers that multiply to −24-24 and add to −2-2.
  2. They are −6-6 and 4.
  3. Answer: (x−6)(x+4)(x-6)(x+4).

Method 3: Trinomials With Another Number in Front

Factor 2x2+7x+32x^2+7x+3. This is the ac method.

  1. a×c=2×3=6a\times c=2\times 3=6. Two numbers that multiply to 6 and add to 7 are 6 and 1.
  2. Split the middle: 2x2+6x+x+32x^2+6x+x+3.
  3. Group: 2x(x+3)+1(x+3)2x(x+3)+1(x+3).
  4. Answer: (2x+1)(x+3)(2x+1)(x+3).

How to factor a trinomial by the ac method, step by step

Method 4: Difference of Squares

Factor 9x2−169x^2-16. Since 9x2=(3x)29x^2=(3x)^2 and 16=4216=4^2, the answer is (3x−4)(3x+4)(3x-4)(3x+4). A sum of squares, such as 9x2+169x^2+16, does not factor with real numbers.

Method 5: Sum and Difference of Cubes

Factor x3−125x^3-125. Since 125=53125=5^3, use the pattern: (x−5)(x2+5x+25)(x-5)(x^2+5x+25). The word SOAP helps with signs: same, opposite, always positive.

Method 6: Factoring by Grouping

Factor x3+5x2−4x−20x^3+5x^2-4x-20.

  1. Pair the terms: x2(x+5)−4(x+5)x^2(x+5)-4(x+5).
  2. Take out the bracket: (x+5)(x2−4)(x+5)(x^2-4).
  3. The second part is a difference of squares: (x+5)(x−2)(x+2)(x+5)(x-2)(x+2).

Substitution: A Hidden Trinomial

Some polynomials with higher powers are trinomials in disguise. The sign is that one power is double the other.

Factor x4−13x2+36x^4-13x^2+36.

  1. Let u=x2u=x^2. Then it reads u2−13u+36u^2-13u+36.
  2. Two numbers that multiply to 36 and add to −13-13 are −4-4 and −9-9: (u−4)(u−9)(u-4)(u-9).
  3. Put x2x^2 back: (x2−4)(x2−9)(x^2-4)(x^2-9).
  4. Both are differences of squares: (x−2)(x+2)(x−3)(x+3)(x-2)(x+2)(x-3)(x+3).

Step 4 is easy to miss. Always look at each factor again before you stop.

The Factor and Remainder Theorems

Two short facts make higher powers easier.

  • Remainder theorem: when you divide a polynomial by x−cx-c, the remainder is the value of the polynomial at cc.
  • Factor theorem: if that value is 0, then x−cx-c is a factor.

So you can test a factor just by putting a number in. Is x−2x-2 a factor of x3−3x2+4x^3-3x^2+4? Put in 2: 8−12+4=08-12+4=0. Yes, it is. Is x−1x-1? Put in 1: 1−3+4=21-3+4=2. No, and the remainder would be 2.

Which numbers are worth testing? If the first coefficient is 1, try the numbers that divide the last term, both positive and negative. For x3−3x2+4x^3-3x^2+4, that means 1, 2 and 4, and their negatives. If the first coefficient is not 1, also try those numbers divided by its factors. This is called the rational root theorem.

Factoring With Two Letters

The same methods work when there are two letters. Treat one of them like a number.

  • GCF: 6x2y+9xy2=3xy(2x+3y)6x^2y+9xy^2=3xy(2x+3y). Take the smaller power of each letter.
  • Trinomial: x2+5xy+6y2=(x+2y)(x+3y)x^2+5xy+6y^2=(x+2y)(x+3y). Find the two numbers as usual, then attach yy.
  • Squares: 4x2−9y2=(2x−3y)(2x+3y)4x^2-9y^2=(2x-3y)(2x+3y).

What If Nothing Works?

For higher powers, test small numbers. If putting in x=cx=c gives 0, then x−cx-c is a factor. Divide it out with polynomial long division and factor what is left. If no rational number works, the polynomial may be prime over the whole numbers.

Worked Examples

Example 1: GCF and a Pattern Together

Factor 5x2−205x^2-20.

  1. GCF: 5(x2−4)5(x^2-4).
  2. Difference of squares: 5(x−2)(x+2)5(x-2)(x+2).

Example 2: A Negative Middle Term

Factor 3x2−10x+83x^2-10x+8.

  1. a×c=24a\times c=24. Two numbers that multiply to 24 and add to −10-10 are −6-6 and −4-4.
  2. Split: 3x2−6x−4x+83x^2-6x-4x+8.
  3. Group: 3x(x−2)−4(x−2)=(3x−4)(x−2)3x(x-2)-4(x-2)=(3x-4)(x-2).

Example 3: A Perfect Square

Factor 4x2+20x+254x^2+20x+25.

  1. The ends are squares: (2x)2(2x)^2 and 525^2.
  2. Test the middle: 2⋅2x⋅5=20x2\cdot 2x\cdot 5=20x. It fits.
  3. So the answer is (2x+5)2(2x+5)^2.

Example 4: Three Steps in a Row

Factor 2x3+6x2−20x2x^3+6x^2-20x.

  1. The GCF is 2x2x: 2x(x2+3x−10)2x(x^2+3x-10).
  2. Two numbers that multiply to −10-10 and add to 3 are 5 and −2-2.
  3. Answer: 2x(x+5)(x−2)2x(x+5)(x-2).

Example 5: A Cubic With a Known Root

Factor x3−6x2+11x−6x^3-6x^2+11x-6.

  1. Test small numbers that divide 6. At x=1x=1: 1−6+11−6=01-6+11-6=0. So x−1x-1 is a factor.
  2. Divide it out. The quotient is x2−5x+6x^2-5x+6.
  3. Factor that: (x−2)(x−3)(x-2)(x-3).
  4. Answer: (x−1)(x−2)(x−3)(x-1)(x-2)(x-3).

Example 6: A Cubic With a Double Factor

Factor x3−3x2+4x^3-3x^2+4.

  1. At x=2x=2 the value is 0, so x−2x-2 is a factor.
  2. Divide it out. The quotient is x2−x−2x^2-x-2.
  3. Factor that: (x−2)(x+1)(x-2)(x+1).
  4. Put it together: (x−2)2(x+1)(x-2)^2(x+1).

The factor x−2x-2 appears twice. On a graph, the curve touches the axis at 2 instead of crossing it.

Example 7: A Leading Minus Sign

Factor −x2+2x+15-x^2+2x+15.

  1. Take out −1-1 first: −(x2−2x−15)-(x^2-2x-15). Every sign inside changes.
  2. Two numbers that multiply to −15-15 and add to −2-2 are −5-5 and 3.
  3. Answer: −(x−5)(x+3)-(x-5)(x+3).

Taking the minus out first makes the sign patterns work normally.

Example 8: Grouping With a Negative

Factor 3x3−6x2−5x+103x^3-6x^2-5x+10.

  1. Pair the terms: 3x2(x−2)3x^2(x-2) and −5x+10-5x+10.
  2. Take −5-5 out of the second pair: −5(x−2)-5(x-2). Now both brackets match.
  3. Answer: (x−2)(3x2−5)(x-2)(3x^2-5).

If you take out 5 instead of −5-5, the second bracket is −x+2-x+2 and the two don't match. When brackets are exact opposites, change the sign you took out.

How to Find the Two Numbers Faster

For x2+bx+cx^2+bx+c, you need two numbers that multiply to cc and add to bb. The signs tell you a lot before you list anything:

Sign of ccSign of bbThe two numbers
PositivePositiveBoth positive
PositiveNegativeBoth negative
NegativePositiveDifferent signs, the bigger one positive
NegativeNegativeDifferent signs, the bigger one negative

Say you have x2−2x−24x^2-2x-24. Since cc is negative, the signs differ, and since bb is negative, the bigger number is negative. List pairs for 24 and look for a difference of 2: 1 and 24, 2 and 12, 3 and 8, 4 and 6. The pair 4 and 6 works, so the numbers are 4 and −6-6.

If no pair works, check b2−4acb^2-4ac. When it is not a perfect square, the trinomial does not factor over the whole numbers, and you can stop looking.

A Plan You Can Use on a Test

Write the terms in order, then say three questions in your head. Is there a common factor? How many terms are left? Can any piece be broken down again?

If you are stuck on a trinomial, check its discriminant before you keep hunting for pairs. If you are stuck on four terms, try pairing them in a different order. And if you only need the roots, remember that you can use the quadratic formula instead of factoring.

How to Check a Factored Answer

Multiply the factors and compare every term. For Example 4: 2x(x+5)(x−2)=2x(x2+3x−10)=2x3+6x2−20x2x(x+5)(x-2)=2x(x^2+3x-10)=2x^3+6x^2-20x.

For a quick test, pick a number, such as x=1x=1. The original gives 2+6−20=−122+6-20=-12. The factors give 2⋅6⋅(−1)=−122\cdot 6\cdot(-1)=-12. A match is a good sign, but one number can agree by luck, so multiply back when it matters.

Common Mistakes

Skipping the GCF

5x2−205x^2-20 does not look like a difference of squares until the 5 comes out.

Getting the Signs Backward

If cc is positive, both numbers have the same sign as bb. If cc is negative, they have different signs.

Factoring a Sum of Squares

x2+9x^2+9 is not (x+3)2(x+3)^2 or (x+3)(x−3)(x+3)(x-3). It does not factor with real numbers.

Stopping After One Step

x4−16=(x2−4)(x2+4)x^4-16=(x^2-4)(x^2+4) is not finished, because x2−4x^2-4 factors again. The full answer is (x−2)(x+2)(x2+4)(x-2)(x+2)(x^2+4).

Forgetting the GCF in the Answer

After you take out 2 from 2x2−182x^2-18, keep it. The answer is 2(x−3)(x+3)2(x-3)(x+3), not (x−3)(x+3)(x-3)(x+3). The 2 is a factor like any other.

Confusing the Cube Patterns

In a3+b3a^3+b^3 the middle term of the long bracket is minus. In a3−b3a^3-b^3 it is plus. The middle sign is always the opposite of the sign you started with.

Practice Problems

  1. Factor 7x2−637x^2-63.
  2. Factor x2+9x+18x^2+9x+18.
  3. Factor 2x2−9x+102x^2-9x+10.
  4. Factor x3+64x^3+64.
  5. Factor x3−2x2+5x−10x^3-2x^2+5x-10.
Show the answers
  1. 7(x−3)(x+3)7(x-3)(x+3)
  2. (x+3)(x+6)(x+3)(x+6)
  3. (2x−5)(x−2)(2x-5)(x-2)
  4. (x+4)(x2−4x+16)(x+4)(x^2-4x+16)
  5. (x−2)(x2+5)(x-2)(x^2+5)

Check Your Answer With the Factoring Calculator

Multiply your factors. If you don't get the original, look at the signs first. Then compare with the factor calculator. To use factors to find roots, read how to solve quadratic equations. There are more exercises in Factoring Polynomials in OpenStax College Algebra.

FAQ

What Is the First Step in Factoring?

Look for a greatest common factor. Taking it out makes the numbers smaller and can reveal a pattern.

How to Factor Trinomials Quickly?

List the factor pairs of cc and find the pair that adds to bb. When aa is not 1, use the pairs of a×ca\times c instead.

How Do You Factor a Polynomial With 4 Terms?

Try factoring by grouping. Pair the terms so that both pairs share the same bracket.

How Do You Know When You Are Done?

When no factor has a GCF and none matches a pattern. x2+5x^2+5 is done. x2−4x^2-4 is not.

Is Factoring the Same as Solving?

No. Factoring rewrites an expression. Solving sets it equal to zero and finds xx.

How Do You Factor a Cubic Polynomial?

Try the GCF and grouping first. If they fail, test small numbers until one gives zero. Divide that factor out, and factor the quadratic that is left.

Are There Polynomials You Can't Factor?

Not with whole numbers. A polynomial that can't be broken down that way is called prime or irreducible. x2+x+1x^2+x+1 is one example.


Next step: sort ten problems by number of terms before factoring any of them. Knowing how to factor polynomials is mostly knowing which method to reach for.

Try the Calculator

Related Pages