Sub topic 1
What Factoring Means and How to Check Your Work
Prerequisites
This chapter assumes you can do the following:
- Add, subtract, and multiply integers, including negative numbers.
- Apply the exponent rule for multiplying powers of the same base: x^a * x^b = x^(a+b).
- Use the distributive property: a(b + c) = ab + ac.
- Multiply two binomials with FOIL (First, Outer, Inner, Last).
- Use the basic vocabulary of polynomials: term, coefficient, degree, monomial, binomial, and trinomial.
If any of these feel shaky, review them first. Factoring is multiplication run backward, so every error in multiplying becomes an error in factoring.
What factoring means
To factor a polynomial is to rewrite it as a product of simpler polynomials. Each polynomial in that product is called a factor. The two forms below describe the same expression:
x^2 + 5x + 6 (a sum of terms)
(x + 2)(x + 3) (a product of factors)The first form is a sum because its terms are separated by plus signs. The second is a product because the two binomials are multiplied. Both forms give the same value for every x. You can test this with x = 1: the left side gives 1 + 5 + 6 = 12, and the right side gives (3)(4) = 12.
Factoring is the reverse of multiplying. When you multiply, you start with factors and produce a sum of terms. When you factor, you start with the sum of terms and look for the factors.
Multiplying: (x + 2)(x + 3) -> x^2 + 5x + 6
Factoring: x^2 + 5x + 6 -> (x + 2)(x + 3)Multiplying always has a single correct answer after you combine like terms. Factoring takes more searching, because you have to discover which factors produce the polynomial. That difference is why this tutorial spends many chapters on factoring and only a short review on multiplying.
Why factoring is useful
Factored form shows structure that expanded form hides. Three common uses motivate the rest of this tutorial:
- Solving equations. If a product equals zero, at least one factor must equal zero. This idea, the zero product property, turns a hard equation into several easy ones. The last chapter of this tutorial covers it in detail.
- Simplifying expressions. Common factors in a numerator and denominator can be cancelled, but only when they are factors. You cannot cancel terms inside a sum.
- Finding zeros and graph features. The values of x that make a factor zero are where the graph of the polynomial crosses or touches the x-axis.
Factoring over the integers
The word "factor" depends on what numbers you allow in the factors. In this tutorial you factor over the integers. That means every coefficient in every factor must be an integer.
Consider x^2 - 2. Over the real numbers it equals (x - sqrt(2))(x + sqrt(2)). Those factors use sqrt(2), which is not an integer, so over the integers x^2 - 2 does not factor. A polynomial that cannot be factored over the integers is called prime. A later chapter covers how to recognize these.
Two related conventions keep answers consistent:
- A factorization is complete when no factor can be factored further over the integers. For example, 2(x^2 - 4) is not complete, because x^2 - 4 factors into (x - 2)(x + 2). The complete answer is 2(x - 2)(x + 2).
- Factors can appear in any order. (x + 2)(x + 3) and (x + 3)(x + 2) are the same answer, because multiplication is commutative.
The check: multiply it back
Every factorization can be verified by multiplying the factors and comparing the result with the original polynomial. This check is the most important habit in the whole tutorial. It takes less than a minute and catches nearly every mistake.
The procedure is:
- Multiply the factors you found, using the distributive property or FOIL.
- Combine like terms.
- Compare the result with the original polynomial, term by term.
If the two match, the factorization is correct. If they differ, at least one factor is wrong.
Worked example 1: a correct factorization
Claim: 6x^3 + 9x^2 = 3x^2(2x + 3).
Multiply 3x^2 by each term inside the parentheses:
3x^2 * 2x = 6x^3
3x^2 * 3 = 9x^2The sum is 6x^3 + 9x^2, which matches the original. The claim is correct.
Notice the exponent rule at work in the first line: x^2 x = x^(2+1) = x^3, and 3 2 = 6.
Worked example 2: a trinomial
Claim: x^2 + 5x + 6 = (x + 2)(x + 3).
Apply FOIL:
First: x * x = x^2
Outer: x * 3 = 3x
Inner: 2 * x = 2x
Last: 2 * 3 = 6Combine the like terms 3x and 2x to get 5x. The product is x^2 + 5x + 6, which matches. The claim is correct.
Worked example 3: catching an error
Suppose a classmate claims x^2 + 5x + 6 = (x + 1)(x + 6). Both numbers multiply to 6, so the claim looks plausible. Check it:
First: x * x = x^2
Outer: x * 6 = 6x
Inner: 1 * x = x
Last: 1 * 6 = 6The middle terms combine to 6x + x = 7x. The product is x^2 + 7x + 6, which does not match x^2 + 5x + 6. The claim is wrong. The two numbers in the factors must multiply to the constant term and also add to the middle coefficient. The pair 1 and 6 satisfies only the first condition.
Worked example 4: a hidden common factor
Claim: 2x^2 + 10x + 12 = (x + 2)(2x + 6).
Multiply:
First: x * 2x = 2x^2
Outer: x * 6 = 6x
Inner: 2 * 2x = 4x
Last: 2 * 6 = 12The product is 2x^2 + 10x + 12, which matches. So the multiplication check passes. But the factorization is not complete, because 2x + 6 = 2(x + 3). The complete factorization is 2(x + 2)(x + 3).
Checking with a numeric test
Multiplying out is the full check. A faster partial check is to substitute a number for x on both sides and compare the values. For x^2 + 5x + 6 = (x + 2)(x + 3), try x = 2:
Left: 4 + 10 + 6 = 20
Right: (4)(5) = 20The values agree. A mismatch proves the factorization is wrong. A match does not prove it is right, because two different polynomials can agree at a single point. For example, (x + 1)(x + 6) also gives 3 * 8 = 24 at x = 2, while the original gives 20, so this test would catch that error. But with an unlucky choice of x, a wrong answer can slip through.
Use these guidelines:
- Choose a value other than 0 or 1. At x = 0 only the constant term matters. At x = 1 many errors cancel because every power of 1 equals 1.
- Test two different values if you want more confidence.
- Treat the numeric test as a quick screen, and use multiplication when you need certainty.
A polynomial of degree n can agree with another polynomial of degree n at no more than n points unless the two are identical. So if you test more than n values and all agree, the factorization is correct. For a quadratic, three agreeing values are enough. Multiplying out is usually quicker than testing that many points.
Checking with SymPy
SymPy is a Python library for symbolic math. Its factor function factors a polynomial over the integers, and its expand function multiplies factors back out. You need SymPy installed, which you can do with pip install sympy.
from sympy import symbols, factor, expand
x = symbols('x')
expr = x**2 + 5*x + 6
factored = factor(expr)
print(factored)
print(expand(factored) == expr)The first line prints (x + 2)*(x + 3). The second prints True, which confirms that expanding the factored form returns the original expression.
You can also use SymPy to test a claim you made by hand. This example checks the incorrect claim from worked example 3:
from sympy import symbols, expand
x = symbols('x')
original = x**2 + 5*x + 6
claim = (x + 1)*(x + 6)
print(expand(claim))
print(expand(claim) == original)This prints x**2 + 7*x + 6 and then False. SymPy uses ** for powers and * for every multiplication, so you must write 5*x, not 5x.
Common errors when checking
The following mistakes appear often. Each one leads to a wrong conclusion about whether a factorization is correct.
| Error | Example | Why it fails |
|---|---|---|
| Skipping the middle terms | Treating (x + 2)(x + 3) as x^2 + 6 | FOIL has four products. The Outer and Inner products give 5x. |
| Sign mistakes | Treating (x - 2)(x - 3) as x^2 - 5x - 6 | Last is (-2)(-3) = +6, so the constant is positive. |
| Distributing to only one term | Treating 3(x + 4) as 3x + 4 | Every term inside the parentheses is multiplied by 3. |
| Stopping at a correct but incomplete answer | Leaving 2(x^2 - 4) | The factor x^2 - 4 still factors. |
| Cancelling terms instead of factors | Simplifying (x + 4)/4 to x | Only factors can be cancelled. The 4 is a term in the numerator. |
Edge cases to remember
- Any polynomial equals itself times 1. Writing x^2 + 5x + 6 = 1(x^2 + 5x + 6) is true, but it is not a useful factorization. Factoring means finding a nontrivial product, in which every factor is simpler than the original.
- A leading negative sign counts. Writing -x^2 - 5x - 6 = -(x + 2)(x + 3) uses a factor of -1. Pulling out a negative is often the cleanest way to start, and a later chapter explains when to do so.
- Constants are factors too. In 2(x + 2)(x + 3), the number 2 is a factor, and the check must include it. Multiply the 2 through, or the product will be half what it should be.
- A repeated factor is written with an exponent. (x + 3)(x + 3) is written (x + 3)^2. When you check, expand it as a product of two copies, not as x^2 + 3^2.
How this chapter connects to the rest
Each later chapter introduces a technique for finding factors. All of them end with the check from this chapter.
The techniques you will learn, in order, are:
- Finding and factoring out the greatest common factor.
- Factoring four-term polynomials by grouping.
- Factoring trinomials, first with leading coefficient 1, then with other leading coefficients.
- Recognizing special products: difference of squares, perfect square trinomials, and sum and difference of cubes.
- Combining these into a fixed strategy for factoring completely.
Summary of key ideas
- Factoring rewrites a sum of terms as a product of factors, and it reverses multiplication.
- In this tutorial, factoring is done over the integers, and a complete factorization has no factor that can be factored further.
- To verify a factorization, multiply the factors and compare with the original polynomial term by term.
- A passing multiplication check shows correctness. You still have to inspect each factor for completeness.
- A numeric substitution test can reveal an error quickly, but it cannot prove a factorization is right.
- Software such as SymPy can confirm your work, and
expandis the programmatic form of the multiplication check.
Exercise
A student claims that 3x^2 + 12x + 12 = (3x + 6)(x + 2). (a) Use FOIL to check whether the claim is correct. (b) If it is correct, decide whether the factorization is complete, and give the complete factorization if it is not.
Show answer
(a) FOIL gives First: 3x x = 3x^2, Outer: 3x 2 = 6x, Inner: 6 x = 6x, Last: 6 2 = 12. The middle terms combine to 12x, so the product is 3x^2 + 12x + 12. The claim is correct. (b) It is not complete, because 3x + 6 = 3(x + 2). The complete factorization is 3(x + 2)(x + 2), which can also be written 3(x + 2)^2.
Exercise
Show that x^2 - 4x - 12 = (x - 6)(x + 2) is correct, and show that (x + 6)(x - 2) is not a correct factorization of the same polynomial.
Show answer
For (x - 6)(x + 2): First x^2, Outer 2x, Inner -6x, Last -12. The middle terms give 2x - 6x = -4x, so the product is x^2 - 4x - 12, which matches. For (x + 6)(x - 2): First x^2, Outer -2x, Inner 6x, Last -12. The middle terms give 4x, so the product is x^2 + 4x - 12, which does not match because the sign of the middle term is wrong.
Exercise
A student tests the claim x^2 + 3x + 2 = (x + 1)(x + 4) by substituting x = 0 and finds that the left side is 2 and the right side is 4. Another student tests the true factorization x^2 + 3x + 2 = (x + 1)(x + 2) with x = 1 and gets 6 on both sides. What does each test show, and why is a single numeric test not a full proof?
Show answer
The first test shows the claim is wrong, because a correct factorization must give equal values for every x, and 2 is not 4. The second test shows agreement at x = 1, which is consistent with a correct factorization but does not prove it. Two different polynomials can have the same value at one input, so only multiplying out and comparing every term (or testing more points than the degree) proves the factorization correct.
Exercise
Write a short SymPy program that checks whether x^2 - 49 = (x - 7)(x + 7) is true, and state what it prints.
Show answer
from sympy import symbols, expand x = symbols('x') print(expand((x - 7)(x + 7)) == x2 - 49) The program prints True, because expand multiplies the factors into x*2 - 49, which equals the original expression.