Sub topic 3
Factoring out a common factor
This chapter covers the first factoring step. Every other factoring method in this tutorial starts from it. It assumes you can expand products with the distributive property, handle integer arithmetic including negatives, and read exponents such as x³ as x·x·x. You should also know standard form, ax² + bx + c = 0, and the zero product property: if a product equals 0, at least one factor equals 0.
What a common factor is
A common factor of several terms is an expression that divides every one of them with no remainder. The greatest common factor (GCF) is the largest such expression. It combines two parts:
- the largest integer that divides every coefficient
- each variable that appears in every term, raised to the lowest power it has in any term
Factoring out the GCF is the distributive property run backward:
- Forward: 3x(x + 4) = 3x² + 12x
- Backward: 3x² + 12x = 3x(x + 4)
The factored form is a product, and products are what the zero product property needs.
Finding the GCF step by step
Take 12x³ − 18x² + 6x.
- Coefficients. The numbers are 12, 18 and 6. The largest integer dividing all three is 6.
- Variables. Every term contains x. The powers are 3, 2 and 1, and the lowest is 1, so the variable part is x.
- Combine. The GCF is 6x.
- Divide each term by the GCF. 12x³ ÷ 6x = 2x². −18x² ÷ 6x = −3x. 6x ÷ 6x = 1.
- Write the product. 12x³ − 18x² + 6x = 6x(2x² − 3x + 1).
The following table shows how the GCF is chosen for a few expressions.
| Expression | Coefficient GCF | Variable part | GCF | Factored form |
|---|---|---|---|---|
| 3x² + 12x | 3 | x | 3x | 3x(x + 4) |
| 10x² − 25 | 5 | none (the constant has no x) | 5 | 5(2x² − 5) |
| 4x⁴ + 8x³ | 4 | x³ | 4x³ | 4x³(x + 2) |
| x² + x | 1 | x | x | x(x + 1) |
In the second row, no x appears in the term −25, so x is not a common factor. A variable counts only if it appears in every term.
Details that cause errors
A term equal to the GCF leaves a 1
In x² + x = x(x + 1), the second term x divided by x is 1, not 0. Writing x(x) is a common slip. Expanding the result catches it: x · x = x², which is missing the +x.
Signs of the factored-out part
When the leading coefficient is negative, factor out a negative GCF. This leaves a positive leading term in the parentheses, which later methods prefer.
−4x² + 8x = −4x(x − 2)
Check: −4x · x = −4x², and −4x · (−2) = +8x. The result matches.
You can also write 4x(−x + 2). That is correct but harder to continue with, so factor out the negative.
Factor completely
Factoring is complete only when the parentheses contain no further common factor. Writing 12x² + 18x = 3x(4x + 6) is correct but unfinished, because 4x + 6 still has a common factor of 2. The full GCF is 6x, which gives 6x(2x + 3). Either form gives the same roots, but the unfinished form leaves an extra constant that makes later steps harder to read.
A common factor can be a binomial
The shared factor does not have to be a monomial. In 5(x + 2) + x(x + 2), both terms contain (x + 2). Factor it out: (x + 2)(5 + x). You will meet this pattern again when factoring by grouping for ax² + bx + c.
Expressions versus equations
The two uses of a common factor behave differently.
- In an expression, factoring out 3 from 3x² + 12x + 9 gives 3(x² + 4x + 3). The 3 stays as a factor.
- In an equation, 3x² + 12x + 9 = 0 can be divided by 3 on both sides. The result is x² + 4x + 3 = 0. The 3 disappears, because 0 ÷ 3 = 0.
Both approaches give the same solutions. Dividing an equation by a constant simply removes a factor that can never be zero, so it cannot produce a solution. Whichever you use, the next step is to factor x² + 4x + 3 into (x + 1)(x + 3).
Solving equations with no constant term
When c = 0, the equation ax² + bx = 0 always has x as a common factor. This is the case where factoring out a GCF solves the whole equation.
Solve 5x² = 20x.
- Move everything to one side so the other side is 0: 5x² − 20x = 0.
- Factor out the GCF 5x: 5x(x − 4) = 0.
- Apply the zero product property. Either 5x = 0 or x − 4 = 0.
- Solve each: x = 0 or x = 4.
Check x = 4 in the original equation: 5(16) = 80 and 20(4) = 80. ✓ Check x = 0: 5(0) = 0 and 20(0) = 0. ✓
For a quadratic with c = 0, the roots are always 0 and −b/a. When b is also 0, the equation is ax² = 0 and the only root is 0.
Doing it in code
This program finds the GCF of the coefficients of ax² + bx + c, factors it out, and solves the c = 0 case.
from fractions import Fraction
from math import gcd
def factor_out_gcf(a, b, c):
"""Return (g, (a2, b2, c2)) with a*x^2 + b*x + c = g * (a2*x^2 + b2*x + c2).
g is the integer GCF of the coefficients, made negative when a < 0
so that the leading coefficient inside the parentheses is positive.
Requires a != 0.
"""
g = gcd(gcd(abs(a), abs(b)), abs(c))
if a < 0:
g = -g
return g, (a // g, b // g, c // g)
def solve_no_constant(a, b):
"""Solve a*x^2 + b*x = 0 (a != 0) by factoring x out: x * (a*x + b) = 0."""
return sorted({Fraction(0), Fraction(-b, a)})
print(factor_out_gcf(6, 12, 18)) # (6, (1, 2, 3))
print(factor_out_gcf(-4, 8, 0)) # (-4, (1, -2, 0))
print(factor_out_gcf(12, -18, 6)) # (6, (2, -3, 1))
roots = solve_no_constant(5, -20)
print([str(r) for r in roots]) # ['0', '4']
roots = solve_no_constant(6, -9)
print([str(r) for r in roots]) # ['0', '3/2']The function handles only the coefficient part of the GCF. The variable part is x exactly when c = 0, which is why solve_no_constant takes only a and b.
Checking a factorization
Expanding the result is the reliable check. It uses the distributive property in the forward direction, and the product must match the original expression term by term.
For 6x(2x² − 3x + 1):
- 6x · 2x² = 12x³
- 6x · (−3x) = −18x²
- 6x · 1 = 6x
The terms add up to 12x³ − 18x² + 6x, which is the original expression. ✓
Another check is to count terms. The parentheses should contain the same number of terms as the original expression. If a term seems to vanish, you probably dropped a 1.
Where this leads
Factoring out the GCF always comes first, even when you plan to use another method. Taking 2x² + 10x + 12, you would pull out 2 to get 2(x² + 5x + 6). This leaves a trinomial with leading coefficient 1, which the next chapter factors into (x + 2)(x + 3). Skipping the GCF step turns an easy problem into a harder one with leading coefficient 2.
Exercise
Factor 18x³ + 24x² − 12x completely, then expand your answer to check it.
Show answer
The coefficient GCF of 18, 24 and 12 is 6. The lowest power of x is 1. The GCF is 6x. Dividing each term gives 3x², 4x and −2. The result is 6x(3x² + 4x − 2). Check: 6x · 3x² = 18x³, 6x · 4x = 24x², and 6x · (−2) = −12x. The product matches the original.
Exercise
Solve 7x² − 21x = 0, and explain why you should not start by dividing both sides by x.
Show answer
Factor out 7x to get 7x(x − 3) = 0. By the zero product property, 7x = 0 or x − 3 = 0, so x = 0 or x = 3. Dividing both sides by x would give 7x − 21 = 0 and the single answer x = 3. This loses x = 0, because dividing by x assumes x is not zero.
Exercise
Factor −9x² + 15x with a negative GCF, and state the roots of −9x² + 15x = 0.
Show answer
The coefficient GCF is 3, and the common variable part is x. Because the leading coefficient is negative, use −3x. Dividing each term gives 3x and −5, so −9x² + 15x = −3x(3x − 5). Setting each factor to zero gives x = 0 or x = 5/3.
Exercise
A student factors 4x² + 4x as 4(x² + x) and says the work is finished. What is missing?
Show answer
The parentheses still contain a common factor, x, because x² + x = x(x + 1). The full GCF is 4x, so the complete factorization is 4x(x + 1). The roots of 4x² + 4x = 0 are then x = 0 and x = −1.