Mathwords logoMathwords

Factoring Rules

Factoring Rules

Algebra formulas for factoring.

1.   x2 – (r + s)x + rs = (x – r)(x – s)
2.   x2 + 2ax + a2 = (x + a)2  and  x2 2ax + a2 = (x – a)2
3.   Difference of squares:  a2 – b2 = (a – b)(a + b)
4.   Difference of cubes:  a3 – b3 = (a – b)(a2 + ab + b2)
5.   a4 – b4 = (a – b)(a3 + a2b + ab2 + b3) = (a – b) [ a2(a + b) + b2(a + b) ] = (a – b)(a + b)(a2 + b2)
  or, more simply,   a4 – b4 = (a2 – b2)(a2 + b2) = (a – b)(a + b)(a2 + b2)
6.   a5 – b5 = (a – b)(a4 + a3b + a2b2 + ab3 + b4)
7.   an – bn = (a – b)(an 1 + an 2b + an 3b2 + ··· + abn 2 + bn 1)
8.   Sum of cubes:  a3 + b3 = (a + b)(a2 – ab + b2)
9.   a5 + b5 = (a + b)(a4 – a3b + a2b2 – ab3 + b4)
10.   a7 + b7 = (a + b)(a6 – a5b + a4b2 – a3b3 + a2b4 – ab5 + b6)
11.   If n is odd, then  an + bn = (a + b)(an 1 – an 2b + an 3b2 – ··· + a2bn 3abn 2 + bn 1)
12.   Sum of squares:  a2 + b2 = (a – bi)(a + bi)      Note:  a2 + b2  does not factor using real numbers.
13.   a⁴ + b⁴ = (a² − √2·ab + b²)(a² + √2·ab + b²)

 

See also

Factor theorem, rational root theorem, polynomial long division, synthetic division

Key Formula

1.  x2(r+s)x+rs=(xr)(xs)2.  x2±2ax+a2=(x±a)23.  a2b2=(ab)(a+b)4.  a3b3=(ab)(a2+ab+b2)5.  a3+b3=(a+b)(a2ab+b2)6.  anbn=(ab)(an1+an2b++bn1)\begin{aligned} &1.\; x^2 - (r+s)x + rs = (x-r)(x-s) \\ &2.\; x^2 \pm 2ax + a^2 = (x \pm a)^2 \\ &3.\; a^2 - b^2 = (a-b)(a+b) \\ &4.\; a^3 - b^3 = (a-b)(a^2+ab+b^2) \\ &5.\; a^3 + b^3 = (a+b)(a^2-ab+b^2) \\ &6.\; a^n - b^n = (a-b)(a^{n-1}+a^{n-2}b+\cdots+b^{n-1}) \end{aligned}
Where:
  • a,ba, b = Any expressions (numbers, variables, or combinations)
  • r,sr, s = The roots of the quadratic; the values that make each factor zero
  • nn = A positive integer exponent
  • xx = The variable in the polynomial being factored

Worked Example

Problem: Factor the expression x25x+6x^2 - 5x + 6 completely.
Step 1: Identify the form. This is a quadratic x2(r+s)x+rsx^2 - (r+s)x + rs, so you need two numbers rr and ss whose sum is 5 and whose product is 6.
r+s=5andrs=6r + s = 5 \quad \text{and} \quad rs = 6
Step 2: Find the pair. The numbers 2 and 3 satisfy both conditions: 2+3=52 + 3 = 5 and 2×3=62 × 3 = 6.
r=2,  s=3r = 2,\; s = 3
Step 3: Apply Rule 1 to write the factored form.
x25x+6=(x2)(x3)x^2 - 5x + 6 = (x - 2)(x - 3)
Step 4: Verify by expanding: (x2)(x3)=x23x2x+6=x25x+6(x-2)(x-3) = x^2 - 3x - 2x + 6 = x^2 - 5x + 6. The factoring is correct.
\checkmark
Answer: x25x+6=(x2)(x3)x^2 - 5x + 6 = (x - 2)(x - 3)

Another Example

This example uses the difference of cubes rule instead of the basic trinomial rule, and it shows how to handle coefficients other than 1 by rewriting terms as perfect cubes.

Problem: Factor 8x3278x^3 - 27 completely.
Step 1: Recognize that both terms are perfect cubes. Write each term as a cube: 8x3=(2x)38x^3 = (2x)^3 and 27=3327 = 3^3.
8x327=(2x)3338x^3 - 27 = (2x)^3 - 3^3
Step 2: Apply the difference of cubes rule (Rule 4): a3b3=(ab)(a2+ab+b2)a^3 - b^3 = (a - b)(a^2 + ab + b^2), with a=2xa = 2x and b=3b = 3.
a=2x,b=3a = 2x,\quad b = 3
Step 3: Substitute into the formula. Compute each part of the trinomial factor: (2x)2=4x2(2x)^2 = 4x^2, (2x)(3)=6x(2x)(3) = 6x, and 32=93^2 = 9.
(2x3)(4x2+6x+9)(2x - 3)\bigl(4x^2 + 6x + 9\bigr)
Step 4: Check that the trinomial 4x2+6x+94x^2 + 6x + 9 does not factor further over the reals. Its discriminant is 36144=108<036 - 144 = -108 < 0, so it is irreducible.
8x327=(2x3)(4x2+6x+9)8x^3 - 27 = (2x - 3)(4x^2 + 6x + 9)
Answer: 8x327=(2x3)(4x2+6x+9)8x^3 - 27 = (2x - 3)(4x^2 + 6x + 9)

Frequently Asked Questions

What is the difference between the difference of cubes and the sum of cubes formulas?
The difference of cubes a3b3=(ab)(a2+ab+b2)a^3 - b^3 = (a - b)(a^2 + ab + b^2) has a minus sign in the binomial factor and all plus signs in the trinomial. The sum of cubes a3+b3=(a+b)(a2ab+b2)a^3 + b^3 = (a + b)(a^2 - ab + b^2) has a plus in the binomial and an alternating pattern (plus, minus, plus) in the trinomial. A helpful mnemonic is "SOAP": Same sign, Opposite sign, Always Positive — referring to the signs in order across both factors.
Can you factor a sum of squares like a2+b2a^2 + b^2?
No, a2+b2a^2 + b^2 cannot be factored into real-number factors. It only factors over the complex numbers as (abi)(a+bi)(a - bi)(a + bi), where i=1i = \sqrt{-1}. This is a key distinction from the difference of squares a2b2a^2 - b^2, which always factors over the reals.
When should you use the general rule anbna^n - b^n instead of a specific formula?
Use the general rule anbn=(ab)(an1+an2b++bn1)a^n - b^n = (a - b)(a^{n-1} + a^{n-2}b + \cdots + b^{n-1}) when nn is larger than 3 and no simpler factoring path exists. For even exponents like n=4n = 4, you can often factor in stages — for example, treating a4b4a^4 - b^4 as a difference of squares first, then factoring again. Choosing the most efficient path depends on the specific exponent.

Factoring vs. Expanding (Distributing)

FactoringExpanding (Distributing)
DirectionBreaks a product apart: rewrites a polynomial as a product of factorsMultiplies factors out: rewrites a product as a sum of terms
Examplex29=(x3)(x+3)x^2 - 9 = (x-3)(x+3)(x3)(x+3)=x29(x-3)(x+3) = x^2 - 9
When to useSolving equations, simplifying fractions, finding rootsSimplifying expressions, verifying a factoring result, distributing
DifficultyRequires pattern recognition; harder because multiple rules may applyMechanical process; apply the distributive property systematically

Why It Matters

Factoring rules appear constantly in algebra and precalculus, especially when solving quadratic and higher-degree polynomial equations. You also need them to simplify rational expressions (algebraic fractions) by canceling common factors. In calculus, factoring is used to evaluate limits, integrate rational functions via partial fractions, and simplify derivatives — making fluency with these rules essential long before and well beyond Algebra 2.

Common Mistakes

Mistake: Confusing the signs in the sum vs. difference of cubes trinomial factor. Students often write a3+b3=(a+b)(a2+ab+b2)a^3 + b^3 = (a + b)(a^2 + ab + b^2) with a plus on the abab term.
Correction: The middle term of the trinomial always has the opposite sign from the binomial factor. For a3+b3a^3 + b^3, the binomial is (a+b)(a + b), so the trinomial must be (a2ab+b2)(a^2 - ab + b^2). Use the SOAP mnemonic: Same, Opposite, Always Positive.
Mistake: Trying to factor a sum of squares a2+b2a^2 + b^2 as (a+b)2(a + b)^2 or (a+b)(ab)(a + b)(a - b).
Correction: Neither of those is correct. Expanding (a+b)2(a + b)^2 gives a2+2ab+b2a^2 + 2ab + b^2, and (a+b)(ab)(a + b)(a - b) gives a2b2a^2 - b^2. The sum of two squares does not factor over the real numbers. Only the difference of squares a2b2a^2 - b^2 factors as (ab)(a+b)(a - b)(a + b).

Related Terms