Introduction
Expanding expressions is fun but can be horribly painful. There are useful formulae we can use to speed up the process.
In this lesson, we will learn:
- How to expand expressions with quadratic identities.
- How to expand expressions with cubic identities. Cubic identities are part of the Mathematics II course, but we will introduce them here along with quadratic identities.
Identities and Proofs
Identities are a special kind of equations. The biggest difference is that, while equations can be sometimes true, identities should be always true.
For example, $ x - 2 = 0 $ is an equation. We know that there is a specific value of $x$ that satisfies the equation, that is, $x=2$. Finding the values of $x$ that make the equation true is called solving for $x$.
This is an example of an identity: $ x^1 \times x^2 = x^3 $ (this is from one of the index laws!). Regardless of the value of $x$, this identity is always true.
An identity is a mathematical argument. Like in conversation and writing, to make sure an argument is true, you need to prove it. Same in mathematics: if we want to say a mathematical argument is true, we need to mathematically prove it!
So how do we prove an identity? The most straightforward way is to manipulate the left-hand side to make it identical to the right-hand side. We have already done something similar for the index laws. Scroll down to see more examples of simple proofs.
Quadratic Identities
Here are some of the useful identities for expanding brackets. Note that the results are all quadratic polynomials. That is why they are called, well, quadratic identities.
Proofs
We will expand the left-hand sides to see if we arrive on the other side. Once we get to the other side, put a little box symbol Mathematicians often use a box symbol $\Box$ to indicate the end of a proof. Pretty cool, isn’t it! to indicate the proof is finished!
1. \begin{align*} (a+b)^2 &= (\underline{a+b})(a+b) \cr &= a(\underline{a+b}) + b(\underline{a+b}) \cr &= a^2 + ab + ab + b^2 \cr &= a^2 + 2ab + b^2. && \Box \end{align*}
Switch $b$ with $-b$ and it becomes the proof for $(a-b)^2=a^2-2ab+b^2$.
2. \begin{align*} (\underline{a+b})(a-b) &= a(\underline{a+b}) - b(\underline{a+b}) \cr &= a^2 + ab - ab - b^2 \cr &= a^2 - b^2. && \Box \end{align*}
3. \begin{align*} & (\underline{ax+b})(cx+d) \cr &= cx (\underline{ax+b}) + d (\underline{ax+b}) \cr &= ac x^2 + bc x + ad x + bd \cr &= ac x^2 + (bc+ad)x + bd. && \Box \end{align*}
When $a=c=1$, we achieve $(x+a)(x+b)=x^2+(a+b)x+ab$.
Let’s look at examples where the identities are in action.
Example. Expand:
- $(a+2)^2$
- $(3x-4y)^2$
- $(2p+q)(2p-q)$
- $(x+3)(x-5)$
- $(4x+y)(7y-3x)$
Solution.
1.
(1) Identity 1-1
\begin{align*}
& (a+2)^2 \cr
&= a^2 + 2\cdot a \cdot 2 + 2^2 \tag{1} \cr
&= \boldsymbol{a^2 + 4a + 4. }
\end{align*}
2.
(2) Identity 1-2
\begin{align*}
& (3x-4y)^2 \cr
&= (3x)^2 - 2\cdot 3x \cdot 4y + (4y)^2 \tag{2} \cr
&= \boldsymbol{ 9x^2 - 24xy + 16y^2. }
\end{align*}
3.
(3) Identity 2
\begin{align*}
& (2p+q)(2p-q) \cr
&= (2p)^2 - q^2 \tag{3} \cr
&= \boldsymbol{ 4p^2 - q^2. }
\end{align*}
4.
(4) Identity 3-1
\begin{align*}
& (x+3)(x-5) \cr
&= x^2 + (3-5)x + 3\cdot(-5) \tag{4} \cr
&= \boldsymbol{ x^2 - 2x - 15. }
\end{align*}
5.
(5) Rearrange polynomials to $(ax+b)(cx+d)$ form
(6) Identity 3-2
\begin{align*}
& (4x+y)(7y-3x) \cr
&= (4x+y)(\hl{-3x+7y}) \tag{5} \cr
&= 4\cdot(-3)x^2 +\left\{ 4\cdot 7y + y\cdot(-3)\right\} x + y\cdot 7y \tag{6} \cr
&= \boldsymbol{ -12x^2 +25xy + 7y^2. }
\end{align*}
Alternative solution for Q5
In the solution above, we solved it as a polynomial of $x$. Of course, you can focus on $y$ and use the identity.
\begin{align*} (4x+y)(7y-3x) &= (\hl{y} + 4x)(7\hl{y}-3x) \cr &= 7\hl{y^2} + { -3x + 28x }\hl{y} - 12x^2 \cr &= \boldsymbol{ 7y^2 + 25xy - 12x^2 }. \end{align*}
Try Practice Questions 1 and 2 before moving on.
Cubic Identities
This is another set of identities that involve cubic polynomials. They are in fact a part of the Mathematics II curriculum, but we will put them together with quadratic identities. They are not that much more difficult!
Proofs
We only show one of each set of identities. You can easily repeat the exercise, with $-b$ instead of $+b$, to prove the other ones. Try it!
4. (1) Identity 1 \begin{align*} & (a+b)^3 \cr &= (a+b) \cdot (a+b)^2 \cr &= (a+b) \cdot (a^2 + 2ab + b^2) \tag{1} \cr &= a^2 (a+b) + 2ab (a+b) + b^2 (a+b) \cr &= a^3 + a^2b + 2a^2b + 2ab^2 + ab^2 + b^3 \cr &= a^3 + 3a^2b + 3ab^2 + b^3. && \Box \end{align*}
5. \begin{align*} & (a+b)(a^2-ab+b^2) \cr &= a^2 (a+b) - ab(a+b) + b^2 (a+b) \cr &= a^3 + a^2b - a^2b - ab^2 + ab^2 - b^3 \cr &= a^3 - b^3. && \Box \end{align*}
This is a set of example questions. Note the shape of the expressions!
Example. Expand:
- $(a+1)^3$
- $(x+2)(x^2-2x+4)$
- $(2z-3w)(4z^2 + 6zw + 9w^2)$
- $(3y-2x)^3$
Solution.
(1) Identity 4
(2) Identity 5
(3) Identity 5
(4) Identity 4
1. \begin{align*} & (a+1)^3 \cr &= \boldsymbol{ a^3 + 3a^2 + 3a + 1. } \tag{1} \end{align*} 2. \begin{align*} & (x+2)(x^2-2x+4) \cr &=(x+2)(x^2-x\cdot 2 + 2^2 ) \cr &= x^3 - 2^3 \tag{2} \cr &= \boldsymbol{ x^3 - 8. } \end{align*} 3. \begin{align*} & (2z-3w)(4z^2 + 6zw + 9w^2) \cr &= (2z - 3w)\left\{ (2z)^2 + 2z\cdot 3w + (3w)^2\right\} \cr &= (2z)^3 - (3w)^3 \tag{3} \cr &= \boldsymbol{ 8z^3 - 27w^3 .} \end{align*} 4. \begin{align*} & (3y-2x)^3 \cr &= (3y)^3 - 3\cdot (3y)^2\cdot 2x + 3\cdot 3y \cdot (2x)^2 - (2x)^3 \tag{4} \cr &= \boldsymbol{ 27y^3 - 54y^2x + 36yx^2 - 8x^3 .} \end{align*}
Signs!
The signs in the identities can be quite confusing!

Another convenient method to remember them is to use $\pm$ (“plus-minus”) and $\mp$ (“minus-plus”) signs:
Identity 4. Perfect cubes $$ (a\pm b)^3 = a^3 \pm 3a^2b + 3ab^2 \pm b^3 $$
Identity 5. Sums and differences of cubes $$ (a \pm b)(a^2 \mp ab + b^2) = a^3 \pm b^3 $$
You can see that the plus-minus signs share the signs, so when one is positive, all the others are positive. The minus-plus signs are like the opposite: when the $\pm$s are positive, $\mp$s are all negative!

Practice Questions
- Expand the following expressions using the quadratic identities.
- $(3x+5y)^2$
- $(7f-2g)^2$
- $(2xy-3)^2$
- $(x+5y)(x-5y)$
- $(3c^2 - 2d)(3c^2 + 2d)$
Answer
- $9x^2 + 30xy + 25y^2$
- $49f^2 - 28fg + 4g^2$
- $4x^2y^2 - 12xy + 9$
- $x^2 - 25y^2$
- $9c^4 - 4d^2$
Solution. Parts (a) to (c) use the first identity.
a. \begin{align*} & (3x+5y)^2 \cr &= (3x)^2 + 2\cdot 3x\cdot 5y + (5y)^2 \cr &= \boldsymbol{ 9x^2 + 30xy + 25y^2 }. \end{align*} b. \begin{align*} & (7f-2g)^2 \cr &= (7f)^2 - 2\cdot 7f \cdot 2g + (2g)^2 \cr &= \boldsymbol{ 49f^2 - 28fg + 4g^2 }. \end{align*} c. \begin{align*} & (2xy-3)^2 \cr &= (2xy)^2 - 2\cdot 2xy \cdot 3 + 3^2 \cr &= \boldsymbol{ 4x^2y^2 - 12xy + 9 .} \end{align*}
Parts (d) and (e) use the second identity.
d. \begin{align*} & (x+5y)(x-5y) \cr &= x^2 - (5y)^2 \cr &= \boldsymbol{ x^2 - 25y^2 }. \end{align*} e. \begin{align*} & (3c^2 - 2d)(3c^2 + 2d) \cr &= (3c^2)^2 - (2d)^2 \cr &= \boldsymbol{ 9c^4 - 4d^2 }. \end{align*}
- Expand the following expressions using the quadratic identities.
- $(x-2y)(3y+x)$
- $(x^2 - 4)(x^2 + 3)$
- $(3a-2)(4a+1)$
- $(2p-3q)(4p+2q)$
Answer
- $x^2 + xy - 6y^2$
- $x^4 - x^2 - 12$
- $12a^2 - 5a - 2$
- $8p^2 - 8pq - 6q^2$
Solution. We use the third identity for all parts.
a. (1) Rearrange the terms to $(x+a)(x+b)$ form \begin{align*} & (x-2y)(3y+x) \cr &= (x-2y)(\hl{x+3y}) \tag{1} \cr &= x^2 + (-2y+3y)x -2y\cdot 3y \cr &= \boldsymbol{ x^2 + xy - 6y^2 .} \end{align*} b. \begin{align*} & (x^2 - 4)(x^2 + 3) \cr &= \left(x^2\right)^2 + (-4+3)x^2 -4\cdot 3 \cr &= \boldsymbol{ x^4 - x^2 - 12 .} \end{align*} c. \begin{align*} & (3a-2)(4a+1) \cr &= 12a^2 + (3 - 8)a - 2 \cr &= \boldsymbol{ 12a^2 - 5a - 2 .} \end{align*} d. \begin{align*} & (2p-3q)(4p+2q) \cr &= 8p^2 + (4q-12q)p -3q\cdot 2q \cr &= \boldsymbol{ 8p^2 - 8pq - 6q^2 .} \end{align*}
- Expand the following expressions.
- $(2x+1)^3$
- $(x-4y)^3$
- $(2p-q)(4p^2+2pq+q^2)$
- $(d+5)(d^2-5d+25)$
Answer
- $8x^3 + 12x^2 + 6x + 1$
- $x^3 - 12x^2y + 48xy^2 - 64y^3$
- $8p^3 - q^3$
- $d^3 + 125$
Solution. Parts (a) and (b) use the fourth identity.
a. \begin{align*} & (2x+1)^3 \cr &= (2x)^3 + 3(2x)^2 + 3(2x) + 1 \cr &= \boldsymbol{ 8x^3 + 12x^2 + 6x + 1. } \end{align*} b. \begin{align*} & (x-4y)^3 \cr &= x^3 - 3x^2\cdot 4y + 3x (4y)^2 - (4y)^3 \cr &= \boldsymbol{ x^3 - 12x^2y + 48xy^2 - 64y^3 .} \end{align*}
Parts (c) and (d) use the fifth identity.
c. \begin{align*} & (2p-q)(4p^2+2pq+q^2) \cr &= (2p - q)\left\{ (2p)^2 + 2p\cdot q + q^2\right\} \cr &= (2p)^3 - q^3 \cr &= \boldsymbol{ 8p^3 - q^3 .} \end{align*} a. \begin{align*} & (d+5)(d^2-5d+25) \cr &= (d+5)(d^2 - d\cdot 5 + 5^2 ) \cr &= d^3 + 5^3 \cr &= \boldsymbol{ d^3 + 125. } \end{align*}