Expressions

The goal of the field of algebra is to find an unknown number (or numbers).

It is most commonly associated with “finding \(x\)”, where \(x\) is used to represent the unknown number. We also often refer to the unknown number, e.g. \(x\), as a variable.

Key Point

A variable is any symbol, e.g. \(x\), that is used to represent an unknown number.

In order to “find \(x\)”, we need to solve algebraic equations involving \(x\).

Before introducing such equations, let us first describe various different ways in which \(x\) can appear within such equations. 

For example, we can raise \(x\) to any power \(n\) and create \(x^n\). Here are some examples

\begin{align}x&& x^3&& x^{17}\end{align}

We can then multiply this by a coefficient \(a\), creating a term \(ax^n\).

\begin{align}7x&& 4x^2&& 3x^{5}\end{align}

We can also add and subtract terms together, creating an expression.

\begin{gather}x^2+5x&& 2x^3-3x^2 && x^7+7x^3-11x\end{gather}

Finally, such expressions can also include terms composed only of a constant \(c\).

\begin{gather}2x^2-4x +3&& x^3+5x^2-10&& 6x^5+x^4-2x^3-10x^2+8\end{gather}

This is summarised in the following animation.

Cause of Confusion

There is nothing special about the letter \(x\). A variable can be represented by any letter, including \(y\).

\begin{align}2y^3+7y\end{align}

We can also have more than one variable within the same expression, each represented by a different letter.

\begin{align}x^3+5xy+2y^2+7\end{align}

As with regular numbers, we can add, subtract, multiply and divide one expression by another. Let’s look at how to do each one of these separately.

1) Adding/subtracting expressions

Let’s assume that we are given the following two expressions:

\begin{align}(x^3+3x^2) && (2x-4)\end{align}

How do we add them together?

Well, it couldn’t be simpler!

\begin{align}(x^3+3x^2)+(2x-4)=x^3+3x^2+2x-4\end{align}

Sometimes, the resulting new expression can also be simplified if any of the terms in the new expression have the same power. In that case, we simply add the two corresponding coefficients together!

Guided Example 1

Simplify the following:

\begin{align}(2x^5+3)+(6x^5-4x^3)\end{align}

As the only difference between the terms \(2x^5\) and \(6x^5\) are their coefficients, they can be directly added together, i.e. \(2x^5+6x^5=8x^5\) (two apples plus six apples equals eight apples).

\begin{align}(2x^5+3)+(6x^5-4x^3)&=2x^5+3+6x^5-4x^3\\&=8x^5+3-4x^3\\&=8x^5-4x^3+3\end{align}

Exam Tip

In the above Guided Example, the final expression was rearranged from this

\begin{align}8x^5+3-4x^3\end{align}

to an order with the term of the highest power first to the term of the lowest power last

\begin{align}8x^5-4x^3+3\end{align}

Although either answer will give you full marks in your exam, it is a good idea to get used to rearranging expressions in this manner as it makes it easier to spot specific types of expressions that we will discuss later.

We can also take the exact same approach to instead subtract an expression from another expression.

Guided Example 2

Simplify the following:

\begin{align}(2x^3-4x^2)-(x^2+5)\end{align}

In this case, the \(-4x^2\) and \(x^2\) terms again only differ in coefficients.

Therefore, we obtain

\begin{align}(2x^3-4x^2)-(x^2+5)&=2x^3-4x^2-x^2-5\\&=2x^3-5x^2-5\end{align}

2) Multiplying expressions

In order to both multiply and divide expressions, we need to first know how to both multiply and divide terms within that expression.

This is achieved using what are known as the laws of indices which many of you will have seen and used during your Junior Cycle.

Key Point

The laws of indices state the following

\begin{align}a^pa^q=a^{p+q}&& \mbox{e.g. } 2^7\times 2^4 = 2^{11}\end{align}

\begin{align}\frac{a^p}{a^q}=a^{p-q}&& \mbox{e.g. } \frac{2^7}{2^4} = 2^{3}\end{align}

\begin{align}(a^p)^q=a^{pq}&& \mbox{e.g. } (2^7)^4 = 2^{28}\end{align}

\begin{align}a^0=1&& \mbox{e.g. } 2^0 = 1\end{align}

\begin{align}a^{-p}=\frac{1}{a^p}&& \mbox{e.g. } 2^{-5}= \frac{1}{2^5}\end{align}

\begin{align}a^{\frac{1}{q}}=\sqrt[q]{a}&& \mbox{e.g. } 2^{\frac{1}{3}}= \sqrt[3]{2}\end{align}

\begin{align}a^{\frac{p}{q}}=\sqrt[q]{a^p}=(\sqrt[q]{a})^p&& \mbox{e.g. } 2^{\frac{2}{3}}= \sqrt[3]{2^2}=(\sqrt[3]{2})^2\end{align}

\begin{align}(ab)^p=a^pb^p &&\mbox{e.g. } (2 \times 6)^7=2^76^7\\ \left(\frac{a}{b}\right)^p=\frac{a^p}{b^p} && \mbox{e.g. }\left(\frac{2}{6}\right)^7  = \frac{2^7}{6^7}\end{align}

Let’s now use these laws to multiply expressions together (often referred to as expanding expressions).

Guided Example 3

Expand the following:

\begin{align}(x^3+3x^2)(2x-4)\end{align}

To do this, we need to use the first law of indices above

\begin{align}a^m \times a^n = a^{m+n}\end{align}

together with what is known as the distributive law

\begin{align}a(b+c)=ab+ac\end{align}

to obtain

\begin{align}(x^3+3x^2)(2x-4)&=x^3(2x-4)+3x^2(2x-4)\\&=2x^{3+1}-4x^3+6x^{2+1}-12x^2\\&=2x^4-4x^3+6x^3-12x^2\\&=2x^4+2x^3-12x^2\end{align}

Certain expressions that are created by multiplying two expressions together are given specific names as they have interesting features. One example is what is known as a perfect square, i.e. an expression of the form

\begin{align}(x+a)^2 && \mbox{or} && (x-a)^2\end{align}

All of the following are therefore considered perfect squares.

\begin{align}(x+5)^2 && (x+2)^2 && (x-7)^2 \end{align}

Perfect squares are expanded as follows

\begin{align}(x+a)^2 &= (x+a)(x+a)\\&=x(x+a)+a(x+a)\\&=x^2+ax+ax+a^2\\&=x^2+2ax+a^2\end{align}

or

\begin{align}(x-a)^2 &= (x-a)(x-a)\\&=x(x-a)-a(x-a)\\&=x^2-ax-ax+a^2\\&=x^2-2ax+a^2\end{align}

Guided Example 4

Expand the following:

(a) \((x+3)^2\)

(b) \((x-5)^2\)

(a) Since this is a perfect square of the form \((x+a)^2\), we know that it expands as follows:

\begin{align}(x+a)^2 =x^2+2ax+a^2\end{align}

We can therefore skip a few steps to save time and immediately write the above. In this case, \(a=3\) and therefore:

\begin{align}(x+3)^2 &=x^2+2(3)x+3^2\\&=x^2+6x+9\end{align}

(b) In this case, this is a perfect square of the form \((x-a)^2\), which instead expands as follows

\begin{align}(x-a)^2 =x^2-2ax+a^2\end{align}

Inserting that \(a=5\), we obtain

\begin{align}(x-5)^2 &=x^2-2(5)x+5^2\\&=x^2-10x+25\end{align}

As discussed, perfect squares are either of the form

\begin{align}(x+a)^2=(x+a)(x+a)\end{align}

or

\begin{align}(x-a)^2=(x-a)(x-a)\end{align}

Is there also something special about \((x+a)(x-a)\)?

Well, let’s check by expanding it!

\begin{align}(x+a)(x-a) &= x(x-a)+x(x-a)\\&=x^2-ax+ax-a^2\\&=x^2-a^2 \end{align}

Yes! We see that some terms cancel and we are left with what is referred to as the difference of two squares.

Guided Example 5

Expand the following:

\begin{align}(x+4)(x-4)\end{align}

As this is in the form \((x+a)(x-a)\), we know that it will expand into the difference of two squares as follows:

\begin{align}(x+a)(x-a) = x^2-a^2\end{align}

We can therefore skip a few steps to save time and immediately write the above. In this case, \(a=4\) and therefore:

\begin{align}(x+4)(x-4) &= x^2-4^2\\&=x^2-16\end{align}

3) Dividing expressions

If we are asked to divide one expression by another, and if each expression consists only of one term, then we can simply use the second law of indices listed above, namely

\begin{align}\frac{a^p}{a^q}=a^{p-q}\end{align}

Guided Example 6

Simplify the following:

\begin{align}4x^8 \div 2x^3\end{align}

We can use the above law of indices to simplify this directly as follows:

\begin{align}\frac{4x^8}{2x^3}&=\frac{4}{2}\times \frac{x^8}{x^3}\\&=2 \times x^{8-3}\\&=2x^5\end{align}

However, what if either expression consists of more than one term?

For example, let us assume that we are asked to divide the expression \(x^3+3x^2-3x-14\) by \(x-2\). In other words, we wish to calculate

\begin{align}(x^3+3x^2-3x-14)\div (x-2)\end{align}

which is equivalent to being asked to simplify the following fraction

\begin{align}\frac{x^3+3x^2-3x-14}{x-2}\end{align}

To do this, we need to perform what is known as algebraic long division.

To understand how this works, let us first recall how to perform normal long division with regular numbers. 

Guided Example 7

Using long division, calculate \(912\div4\).

This long division is set up as follows

\[
\require{enclose}
\begin{array}{rll}
4 \enclose{longdiv}{912}
\end{array}
\]

To start, we calculate how many times \(4\) goes into the first digit of \(912\), i.e. \(9\), which is \(2\) times. We then write this number on the top.

\[
\require{enclose}
\begin{array}{rll}
2\phantom{00}\, \\[-3pt]
4 \enclose{longdiv}{912}\kern-.2ex
\end{array}
\]

Underneath, we then determine our remainder by calculating \(4\times 2=8\) and subtracting it.

\[
\require{enclose}
\begin{array}{rll}
2\phantom{00}\, \\[-3pt]
4 \enclose{longdiv}{912}\kern-.2ex \\[-3pt]
\underline{8\phantom{00}\,} \\[-3pt]
1\phantom{00}\,
\end{array}
\]

We then bring down the next digit in \(912\), i.e. \(1\).

\[
\require{enclose}
\begin{array}{rll}
2\phantom{00}\, \\[-3pt]
4 \enclose{longdiv}{912}\kern-.2ex \\[-3pt]
\underline{8\phantom{00}\,} \\[-3pt]
11\phantom{0}\,
\end{array}
\]

These steps can be more easily remembered as follows

  • Divide: \(9\div 4=2\) with a remainder
  • Multiply: \(4 \times 2=8\)
  • Subtract: \(9-8=1\)
  • Bring down: We bring down the \(1\).

\[
\require{enclose}
\begin{array}{rll}
2\phantom{00}\, \\[-3pt]
4 \enclose{longdiv}{912}\kern-.2ex \\[-3pt]
\underline{8\phantom{00}\,} \\[-3pt]
11\phantom{0}\,
\end{array}
\]

Now, we repeat the above process but for the new number \(11\).

  • Divide: \(11 \div 4=2\) with a remainder
  • Multiply: \(4 \times 2=8\)
  • Subtract: \(11-8=3\)
  • Bring down: We bring down the \(2\).

\[
\require{enclose}
\begin{array}{rll}
22\phantom{0}\, \\[-3pt]
4 \enclose{longdiv}{912}\kern-.2ex \\[-3pt]
\underline{8\phantom{00}\,} \\[-3pt]
11\phantom{0}\, \\[-3pt]
\underline{\phantom{0}8\,\phantom{0}} \\[-3pt]
\phantom{0}32\,
\end{array}
\]

Finally, we repeat this process one last time for the number \(32\).

  • Divide: \(32 \div 4=8\)
  • Multiply: \(4 \times 8=32\)
  • Subtract: \(32-32=0\)
  • Bring down: There are no more numbers to bring down.

\[
\require{enclose}
\begin{array}{rll}
228\, \\[-3pt]
4 \enclose{longdiv}{912}\kern-.2ex \\[-3pt]
\underline{8\phantom{00}\,} \\[-3pt]
11\phantom{0}\, \\[-3pt]
\underline{\phantom{0}8\phantom{0}\,} \\[-3pt]
\phantom{0}32\, \\[-3pt]
\underline{\phantom{0}32\,}  \\[-3pt]
\phantom{00}0\,
\end{array}
\]

Done! We have just determined that \(912 \div 4=228\).

So, what about with algebra? Well, we use the exact same logic!

Guided Example 8

Using long division, calculate \((x^3+3x^2-3x-14)\div (x-2)\).

This long division is instead set up as follows

\[
\require{enclose}
\begin{array}{rll}
x-2 \enclose{longdiv}{x^3+3x^2-3x-14}
\end{array}
\]

In this case, we start by calculating how many times the first term of \(x-2\), i.e. \(x\), goes into the first term of \(x^3+3x^2-3x-14\), i.e. \(x^3\). In other words, we need to calculate

\begin{align}x^3 \div x\end{align}

According to the following law of indices

\begin{align}a^m \div a^n = a^{m-n}\end{align}

this is given by 

\begin{align}x^3 \div x&=x^{3-1}\\&=x^2\end{align}

Therefore, we write \(x^2\) on the top.

\[
\require{enclose}
\begin{array}{rll}
x^2\phantom{00000000000000}\, \\[-3pt]
x-2 \enclose{longdiv}{x^3+3x^2-3x-14}\kern-.2ex
\end{array}
\]

Underneath, we again determine our remainder by calculating

\begin{align}x^2(x-2)=x^3-2x^2\end{align}

and subtracting it

\begin{align}x^3+3x^2-(x^3-2x^2)&=x^3+3x^2-x^3+2x^2\\&=5x^2\end{align}

to now give

\[
\require{enclose}
\begin{array}{rll}
x^2\phantom{00000000000000}\, \\[-3pt]
x-2 \enclose{longdiv}{x^3+3x^2-3x-14} \\[-3pt]
\underline{x^3-2x^2\phantom{000000000}} \\[-3pt]
5x^2\phantom{000000000}
\end{array}
\]

We then bring down the next term in \(x^3+3x^2-3x-14\), i.e. \(-3x\).

\[
\require{enclose}
\begin{array}{rll}
x^2\phantom{0000000000000} \\[-3pt]
x-2 \enclose{longdiv}{x^3+3x^2-3x-14} \\[-3pt]
\underline{x^3-2x^2\phantom{0000000}\,\,} \\[-3pt]
5x^2-3x\phantom{000}\,
\end{array}
\]

These steps can again be more easily remembered as follows

  • Divide: \(x^3 \div x=x^2\)
  • Multiply: \(x^2(x-2)=x^3-2x^2\)
  • Subtract: \((x^3+3x^2)-(x^3-2x^2)=5x^2\)
  • Bring down: We bring down the \(-3x\).

\[
\require{enclose}
\begin{array}{rll}
x^2\phantom{0000000000000} \\[-3pt]
x-2 \enclose{longdiv}{x^3+3x^2-3x-14} \\[-3pt]
\underline{x^3-2x^2\phantom{0000000}\,\,} \\[-3pt]
5x^2-3x\phantom{000}\,
\end{array}
\]

We then repeat the above process but for the new expression \(5x^2-3x\).

  • Divide: \(5x^2 \div x=5x\)
  • Multiply: \(5x(x-2)=5x^2-10x\)
  • Subtract: \((5x^2-3x)-(5x^2-10x)=7x\)
  • Bring down: We bring down the \(-14\).

\[
\require{enclose}
\begin{array}{rll}
x^2+5x\phantom{00000000}\, \\[-3pt]
x-2 \enclose{longdiv}{x^3+3x^2-3x-14} \\[-3pt]
\underline{x^3-2x^2\phantom{0000000}\,\,} \\[-3pt]
5x^2-3x\phantom{000}\,\\[-3pt]\phantom{0000}\underline{5x^2-10x\phantom{00}\,}\\[-3pt]\phantom{00}7x-14
\end{array}
\]

Finally, we repeat this process one last time for the expression \(7x-14\).

  • Divide: \(7x \div x=7\)
  • Multiply: \(7(x-2)=7x-14\)
  • Subtract: \((7x-14)-(7x-14)=0\)
  • Bring down: There are no more terms to bring down.

\[
\require{enclose}
\begin{array}{rll}
x^2+5x+7\phantom{00000}\, \\[-3pt]
x-2 \enclose{longdiv}{x^3+3x^2-3x-14} \\[-3pt]
\underline{x^3-2x^2\phantom{0000000}\,\,} \\[-3pt]
5x^2-3x\phantom{000}\,\\[-3pt]\phantom{0000}\underline{5x^2-10x\phantom{00}\,}\\[-3pt]\phantom{00}7x-14\\[-3pt]\phantom{00}\underline{7x-14}\\[-3pt]0
\end{array}
\]

Finished! We have just determined that

\begin{align}(x^3+3x^2-3x-14)\div (x-2) = x^2+5x+7\end{align}