Polynomials & Factoring

The FOIL Method: How to Multiply Binomials Step by Step

To FOIL two binomials, add four products: (a+b)(c+d)=ac+ad+bc+bd(a+b)(c+d)=ac+ad+bc+bd. The letters stand for First, Outer, Inner and Last, and the answer is those four products combined.

(a+b)(c+d)=ac+ad+bc+bd(a+b)(c+d)=ac+ad+bc+bd

Try it with your numbers

Show every step

FOIL is a memory aid, not a separate law. It covers one case of multiplying polynomials: two binomials, which are polynomials with exactly two terms. Once you see where the four products come from, the method stops being a chant and becomes something you can rebuild, check and extend.

What Does FOIL Stand For in Math?

Take (a+b)(c+d)(a+b)(c+d). Each letter names one pairing of a term from the left factor with a term from the right factor:

  • First: the first term of each binomial, a⋅ca\cdot c
  • Outer: the two terms on the outside, a⋅da\cdot d
  • Inner: the two terms on the inside, b⋅cb\cdot c
  • Last: the last term of each binomial, b⋅db\cdot d

Here is a full example, (2x+3)(x+4)(2x+3)(x+4):

(2x+3)(x+4)=2x⋅x+2x⋅4+3⋅x+3⋅4=2x2+8x+3x+12(2x+3)(x+4)=2x\cdot x+2x\cdot 4+3\cdot x+3\cdot 4=2x^2+8x+3x+12

The Outer and Inner products, 8x8x and 3x3x, are like terms, so they merge into 11x11x (see adding and subtracting polynomials for the rules on combining). The answer is 2x2+11x+122x^2+11x+12.

Notice what FOIL guarantees: two terms times two terms always gives exactly four products. If you ever list three or five, something was skipped or invented. That count is the real safety net, more useful than the letters themselves.

Quick check

Find the Outer and Inner products of (x+7)(x−2)(x+7)(x-2), then add them.

Why Does the FOIL Method Work?

The whole method rests on one idea: a parenthesis can be treated as a single block. Call (c+d)(c+d) the block kk. Then (a+b)k=ak+bk(a+b)k=ak+bk by the ordinary distributive property. Put the block back and distribute a second time:

(a+b)(c+d)=a(c+d)+b(c+d)=ac+ad+bc+bd(a+b)(c+d)=a(c+d)+b(c+d)=ac+ad+bc+bd

That is FOIL, with nothing added. You can see the same thing in arithmetic. Split 23×1423\times 14 as (20+3)(10+4)(20+3)(10+4) and the four products are 200+80+30+12=322200+80+30+12=322. This is exactly how long multiplication works, with the place values written out.

The area picture

Draw a rectangle with sides (a+b)(a+b) and (c+d)(c+d). Cut it into four smaller rectangles with areas acac, adad, bcbc and bdbd. Those four areas are F, O, I and L.

This also explains why the order of the letters is arbitrary. You could multiply Last first and still land on the same sum, because addition is commutative. What matters is that every term in the first factor meets every term in the second, once.

How Do You FOIL With Negatives and Fractions?

Negatives cause most lost points, and the fix is a habit: treat subtraction as adding a negative term, so 4x−34x-3 is 4x+(−3)4x+(-3). Each term carries its sign into every product it touches. For (4x−3)(x−6)(4x-3)(x-6):

(4x−3)(x−6)=4x2−24x−3x+18=4x2−27x+18(4x-3)(x-6)=4x^2-24x-3x+18=4x^2-27x+18

Outer is 4x⋅(−6)=−24x4x\cdot(-6)=-24x, Inner is (−3)(x)=−3x(-3)(x)=-3x, and Last is (−3)(−6)=+18(-3)(-6)=+18. The Last term is where students slip, writing −18-18 when two negatives multiply to a positive.

Fractions follow the same rules; the arithmetic is just slower. For (x2+3)(x−4)\left(\tfrac{x}{2}+3\right)(x-4), First is x22\tfrac{x^2}{2}, Outer is −2x-2x, Inner is 3x3x and Last is −12-12. Combine −2x+3x=x-2x+3x=x and the result is 12x2+x−12\tfrac{1}{2}x^2+x-12. Keep each product as its own fraction until the end rather than converting to decimals, which hides exact answers.

A quick sanity check on shape: the degree of a polynomial product equals the sum of the degrees. Two linear binomials must give a quadratic, so if your answer has an x3x^3 or no x2x^2 at all, the work has gone wrong.

How Do You FOIL Faster in Your Head?

Look at what happens to the middle term in general:

(ax+b)(cx+d)=acx2+(ad+bc)x+bd(ax+b)(cx+d)=acx^2+(ad+bc)x+bd

The middle coefficient is the sum of the two cross products, outer plus inner. So you can write the answer straight down: multiply the first terms, multiply the last terms, then add the two diagonal products. For (5x+2)(x+8)(5x+2)(x+8) the diagonals are 5⋅8=405\cdot 8=40 and 2⋅1=22\cdot 1=2, giving 5x2+42x+165x^2+42x+16.

Signs ride along with the numbers. For (7x+3)(2x−4)(7x+3)(2x-4) the cross products are 7⋅(−4)=−287\cdot(-4)=-28 and 3⋅2=63\cdot 2=6, so the middle is −22x-22x and the answer is 14x2−22x−1214x^2-22x-12. This shortcut works only when the Outer and Inner terms are like terms, which is the usual case for a single variable.

Try this: Expand (6x−1)(2x+5)(6x-1)(2x+5) without writing any intermediate line. Say it aloud as three pieces: first product, sum of the diagonals, last product. You should get 12x2+28x−512x^2+28x-5.

When Does the FOIL Method Not Work?

FOIL fails the moment either factor has more than two terms. A binomial times a trinomial needs 2×3=62\times 3=6 products, and no letter in FOIL tells you where the other two go. The general rule is that the number of products is the number of terms in one factor times the number in the other.

The distributive property handles any size. Expand (x+2)(x2+3x−5)(x+2)(x^2+3x-5):

x(x2+3x−5)+2(x2+3x−5)=x3+3x2−5x+2x2+6x−10x(x^2+3x-5)+2(x^2+3x-5)=x^3+3x^2-5x+2x^2+6x-10

Combine like terms to get x3+5x2+x−10x^3+5x^2+x-10. A fast confirmation: at x=2x=2 the original is 4⋅5=204\cdot 5=20 and the answer is 8+20+2−10=208+20+2-10=20.

Three binomials work in stages: FOIL the first two, then distribute the result across the third. For (x+2)3(x+2)^3, first (x+2)(x+2)=x2+4x+4(x+2)(x+2)=x^2+4x+4, then (x+2)(x2+4x+4)=x3+6x2+12x+8(x+2)(x^2+4x+4)=x^3+6x^2+12x+8. For higher powers this gets long, and the binomial theorem gives the coefficients directly.

Quick check

Expand (x+1)(x2+2x+3)(x+1)(x^2+2x+3).

FOIL vs Special Products: Squares and Conjugates

Area model of a 5 by 5 square split into 2 and 3 showing why (a+b)² is not a²+b²
A 5 by 5 square splits into 4, 6, 6 and 9, so squaring a sum always needs the middle 2ab.

The costliest FOIL mistake is not a sign error but a shortcut: writing (a+b)2=a2+b2(a+b)^2=a^2+b^2. A square means multiplying the binomial by itself, so FOIL gives four products, and the two middle ones are equal:

(a+b)2=a2+2ab+b2(a+b)^2=a^2+2ab+b^2

Test it with numbers: (2+3)2=25(2+3)^2=25, but 22+32=132^2+3^2=13. The missing 2ab=122ab=12 is exactly the Outer plus Inner. For a worked case, (2x−3)2=4x2−6x−6x+9=4x2−12x+9(2x-3)^2=4x^2-6x-6x+9=4x^2-12x+9.

Conjugates cancel

In (a+b)(a−b)(a+b)(a-b) the Outer product −ab-ab and the Inner product +ab+ab cancel, leaving a2−b2a^2-b^2. So (5x+4)(5x−4)=25x2−16(5x+4)(5x-4)=25x^2-16 with no middle term.

These two patterns appear so often that they have their own page: special products of binomials. Recognising them saves a full FOIL, and they run backward too. A trinomial like 4x2−12x+94x^2-12x+9 is a perfect square trinomial, and a binomial like 25x2−1625x^2-16 is a difference of two squares.

How Do You Check a FOIL Answer?

Wrong versus right expansion of (x−5)(x+2) checked by substituting x equals 2
Substituting x = 2 shows the wrong constant +10 fails the check, while −10 matches.

Three quick tests catch nearly every error, and none requires redoing the work:

  • Plug in a number. Choose x=2x=2 and compare the original product with your answer. Avoid x=0x=0 and x=1x=1, which can hide mistakes.
  • Check the ends. The leading coefficient of the answer is the product of the leading coefficients, and the constant is the product of the constants.
  • Check the shape. Two linear binomials must give a quadratic with at most three terms.

Suppose a student expands (x−5)(x+2)(x-5)(x+2) and writes x2−3x+10x^2-3x+10. At x=2x=2 the original gives (−3)(4)=−12(-3)(4)=-12, but the answer gives 4−6+10=84-6+10=8. The mismatch is real, and the constant test points to the culprit: (−5)(2)=−10(-5)(2)=-10, not +10+10. The corrected answer x2−3x−10x^2-3x-10 gives 4−6−10=−124-6-10=-12, which matches.

One substitution can accidentally agree even when the answer is wrong, but it is rare. Two different values, such as x=2x=2 and x=3x=3, make a wrong answer that survives both extremely unlikely, since two distinct quadratics can agree at only two points at most.

Reverse FOIL: How Does It Connect to Factoring?

Factoring a quadratic is FOIL run backward. Going forward, (x+4)(x+5)=x2+9x+20(x+4)(x+5)=x^2+9x+20 turns a product into a sum. Going backward, you start with x2+9x+20x^2+9x+20 and ask which two numbers multiply to 2020 and add to 99. The pair 44 and 55 is the answer, because those are exactly the Last product and the Outer plus Inner sum. This is the core of factoring trinomials.

When the leading coefficient is not 11, use the product acac. For 6x2+19x+106x^2+19x+10, find two numbers with product 6060 and sum 1919: they are 1515 and 44. Split the middle term and group:

6x2+15x+4x+10=3x(2x+5)+2(2x+5)=(3x+2)(2x+5)6x^2+15x+4x+10=3x(2x+5)+2(2x+5)=(3x+2)(2x+5)

The splitting step is the same four-term line FOIL produces, which is why factoring by grouping works. A grid version of the same idea is the box method for trinomials. To verify, FOIL the answer: 6x2+15x+4x+106x^2+15x+4x+10 matches.

Quick check

Factor x2+9x+20x^2+9x+20 by reversing FOIL.

Where Is the FOIL Method Used in Real Life?

The most literal use is area. A garden measures 1212 ft by 88 ft, and you extend both sides by xx feet. The new area is (12+x)(8+x)=96+20x+x2(12+x)(8+x)=96+20x+x^2. The 9696 is the old garden, the 20x20x is the two new strips, and x2x^2 is the corner square. FOIL separates the pieces so you can see them.

Revenue problems use it too. A theater sells 100100 tickets at $15, and each $1 price increase loses 44 sales. With xx dollars of increase, revenue is (15+x)(100−4x)=1500+40x−4x2(15+x)(100-4x)=1500+40x-4x^2. Because the result is a quadratic with a negative leading coefficient, it has a maximum at x=−402(−4)=5x=-\tfrac{40}{2(-4)}=5, giving 20⋅80=20\cdot 80=1600$.

FOIL also shows up with complex numbers, where i2=−1i^2=-1 turns the Last term into a real number: (3+2i)(1−4i)=3−12i+2i−8i2=11−10i(3+2i)(1-4i)=3-12i+2i-8i^2=11-10i. In each case the habit is identical: list every pairing, then combine what matches.

Practice problems

0 of 5 solved

  1. Expand (x+4)(x+7)(x+4)(x+7).

  2. Expand (x−3)(x+8)(x-3)(x+8).

  3. Expand (3x−2)(2x−5)(3x-2)(2x-5).

  4. Expand (2x+5y)(3x−4y)(2x+5y)(3x-4y).

  5. Expand (12x+6)(4x−23)\left(\tfrac{1}{2}x+6\right)(4x-\tfrac{2}{3}).

Common questions

What does FOIL stand for in math?

FOIL stands for First, Outer, Inner, Last. These are the four products you add when you multiply two binomials: first terms, outer terms, inner terms and last terms.

Can you use FOIL on a binomial times a trinomial?

No. A binomial times a trinomial needs six products, and FOIL names only four. Use the distributive property instead: multiply every term of one factor by every term of the other, then combine like terms.

Is the FOIL method the same as the distributive property?

FOIL is the distributive property applied twice, with the four products listed in a fixed order. The distributive property is the general rule, and it works for any number of terms.

Does the order of First, Outer, Inner, Last matter?

No. The answer is the sum of all four pairings, and addition does not care about order. The letters are only a checklist so that no pairing gets skipped.

How do you expand (x+5)2(x+5)^2 with FOIL?

Write it as (x+5)(x+5)(x+5)(x+5). First gives x2x^2, Outer and Inner give 5x5x each, and Last gives 2525, so the result is x2+10x+25x^2+10x+25. The middle term is never missing.

Do the Outer and Inner terms always combine?

Only when they are like terms. In (2x+5y)(3x−4y)(2x+5y)(3x-4y) both are multiples of xyxy, so they combine. In (x+2)(y+3)(x+2)(y+3) they are 3x3x and 2y2y, which stay separate.

Up next