Multiplying (x+2)(x+3) to get x2+5x+6 is a mechanical process — distribute, combine, done. But going the other direction — starting with x2+5x+6 and recovering the factors that built it — requires pattern recognition, strategy, and a toolkit of techniques that grows with the complexity of the polynomial.
That reverse process is factoring, and it underpins much of algebra. Solving polynomial equations, simplifying rational expressions, and analyzing how polynomials behave all depend on the ability to decompose a polynomial into simpler multiplicative pieces. The sections that follow develop the methods for doing so, from extracting common factors through recognizing special patterns to handling polynomials of any degree.
What is Factoring?
To factor a polynomial means to write it as a product of two or more polynomials of lower degree. The original polynomial and its factored form are equivalent expressions — they produce the same value for every input — but the factored form reveals structure that the expanded form conceals.
Consider x2+5x+6. Written this way, the polynomial is a sum of three terms. Factored as (x+2)(x+3), the same expression becomes a product of two linear factors, making it immediately clear that the polynomial equals zero when x=−2 or x=−3. This connection between factors and roots is one of the main reasons factoring matters.
A polynomial is fully factored when none of its factors can be broken down further. The expression 2x(x2−9) is not fully factored because x2−9 splits into (x+3)(x−3). The complete factorization is 2x(x+3)(x−3).
What counts as "fully factored" depends on the number system in play. Over the integers, x2+1 cannot be factored — no pair of integer-coefficient linear factors multiplies to give x2+1. Over the reals, it remains irreducible for the same reason. Over the complex numbers, however, x2+1=(x+i)(x−i), and every polynomial of degree n factors into exactly n linear factors.
Greatest Common Factor (GCF)
The first step in any factoring problem is to check whether all terms share a common factor. The greatest common factor is the largest expression — including both numerical and variable parts — that divides evenly into every term of the polynomial.
For 6x3+9x2−3x, each term is divisible by 3x. Factoring it out gives 3x(2x2+3x−1). The original three-term polynomial now appears as a product of a monomial and a simpler trinomial.
When variables carry different exponents, the GCF takes the lowest power present across all terms. In 4x2y+8xy2, the numerical GCF is 4, the lowest power of x is x1, and the lowest power of y is y1, so the GCF is 4xy. Factoring yields 4xy(x+2y).
Extracting the GCF should become automatic — it simplifies the remaining expression and often makes subsequent factoring steps far more manageable. A polynomial like 2x3+8x2+8x looks like a difficult cubic until the GCF of 2x is removed, leaving 2x(x2+4x+4), which is a recognizable perfect square trinomial: 2x(x+2)2.
Factoring by Grouping
When a polynomial has four or more terms and no single GCF spans all of them, grouping offers a path forward. The idea is to split the polynomial into pairs of terms, factor each pair separately, and then look for a common binomial factor across the groups.
Take x3+2x2+3x+6. Grouping the first two terms and the last two gives (x3+2x2)+(3x+6). Factoring each group produces x2(x+2)+3(x+2). The binomial (x+2) now appears in both pieces, so it factors out: (x2+3)(x+2).
The method depends on the right grouping — and the original order of terms does not always produce one that works. Rearranging may be necessary. For ax+by+ay+bx, the natural left-to-right pairing yields (ax+by)+(ay+bx), which leads nowhere useful. Rearranging to ax+bx+ay+by and grouping as (ax+bx)+(ay+by) gives x(a+b)+y(a+b)=(x+y)(a+b).
Grouping also plays a role inside other techniques. The AC method for factoring trinomials with a leading coefficient other than 1 rewrites the middle term as two terms, creating a four-term polynomial that is then factored by grouping.
Factoring Trinomials — Simple Case
A trinomial of the form x2+bx+c has a leading coefficient of 1, which makes the factoring process straightforward. The goal is to find two numbers m and n such that m⋅n=c and m+n=b. If such a pair exists, the trinomial factors as (x+m)(x+n).
For x2+7x+12, the task is to find two numbers that multiply to 12 and add to 7. The pair 3 and 4 satisfies both conditions: 3⋅4=12 and 3+4=7. So x2+7x+12=(x+3)(x+4).
The signs of b and c guide the search. When c is positive and b is positive, both numbers are positive. When c is positive and b is negative, both numbers are negative — for instance, x2−9x+20=(x−4)(x−5) since (−4)(−5)=20 and (−4)+(−5)=−9. When c is negative, the two numbers have opposite signs: x2+2x−15=(x+5)(x−3) because 5⋅(−3)=−15 and 5+(−3)=2.
Not every trinomial of this form factors over the integers. The polynomial x2+x+1 requires two integers that multiply to 1 and add to 1 — no such pair exists. The discriminant b2−4c determines factorability: when it is a perfect square, the trinomial factors over the integers.
Factoring Trinomials — General Case
When the leading coefficient is not 1, the trinomial takes the form ax2+bx+c and requires a more systematic approach. The AC method handles this by converting the problem into a grouping problem.
Multiply a and c to get the product ac. Then find two numbers m and n such that m⋅n=ac and m+n=b. Use these numbers to split the middle term into two terms, creating a four-term polynomial that can be factored by grouping.
For 6x2+11x+4, compute ac=6⋅4=24. The pair 3 and 8 satisfies 3⋅8=24 and 3+8=11. Rewrite the middle term: 6x2+3x+8x+4. Group and factor: 3x(2x+1)+4(2x+1)=(3x+4)(2x+1).
The order in which the split terms are written does not affect the final result. Writing 6x2+8x+3x+4 instead leads to 2x(3x+4)+1(3x+4)=(2x+1)(3x+4) — the same factors in a different order.
As with the simple case, the discriminant b2−4ac determines whether the trinomial factors over the integers. When b2−4ac is negative, the polynomial has no real roots and is irreducible over the reals.
Difference of Squares
The identity a2−b2=(a+b)(a−b) is one of the most frequently used factoring patterns. It applies whenever a polynomial consists of two perfect square terms separated by subtraction.
Recognizing perfect squares is the key skill. The term 9x2 is (3x)2, the term 16 is 42, and the term x4 is (x2)2. So 9x2−16=(3x+4)(3x−4), and x4−1=(x2+1)(x2−1)=(x2+1)(x+1)(x−1) after factoring the second factor further.
The pattern extends to less obvious cases. The expression x2−5 is a difference of squares if reals are permitted: x2−(5)2=(x+5)(x−5). Over the integers alone, x2−5 does not factor.
The sum of squares a2+b2 has no factorization over the real numbers. No real values of m and n satisfy (a+m)(a+n)=a2+b2. Over the complex numbers, however, the factorization exists: a2+b2=(a+bi)(a−bi), using the fact that i2=−1.
Perfect Square Trinomials
Two closely related patterns arise when a binomial is squared:
a2+2ab+b2=(a+b)2
a2−2ab+b2=(a−b)2
The test for a perfect square trinomial has three parts: the first term must be a perfect square, the last term must be a perfect square, and the middle term must equal twice the product of their square roots. If all three conditions hold, the trinomial is the square of a binomial.
For x2+10x+25, the first term is x2, the last is 52, and the middle term 10x=2⋅x⋅5. All conditions are met, so x2+10x+25=(x+5)2.
For 4x2−12x+9, the first term is (2x)2, the last is 32, and the middle term 12x=2⋅2x⋅3. The subtraction sign carries through: 4x2−12x+9=(2x−3)2.
A common error is assuming any trinomial with perfect square first and last terms must be a perfect square trinomial. The expression x2+7x+9 has x2 and 32 at the ends, but the middle term 7x does not equal 2⋅x⋅3=6x. This trinomial is not a perfect square.
Sum and Difference of Cubes
Two factoring identities handle cubic terms:
a3+b3=(a+b)(a2−ab+b2)
a3−b3=(a−b)(a2+ab+b2)
Each factors a two-term cubic into a linear factor and a quadratic factor. The linear factor shares the same sign as the original expression. The quadratic factor follows the pattern: square the first term, take the opposite sign for the product term, then square the last term. The mnemonic SOAP — Same, Opposite, Always Positive — captures the sign sequence.
For x3+8, recognize 8=23. The sum of cubes formula gives x3+23=(x+2)(x2−2x+4). The linear factor (x+2) takes the same sign as the original sum. The quadratic factor has a negative middle term (opposite) and a positive constant (always positive).
For 27x3−1, recognize 27x3=(3x)3 and 1=13. The difference of cubes formula gives (3x−1)(9x2+3x+1). The linear factor takes the minus sign (same as the original difference), the middle term is positive (opposite), and the constant remains positive.
The quadratic factors a2−ab+b2 and a2+ab+b2 that arise from these formulas are irreducible over the reals. Their discriminants are −3b2 and −3b2 respectively — both negative — so neither factors further into real linear terms.
Factoring Higher-Degree Polynomials
Polynomials of degree four and above often yield to the same techniques used on quadratics and cubics, provided the right structure is recognized.
A common pattern is the quadratic in disguise. The polynomial x4+5x2+6 contains only even powers of x, which means substituting u=x2 transforms it into u2+5u+6. This factors as (u+2)(u+3), and substituting back gives (x2+2)(x2+3). Neither quadratic factor has real roots, so the factorization is complete over the reals.
Repeated application of earlier techniques handles layered structures. The polynomial x4−16 is a difference of squares: (x2+4)(x2−4). The second factor is itself a difference of squares: (x2+4)(x+2)(x−2). The first factor x2+4 is irreducible over the reals, so the process stops here.
Known roots provide another entry point. If r is a root of a polynomial P(x), then (x−r) is a factor, and polynomial division produces the remaining quotient. For instance, if direct substitution shows that P(2)=0, then (x−2) divides P(x) evenly, and the quotient can be factored further using any applicable technique.
The Fundamental Theorem of Algebra guarantees that every polynomial of degree n has exactly n roots over the complex numbers, counted with multiplicity. This means complete factorization into linear factors is always possible in that setting.
Factoring Strategy
With multiple techniques available, a systematic approach prevents wasted effort and missed factors.
The first move is always to extract the greatest common factor. Even when a GCF seems small — a single factor of 2 or a lone x — removing it simplifies everything that follows. Skipping this step is the most common source of incomplete factorizations.
Next, count the terms. A two-term polynomial calls for checking special patterns: difference of squares, sum or difference of cubes. A three-term polynomial is a candidate for trinomial factoring — simple case if the leading coefficient is 1, the AC method otherwise. A polynomial with four or more terms suggests grouping.
After each factoring step, examine every factor to determine whether it can be broken down further. The expression x4−81 factors as (x2+9)(x2−9), but stopping here misses the difference of squares hiding in the second factor: (x2+9)(x+3)(x−3).
The final check is verification. Multiplying the factors back together must reproduce the original polynomial. This catches sign errors, arithmetic mistakes, and overlooked terms. If the product does not match, at least one factoring step contains an error.
Not every polynomial factors neatly over the integers. When no technique produces integer-coefficient factors, the polynomial may be irreducible over the integers — or it may factor over the reals or complex numbers using roots found through the quadratic formula or numerical methods.
Irreducible Polynomials
A polynomial is irreducible over a given number system when it cannot be written as a product of lower-degree polynomials with coefficients in that system. Irreducibility is not an absolute property — it depends entirely on what numbers are allowed.
The polynomial x2−2 is irreducible over the integers because no pair of integer-coefficient linear factors produces it. Over the reals, it factors as (x+2)(x−2). The polynomial x2+1 goes further: it is irreducible over both the integers and the reals, since its roots ±i are not real numbers. Over the complex numbers, it factors as (x+i)(x−i).
The Fundamental Theorem of Algebra settles the question at the deepest level: every polynomial of degree n≥1 with complex coefficients factors completely into n linear factors over the complex numbers. This means the only irreducible polynomials over the complex numbers are linear — degree 1.
Over the reals, the irreducible building blocks are linear polynomials and quadratic polynomials with negative discriminant (b2−4ac<0). Every real polynomial factors into a product of such pieces. Over the integers, identifying irreducibility is harder and no single test covers all cases, though the discriminant and the rational root theorem from the rules page offer useful starting points.
Common Mistakes
Certain errors appear repeatedly in factoring work, and awareness of them is the simplest way to avoid them.
Skipping the GCF check is the most frequent. The polynomial 3x3−12x looks like it might require advanced techniques, but extracting 3x first gives 3x(x2−4)=3x(x+2)(x−2). Without that initial step, the factorization becomes unnecessarily difficult or incomplete.
Sign errors plague trinomial factoring. In x2−5x+6, both numbers must be negative: (−2)(−3)=6 and (−2)+(−3)=−5. Writing (x+2)(x−3) instead of (x−2)(x−3) gives a middle term of −x, not −5x. Verification by expanding catches this immediately.
Confusing the sum and difference of squares is another trap. The difference a2−b2 factors as (a+b)(a−b). The sum a2+b2 does not factor over the reals — attempting to write it as (a+b)(a−b) produces a2−b2, not a2+b2.
With cube formulas, the most common error is mishandling signs in the quadratic factor. For a3+b3=(a+b)(a2−ab+b2), the middle term of the quadratic factor is −ab, not +ab. Mixing this up produces an incorrect factorization that fails verification.
Stopping too early leaves factors on the table. After obtaining (x2+4)(x2−4) from x4−16, the second factor is itself a difference of squares. Every factor must be inspected for further decomposition before the factorization is considered complete.