Skip to content
Educora
IntermediateGrade 722 min14 / 82

Factoring polynomials

Four ways to write a polynomial as a product — taking out the common factor, grouping, the special product formulas and factoring a quadratic trinomial — and what they are good for: simplifying, solving equations of the form ab = 0, proving divisibility and mental arithmetic.

Check yourself
In this lesson you will learn
  • Find the greatest common factor of the terms and take it out of brackets (also when it is a bracket)
  • Factor by grouping and by reading the special product formulas from right to left
  • Factor the quadratic trinomials x² + px + q and ax² + bx + c
  • Use factoring to solve equations, prove divisibility and calculate mentally

The teacher wrote three tasks on the board: 1) work out 47 · 53 + 47 · 47; 2) work out 57² − 43²; 3) solve x² = 5x. Murad reached for a calculator, while Aysel did all three in her head in a minute: 47 · (53 + 47) = 4700; (57 − 43)(57 + 43) = 14 · 100 = 1400; x(x − 5) = 0, so x = 0 or x = 5. Murad divided the equation by x, found only x = 5 and lost a root. Aysel’s secret is the same every time: she turned a sum into a product.

In the previous lessons, including “Special products (short multiplication formulas)”, we turned products into polynomials by expanding brackets. Now we go the other way. A product is valuable because a lot can be seen in it at once: if one factor is zero, the product is zero; if one factor is divisible by 7, so is the product; and in a fraction only factors can be cancelled. In the next lesson, “Algebraic fractions (rational expressions)”, you will need this skill at every step.

Definition
Factoring a polynomial

Writing a polynomial as a product of two or more polynomials (or monomials). For example, x² − 9 = (x − 3)(x + 3). It is expanding in reverse: when you expand the product you got, the original polynomial must come back — that is the most reliable check.

Taking out the common factor

This is the simplest method, and it is always tried first. The distributive law a(b + c) = ab + ac is read from right to left: the factor that repeats in every term is written once in front of the brackets, and inside the brackets stay the quotients of each term divided by that factor.

ab + ac − ad = a(b + c − d)
where:
  • athe common factor of all terms (a number, a monomial or a bracket)
  • b, c, dwhat is left of each term after dividing it by the common factor

The distributive law from right to left. The bracket must keep as many terms as the original polynomial had — comparing the number of terms is a quick check.

  1. 1
    Coefficients

    Find the GCD of the coefficients (for 12 and 18 it is 6). If the first term is negative, a negative factor such as −6 is usually taken out.

  2. 2
    Letters

    Take every letter that appears in all the terms, with its smallest exponent: for a³b, a²b² and a⁴b this is a²b.

  3. 3
    Divide

    Divide every term by the common factor and write the quotient in the brackets. If a term equals the common factor itself, 1 stays in its place.

  4. 4
    Check

    Expand the bracket in your head: you must get the original polynomial. The terms inside the bracket must have no common factor left.

The common factor is a monomial

Factor:
1) 6x + 9
2) 12a³b − 18a²b²
3) 5x⁴ − 10x³ + 15x²
4) −4y² − 8y

Show solution
1) GCD(6, 9) = 3: 6x + 9 = 3(2x + 3).
2) GCD(12, 18) = 6, the smallest power of a is 2 and of b is 1, so the common factor is 6a²b.
12a³b ÷ 6a²b = 2a, 18a²b² ÷ 6a²b = 3b ⇒ 6a²b(2a − 3b).
3) The common factor is 5x²: 5x²(x² − 2x + 3). Three terms in the bracket, three in the original.
4) The first term is negative, so take out −4y: −4y² ÷ (−4y) = y, −8y ÷ (−4y) = 2 ⇒ −4y(y + 2).
Check: −4y · y − 4y · 2 = −4y² − 8y ✓

The common factor can also be a whole bracket. Then we treat the bracket like a single letter. If two brackets are opposites of each other, such as 4 − n and n − 4, first take out the minus sign: 4 − n = −(n − 4).

The common factor is a bracket

Factor (find the common bracket):
1) x(a − b) + 3(a − b)
2) 2m(n − 4) − 5(4 − n)
3) (x + 1)² − 3(x + 1)

Show solution
1) (a − b) is in both terms — take it out as a whole factor: (a − b)(x + 3).
2) 4 − n = −(n − 4), so −5(4 − n) = +5(n − 4).
2m(n − 4) + 5(n − 4) = (n − 4)(2m + 5).
3) (x + 1)² = (x + 1)(x + 1), so the common factor is (x + 1):
(x + 1)((x + 1) − 3) = (x + 1)(x − 2).
Check (3): this gives x² − x − 2, and the original is x² + 2x + 1 − 3x − 3 = x² − x − 2 ✓

Factoring by grouping

Sometimes the terms have no common factor all together, but when they are grouped in pairs, the same bracket appears in every group. In ab + 3a + 2b + 6, for example, no factor is shared by all four terms, but the first two terms are divisible by a and the last two by 2.

ax + ay + bx + by = a(x + y) + b(x + y) = (x + y)(a + b)
where:
  • a, bthe factors taken out of the first and the second group
  • x + ythe bracket that comes out the same in both groups — the new common factor

A common factor is taken out twice: first from each group, then from the whole expression. If the brackets do not match, group the terms differently or take a negative factor out of one group.

Grouping

Factor by grouping:
1) ab + 3a + 2b + 6
2) x³ − 2x² + 5x − 10
3) 7m − 7n − am + an
4) xy − 6 + 3x − 2y

Show solution
1) a(b + 3) + 2(b + 3) = (b + 3)(a + 2).
2) x²(x − 2) + 5(x − 2) = (x − 2)(x² + 5).
3) Take −a out of the second group so that the brackets match: 7(m − n) − a(m − n) = (m − n)(7 − a).
4) In this order the groups do not work: xy − 6 has no common factor. Rearrange the terms: xy + 3x − 2y − 6 = x(y + 3) − 2(y + 3) = (y + 3)(x − 2).
Check (4): (y + 3)(x − 2) = xy − 2y + 3x − 6 ✓

Factoring with the special product formulas

In the lesson “Special products (short multiplication formulas)” we used these identities from left to right, to expand brackets. To factor, we read them from right to left. The main job is to recognise the formula: count the terms and see which of them are perfect squares (1, 4, 9, 25x², a⁴, …) or perfect cubes (8, 27, 64, x³, 8a³, …).

a² − b² = (a − b)(a + b)a² + 2ab + b² = (a + b)²a² − 2ab + b² = (a − b)²a³ + b³ = (a + b)(a² − ab + b²)a³ − b³ = (a − b)(a² + ab + b²)
where:
  • a, bthe bases of the terms that are perfect squares or cubes: 25x² = (5x)², 8a³ = (2a)³
  • 2abthe middle term — the sign of a perfect square: twice the product of the bases

Two terms: a difference of squares, or a sum (difference) of cubes; three terms: possibly a perfect square. A sum of squares a² + b² cannot be factored (with real coefficients).

Difference of squares

Factor with the difference of squares:
1) 25x² − 4
2) 16a⁴ − 81
3) (x + 3)² − 4x²

Show solution
1) 25x² = (5x)², 4 = 2² ⇒ (5x − 2)(5x + 2).
2) 16a⁴ = (4a²)², 81 = 9² ⇒ (4a² − 9)(4a² + 9). The first bracket is again a difference of squares: 4a² − 9 = (2a − 3)(2a + 3).
Answer: (2a − 3)(2a + 3)(4a² + 9); 4a² + 9 is a sum of squares and does not factor.
3) Here a = x + 3 and b = 2x: (x + 3 − 2x)(x + 3 + 2x) = (3 − x)(3x + 3) = 3(3 − x)(x + 1).
Perfect squares and cubes

Factor with a formula, if possible:
1) x² − 10x + 25
2) 9a² + 12ab + 4b²
3) x² + 10x + 16
4) 8x³ − 27
5) a³ + 64

Show solution
1) x² and 25 = 5² are squares, and 2 · x · 5 = 10x matches the middle term ⇒ (x − 5)².
2) (3a)² and (2b)², 2 · 3a · 2b = 12ab ⇒ (3a + 2b)².
3) x² and 16 = 4² are squares, but 2 · x · 4 = 8x ≠ 10x. So this is not a perfect square; we will factor it another way in the next section.
4) 8x³ = (2x)³, 27 = 3³: (2x − 3)((2x)² + 2x · 3 + 3²) = (2x − 3)(4x² + 6x + 9).
5) 64 = 4³ ⇒ (a + 4)(a² − 4a + 16).

Factoring a quadratic trinomial

Definition
Quadratic trinomial

A polynomial of the form ax² + bx + c, where a, b, c are numbers and a ≠ 0. For example, x² + 7x + 12 and 2x² − x − 3.

Why does the method work? Expand: (x + m)(x + n) = x² + nx + mx + mn = x² + (m + n)x + mn. So the coefficient of x is the sum of m and n, and the constant term is their product. To factor, it is enough to find these two numbers.

x² + px + q = (x + m)(x + n), m + n = p, m · n = q
where:
  • pthe coefficient of x
  • qthe constant term
  • m, ntwo numbers with sum p and product q

Start the search from the product: write q as a product of two factors in every possible way and pick the pair whose sum is p.

The trinomial x² + px + q

Factor the quadratic trinomial:
1) x² + 7x + 12
2) x² − x − 12
3) x² − 8x + 15
4) x² + 10x + 16

Show solution
1) Product 12, sum 7: 12 = 1 · 12 = 2 · 6 = 3 · 4; 3 + 4 = 7 ⇒ (x + 3)(x + 4).
2) The product −12 is negative, so the numbers have different signs; sum −1: −4 and 3 ⇒ (x − 4)(x + 3).
3) The product 15 is positive and the sum −8 is negative, so both numbers are negative: −3 and −5 ⇒ (x − 3)(x − 5).
4) Product 16, sum 10: 2 and 8 ⇒ (x + 2)(x + 8). This trinomial was not a perfect square, but it does factor.
Check (2): (x − 4)(x + 3) = x² + 3x − 4x − 12 = x² − x − 12 ✓

When the leading coefficient is not 1 (a ≠ 1), split the middle term into two terms and use grouping. To do this, look for two numbers whose product is a · c and whose sum is b. Another way is completing the square: bring the expression to a difference of squares.

  1. 1
    Compute a · c

    For 2x² + 7x + 3: a · c = 2 · 3 = 6.

  2. 2
    Choose two numbers

    Numbers with product 6 and sum b = 7: 1 and 6.

  3. 3
    Split the middle term

    Write 7x = x + 6x: 2x² + x + 6x + 3.

  4. 4
    Group

    x(2x + 1) + 3(2x + 1) = (2x + 1)(x + 3). The brackets must match.

When a ≠ 1, and completing the square

Factor:
1) 6x² − x − 2
2) 3x² − 10x + 8
3) x² + 6x + 5 (by completing the square)

Show solution
1) a · c = 6 · (−2) = −12, sum −1: −4 and 3.
6x² − 4x + 3x − 2 = 2x(3x − 2) + (3x − 2) = (3x − 2)(2x + 1).
2) a · c = 24, sum −10: −4 and −6.
3x² − 4x − 6x + 8 = x(3x − 4) − 2(3x − 4) = (3x − 4)(x − 2).
3) x² + 6x + 5 = (x² + 6x + 9) − 9 + 5 = (x + 3)² − 2².
Difference of squares: (x + 3 − 2)(x + 3 + 2) = (x + 1)(x + 5).

Not every quadratic trinomial factors with whole numbers: for x² + x + 1 there are no integers with product 1 and sum 1. In the lesson “Quadratic equations” you will learn, using the discriminant, which trinomials can be factored at all, and the formula ax² + bx + c = a(x − x₁)(x − x₂).

Let us put all the methods into one plan. In harder tasks, two or three methods are usually used one after another.

  1. 1
    Common factor

    Always start by taking out the common factor (with a minus sign if needed).

  2. 2
    Count the terms

    Two terms: difference of squares, or sum (difference) of cubes. Three terms: perfect square or quadratic trinomial. Four or more: grouping.

  3. 3
    Go all the way

    Look at every factor again: can it be factored further? For example, a⁴ − 1 = (a² − 1)(a² + 1) = (a − 1)(a + 1)(a² + 1).

  4. 4
    Check

    Expand the brackets, or put the same number (say x = 1 or x = 2) into both expressions — the results must be equal.

Several methods together

Factor completely:
1) 3x³ − 12x
2) 2a² − 4ab + 2b²
3) x³ − 3x² − 4x + 12
4) x² − 2xy + y² − 9

Show solution
1) Common factor 3x: 3x(x² − 4) = 3x(x − 2)(x + 2).
2) Common factor 2: 2(a² − 2ab + b²) = 2(a − b)².
3) Grouping: x²(x − 3) − 4(x − 3) = (x − 3)(x² − 4) = (x − 3)(x − 2)(x + 2).
4) The first three terms are a perfect square: (x − y)² − 3² = (x − y − 3)(x − y + 3).
Check (3), x = 1: 1 − 3 − 4 + 12 = 6 and (1 − 3)(1 − 2)(1 + 2) = (−2) · (−1) · 3 = 6 ✓

What factoring is good for

The most important property of a product: a product of two numbers is zero only when at least one of them is zero. So we move all terms of an equation to one side and factor that side — a hard equation breaks into several easy ones.

a · b = 0 ⇔ a = 0 or b = 0
where:
  • a, bnumbers or expressions with variables (the factors)
  • ⇔true in both directions: “if and only if”

One side of the equation must be a product and the other side zero. Nothing follows from x(x − 5) = 6.

Equations

Solve the equation:
1) x² = 5x
2) x³ − 16x = 0
3) x² − 7x + 12 = 0
4) x³ + 2x² − 9x − 18 = 0

Show solution
1) x² − 5x = 0 ⇒ x(x − 5) = 0 ⇒ x = 0 or x = 5.
2) x(x² − 16) = 0 ⇒ x(x − 4)(x + 4) = 0 ⇒ x = 0, x = 4, x = −4.
3) (x − 3)(x − 4) = 0 ⇒ x = 3 or x = 4.
4) Grouping: x²(x + 2) − 9(x + 2) = (x + 2)(x − 3)(x + 3) = 0 ⇒ x = −2, x = 3, x = −3.
Check (4), x = −3: −27 + 18 + 27 − 18 = 0 ✓
Interactive
Loading simulation…
The graph of y = (x − a)(x − b). Move a and b: the curve crosses the x-axis exactly at x = a and x = b, because at these values one of the factors is zero. Expanding gives x² − (a + b)x + ab: the coefficient of x is minus the sum of a and b, and the constant term is their product.

Factoring also makes calculations easier. The difference of squares turns the difference of two big squares into one multiplication, and a common factor produces “round” numbers. To prove divisibility, we also bring the expression to the form of a product: if one factor is divisible by n, the whole product is divisible by n.

Mental arithmetic

Work out the easy way:
1) 3.6 · 7.2 + 3.6 · 2.8
2) 76² − 24²
3) x² − 2xy + y² for x = 7.3 and y = 2.3
4) (38² − 17²)/(47² − 19²)

Show solution
1) 3.6 · (7.2 + 2.8) = 3.6 · 10 = 36.
2) (76 − 24)(76 + 24) = 52 · 100 = 5200.
3) x² − 2xy + y² = (x − y)² = (7.3 − 2.3)² = 5² = 25.
4) (38 − 17)(38 + 17)/((47 − 19)(47 + 19)) = (21 · 55)/(28 · 66) = (3 · 7 · 5 · 11)/(4 · 7 · 6 · 11) = 15/24 = 5/8.
Proving divisibility

Prove that:
1) 7²⁰ + 7¹⁹ is divisible by 8.
2) (n + 7)² − (n − 5)² is divisible by 24 for every integer n.
3) n³ − n is divisible by 6 for every integer n.

Show solution
1) Take out the factor 7¹⁹: 7¹⁹ · (7 + 1) = 8 · 7¹⁹ — one of the factors is 8, so the number is divisible by 8.
2) Difference of squares: (n + 7 − n + 5)(n + 7 + n − 5) = 12 · (2n + 2) = 24(n + 1) ⇒ divisible by 24.
3) n³ − n = n(n² − 1) = (n − 1) · n · (n + 1) — the product of three consecutive integers. Among them there is always an even number and a multiple of 3 ⇒ the product is divisible by 2 · 3 = 6. For example, n = 5: 125 − 5 = 120 = 4 · 5 · 6.
Check yourself: fill in the gap
  1. 1.6a + 18 = 6()
  2. 2.x² − 49 = (x − 7)()
  3. 3.x² + 5x + 6 = (x + 2)()
  4. 4.16x² − 8x + 1 = ()²
  5. 5.x³ + 8 = (x + 2)(x² − + 4)
  6. 6.x² − 3x = 0 ⇒ x = 0 or x =

Key points

  • Factoring turns a sum into a product; always check the result by expanding or by substituting a number.
  • Order of work: common factor first, then count the terms: two — difference of squares or sum (difference) of cubes; three — perfect square or quadratic trinomial; four — grouping.
  • x² + px + q = (x + m)(x + n), where m + n = p and m · n = q; for ax² + bx + c, split the middle term with two numbers whose product is a · c and sum is b.
  • a · b = 0 ⇔ a = 0 or b = 0. Never divide an equation by an expression with the variable — a root gets lost.
  • Factoring makes mental arithmetic (76² − 24² = 52 · 100) and divisibility proofs (n³ − n = (n − 1)n(n + 1)) easy.

Check yourself

12 questions. Every correct answer earns XP.

1 / 12
What does it mean to factor a polynomial?