Factorization

Factorization (or factoring) is the reverse of expansion: instead of multiplying out, we write an algebraic expression as a product of simpler ones. For example,

We say that and are factors of .

Diagram comparing expansion from (x−3)(x+1) to x²−2x−3 and factorization in reverse

Quick Reference

Method Key Formula or Idea When to Use
Common Factor Always check this first
Difference of Squares Two perfect squares with a minus sign
Perfect Square Trinomial Middle term equals
Difference of Cubes Two perfect cubes, minus sign
Sum of Cubes Two perfect cubes, plus sign
Inspection () Find integers with and Leading coefficient is 1
Inspection () Multiply by ; find and General quadratic trinomial
Completing the Square () Add and subtract ; apply Always works, including irrational roots
Grouping Group terms that share common factors Four or more terms

Why Is Factorization Important?

If we can write an equation in factored form , solving it reduces to solving two independent equations and . (Recall from Section: Sets of Numbers that if then or .) For example, because , instead of solving

we solve

which gives at once

Similarly, because

we immediately conclude

Evaluating at those roots also reduces to a handful of arithmetic steps.

Factorization is not always possible, and even when it is, the factors are not always simpler. For example, factors into and , but solving is harder than the original.

Another application is simplifying rational expressions. For example:

Now let's review the main factorization techniques.

Common Factors

When a factor appears in every term of an expression, factor it out using the distributive property in reverse.

Example. Factor each expression.

Solution
  1. The greatest common factor of and is :
  2. The greatest common factor of all four terms is :
  3. The common factor of and is :

Factoring fractional and negative exponents. In calculus, expressions with fractional or negative exponents often need to be factored. In that case, factor out the common base with the smallest exponent.

Example. Factor each expression.

Solution
  1. The common base is and the smallest exponent is : Check: and , as required.
  2. The common base is and the smallest exponent is : Check: , using .

Special Factorization Formulas

When no common factor exists, the following formulas — each the reverse of a special product identity — often apply.

  1.   (Difference of Squares)
  2.   (Perfect Square Trinomial)
  3.   (Difference of Cubes)
  4.   (Sum of Cubes)

How to remember Sum and Difference of Cubes: the SOAP rule. For a factored cubic , the signs follow Same, Opposite, Always Positive.

SOAP mnemonic sign diagram for the sum and difference of cubes formulas
SOAP mnemonic applied to the factored forms of A³+B³ and A³−B³

Example. Factor each expression.

Solution
  1. Set and , then apply the Difference of Squares formula:
  2. Set and : Since , apply the formula once more:
  3. Set and . Since the middle term satisfies , this is a Perfect Square Trinomial:
  4. Set and , then apply the Difference of Cubes formula:
  5. First factor out the common factor 8, then apply Sum of Cubes with and :

Example. Factor .

Solution Since and , and the middle term satisfies , this is a Perfect Square Trinomial with a negative middle sign:

Example. Factor .

Solution Regroup to reveal a perfect square pattern:

Example. Factor .

Solution The last step applies the Difference of Squares formula with and .

Example. Factor .

Solution Add and subtract to complete a perfect square, then factor as a difference of squares:

More Special Factorization Formulas. For any integer :

  • Difference, even exponent:
  • Difference, any exponent:
  • Sum, odd exponent:
  • Sum, even exponent: cannot, in general, be factored over the reals.

Replacing by in the difference formula (with odd) yields the sum formula.

Factoring x2 +bx+c by Inspection

Since

a polynomial factors over the integers whenever we can find integers and with

By the Rational Root Theorem, when rational roots exist they must be integers, so we do not consider fractions such as or during inspection. In this section we find and by trial and error; a systematic method appears in the section on quadratic equations.

Example. Factor .

Solution We seek two integers and such that and . Since is positive, and must be either both positive or both negative. Since is positive, and must be both positive. Therefore, we seek two positive integers whose product is 42 and whose sum is 13. The positive factor pairs of 42 are: , , , . The pair with sum 13 is and .

Example. Factor .

Solution Since is negative, and have opposite signs. Since is negative, the one with the greater absolute value must be negative. Testing: , . The pair and gives .

Example. Factor .

Solution Since is positive and is negative, both and must be negative. Testing negative factor pairs of 22, we find and , since .

Example. Factor each expression.

Solution
  1. Find and with and . By trial: , .
  2. Find and with and . By trial: , .

Factoring ax2 +bx+c by Inspection

It is sometimes possible to factor by inspection when , , and are integers.

Multiplying and dividing by , we reduce the expression to the form

and then factor the numerator with respect to by finding two integers whose product is and sum is .

Example. Factor .

Solution Multiply and divide by 6: Let , then Now let's factor . We need two integers with product and sum . Since is negative, the integers have opposite signs; since is positive, the larger in absolute value is positive. Factor pairs of : , , . The pair and satisfies . Therefore, Substitute : Divide by 6 and simplify:

Example. Factor .

Solution Multiply and divide by 2, then find two integers with product and sum : they are and .

Example. Factor .

Solution

Example. Factor .

Solution Notice that and , so we can treat directly as the variable:

Factoring x2+px+q by Completing the Square

While inspection applies only in particular cases, completing the square is perfectly general. The key identity is:

so we can make a perfect square by adding — the square of half the coefficient of . This process is called completing the square.

  1. Adding and subtracting leaves unchanged, but transforms it into a difference of squares:
  1. For the general case , substitute and into (i) and simplify:

Example. Factor .

Solution

Example. Factor .

Solution

Example. Factor .

Solution Here the sum of squares leads to complex numbers: in the complex number system. We treat this factorization symbolically for now and return to complex numbers later.

Factoring by Grouping

Sometimes a polynomial has no common factor shared by all terms, but can still be factored by grouping terms that share a common factor. This strategy works best for polynomials with four or more terms.

For example:

Example. Factor .

Solution Group the first two and last two terms: The last step uses the Difference of Squares formula on .

Frequently Asked Questions

What is the first step in factoring any polynomial? Always check for a common factor first. Factor out the greatest common factor (GCF) from all terms before trying any other method. This simplifies all subsequent work and is easy to overlook.

What is the difference between factoring and expanding? Expanding (or distributing) turns a product like into a sum: . Factoring is the reverse — it rewrites a sum as a product. The two operations undo each other, and you can verify any factorization by expanding the result.

How do I choose which factoring method to use? A practical order: (1) Always pull out the GCF first. (2) Count the terms: two terms often suggest Difference of Squares or Sum/Difference of Cubes; three terms suggest a trinomial method (inspection or completing the square); four or more terms suggest grouping. (3) Check whether the expression matches a special pattern such as a perfect square trinomial.

What does it mean for a polynomial to be prime or irreducible? A polynomial is prime (or irreducible) over the integers if it cannot be written as a product of two polynomials with integer coefficients, other than times itself. For example, and are prime over the integers. When inspection fails to find integer values of and , the polynomial may still factor using irrational roots via completing the square.

Can (a sum of squares) be factored over the reals? No. A sum of two perfect squares such as cannot be factored using real numbers. It factors only over the complex numbers: . This is why the Difference of Squares formula has a minus sign factors, but does not (over the reals).

When is completing the square necessary? Use completing the square when inspection fails and the roots are irrational or complex. It always produces a factorization (possibly involving square roots), whereas inspection only works when the roots are rational integers. Completing the square also underlies the quadratic formula, which gives the roots of any quadratic polynomial.