Special Product Formulas

Quick Reference

# Formula Name
1 $(A+B)^{2}=A^{2}+2AB+B^{2}$ Square of a Sum
2 $(A-B)^{2}=A^{2}-2AB+B^{2}$ Square of a Difference
3 $(A+B)^{3}=A^{3}+3A^{2}B+3AB^{2}+B^{3}$ Cube of a Sum
4 $(A-B)^{3}=A^{3}-3A^{2}B+3AB^{2}-B^{3}$ Cube of a Difference
6 $(x+A)(x+B)=x^{2}+(A+B)x+AB$ Product of Binomials with a Common Term
7 $(A+B)(A-B)=A^{2}-B^{2}$ Difference of Squares
8 $(A-B)(A^{2}+AB+B^{2})=A^{3}-B^{3}$ Difference of Cubes
9 $(A+B)(A^{2}-AB+B^{2})=A^{3}+B^{3}$ Sum of Cubes

The Formulas

The following special formulas are vastly used in algebra and calculus, and should be memorized. You can verify each of the formulas by actual multiplication.

Here $A$ and $B$ represent real numbers, variables, or algebraic expressions.

Squares of Binomials

  1. $(A+B)^{2}=A^{2}+2AB+B^{2}$    (Square of a Sum)
  2. $(A-B)^{2}=A^{2}-2AB+B^{2}$    (Square of a Difference)

Cubes of Binomials

  1. $(A+B)^{3}=A^{3}+3A^{2}B+3AB^{2}+B^{3}$    (Cube of a Sum)
  2. $(A-B)^{3}=A^{3}-3A^{2}B+3AB^{2}-B^{3}$    (Cube of a Difference)

Note that the Square of a Difference formula can be obtained by replacing $B$ with $-B$ in the Square of a Sum formula. Similarly, replacing $B$ with $-B$ in the Cube of a Sum formula yields the Cube of a Difference formula.

Binomial Expansion

The formulas above handle the cases $n=2$ and $n=3$. For higher powers, the coefficients of the expansion of $(A+B)^{n}$ can be read directly from the Pascal-Newton-Khayyam triangle (commonly called Pascal's triangle). Each row of the triangle corresponds to one value of $n$, and the entries in that row are the coefficients of $A^{n}B^{0},\, A^{n-1}B^{1},\, \ldots,\, A^{0}B^{n}$ in order.

$n$ Coefficients of $(A+B)^n$
0 $1$
1 $1\quad 1$
2 $1\quad 2\quad 1$
3 $1\quad 3\quad 3\quad 1$
4 $1\quad 4\quad 6\quad 4\quad 1$
5 $1\quad 5\quad 10\quad 10\quad 5\quad 1$
6 $1\quad 6\quad 15\quad 20\quad 15\quad 6\quad 1$

Each entry is the sum of the number directly above it and the number to the left of that one. For example, in row 4 the entry $6$ equals $3+3$ (the $3$ directly above it and the $3$ to its left in row 3), and each $4$ equals $1+3$ or $3+1$ by the same rule. The first and last entries of every row are always $1$. To expand $(A+B)^{n}$, read off row $n$, attach the corresponding powers of $A$ (descending from $n$ to $0$) and $B$ (ascending from $0$ to $n$), and write out the sum.

For example, using row $n=4$:

$ (A+B)^{4} = A^{4}+4A^{3}B+6A^{2}B^{2}+4AB^{3}+B^{4}. $

And using row $n=5$:

$ (A+B)^{5} = A^{5}+5A^{4}B+10A^{3}B^{2}+10A^{2}B^{3}+5AB^{4}+B^{5}. $

Further Study: The Binomial Coefficient Formula

The general formula for any power $n$ For large $n$, reading off the triangle row by row can be tedious. The entry in row $n$ at position $k$ (counting from $0$) is given by the **binomial coefficient** $ \binom{n}{k}=\frac{n!}{k!\,(n-k)!} \qquad \text{(read "$n$ choose $k$")} $ where $k!=1\times2\times\cdots\times k$ (with $0!=1$ by convention). This gives the general expansion: $ (A+B)^{n}=A^{n}+\binom{n}{1}A^{n-1}B+\binom{n}{2}A^{n-2}B^{2}+\cdots+\binom{n}{n-1}AB^{n-1}+B^{n} $ and $ \begin{aligned} (A-B)^{n}=A^{n}&-\binom{n}{1}A^{n-1}B+\cdots+(-1)^{k}\binom{n}{k}A^{n-k}B^{k}+\cdots \\ &+(-1)^{n-1}\binom{n}{n-1}AB^{n-1}+(-1)^{n}B^{n}. \end{aligned} $ You can verify that the binomial coefficients recover the triangle entries: $\binom{4}{0}=1$, $\binom{4}{1}=4$, $\binom{4}{2}=6$, $\binom{4}{3}=4$, $\binom{4}{4}=1$, which matches row $n=4$ above.

Other Product Formulas

  1. $(x+A)(x+B)=x^{2}+(A+B)x+AB$    (Product of Binomials with a Common Term)
  2. $(A+B)(A-B)=A^{2}-B^{2}$    (Difference of Squares)
  3. $(A-B)(A^{2}+AB+B^{2})=A^{3}-B^{3}$    (Difference of Cubes)
  4. $(A+B)(A^{2}-AB+B^{2})=A^{3}+B^{3}$    (Sum of Cubes)

Trinomial Formulas

The square and cube of a trinomial $A+B+C$ can be derived from the binomial formulas by treating two of the three terms as a single unit. Set $D=A+B$, so that $A+B+C=D+C$, and then apply the binomial formulas to the pair $(D,C)$.

Square of a trinomial. Apply the Square of a Sum formula to $(D+C)^{2}$:

$ \begin{aligned} (A+B+C)^{2}&=(D+C)^{2}=D^{2}+2DC+C^{2} \\ &=(A+B)^{2}+2(A+B)C+C^{2} \\ &=(A^{2}+2AB+B^{2})+(2AC+2BC)+C^{2} \\ &=A^{2}+B^{2}+C^{2}+2AB+2AC+2BC. \end{aligned} $

In other words, the square of a trinomial equals the sum of the squares of each term plus twice the product of every pair of distinct terms: $A^{2}$, $B^{2}$, $C^{2}$ from squaring each term, and $2AB$, $2AC$, $2BC$ from doubling each pairwise product.

Derivation of the cube of a trinomial Apply Formula 3 to $(D+C)^{3}$, where $D=A+B$: $ (A+B+C)^{3}=(D+C)^{3}=D^{3}+3D^{2}C+3DC^{2}+C^{3}. $ Expand each term using the binomial formulas: $ \begin{aligned} D^{3}&=(A+B)^{3}=A^{3}+3A^{2}B+3AB^{2}+B^{3}, \\ 3D^{2}C&=3(A+B)^{2}C=3(A^{2}+2AB+B^{2})C=3A^{2}C+6ABC+3B^{2}C, \\ 3DC^{2}&=3(A+B)C^{2}=3AC^{2}+3BC^{2}, \\ C^{3}&=C^{3}. \end{aligned} $ Adding all terms: $ (A+B+C)^{3}=A^{3}+B^{3}+C^{3}+3A^{2}B+3AB^{2}+3A^{2}C+3AC^{2}+3B^{2}C+3BC^{2}+6ABC. $ In other words, the cube of a trinomial equals the sum of the cubes of each term ($A^{3}$, $B^{3}$, $C^{3}$), plus three times the square of each term multiplied by each of the other two terms ($3A^{2}B$, $3AB^{2}$, $3A^{2}C$, $3AC^{2}$, $3B^{2}C$, $3BC^{2}$), plus six times the product of all three terms ($6ABC$).

Common Mistake: Squaring a Binomial

Warning: $(A+B)^{2} \neq A^{2}+B^{2}$.
The middle term $2AB$ is always present and must not be omitted. For example,
$(x+3)^{2} = x^{2}+6x+9$, not $x^{2}+9$.
Similarly, $(A-B)^{2} \neq A^{2}-B^{2}$; the correct expansion is $A^{2}-2AB+B^{2}$.

Worked Examples

Example 1. Expand $(3x-5y)^{2}$.

Solution Let $A=3x$ and $B=5y$. Using Formula 2: $ \begin{aligned} (3x-5y)^{2}&=(A-B)^{2} \\ &=A^{2}-2AB+B^{2} \\ &=(3x)^{2}-2(3x)(5y)+(5y)^{2} \\ &=9x^{2}-30xy+25y^{2} \end{aligned} $

Example 2. Simplify $(x-y)(x+y)+y^{2}$.

Solution Using Formula 7 (Difference of Squares), $(x-y)(x+y)=x^{2}-y^{2}$. Therefore: $ \begin{aligned} (x-y)(x+y)+y^{2}&=x^{2}-y^{2}+y^{2} \\ &=x^{2} \end{aligned} $

Example 3. Find $(x^{3}-2\sqrt{y})(x^{3}+2\sqrt{y})$.

Solution Let $A=x^{3}$ and $B=2\sqrt{y}$. The product has the form $(A-B)(A+B)$, so by Formula 7: $ \begin{aligned} (x^{3}-2\sqrt{y})(x^{3}+2\sqrt{y})&=(A-B)(A+B) \\ &=A^{2}-B^{2} \\ &=\left(x^{3}\right)^{2}-\left(2\sqrt{y}\right)^{2} \\ &=x^{6}-4y \end{aligned} $ Note that the above equation has a meaning only when $y\geq 0$.

Frequently Asked Questions

What are special product formulas? Special product formulas are identities that give the expanded form of certain polynomial products directly, without performing full term-by-term multiplication. Because the same patterns (squares of binomials, difference of squares, cubes) appear constantly in algebra and calculus, memorizing these formulas saves significant time.

What is the difference of squares formula? The difference of squares formula states that $(A+B)(A-B)=A^{2}-B^{2}$. It applies whenever two identical expressions are multiplied with opposite signs between their terms. For example, $(x+5)(x-5)=x^{2}-25$.

What is a perfect square trinomial? A perfect square trinomial is a trinomial of the form $A^{2}+2AB+B^{2}$ or $A^{2}-2AB+B^{2}$, which factors as $(A+B)^{2}$ or $(A-B)^{2}$ respectively. For example, $x^{2}+6x+9=(x+3)^{2}$ and $4x^{2}-12x+9=(2x-3)^{2}$.

What is the most common mistake when squaring a binomial? The most common error is writing $(A+B)^{2}=A^{2}+B^{2}$, which omits the middle term $2AB$. The correct formula is $(A+B)^{2}=A^{2}+2AB+B^{2}$. Similarly, $(A-B)^{2}=A^{2}-2AB+B^{2}$, not $A^{2}-B^{2}$.

What is the binomial theorem? The binomial theorem gives the full expansion of $(A+B)^{n}$ for any positive integer $n$: $ (A+B)^{n}=\sum_{k=0}^{n}\binom{n}{k}A^{n-k}B^{k} $ where $\binom{n}{k}=\dfrac{n!}{k!\,(n-k)!}$ is the binomial coefficient (read "$n$ choose $k$"). The formulas for $(A+B)^{2}$ and $(A+B)^{3}$ are the special cases $n=2$ and $n=3$, and the triangle rows give the coefficients for all small $n$ at a glance.