Example 1 — Factoring out a common factor
Factor the binomial: \( 12x - 8 \)
Solution: The greatest common factor of 12 and 8 is 4. Rewrite each term:
\[ 12x - 8 = 4(3x) - 4(2) \] \[ = 4(3x - 2) \]Check by expanding: \( 4(3x - 2) = 12x - 8 \) ✓
Formulas, worked examples, and practice — factor completely over the reals
To factor a polynomial means to rewrite it as a product of simpler polynomials that cannot be factored further over the real numbers. For example:
\[ x^2 + 6x + 8 = (x + 2)(x + 4) \]Below you'll find the main factoring formulas, four worked examples with full solutions, and practice questions with answers. A factor polynomial calculator is also available to check your work.
| Name | Formula |
|---|---|
| Common factor | \( ax + ay = a(x + y) \) |
| Grouping | \( ax + ay + bx + by = a(x+y) + b(x+y) = (a + b)(x + y) \) |
| Difference of squares | \( x^2 - y^2 = (x + y)(x - y) \) |
| Extended difference of squares | \( (x + y)^2 - z^2 = (x + y + z)(x + y - z) \) |
| Sum of cubes | \( x^3 + y^3 = (x + y)(x^2 - xy + y^2) \) |
| Difference of cubes | \( x^3 - y^3 = (x - y)(x^2 + xy + y^2) \) |
| Difference of fourth powers | \( x^4 - y^4 = (x + y)(x - y)(x^2 + y^2) \) |
| Perfect-square trinomial | \( x^2 \pm 2xy + y^2 = (x \pm y)^2 \) |
| Perfect cube | \( x^3 \pm 3x^2y + 3xy^2 \pm y^3 = (x \pm y)^3 \) |
Remember: the factors \( x^2 + xy + y^2 \) (from the sum of cubes) and \( x^2 - xy + y^2 \) (from the difference of cubes) are themselves irreducible over the reals — their discriminants are \( -3y^2 < 0 \). So don't try to factor them further.
Factor the binomial: \( 12x - 8 \)
Solution: The greatest common factor of 12 and 8 is 4. Rewrite each term:
\[ 12x - 8 = 4(3x) - 4(2) \] \[ = 4(3x - 2) \]Check by expanding: \( 4(3x - 2) = 12x - 8 \) ✓
Factor the binomial: \( 9 - 4x^2 \)
Solution: Rewrite as a difference of squares:
\[ 9 - 4x^2 = 3^2 - (2x)^2 \]Apply \( a^2 - b^2 = (a + b)(a - b) \):
\[ = (3 - 2x)(3 + 2x) \]Factor the trinomial: \( 9x^2 + 3x - 2 \)
Solution: For \( ax^2 + bx + c \) with \( a = 9 \), \( b = 3 \), \( c = -2 \), compute \( ac = 9 \cdot (-2) = -18 \).
Find two numbers that multiply to \( -18 \) and add to \( 3 \). Those are \( 6 \) and \( -3 \).
Rewrite the middle term \( 3x \) as \( 6x - 3x \):
\[ 9x^2 + 6x - 3x - 2 \]Factor by grouping:
\[ 3x(3x + 2) - 1(3x + 2) \] \[ = (3x + 2)(3x - 1) \]Check by expanding: \( (3x + 2)(3x - 1) = 9x^2 - 3x + 6x - 2 = 9x^2 + 3x - 2 \) ✓
Factor the polynomial: \( x^3 + 2x^2 - 16x - 32 \)
Solution: Group terms:
\[ (x^3 + 2x^2) - (16x + 32) \]Factor each group:
\[ x^2(x + 2) - 16(x + 2) \]Factor out the common binomial \( (x + 2) \):
\[ = (x + 2)(x^2 - 16) \]Apply the difference of squares to the remaining factor:
\[ = (x + 2)(x + 4)(x - 4) \]Use the extended difference of squares formula \( A^2 - B^2 = (A + B)(A - B) \) with \( A = x + 1 \) and \( B = 2 \):
\[ (x + 1)^2 - 2^2 = \big((x+1) - 2\big)\big((x+1) + 2\big) \] \[ = (x - 1)(x + 3) \]Find two numbers that multiply to \( 6 \) and add to \( 5 \): these are \( 2 \) and \( 3 \).
\[ x^2 + 5x + 6 = (x + 2)(x + 3) \]Apply the difference of two cubes, \( x^3 - 1^3 = (x - 1)(x^2 + x + 1) \):
\[ x^3 - 1 = (x - 1)(x^2 + x + 1) \]The quadratic \( x^2 + x + 1 \) has discriminant \( 1 - 4 = -3 < 0 \), so it is irreducible over the reals.
Factor by grouping:
\[ (x^3 - x^2) - (25x - 25) = x^2(x - 1) - 25(x - 1) \] \[ = (x - 1)(x^2 - 25) \]Apply the difference of squares:
\[ = (x - 1)(x + 5)(x - 5) \]Rewrite as a sum of cubes:
\[ 3^3 + (2x)^3 \]Apply \( a^3 + b^3 = (a + b)(a^2 - ab + b^2) \):
\[ = (3 + 2x)\big(3^2 - (3)(2x) + (2x)^2\big) \] \[ = (3 + 2x)(9 - 6x + 4x^2) \]The quadratic \( 4x^2 - 6x + 9 \) has discriminant \( 36 - 144 = -108 < 0 \), so it is irreducible over the reals.
Group the terms:
\[ x^3 - 3x^2y + 3xy^2 - y^3 = (x^3 - y^3) - (3x^2y - 3xy^2) \]Apply the difference of cubes to the first group and factor the second:
\[ = (x - y)(x^2 + xy + y^2) - 3xy(x - y) \]Factor out the common \( (x - y) \):
\[ = (x - y)\big[(x^2 + xy + y^2) - 3xy\big] \] \[ = (x - y)(x^2 - 2xy + y^2) \]Recognize the perfect-square trinomial \( x^2 - 2xy + y^2 = (x - y)^2 \):
\[ = (x - y)(x - y)^2 = (x - y)^3 \quad \blacksquare \]A polynomial is factored completely when it is written as a product of irreducible factors over the given number system. Over the reals, every factor must be linear or irreducible quadratic. For example, \(x^3 - 1 = (x - 1)(x^2 + x + 1)\) is complete over the reals, since \(x^2 + x + 1\) has discriminant \(-3 < 0\).
\(x^2 - y^2 = (x + y)(x - y)\). For example, \(9 - 4x^2 = 3^2 - (2x)^2 = (3 + 2x)(3 - 2x)\).
\(x^3 + y^3 = (x + y)(x^2 - xy + y^2)\). For example, \(27 + 8x^3 = 3^3 + (2x)^3 = (3 + 2x)(9 - 6x + 4x^2)\).
\(x^3 - y^3 = (x - y)(x^2 + xy + y^2)\). For example, \(x^3 - 1 = (x - 1)(x^2 + x + 1)\).
Use the "ac" method: multiply \(a\) and \(c\) to get \(ac = -18\). Find two numbers whose product is \(-18\) and whose sum is \(b = 3\) — these are \(6\) and \(-3\). Rewrite the middle term: \(9x^2 + 6x - 3x - 2\). Then factor by grouping: \(3x(3x+2) - (3x+2) = (3x+2)(3x-1)\).
Last updated: October 17, 2026