# College Algebra/FOIL and algebraic manipulation

FOIL is an abbreviation for the words first, outer, inner, and last. It is a mnemonic to help with polynomial multiplication.

Take a look at this example of multiplying two linear monomials:

$(x + 3)(x + 4) \,\;$

There are 4 distinct products which have to be computed. Here they are highlighted:

first - $(\bold{x} + 3)(\bold{x} + 4) \,\;$
outer - $(\bold{x} + 3)(x + \bold{4}) \,\;$
inner - $(x + \bold{3})(\bold{x} + 4) \,\;$
last - $(x + \bold{3})(x + \bold{4}) \,\;$

The product of the highlighted terms gives:

first - $x^2 \,\;$
outer - $4x \,\;$
inner - $3x \,\;$
last - $12 \,\;$

$(x + 3)(x + 4) = x^2 + 7x + 12 \,\;$

Note: The point of this is to remind you to multiply everything in one set of parenthesis exactly once with everything in the other set of parenthesis. As long as you understand that this is why you do this, it doesn't matter what order you do it in, as long as it all gets added in the end. And so, F+O+I+L is the same as O+L+I+F, L+I+F+O, F+L+O+I, etc.

Exercise:
Multiply $(a + b + c)\,\;$ with $(d + e + f)\,\;$.Solution:
The easiest way to remember to do all the combinations is to do it systematically.
First take $a\,\;$ and multiply it with $(d + e + f)\,\;$.  You get $(ad + ae + af)\,\;$.
Then multiply $b\,\;$ by $(d + e + f)\,\;$.  You get $(bd + be + bf)\,\;$.
Finally, multiply $c\,\;$ by $(d + e + f)\,\;$.  You get $(cd + ce + cf)\,\;$.
Add all three of these results and you get $(ad + ae + af)+(bd + be + bf)+(cd + ce + cf)\,\;$.
Take out the parenthesis and you get $ad + ae + af+bd + be + bf+cd + ce + cf\,\;$.