Allday Education

Multiplying Polynomials

When you multiply two polynomials, every term in the first must multiply every term in the second. For two binomials like (x+4)(x+3)(x + 4)(x + 3), that is four products — and FOIL is just a checklist that keeps them in order: First, Outer, Inner, Last.

After the four products, one more step: combine like terms. The Outer and Inner products are usually a matching pair of xx terms, and merging them produces the middle term of your answer. Multiply four times, combine once — that is the whole method.

FOIL: four products, then combine

Take (x+3)(x+5)(x + 3)(x + 5). First: xx=x2x \cdot x = x^{2}. Outer: x5=5xx \cdot 5 = 5x. Inner: 3x=3x3 \cdot x = 3x. Last: 35=153 \cdot 5 = 15. That gives x2+5x+3x+15x^{2} + 5x + 3x + 15, and combining the middle pair gives x2+8x+15x^{2} + 8x + 15.

Signs travel with their terms. In (x5)(x+2)(x - 5)(x + 2), the second term of the first binomial is 5-5, so Inner is 5x=5x-5 \cdot x = -5x and Last is 52=10-5 \cdot 2 = -10. Keeping the sign attached to the term is what keeps the arithmetic honest.

The box method

The box method organizes the same four products in a grid. Write one binomial's terms across the top and the other's down the side, then fill each cell with the product of its row and column. For (x+3)(x+5)(x + 3)(x + 5) the four cells are x2x^{2}, 5x5x, 3x3x, and 1515 — identical to FOIL, just laid out visually.

The box really earns its keep on bigger products. A binomial times a trinomial makes a 2×32 \times 3 grid of six products, and the box guarantees you do not miss any of them.

Beyond two binomials

FOIL only works for binomial times binomial, but the underlying rule always works: multiply every term by every term, then combine like terms. For (x+3)(x26x+2)(x + 3)(x^{2} - 6x + 2), distribute the xx to all three terms, distribute the 33 to all three terms, and combine — six products in total.

A quick sanity check: the number of products before combining is the product of the term counts. Two terms times three terms should give six products. If you wrote down five, one is missing.

Worked examples

Example 1: both signs positive

Multiply (x+2)(x+6)(x + 2)(x + 6).

Firstxx=x2x \cdot x = x^{2}
Outer and Inner6x+2x=8x6x + 2x = 8x
Last26=122 \cdot 6 = 12

Answer: x2+8x+12x^{2} + 8x + 12

Example 2: a mixed-sign product

Multiply (x2)(x+7)(x - 2)(x + 7).

Firstxx=x2x \cdot x = x^{2}
Outer and Inner — keep the sign with the 227x2x=5x7x - 2x = 5x
Last(2)(7)=14(-2)(7) = -14

Answer: x2+5x14x^{2} + 5x - 14

Example 3: binomial times trinomial

Multiply (x+3)(x26x+2)(x + 3)(x^{2} - 6x + 2).

Distribute the xx to all three termsx36x2+2xx^{3} - 6x^{2} + 2x
Distribute the 33 to all three terms3x218x+63x^{2} - 18x + 6
Combine the x2x^{2} terms6x2+3x2=3x2-6x^{2} + 3x^{2} = -3x^{2}
Combine the xx terms2x18x=16x2x - 18x = -16x

Answer: x33x216x+6x^{3} - 3x^{2} - 16x + 6

Try one yourself

Common questions

What does FOIL stand for?

First, Outside, Inside, Last — the four pairs of terms you multiply when expanding a product of two binomials. It is a memory device for "every term times every term," not a separate rule.

Can I use FOIL on a trinomial?

No — FOIL is built for exactly two terms times two terms. For anything bigger, distribute each term of the first polynomial across the whole second polynomial, or use a box with one row or column per term.

Why do the Outer and Inner terms combine?

Because they usually have the same variable part. In (x+4)(x+3)(x + 4)(x + 3), Outer is 3x3x and Inner is 4x4x — like terms, so they merge into 7x7x. If the binomials use different variables, they may not combine, and that is fine.

How do I check my expansion?

Substitute an easy number into both the original product and your answer. With x=1x = 1, (1+4)(1+3)=20(1 + 4)(1 + 3) = 20 and 1+7+12=201 + 7 + 12 = 20 — matching values will not certify the answer, but a mismatch always catches an error.

Want the video version?

Allday Everyday Math has video lessons, practice, and an AI tutor for every topic, Pre-Algebra through Algebra 2.

Try it for $1