When multiplying two algebraic expressions, it may be helpful if you remember FOIL.
F First Terms
O Outer Terms
I Inner Terms
L Last Terms In the figure above,
$$A \times C$$ are First Terms.
$$A \times D$$ are Outer Terms.
$$B \times C$$ are Inner Terms.
$$B \times D$$ are Last Terms.

Example Expand $$(3y+1)(3x+2y)$$.
Solution  $$(3y+1)(3x+2y) \\ \, \\ =\underbrace{(3y\cdot3x)}_{\text{First Terms}}+\underbrace{(3y\cdot2y)}_{\text{Outer Terms}}+\underbrace{(1\cdot3x)}_{\text{Inner Terms}}+\underbrace{(1\cdot2y)}_{\text{Last Terms}} \\ \, \\ =9xy+6y^2+3x+2y$$

Expand $$(4x+1)(2x+3y)$$.
$$(4x+1)(2x+3y) \\ \, \\ =\underbrace{(4x\cdot2x)}_{\text{First Terms}}+\underbrace{(4x\cdot3y)}_{\text{Outer Terms}}+\underbrace{(1\cdot2x)}_{\text{Inner Terms}}+\underbrace{(1\cdot3y)}_{\text{Last Terms}} \\ \, \\ =8x^2+12xy+2x+3y$$

Expand $$(2+5y)(x+7y)$$.
$$(2+5y)(x+7y) \\ \, \\ =\underbrace{(2\cdot x)}_{\text{First Terms}}+\underbrace{(2\cdot7y)}_{\text{Outer Terms}}+\underbrace{(5y\cdot x)}_{\text{Inner Terms}}+\underbrace{(5y\cdot7y)}_{\text{Last Terms}} \\ \, \\ =2x+14y+5xy+35y^2$$

Need more practice? Click here to do some math drill on this topic!

## Special Rules

There are three types of patterns when multiplying terms. It may be a good idea to memorize these, as they are quite common algebraic expressions that appear in the test.

$$1. \quad (A + B)^2=A^2+2AB+B^2$$

Example Expand $$(3x+2y)^2$$.
Solution  $$(3x+2y)^2 \\ \, \\ =\underbrace{(3x)^2}_{A^2}+\underbrace{2(3x)(2y)}_{2AB}+\underbrace{(2y)^2}_{B^2} \\ \, \\ =9x^2+12xy+4y^2$$

$$2. \quad (A – B)^2=A^2-2AB+B^2$$

Example Expand $$(3x−2y)^2$$.
Solution  $$(3x−2y)^2 \\ \, \\ =\underbrace{(3x)^2}_{A^2}-\underbrace{2(3x)(2y)}_{2AB}+\underbrace{(2y)^2}_{B^2} \\ \, \\ =9x^2-12xy+4y^2$$

$$3. \quad (A+B)(A-B)=A^2-B^2$$

Example Expand $$(3x+2y)(3x−2y)$$.
Solution  $$(3x+2y)(3x−2y) \\ \, \\ =\underbrace{9x^2}_{A^2}-\underbrace{4y^2}_{B^2}$$

Expand $$(4x+y)(4x−y)$$.
$$(4x+y)(4x−y) \\ \, \\ =\underbrace{(4x)^2}_{A^2}-\underbrace{(y)^2}_{B^2} \\ \, \\ =16x^2-y^2$$

Note: This is Type 3, $$(A+B)(A-B)=A^2-B^2$$

Expand $$(8x+y)^2$$.
$$(8x+y)^2 \\ \, \\ =\underbrace{(8x)^2}_{A^2}+\underbrace{2(8x)(y)}_{2AB}+\underbrace{(y)^2}_{B^2} \\ \, \\ =64x^2+16xy+y^2$$
Note: This is Type 1, $$(A + B)^2=A^2+2AB+B^2$$
Expand $$(2k-5)^2$$.
$$(2k-5)^2 \\ \, \\ =\underbrace{(2k)^2}_{A^2}-\underbrace{2(2k)(5)}_{2AB}+\underbrace{(5)^2}_{B^2} \\ \, \\ =4k^2-20k+25$$
Note: This is Type 2, $$(A – B)^2=A^2-2AB+B^2$$