# Basic FOIL

Recall the the distributive law:  For all real numbers $\,a\,,$ $\,b\,,$ and $\,c\,,$ $\,a(b+c) = ab + ac\,.$

At first glance, it might not look like the distributive law applies to the expression $\,(a+b)(c+d)\,.$ However, it does—once you apply a popular mathematical technique called ‘treat it as a singleton’.

Here's how ‘treat it as a singleton’ goes:

First, rewrite the distributive law using some different variable names:   $\,z(c+d) = zc + zd\,.$ This says that anything times $\,(c+d)\,$ is the anything times $\,c\,,$ plus the anything times $\,d\,.$

Now, look back at $\,(a+b)(c+d)\,,$ and take the group $\,(a+b)\,$ as $\,z\,.$ That is, you're taking something that seems to have two parts, and you're treating it as a single thing—a ‘singleton’! Look what happens:

\begin{align} &\cssId{s19}{(a+b)(c+d)}\cr &\quad\cssId{s20}{= \overset{z}{\overbrace{(a+b)}}(c+d)}\cr &\qquad\quad\cssId{s21}{\text{(give \,(a+b)\, the name \,z\,)}}\cr\cr &\quad\cssId{s22}{= z(c + d)}\cr &\qquad\quad\cssId{s23}{\text{(rewrite)}}\cr\cr &\quad\cssId{s24}{= zc + zd}\cr &\qquad\quad\cssId{s25}{\text{(use the distributive law)}}\cr\cr &\quad\cssId{s26}{= (a+b)c + (a+b)d}\cr &\qquad\quad\cssId{s27}{\text{(since \,z = a + b\,)}}\cr\cr &\quad\cssId{s28}{= ac + bc + ad + bd}\cr &\qquad\quad\cssId{s29}{\text{(use the distributive law twice)}}\cr\cr &\quad\cssId{s30}{= ac + ad + bc + bd}\cr &\qquad\quad\cssId{s31}{\text{(re-order; switch the two middle terms)}}\cr\cr &\qquad\cssId{s32}{= \underset{\text{F}}{\underbrace{\ ac\ }}} \cssId{s33}{+ \underset{\text{O}}{\underbrace{\ ad\ }}} \cssId{s34}{+ \underset{\text{I}}{\underbrace{\ bc\ }}} \cssId{s35}{+ \underset{\text{L}}{\underbrace{\ bd\ }}} \end{align}

You get four terms, and each of these terms is assigned a letter. These letters form the word  FOIL , and provide a powerful memory device for multiplying out expressions of the form $\,(a+b)(c+d)\,.$

Here's the meaning of each letter in the word FOIL:

• The first number in the group $\,(a+b)\,$ is $\,a\,$; the first number in the group $\,(c+d)\,$ is $\,c\,.$ Multiplying these  Firsts  together gives $\,ac\,,$ which is labeled ‘ F ’.
• When you look at the expression $\,(a+b)(c+d)\,$ from far away, you see $\,a\,$ and $\,d\,$ on the outside. That is, $\,a\,$ and $\,d\,$ are the outer numbers. Multiplying these  Outers  together gives $\,ad\,,$ which is labeled ‘ O ’.
• Similarly, when you look at the expression $\,(a+b)(c+d)\,$ from far away, you see $\,b\,$ and $\,c\,$ on the inside. That is, $\,b\,$ and $\,c\,$ are the inner numbers. Multiplying these  Inners  together gives $\,bc\,,$ which is labeled ‘ I ’.
• The last number in the group $\,(a+b)\,$ is $\,b\,$; the last number in the group $\,(c+d)\,$ is $\,d\,.$ Multiplying these  Lasts  together gives $\,bd\,,$ which is labeled ‘ L ’.

One common application of FOIL is to multiply out expressions like $\,(x-1)(x+4)\,.$ Remember the exponent laws, and be sure to combine like terms whenever possible:

\begin{align} &\cssId{s61}{(x-1)(x+4)}\cr\cr &\qquad\cssId{s62}{= \underset{\text{F}}{\underbrace{(x\cdot x)}}} \cssId{s63}{+ \underset{\text{O}}{\underbrace{(x\cdot 4)}}} \cssId{s64}{+ \underset{\text{I}}{\underbrace{(-1\cdot x)}}} \cssId{s65}{+ \underset{\text{L}}{\underbrace{(-1\cdot 4)}}}\cr\cr &\qquad\cssId{s66}{= x^2 + 4x - x - 4}\cr\cr &\qquad\cssId{s67}{= x^2 + 3x - 4} \end{align}

You want to be able to write this down without including the first step above:

\begin{align} &\cssId{s69}{(x-1)(x+4)}\cr\cr &\qquad\cssId{s70}{= \underset{\text{F}}{\underbrace{\ x^2\ }}} \cssId{s71}{+ \underset{\text{O}}{\underbrace{\ 4x\ }}} \cssId{s72}{- \underset{\text{I}}{\underbrace{\ \ x\ \ }}} \cssId{s73}{- \underset{\text{L}}{\underbrace{\ \ 4\ \ }}}\cr\cr &\qquad\cssId{s74}{= x^2 + 3x - 4} \end{align}

Then, after you've practiced a bit, you want to be able to combine the ‘outers’ and ‘inners’ in your head, and write it down using only one step:

$$\cssId{s78}{(x-1)(x+4)} \cssId{s79}{= \underset{\text{F}}{\underbrace{\ x^2\ }}} \cssId{s80}{+ \underset{\text{OI}}{\underbrace{\ 3x\ }}} \cssId{s81}{- \underset{\text{L}}{\underbrace{\ \ 4\ \ }}}$$

## Examples

Simplify: $(x+3)(x-2)$

Answer: x^2 + x - 6
Note:   Key in exponents using the ‘ ^ ’ key. Write your answer in the most conventional way.

Simplify: $(x+4)(x-4)$
Answers must be written in the most conventional way: $\,x^2\,$ term first, $\,x\,$ term next, constant term last.