### Calculating with letters: Special products

### The square of a sum or a difference

**Special products** are special cases of the banana formula that are used so often that they have a special place; they are worth noting.

Sum formula for squares

For the square of a sum you can use the following **sum formula**: \[(a+b)^2=a^2+2ab+b^2\]

**Example**

\[\begin{aligned}(x+5)^2&=x^2+2\cdot x\cdot 5+5^2\\ &= x^2+10x+25\end{aligned}\]

Difference formula for squares

For the square of a difference we have the**difference formula **\[(a-b)^2=a^2-2ab+b^2\]

**Example**

\[\begin{aligned}(x-5)^2&=x^2+2\cdot x\cdot 5+5^2\\ &= x^2-10x+25\end{aligned}\]

The difference formula \[(a-b)^2=a^2-2ab+b^2\] follows from the sum formula by \(b\) by \(-b\) (and we will often do that in elaborations of sums), but it is still useful to have both formulas readily available. Note that in the difference formula no minus sign is in front of \(b^2\), but a plus sign.

For those who appreciate a proof using the banana formula: \[\begin{aligned}(a-b)^2&=(a-b)\cdot (a-b) & \blue{\text{square written as product}}\\ &=a\cdot a-a\cdot b-b\cdot a+(-b)\cdot (-b) & \blue{\text{application of the bananas formula}}\\ &=a^2-2ab+b^2& \blue{\text{collection of similar terms and use of powers}}\end{aligned}\]

The formulas are widely applicable, , even when the two-terms are more complicated..

There is a third special product of two two-terms:

Special product with a difference of squares

\[(a-b)(a+b)=a^2-b^2\]

**Example**

\[\begin{aligned}(x-5)(x+5) &=x^2-5^2\\ &= x^2-25\end{aligned}\]

You often use this formula from right to left to factor out to terms of an expression. We will discuss this topic separately.