Polynomial Identities
Polynomial identities, also called special products or short multiplication formulas, are ready-made results of multiplications that come up again and again. Instead of multiplying every term by every term each time, you write the answer straight away. They are among the most used tools in algebra, and they work in two directions:
- left to right, to expand brackets: ${{(x+3)^2}={x^2+6x+9}}$;
- right to left, to factor a polynomial: ${{x^2-9}={(x-3)(x+3)}}$.
In the formulas, $a$ and $b$ can be any numbers or expressions, for example $2x$, $5y^2$ or ${x+1}$.
Table of the Identities
| Name | Formula |
|---|---|
| Square of a sum | ${(a+b)^2}={a^2+2ab+b^2}$ |
| Square of a difference | ${(a-b)^2}={a^2-2ab+b^2}$ |
| Difference of squares | ${a^2-b^2}={(a-b)(a+b)}$ |
| Cube of a sum | ${(a+b)^3}={a^3+3a^2b+3ab^2+b^3}$ |
| Cube of a difference | ${(a-b)^3}={a^3-3a^2b+3ab^2-b^3}$ |
| Sum of cubes | ${a^3+b^3}={(a+b)(a^2-ab+b^2)}$ |
| Difference of cubes | ${a^3-b^3}={(a-b)(a^2+ab+b^2)}$ |
Each of these identities is proved by multiplying out the brackets. Below you will see how, and how to use each one.
Square of a Sum and Square of a Difference
The square of a sum (difference) of two terms equals the square of the first term, plus (minus) twice the product of the two terms, plus the square of the second term.
Why? Squaring means multiplying the expression by itself:
${(a+b)^2}={(a+b)(a+b)}={a^2+ab+ba+b^2}={a^2+2ab+b^2}$
The two equal terms $ab$ and $ba$ give twice the product, $2ab$. The picture shows the same thing: a square with side ${a+b}$ is made of a square $a^2$, two rectangles with area $ab$ and a square $b^2$.
${(a+b)^2}={a^2+ab+ab+b^2}={a^2+2ab+b^2}$
The square of a difference works the same way. The only change is the sign in front of twice the product:
${(a-b)^2}={(a-b)(a-b)}={a^2-ab-ba+b^2}={a^2-2ab+b^2}$
Examples
Example 1. In ${(x+3)^2}$ the first term is $x$ and the second term is $3$:
${(x+3)^2}={x^2+2\cdot x\cdot 3+3^2}={x^2+6x+9}$
Example 2. When a term is a product, such as $2a$, put it in brackets so that both the number and the letter get squared:
${(2a-5)^2}={(2a)^2-2\cdot 2a\cdot 5+5^2}={4a^2-20a+25}$
Example 3.
${(3x+2y)^2}={(3x)^2+2\cdot 3x\cdot 2y+(2y)^2}={9x^2+12xy+4y^2}$
Example 4. To square a power, double its exponent:
${(1-x^2)^2}={1^2-2\cdot 1\cdot x^2+(x^2)^2}={1-2x^2+x^4}$
Opposite expressions have equal squares, so ${{(b-a)^2}={(a-b)^2}}$ and ${{(-a-b)^2}={(a+b)^2}}$. For example, ${(-x-3)^2}={(x+3)^2}={x^2+6x+9}$.
Careful: ${{(a+b)^2}\ne {a^2+b^2}}$. Don't forget twice the product! Check with numbers: ${(3+4)^2}=7^2=49$, but ${3^2+4^2}={9+16}=25$. The difference ${{49-25}=24}$ is exactly ${2\cdot 3\cdot 4}$.
Mental Math
The identities let you square numbers close to a round number in your head:
$51^2={(50+1)^2}={2500+100+1}=2601$
$99^2={(100-1)^2}={10{,}000-200+1}=9801$
Difference of Squares
The difference of the squares of two terms equals the product of their difference and their sum.
When you multiply out the brackets, the two middle terms cancel:
${(a-b)(a+b)}={a^2+ab-ba-b^2}={a^2-b^2}$
In pictures: cut a small square $b^2$ out of the corner of the square $a^2$. Cut what is left into two rectangles and put them together into one rectangle with sides ${a+b}$ and ${a-b}$.
${a^2-b^2}={(a+b)(a-b)}$
Examples
${(x-7)(x+7)}={x^2-7^2}={x^2-49}$
${(2y+1)(2y-1)}={(2y)^2-1^2}={4y^2-1}$
In the other direction, the identity factors a difference of squares:
${9a^2-25b^2}={(3a)^2-(5b)^2}={(3a-5b)(3a+5b)}$
And some mental math: ${51\cdot 49}={(50+1)(50-1)}={2500-1}=2499$, ${102\cdot 98}={100^2-2^2}=9996$.
Careful: there is no such identity for a sum of squares ${a^2+b^2}$. It cannot be factored using real numbers, so ${x^2+9}$ stays as it is. A sum of squares can only be written using the square of a sum or of a difference: ${a^2+b^2}={(a+b)^2-2ab}={(a-b)^2+2ab}$.
Cube of a Sum and Cube of a Difference
The cube of a sum of two terms equals the cube of the first term, plus three times the square of the first term times the second, plus three times the first term times the square of the second, plus the cube of the second term. In the cube of a difference the signs alternate: ${+,\ -,\ +,\ -}$.
Proof: ${(a+b)^3}$ is ${(a+b)^2}$ multiplied once more by ${(a+b)}$:
${(a+b)^3}={(a^2+2ab+b^2)(a+b)}={a^3+a^2b+2a^2b}+{2ab^2+ab^2+b^3}={a^3+3a^2b+3ab^2+b^3}$
Examples
${(2x-1)^3}={(2x)^3-3\cdot(2x)^2\cdot 1}+{3\cdot 2x\cdot 1^2-1^3}={8x^3-12x^2+6x-1}$
${(1+a^2)^3}={1+3\cdot a^2+3\cdot(a^2)^2+(a^2)^3}={1+3a^2+3a^4+a^6}$
In your head: $11^3={(10+1)^3}={1000+300+30+1}=1331$.
Careful: ${{(a+b)^3}\ne {a^3+b^3}}$. For example, ${{(1+2)^3}=27}$, but ${{1^3+2^3}=9}$.
Sum and Difference of Cubes
A sum of two cubes equals the sum of the terms times ${a^2-ab+b^2}$. A difference of two cubes equals the difference of the terms times ${a^2+ab+b^2}$.
The second factor looks like ${(a-b)^2}$ or ${(a+b)^2}$, but its middle term is $ab$, not $2ab$. To remember the signs, use the word SOAP:
- Same: the first bracket has the same sign as the left side;
- Opposite: the middle term of the second bracket has the opposite sign;
- Always Positive: the last sign is always plus.
Check by multiplying: all the middle terms cancel.
${(a+b)(a^2-ab+b^2)}={a^3-a^2b+ab^2}+{a^2b-ab^2+b^3}={a^3+b^3}$
Examples
${x^3-8}={x^3-2^3}={(x-2)(x^2+2x+4)}$
${27a^3+1}={(3a)^3+1^3}={(3a+1)(9a^2-3a+1)}$
The second factors ${a^2\pm ab+b^2}$ cannot be factored any further using real numbers.
Factoring: the Identities in Reverse
Often you have to spot an identity inside a given polynomial. A trinomial of the form ${a^2\pm 2ab+b^2}$ is a perfect square trinomial. How to recognize it:
- Two of the terms are squares: ${x^2=(x)^2}$, ${9=3^2}$, ${4a^2=(2a)^2}$.
- The third term is twice the product of their bases: ${{2\cdot x\cdot 3}=6x}$.
- The sign of that term is the sign inside the bracket.
${x^2+6x+9}={x^2+2\cdot x\cdot 3+3^2}={(x+3)^2}$
${25+20a+4a^2}={5^2+2\cdot 5\cdot 2a+(2a)^2}={(5+2a)^2}$
${4y^2-12y+9}={(2y)^2-2\cdot 2y\cdot 3+3^2}={(2y-3)^2}$
But ${x^2+5x+9}$ is not a perfect square, because ${2\cdot x\cdot 3}=6x\ne 5x$.
Sometimes you use an identity more than once. First take out the common factor, if there is one:
${2x^3-18x}={2x(x^2-9)}={2x(x-3)(x+3)}$
${x^4-16}={(x^2-4)(x^2+4)}={(x-2)(x+2)(x^2+4)}$
More Useful Identities
${(a+b+c)^2}={a^2+b^2+c^2+2ab+2ac+2bc}$
${(a-b-c)^2}={a^2+b^2+c^2-2ab-2ac+2bc}$
${(a+b)^2+(a-b)^2}={2(a^2+b^2)}$
${(a+b)^2-(a-b)^2}=4ab$
${(a-b)^2}={(a+b)^2-4ab}$
${a^3+b^3}={(a+b)^3-3ab(a+b)}$
${a^4-b^4}={(a-b)(a+b)(a^2+b^2)}$
With them you can evaluate an expression without finding the numbers themselves. If ${{a+b}=5}$ and ${ab=6}$, then
${a^2+b^2}={(a+b)^2-2ab}={25-12}=13$
${a^3+b^3}={(a+b)^3-3ab(a+b)}={125-90}=35$
Identities for the nth Power
The difference of squares and the difference of cubes are special cases of an identity that holds for every natural number ${n\ge 2}$:
${a^n-b^n}={(a-b)(a^{n-1}+a^{n-2}b+\dots+b^{n-1})}$
In the second bracket the powers of $a$ go down, the powers of $b$ go up, and all the signs are plus. For example:
${a^4-b^4}={(a-b)(a^3+a^2b+ab^2+b^3)}$
If $n$ is odd, the sum ${a^n+b^n}$ is divisible by ${a+b}$ (the signs in the second bracket alternate):
${a^n+b^n}={(a+b)(a^{n-1}-a^{n-2}b+\dots+b^{n-1})}$
${a^5+b^5}={(a+b)(a^4-a^3b+a^2b^2-ab^3+b^4)}$
If $n$ is even, it is the difference ${a^n-b^n}$ that is divisible by ${a+b}$, not the sum:
${a^n-b^n}={(a+b)(a^{n-1}-a^{n-2}b+\dots-b^{n-1})}$
For even $n$ the sum ${a^n+b^n}$ is not divisible by ${a+b}$. For example, ${a^2+b^2}$ does not factor at all.
Pascal's Triangle
The coefficients of ${(a+b)^n}$ can be read from Pascal's triangle. Every row starts and ends with 1, and every other number is the sum of the two numbers above it:
The row $1,\ 2,\ 1$ gives ${(a+b)^2}$, the row $1,\ 3,\ 3,\ 1$ gives ${(a+b)^3}$, and the next row gives
${(a+b)^4}={a^4+4a^3b+6a^2b^2+4ab^3+b^4}$
The powers of $a$ go down from $n$ to 0, and the powers of $b$ go up from 0 to $n$. In ${(a-b)^n}$ the signs alternate, starting with plus.
Common Mistakes
| Wrong | Right |
|---|---|
| ✗ ${(a+b)^2}={a^2+b^2}$ | ✓ ${(a+b)^2}={a^2+2ab+b^2}$ |
| ✗ ${(a-b)^2}={a^2-b^2}$ | ✓ ${(a-b)^2}={a^2-2ab+b^2}$ |
| ✗ ${(x-3)^2}={x^2-6x-9}$ | ✓ ${(x-3)^2}={x^2-6x+9}$ |
| ✗ $(2x)^2=2x^2$ | ✓ $(2x)^2=4x^2$ |
| ✗ ${-(x-2)^2}={-x^2-4x+4}$ | ✓ ${-(x-2)^2}={-x^2+4x-4}$ |
| ✗ ${x^2+9}={(x-3)(x+3)}$ | ✓ ${x^2-9}={(x-3)(x+3)}$ |
| ✗ ${(a+b)^3}={a^3+b^3}$ | ✓ ${(a+b)^3}={a^3+3a^2b+3ab^2+b^3}$ |
The surest check is to replace the letters with small numbers, for example ${x=1}$, and compare both sides.
Problems Involving Polynomial Identities
Problem 1. Solve the equation ${{x^2-25}=0}$.
Solution: The left side is a difference of squares: ${{x^2-25}={(x-5)(x+5)}}$. A product is zero when at least one of its factors is zero: ${{x-5}=0}$ or ${{x+5}=0}$. The equation has two roots: ${x_1=5}$ and ${x_2=-5}$.
Problem 2. Simplify the expression ${(a-b)^2}-{2(a-b)(a+b)}+{(a+b)^2}$.
Solution: Expand each part:
${(a^2-2ab+b^2)}-{2(a^2-b^2)}+{(a^2+2ab+b^2)}={2a^2+2b^2-2a^2+2b^2}={4b^2}$
Faster: the expression has the form ${{A^2-2AB+B^2}={(A-B)^2}}$ with ${A={a-b}}$ and ${B={a+b}}$, so it equals ${((a-b)-(a+b))^2}={(-2b)^2}={4b^2}$.
Problem 3. Simplify the expression ${(x^2+2)^2}-{(x-2)(x+2)(x^2+4)}$.
Solution: Use the difference of squares twice: ${{(x-2)(x+2)}={x^2-4}}$ and ${(x^2-4)(x^2+4)}={x^4-16}$. Then
${(x^2+2)^2-(x^4-16)}={x^4+4x^2+4-x^4+16}={4x^2+20}$
Problem 4. Simplify the expression ${(x+2)^2-(x-2)^2}$.
Solution: ${(x^2+4x+4)-(x^2-4x+4)}=8x$. It is even faster with the identity ${(a+b)^2-(a-b)^2}=4ab$, where ${a=x}$ and ${b=2}$, so the result is ${{4\cdot x\cdot 2}=8x}$.
Problem 5. Solve the equation ${{(x+3)^2-(x-1)^2}=24}$.
Solution: ${(x^2+6x+9)-(x^2-2x+1)}=24$, that is ${{8x+8}=24}$, so ${x=2}$. Check: ${{5^2-1^2}=24}$.
Problem 6. Calculate ${1001^2-999^2}$.
Solution: ${1001^2-999^2}={(1001-999)(1001+999)}={2\cdot 2000}=4000$.
Problem 7. Factor ${3x^3-12x}$.
Solution: ${3x^3-12x}={3x(x^2-4)}={3x(x-2)(x+2)}$.
Problem 8. Prove that the difference of the squares of two consecutive odd numbers is divisible by 8.
Solution: Two consecutive odd numbers are ${2k-1}$ and ${2k+1}$. By the identity ${(a+b)^2-(a-b)^2}=4ab$ with ${a=2k}$ and ${b=1}$: ${(2k+1)^2-(2k-1)^2}={4\cdot 2k\cdot 1}=8k$, and $8k$ is divisible by 8. For example, ${7^2-5^2}=24={8\cdot 3}$.
Practice
Try each problem, then open it to check your answer.
1. ${(x+5)^2}$
${x^2+10x+25}$
2. ${(3a-2b)^2}$
${(3a)^2-2\cdot 3a\cdot 2b+(2b)^2}={9a^2-12ab+4b^2}$
3. ${(2y-7)(2y+7)}$
${{(2y)^2-7^2}={4y^2-49}}$
4. Calculate $49^2$ in your head
${(50-1)^2}={2500-100+1}=2401$
5. ${(a+2)^3}$
${a^3+3\cdot a^2\cdot 2+3\cdot a\cdot 2^2+2^3}={a^3+6a^2+12a+8}$
6. Factor ${16x^2-1}$
${(4x)^2-1^2}={(4x-1)(4x+1)}$
7. Factor ${x^2-14x+49}$
${x^2-2\cdot x\cdot 7+7^2}={(x-7)^2}$
8. Factor ${8m^3-125}$
${(2m)^3-5^3}={(2m-5)(4m^2+10m+25)}$
9. If ${{a-b}=3}$ and ${ab=10}$, find ${a^2+b^2}$
${a^2+b^2}={(a-b)^2+2ab}={9+20}=29$
10. Solve the equation ${{(x-4)^2}=x^2}$
${{x^2-8x+16}=x^2}$, so ${{-8x+16}=0}$ and ${x=2}$.
Related Resources:
Simplifying polynomial expressions - problems with solutions
Factoring polynomials - problems with solutions
Polynomial identities in the forum

MENU
Simplifying Algebraic Expressions