# Simplifying $(a+b)^2$ and $(a-b)^2$

Here are two very important and common expressions: $$\begin{gather} (a+b)^2\cr\cr \text{and}\cr\cr (a-b)^2 \end{gather}$$

\begin{align} &\overset{\text{In one step, be able to go from here ...}}{\overbrace{(a+b)^2}}\cr\cr &\qquad\qquad\qquad= (a+b)(a+b)\cr\cr &\qquad\qquad\qquad= a^2 + ab + ab + b^2\cr\cr &\qquad\qquad\qquad= \overset{\text{... to here}}{\overbrace{a^2 + 2ab + b^2}} \end{align}
\begin{align} &\overset{\text{In one step, be able to go from here ...}}{\overbrace{(a-b)^2}}\cr\cr &\qquad\qquad\qquad= (a-b)(a-b)\cr\cr &\qquad\qquad\qquad= a^2 - ab - ab + b^2\cr\cr &\qquad\qquad\qquad= \overset{\text{...to here}}{\overbrace{a^2 - 2ab + b^2}} \end{align}

You should (eventually) be able to multiply out expressions like these without writing down any intermediate results.

Be careful! One of the most common algebra mistakes is to think that $\,(a + b)^2\,$ is equal to $\,a^2 + b^2\,.$ NOT SO!!! You've got the Firsts (‘F’) and the Lasts (‘L’) but have left out the Outers (‘O’) and the Inners (‘I’)!

One of my students (Ian Sullivan) came up with this memory device as a reminder that the squares $\,(a+b)^2\,$ and $\,(a-b)^2\,$ require FOILing:

Okay, square—go foil yourself!

## Examples

Simplify: $(x-2)^2$
Answer: x^2 - 4x + 4
Note:  Use the ‘ ^ ’ key for exponents in the exercises below. Input your answer in the most conventional way. That is, even though   4 - 4x + x^2   is a correct answer, it isn't recognized as correct by this program.
Simplify: $(3x+y)^2$
Answer: 9x^2 + 6xy + y^2
Note:  Variables must be typed in the order they appear, going from left to right, for your answer to be recognized as correct. That is, even though   9x^2 + 6yx + y^2   is a correct answer, it isn't recognized as correct by this program.

## Practice

Answers must be written in the most conventional way. Note:  Key in exponents using the ‘ ^ ’ key.