Sub topic 2
Finding the Greatest Common Factor
This chapter assumes you can multiply integers, apply the exponent rule for multiplying powers of the same base, and use the distributive property. You also need the basic vocabulary: term, coefficient, degree, monomial, binomial, and trinomial. Everything here is about finding the greatest common factor (GCF). The next chapter uses the GCF to rewrite a polynomial as a product.
What the GCF of terms is
A factor of a term is something you can multiply by another expression to get that term. For example, 3x^2 is a factor of 6x^3, because 3x^2 * 2x = 6x^3.
A common factor of several terms divides every one of them. The greatest common factor is the common factor with the largest coefficient and the highest degree. Every other common factor divides it.
Consider 6x^3 and 9x^2. Common factors include 3, x, x^2, 3x, and 3x^2. The greatest is 3x^2, and every other common factor divides it.
The GCF has two independent parts:
- Numerical part: the greatest common divisor of the coefficients.
- Variable part: each variable that appears in every term, raised to the smallest exponent it has in any term.
You find the two parts separately and multiply them.
The numerical part
The coefficient part is the largest positive integer that divides every coefficient. Use the absolute values of the coefficients, because signs do not change divisibility.
Method 1: Prime factorization
Write each number as a product of primes. Keep each prime the smallest number of times it appears in any of the numbers.
To find the GCF of 84 and 90:
84 = 2 * 2 * 3 * 790 = 2 * 3 * 3 * 5- The prime 2 appears once in 90, and the prime 3 appears once in 84. The primes 5 and 7 appear in only one number each.
- The GCF is
2 * 3 = 6.
Method 2: The Euclidean algorithm
Divide the larger number by the smaller one and keep the remainder. Replace the larger number with the smaller one, and the smaller with the remainder. Repeat until the remainder is 0. The last nonzero remainder is the GCF.
For 84 and 36:
84 = 2 * 36 + 1236 = 3 * 12 + 0
The last nonzero remainder is 12, so the GCF is 12. This method is faster than factoring when the numbers are large.
For more than two numbers, find the GCF of the first two, then find the GCF of that result and the next number. For 18, 27, and 45: the GCF of 18 and 27 is 9, and the GCF of 9 and 45 is 9. The answer is 9.
The variable part
For each variable, ask two questions:
- Does the variable appear in every term?
- If so, what is its smallest exponent?
If the variable is missing from even one term, it is not part of the GCF. A constant term counts as having exponent 0 for every variable, so a variable cannot be common if any term is a plain number.
Take 12x^3y^2, 18x^2y, and 30x^4:
- Coefficients: the GCF of 12, 18, and 30 is 6.
- Variable
x: exponents are 3, 2, and 4. The smallest is 2, sox^2is common. - Variable
y: it is missing from30x^4, so it is not common.
The GCF is 6x^2.
The reason for using the smallest exponent comes from the exponent rule. The factor x^2 divides x^3, x^2, and x^4, because x^3 = x^2 * x, x^2 = x^2 * 1, and x^4 = x^2 * x^2. A factor x^3 would not divide x^2, since that would leave x^-1, which is not a polynomial term.
Worked examples
The table shows the two parts and the result.
| Terms | Coefficient GCF | Variable part | GCF |
|---|---|---|---|
| `6x^3`, `9x^2` | 3 | `x^2` | `3x^2` |
| `8a^2b^3`, `20ab^2` | 4 | `a b^2` | `4ab^2` |
| `4x^2y`, `6x` | 2 | `x` | `2x` |
| `15x^2`, `7` | 1 | none | `1` |
| `5x^2`, `10` | 5 | none | `5` |
| `x^4`, `x^2`, `x` | 1 | `x` | `x` |
Some details from the table:
- Coefficient 1:
x^4is1 * x^4, so the numerical GCF is 1. The variable part carries all the information. - No common factor: when the GCF is 1, the terms are called relatively prime.
15x^2and7share nothing except 1. Nothing can be factored out in the next chapter's sense. - A constant term: in
5x^2and10, the variablexis missing from the second term, so only 5 is common.
A single flow for any set of terms
The diagram shows the order of the checks.
Negative coefficients
A term such as -12x^3 has coefficient -12. For finding the GCF, use the absolute value 12.
For -12x^3, -8x^2, and 20x:
- Coefficients: the GCF of 12, 8, and 20 is 4.
- Variable
x: exponents are 3, 2, and 1. The smallest is 1.
The GCF is 4x. By convention, the GCF is written as a positive quantity. When the first term of a polynomial is negative, you may choose to factor out the negative of the GCF instead. That is a decision about the factoring step, and the next chapter covers it. The GCF itself stays positive.
When the common factor is a binomial
The same idea applies when the "terms" contain parentheses. A common factor can be a whole expression such as (x + 3).
Consider x^2(x + 3) and 5(x + 3). Each is a product, and each contains the factor (x + 3). Nothing else is shared, since x^2 and 5 have no common factor. The GCF is (x + 3).
A second example: 4(x + 3)^2 and 6(x + 3).
- Coefficients: the GCF of 4 and 6 is 2.
- The expression
(x + 3)appears in both, with exponents 2 and 1. The smaller is 1.
The GCF is 2(x + 3).
This situation appears in factoring by grouping, where a shared binomial emerges after a first round of factoring. Treat the binomial as one unit, like a variable. Do not try to split it up. The expressions (x + 3) and (x - 3) are different factors, so they do not match.
Checking a GCF
A candidate GCF passes two tests:
- It divides every term evenly. Dividing each term by it must leave a polynomial term, with no negative exponents and no fractions of the coefficients.
- It is the greatest. After dividing, the quotients must have no common factor left except 1.
Test 3x as a GCF candidate for 6x^3 and 9x^2:
6x^3 / 3x = 2x^2and9x^2 / 3x = 3x. Both are valid.- The quotients
2x^2and3xstill sharex. So3xis a common factor but not the greatest.
The correct GCF 3x^2 gives quotients 2x and 3, which share nothing. This quotient check is the most reliable way to catch an incomplete GCF.
Common errors
- Using the largest exponent. For
x^3andx^2, the common power isx^2, notx^3. The largest exponent would not divide the smaller term. - Multiplying instead of finding the common part. The coefficient GCF of 6 and 9 is 3. The product 54 and the least common multiple 18 are different quantities. The least common multiple is for adding fractions, not for factoring.
- Including a variable that is missing from one term. In
4x^2yand6x, the variableyis not common. - Stopping at a common factor that is not greatest. For 12 and 18, the factor 2 is common, but the GCF is 6. Use the quotient check to confirm.
- Forgetting the invisible exponent. A bare
xhas exponent 1, and a bare number has exponent 0 for every variable. - Treating
(x + 3)and(3 + x)as different. Addition is commutative, so they are the same factor. But(x - 3)and(3 - x)differ by a sign, and that case needs care later.
Computing a GCF with code
You can automate the two-part method for monomials. The code below stores each term as a coefficient and a dictionary of variable exponents. It uses Python's math.gcd for the numerical part and takes the minimum exponent for variables common to every term.
from functools import reduce
from math import gcd
def gcf_of_monomials(terms):
"""terms is a list of (coefficient, {variable: exponent}) pairs."""
numeric = reduce(gcd, (abs(c) for c, _ in terms))
common_vars = set(terms[0][1])
for _, powers in terms[1:]:
common_vars &= set(powers)
variable_part = {
v: min(powers[v] for _, powers in terms) for v in sorted(common_vars)
}
return numeric, variable_part
# 12x^3y^2, 18x^2y, 30x^4
terms = [
(12, {"x": 3, "y": 2}),
(18, {"x": 2, "y": 1}),
(30, {"x": 4}),
]
print(gcf_of_monomials(terms))The program prints (6, {'x': 2}), which matches the hand result 6x^2. The variable y drops out because it is missing from the third term.
Summary of the method
- Find the GCF of the absolute values of the coefficients.
- Keep each variable that appears in every term, with its smallest exponent.
- Treat a repeated binomial as one unit and use its smallest exponent.
- Multiply the parts, and confirm that the quotients share no factor except 1.
Exercise
Find the GCF of 16x^4y^3, 24x^2y^5, and 40x^3y.
Show answer
Coefficients: the GCF of 16, 24, and 40 is 8. The variable x has exponents 4, 2, and 3, so the smallest is 2. The variable y has exponents 3, 5, and 1, so the smallest is 1. The GCF is 8x^2y. Check: the quotients are 2x^2y^2, 3y^4, and 5x, which share no common factor except 1.
Exercise
Find the GCF of 9x^2(x - 4) and 12x(x - 4)^2.
Show answer
Coefficients: the GCF of 9 and 12 is 3. The variable x has exponents 2 and 1, so the smallest is 1. The binomial (x - 4) has exponents 1 and 2, so the smallest is 1. The GCF is 3x(x - 4).
Exercise
A student says the GCF of 6x^3 and 9x^2 is 3x. Explain what is wrong and give the correct GCF.
Show answer
The factor 3x divides both terms, but it is not the greatest. Dividing gives 2x^2 and 3x, which still share the factor x. The smallest exponent of x in the two terms is 2, so the correct GCF is 3x^2. The quotients 2x and 3 then share only 1.