Sub topic 5
The Distributive Property as a Tool
This chapter assumes you can evaluate algebraic expressions, do integer arithmetic with negative numbers, read exponents such as x^3, and have seen the distributive property in simple numeric form. Here you will use that property as the main working tool for polynomial subtraction and multiplication.
The property in one line
The distributive property of multiplication over addition says that for any numbers a, b, and c:
a(b + c) = ab + ac
Read left to right, it expands a product into a sum. Read right to left, it factors a common multiplier out of a sum. Most polynomial work in this tutorial uses the left-to-right direction. Because a, b, and c can stand for any expressions, including terms like 3x or -2x^2, the property applies to polynomials without change.
A quick numeric check shows it holds: 4(10 + 3) = 4(13) = 52, and 4(10) + 4(3) = 40 + 12 = 52.
Why it works
Picture a rectangle with height a and width b + c. Split the width into two pieces and the rectangle becomes two smaller rectangles. One has area ab and the other has area ac. The total area is the same either way, so a(b + c) = ab + ac.
Applying it to polynomial terms
Each term inside the parentheses gets its own product. Keep the sign attached to the term, and multiply the coefficients first, then handle the variable parts.
Example: expand 3x(2x^2 - 5x + 4).
- 3x times 2x^2 gives 6x^3.
- 3x times -5x gives -15x^2.
- 3x times 4 gives 12x.
The result is 6x^3 - 15x^2 + 12x.
Notice that the number of terms in the answer equals the number of terms inside the parentheses. Nothing combines here because each product has a different power of x. When the multiplier is a single term, the result never needs combining, since the products have different degrees.
The exponent step uses the product rule, x^m x^n = x^(m+n). The next chapters cover it in detail. For now, only note that 3x 2x^2 uses it to turn x * x^2 into x^3.
The negative sign is a multiplier
Subtraction is where most distribution errors happen. A minus sign in front of parentheses means multiplication by -1:
-(b + c) = (-1)(b + c) = -b - c
So every term inside changes sign, not just the first one.
Example: simplify (5x^2 + 3x - 7) - (2x^2 - 4x + 1).
- Rewrite the subtraction as multiplication by -1: (5x^2 + 3x - 7) + (-1)(2x^2 - 4x + 1).
- Distribute -1: -2x^2 + 4x - 1.
- Combine with the first polynomial: 5x^2 + 3x - 7 - 2x^2 + 4x - 1.
- Combine like terms: 3x^2 + 7x - 8.
The middle step is the one that matters. The term -4x becomes +4x, and +1 becomes -1.
Three common error patterns
The table lists mistakes that come from misapplying the property, with the correct handling.
| Mistake | Wrong result | Correct result |
|---|---|---|
| Multiplying only the first term | 2(x + 5) = 2x + 5 | 2x + 10 |
| Dropping the sign of a negative term | 3(x - 4) = 3x + 12 | 3x - 12 |
| Distributing a negative to one term only | -(x - 6) = -x - 6 | -x + 6 |
A fourth mistake is trying to distribute over a product instead of a sum. The property does not say 2(3x) = 6x * 2x. When the inside of the parentheses is a single product, just multiply the factors together: 2(3x) = 6x.
Distribution when both factors have several terms
When the multiplier is itself a sum, apply the property twice. Treat the whole first factor as a single block, distribute it, and then distribute again.
Example: expand (x + 2)(x^2 + 3x + 1).
- Treat (x + 2) as a block and distribute over the second factor's terms. Written out, this is the same as x(x^2 + 3x + 1) + 2(x^2 + 3x + 1).
- First part: x^3 + 3x^2 + x.
- Second part: 2x^2 + 6x + 2.
- Add the two parts: x^3 + 3x^2 + x + 2x^2 + 6x + 2.
- Combine like terms: x^3 + 5x^2 + 7x + 2.
This matches the result used in the code example later in this chapter. The same principle underlies FOIL for two binomials and the general method for larger polynomials. Each term of one factor multiplies each term of the other.
Factoring: the property in reverse
Reading the property from right to left, ab + ac = a(b + c). This is how you pull out a common factor. For example, 6x^3 - 15x^2 + 12x has the common factor 3x, so it equals 3x(2x^2 - 5x + 4). This is the reverse of the earlier expansion.
You can always verify a factoring by distributing the result and seeing whether you recover the original expression. This chapter uses the reverse direction only as a check. Factoring as a technique is outside this tutorial's scope.
Checking a distribution with code
You can test a distribution by evaluating both forms at the same value of x. If they disagree, there is an error. The function below treats a polynomial as a list of coefficients starting from the constant term.
def evaluate(p, x):
return sum(c * x**i for i, c in enumerate(p))
def multiply(p, q):
result = [0] * (len(p) + len(q) - 1)
for i, a in enumerate(p):
for j, b in enumerate(q):
result[i + j] += a * b
return result
factor_a = [2, 1] # x + 2
factor_b = [1, 3, 1] # x^2 + 3x + 1
product = multiply(factor_a, factor_b)
print(product) # [2, 7, 5, 1], which is x^3 + 5x^2 + 7x + 2
x = 2
print(evaluate(factor_a, x) * evaluate(factor_b, x)) # 44
print(evaluate(product, x)) # 44The double loop in multiply is the distributive property in code. Every term a of the first list is multiplied by every term b of the second, and each product is added to the coefficient at position i + j.
A single matching value is evidence, not proof. Two different polynomials can agree at one point. If you test x = 2 and get a match, the result is probably right. Testing a second value, such as x = -1, makes the check much stronger. A later chapter covers this in more detail.
Edge cases
- Distributing zero. 0(x^2 + 5x - 3) = 0. Every product is zero, so the whole expression vanishes.
- Distributing 1 or -1. Multiplying by 1 changes nothing. Multiplying by -1 flips every sign, which is exactly the subtraction rule.
- Nested parentheses. Work from the inside out, or distribute the outer factor first and simplify afterward. Either order gives the same answer, but write each step down so signs do not get lost.
- Fractions and decimals. The property holds for any numbers. For example, (1/2)(4x + 6) = 2x + 3. Multiply each coefficient and simplify.
- Variables with exponents on the multiplier. In -2x^2(3x - 1), the multiplier is -2x^2. The result is -6x^3 + 2x^2. The negative sign belongs to the multiplier and attaches to each product.
Summary of the working rules
- Multiply the outside factor by every term inside, including the last one.
- Keep each term's sign attached to it while you multiply.
- A minus sign before parentheses is multiplication by -1, so it flips every sign inside.
- A product of two sums needs every term of one factor multiplied by every term of the other.
- Combine like terms only after all products are written out.
- Check by substituting a value for the variable, and use a second value if the stakes are high.
Exercise
Expand and simplify (2x^2 - x + 3) - 2x(x - 4). Then check your answer by evaluating both the original expression and your result at x = 1.
Show answer
First distribute -2x across (x - 4) while treating the subtraction as multiplication by -1 on the product: 2x(x - 4) = 2x^2 - 8x. Subtracting it gives (2x^2 - x + 3) - 2x^2 + 8x. Combine like terms: the x^2 terms cancel, -x + 8x = 7x, and the constant is 3. The result is 7x + 3. Check at x = 1: the original is (2 - 1 + 3) - 2(1)(1 - 4) = 4 - 2(-3) = 4 + 6 = 10. The result is 7(1) + 3 = 10. They match.
Exercise
A student writes 4x(x^2 - 3x + 2) = 4x^3 - 3x + 2. Identify the error and give the correct expansion.
Show answer
The student multiplied 4x by only the first term. The terms -3x and 2 were not multiplied by 4x. The correct expansion is 4x x^2 + 4x (-3x) + 4x * 2 = 4x^3 - 12x^2 + 8x.
Exercise
Expand (x - 3)(2x + 5) using the distributive property twice, and state the degree of the result.
Show answer
Distribute (x - 3) over 2x + 5: x(2x + 5) - 3(2x + 5) = 2x^2 + 5x - 6x - 15. Combine like terms: 2x^2 - x - 15. The degree is 2, because the highest power of x is x^2.