Multiplying out, and the products worth memorising
Every term times every term, why the middle term exists, and the three patterns that save you from doing it longhand.
Consider a rectangle whose width is 3 metres more than some length , and whose height is 5 metres more than the same . Its area is , and somebody wants that written without brackets.
There is a claim to test: that and are the same thing for every . Two expressions in one letter are equal only if they agree at every value, so test a spread of values.
Change the 8 to a 7 and run it again. Every row disagrees. That is what a wrong expansion looks like, and it is worth seeing once.
The words
The expression just expanded, , has three pieces added together, and each piece has a name. A term is a product of numbers and letters with whole-number powers. So , and are the three terms here, and is a term as well.
The number multiplying the letters in a term is its coefficient. In the coefficient is 8, and in it is , with the minus sign belonging to the number. A term such as with no number written has a coefficient of 1, because multiplying by 1 changes nothing and is left out.
The power of the letter in a term is that term's degree: has degree 3, has degree 1, and the plain number 15 has degree 0, since .
A polynomial is a sum of terms, such as , and the degree of the whole polynomial is the largest degree among its terms, which here is 3. The coefficient of that highest term is the leading coefficient, and in it is the 2.
What are the degree and the leading coefficient of ?
The degree is 5 and the leading coefficient is 6. Read the degrees of the three terms: 4 has degree 0, has degree 2, and has degree 5. The largest is 5, so that is the degree of the polynomial, and the coefficient sitting on that term is 6. Answering 4 for the leading coefficient reads the term written first rather than the term of highest degree, and the two need not be the same when the terms are out of order.
Like terms have identical letters raised to identical powers. and are like terms and collapse to ; and are not, and cannot be combined at all. Adding polynomials is nothing but collecting like terms.
Subtracting is the same with one hazard: the minus sign applies to every term in the bracket that follows, not only the first. becomes , which is . Two of the three signs changed.
Multiplying: every term by every term
To multiply two polynomials, multiply each term of the first by each term of the second and collect. If the first has 3 terms and the second has 2, you will write down products before collecting, and if you have fewer than six you have missed one.
The bookkeeping is easy to automate, and doing so shows the shape of it. Store a polynomial as a list of coefficients, lowest power first, so is stored as [3, 1], meaning .
Change b to [5, 1, 2], which is , and run it again. How many numbers come back now, and why that many?
The line that matters is prod[i + j] += a[i] * b[j]. Powers add when terms multiply, which is one of the exponent laws, so the product of the th and th terms lands in slot . Two different pairs can land in the same slot, and that is exactly what produces a middle term.
Where the middle term comes from
means , so there are four products: , , and . The two mixed ones are equal and both land in the same slot, so they arrive as . That is the term people lose.
The third pattern is the one from the lesson on simplest form. In the mixed products are and , so this time they cancel instead of doubling.
| Pattern | Example | Result |
|---|---|---|
A worked example, every step
Expand by hand, using the pattern rather than writing out all four products.
- Identify the pieces: and , with a minus between them.
- First term, : .
- Middle term, : .
- Last term, : . It is positive, because a negative squared is positive.
- So .
- Check at : the bracket gives , and the expansion gives .
Higher powers, the slow way
can be got by multiplying by five times over, and for a computer that is a perfectly reasonable plan. Run it on and watch the coefficients that come out.
Change [1, 1] to [2, 1], which is , and run it again. The numbers are no longer symmetric. Which end grows, and why that end?
The rows that come out are 1 1, then 1 2 1, then 1 3 3 1, then 1 4 6 4 1. Those numbers have a pattern of their own, and finding it means never having to run the multiplication again. That is the next lesson.
Expand .
, which collects to . There were products before collecting: , , , , and . Check at : the brackets give , and the answer gives .