FOIL is the most famous mnemonic in school algebra. First, Outer, Inner, Last. Four letters, four products, one neat expansion. For (a+b)(c+d) it is brilliant — every cross-product is covered, and the mnemonic never lets you skip one.
But FOIL has a ceiling. The moment one of the polynomials grows past two terms, the four-letter mnemonic stops covering everything. (a+b+c)(d+e) is six products, not four. (a+b+c)(d+e+f) is nine. Trying to stretch FOIL is how students lose terms.
Match the method to the size. Small products, FOIL. Bigger products, the box method — a grid that refuses to let you skip a cell.
FOIL recap — (a+b)(c+d)
You have two binomials, so there are exactly 2 × 2 = 4 cross-products. FOIL names them in order:
- First:
a · c. - Outer:
a · d. - Inner:
b · c. - Last:
b · d.
Add them up and you get ac + ad + bc + bd. That is the full expansion. The strength of FOIL is that the mnemonic matches the structure exactly — four letters, four products, no leftovers.
Try it on (x+3)(x+5):
- First:
x · x = x². - Outer:
x · 5 = 5x. - Inner:
3 · x = 3x. - Last:
3 · 5 = 15.
Sum: x² + 5x + 3x + 15 = x² + 8x + 15. Done in five seconds.
Why FOIL stops working for larger polynomials
Look at (a+b+c)(d+e). Each term on the left meets each term on the right, so the count is 3 × 2 = 6. FOIL gives you four letters. You are already two short before you start.
You could invent a stretched version with two extra mystery letters, but now the mnemonic is no longer guiding you — you are just doing distribution by hand. And (a+b+c)(d+e+f) is worse: 3 × 3 = 9 products. The usual casualty is a middle term like b · e, and the student only notices when the final degree does not balance.
The mnemonic was designed for a specific shape. Outside that shape, you need a tool that scales.
The box method — a grid of products
Draw a small grid with one row per term of the first polynomial and one column per term of the second. If the first has m terms and the second has n, the grid is m × n. Label rows and columns with the terms (including signs). Fill each cell with the product of its row and column. Sum every cell.
The grid has exactly m × n cells, matching the number of cross-products, so you cannot accidentally miss one.
Worked example 1 — (x+2)(x²+3x-5) binomial × trinomial
Two terms times three terms, so 2 × 3 = 6 products. Draw a 2-by-3 grid:
x² +3x -5
x | x³ | 3x² | -5x
2 | 2x² | 6x | -10
Now sum all six cells, combining like terms:
x³ + 3x² + 2x² + 6x - 5x - 10
= x³ + 5x² + x - 10.
Notice how the 3x² and 2x² live in different cells but combine at the end. The grid does not combine them for you, but it does make them impossible to miss.
Worked example 2 — (x²+x+1)(x-1) trinomial × binomial
Three terms times two terms, 3 × 2 = 6 products. Draw a 3-by-2 grid this time:
x -1
x² | x³ | -x²
x | x² | -x
1 | x | -1
Sum every cell:
x³ - x² + x² - x + x - 1
= x³ - 1.
A lot of things cancel. You recognise this as the identity x³ - 1 = (x - 1)(x² + x + 1), and the grid shows you why: the middle cross-terms come in pairs that annihilate.
Worked example 3 — (x+2)(x+3)(x+1) triple product
Three binomials multiplied together. You cannot box all three at once, but you can chain: expand two of them with FOIL, then box the result with the third.
Step one, FOIL (x+2)(x+3):
- First:
x². Outer:3x. Inner:2x. Last:6. - Sum:
x² + 5x + 6.
Step two, multiply (x² + 5x + 6)(x+1) with the box:
x +1
x² | x³ | x²
5x | 5x² | 5x
6 | 6x | 6
Sum: x³ + x² + 5x² + 5x + 6x + 6
= x³ + 6x² + 11x + 6.
Triple products become manageable once you split them into a FOIL step and a box step.
Benefits of box over FOIL for bigger problems
Four things make the box method robust where FOIL falters:
- Every cell is visible. You see all
m × nproducts at once. No mental juggling, no missed middle terms. - Easy to check. Count the cells. If the grid is 2-by-3 you should have six entries. Any blank cell is an error waiting to happen.
- Like terms line up on diagonals. In the grid above, cells on the same diagonal (top-right to bottom-left) have the same degree in
x. You can combine them column by column. - Signs are cleaner. Each cell has one sign, written once. You are less likely to drop a negative than when chasing Outer minus Inner mentally.
When to still use FOIL
None of this means FOIL is bad. For a pure binomial × binomial, FOIL is faster than drawing a 2-by-2 grid. If the problem is small and quick, the box is overkill.
Use FOIL when:
- Both factors are binomials.
- The terms are short and the signs are obvious.
- You want to finish in ten seconds, not thirty.
Once the product gets bigger, the box saves you more time than it costs to draw.
Alternative — distribute one term at a time
The box method is really just distribution, laid out on a grid. You can also distribute without drawing:
(x+2)(x²+3x-5) = x · (x²+3x-5) + 2 · (x²+3x-5)
= (x³ + 3x² - 5x) + (2x² + 6x - 10)
= x³ + 5x² + x - 10.
Same six products, same answer. If you are comfortable with distribution and your paper is tight, this is fine. The grid is mostly a bookkeeping aid — but a very good one when the products are large.
Recognising the right tool
Match the method to the shape:
- 2 × 2 (binomial × binomial): FOIL.
- 2 × 3, 3 × 2, 3 × 3, or larger: box method.
- Repeated squaring like
(a+b+c)²: expand as(a+b+c)(a+b+c)— that is 3 × 3, so box. - Triple products
(x+a)(x+b)(x+c): FOIL the first two, then box the result with the third.
Recognition drill
Pick the tool, then expand:
(x+1)(x+5): 2 × 2, FOIL. Answer:x² + 6x + 5.(x²+1)(x+2): 2 × 2 if you treatx²and1as the terms of the first factor. FOIL works; the box also works. Answer:x³ + 2x² + x + 2.(a+b+c)²: 3 × 3 box. Fill the nine cells, combine like terms. Answer:a² + b² + c² + 2ab + 2bc + 2ca.(x+y)(a+b+c): 2 × 3 box. Six cells, no like terms to combine. Answer:xa + xb + xc + ya + yb + yc.
Notice how you chose the tool before you did any arithmetic. That is the whole skill.
Why this helps
In a large product, the middle cross-terms decide whether your answer is correct. A dropped xy in (x+y+z)² will ruin the identity. The grid forces you to fill every cell before you sum — it physically will not let you skip one — and that is the safety net you need. FOIL has its own safety net, but it only works for the 2 × 2 shape.
Match the tool to the problem
FOIL is a small hammer; the box is a bigger one. Both belong in your toolkit. If the problem is 2 × 2, FOIL. If it is bigger, draw the grid. Five seconds of drawing a box saves five minutes of hunting for a missing cross-term. Choose by the shape of the problem, not by habit.