# 1 Numbers

We use numbers all the time but rarely stop to think how they work. In this section we will consider decimal, binary and hexadecimal numbers, we will look at exponential numbers to see how the exponents work under different operations and we will look at scientific and engineering notation (also known as standard form and preferred standard form).

## 1.1 Numbers and Bases

You've grown up with the decimal system. It is so widely used that most people do not realise that it is just one of an infinite number of number systems. The decimal system has ten symbols $ 0 $ to $ 9 $ (dec means ten in Latin). You can add $ 1 $ to $ 0 $ to get $ 1 $, add $ 1 $ to $ 1 $ to get $ 2 $ and so on. If you want to add $ 1 $ to $ 9 $ you have a problem because you have no more symbols left. What do you do?

A solution for this problem was found by Indian mathmaticians in about 650AD when they rediscovered a system used by the ancient Sumerians around 2500BC (more details here). They let the position of a character, as well as the actual character, be significant. So, to add $ 1 $ to $ 9 $ you set the $ 9 $ back to $ 0 $ and carry $ 1 $ into the next column. That may seem obvious to you now, four and a half centuries later, but it is so clever and it is ground breaking.

Let’s see how that works in binary. In binary you only have two symbols, $ 0 $ and $ 1 $ (bi means two in Latin). Add $ 1 $ to $ 0 $ you get $ 1 $. To add $ 1 $ to $ 1 $ you have the same problem as above. So, you set the first $ 1 $ back to $ 0 $ and carry $ 1 $ into the next column. The result looks like $ 10 $ but it has the value of $ 2 $ in decimal.

How does it work in hexadecimal (hex means six in Latin so hexadecimal means six + ten = sixteen)? In hexadecimal, or hex for short, there are sixteen symbols, $ 0 $ to $ 9 $ followed by $ A $ to $ F $. $ F $ in hex is equal to $ 15 $ in decimal. To add $ 1 $ to $ F $ you set the $ F $ back to $ 0 $ and carry $ 1 $ to the next column. The result looks like $ 10 $ but this time it has a value of $ 16 $ in decimal.

### 1.1.1 Subscripts

Subscripts are used to specify the base of a number. $ 10 $, $ 10_d $ and $ 10_{10} $ all mean $ 10 $ in decimal. If there is no subscript then you can assume the number is base $ 10 $ .

$ 10_b $ and $ 10_2 $ mean $ 10 $ in binary which is equal to $ 2 $ in decimal.

$ 10_h $ and $ 10_{16} $ mean $ 10 $ in hexadecimal which is equal to $ 16 $ in decimal.

### 1.1.2 Changing Bases

In most computers there are 8 binary digits, called bits, in a byte. Half a byte is called a nybble and a 4 bit nybble can have $ 2^4 $ values from $ 0000 $ to $ 1111 $ (in binary), $ 0 $ to $ 15 $ (in decimal) or $ 0 $ to $ F $ (in hex).

Here is a table of the values:

Decimal | Binary | Hexadecimal | Decimal | Binary | Hexadecimal |
---|---|---|---|---|---|

0 | 0000 | 0 | 8 | 1000 | 8 |

1 | 0001 | 1 | 9 | 1001 | 9 |

2 | 0010 | 2 | 10 | 1010 | A |

3 | 0011 | 3 | 11 | 1011 | B |

4 | 0100 | 4 | 12 | 1100 | C |

5 | 0101 | 5 | 13 | 1101 | D |

6 | 0110 | 6 | 14 | 1110 | E |

7 | 0111 | 7 | 15 | 1111 | F |

A two digit hexadecimal number ranges from $ 0_h $ to $ FF_h $ which is $ 0 $ to $ 1111\ 1111_b $ in binary and $ 0 $ to $ 255 $ in decimal. In the hexadecimal number the right digit represents units and the left digit represents sixteens.

Converting between binary and hexadecimal is easy, particularly if you treat the binary number in nybbles.

Example 1.1

Convert $ 1010\ 1100 $ to hex

In decimal the left digit is $ 8 + 2 = 10 $ which is $ A $ in hex.

The right digit is $ 8 + 4 = 12 $ which is $ C $ in hex.

So $ 1010\ 1100_b = AC_h $.

Converting from hex into binary is also easy.

Example 1.2

Convert $ D6 $ to binary

$ D_h = 13 $ in decimal which is $ 8 + 4 + 1 = 1101_b $.

$ 6_h = 6 $ in decimal which is $ 4 + 2 = 0110_b $.

So $ D6_h = 1101\ 0110_b $.

The easiest way to convert from decimal into binary is to find the number of sixteens and the number of units in the decimal number. The easiest way to find the number of sixteens is to half the number four times.

Example 1.3

Convert $ 197 $ to binary and hex

Ignoring the remainders $ 197 \div 2 = 98, 98 \div 2 = 49, 49 \div 2 = 24 $ and $ 24 \div 2 = 12 $.

So there are $ 12 $ sixteens in $ 197 $. $ 12 \times 16 = 192 $ so $ 197 = 12 \times 16 + 5 $. That's the hard bit.

$ 12 = 8 + 4 = 1100_b = C_h $.

$ 5 = 4 + 1 = 0101_b = 5_h $.

So $ 197 = 1100\ 0101_b = C5_h $ and not even a whiff of a calculator.

## 1.2 Exponential Numbers

If you multiply a number by itself you get an exponential number. For example $ 2 \times 2 = 2^2 $. The big $ 2 $ is called the base and the little $ 2 $ is called the exponent. If you multiply $ 2 \times 2 \times 2 $ you get $ 2^3 $. $ 2 $ is the base and $ 3 $ is the exponent.

### 1.2.1 How do Exponents Work?

Each time you multiply a number by itself you increase the exponent by 1 so $ 2 \times 2 = 2^2 $, $ 2 \times 2 \times 2 = 2^3 $ and so on.

$ 2 = 2^1 $ | $ 2 \times 2 = 2^2 $ | $ 2 \times 2 \times 2 = 2^3 $ | $ 2 \times 2 \times 2 \times 2 = 2^4 $ |

$ 2 $ | $ 4 $ | $ 8 $ | $ 16 $ |

Each time we increment the exponent we multiply by the base. What happens if we decrement the exponent?

$ 2 \times 2 \times 2 = 2^3 $ | $ 2 \times 2 = 2^2 $ | $ 2 = 2^1 $ | $ 2^0 = 1 $ |

$ 8 $ | $ 4 $ | $ 2 $ | $ 1 $ |

You can see we are dividing by the base each time we decrement the exponent so it comes as no surprise that $ 2^0 = 1 $. You can probably see that anything raised to the power of $ 0 $ is equal to $ 1 $ except for $ 0^0 $.

- $ 0^0 $ is undefined.

What happens if we keep decrementing the exponent?

$ 2^1 $ | $ 2^0 $ | $ 2^{-1} $ | $ 2^{-2} $ |

$ 2 $ | $ 1 $ | $ 1/2 $ | $ 1/4 $ |

Which means $ 2^{-2} = 1/2^2 $ or, more generally:

- $ x^{-a} = 1/x^a $

### 1.2.2 Multiplying Exponential Numbers

What is $ 3^2 \times 3^3 $ ? Well, $ 3^2 = 9 $ and $ 3^3 = 27 $. Now $ 9 \times 27 = 243 $ which is equal to $ 3^5 $ which means $ 3^2 \times 3^3 = 3^5 $. More generally we can write

- $ x^a \times x^b = x^{a+b} $

Psst - This is how logarithms and slide rules work.

### 1.2.2 Exponents of Exponents

We know that $ x^a \times x^b = x^{a+b} $. What happens in the case of $ (x^a)^b $ ?

First, let’s try this with some easy numbers. Try $ (2^3)^2 = (8)^2 = 64 = 2^6 $ .

As $ 6 = 3 \times 2 $ we can deduce

- $ (x^a)^b = x^{a \times b} $

### 1.2.3 Fractional Exponents

Think about $ 2^3 $. $ 2^3 $ is one of the square roots of $ 2^6 $. We could write $ 2^2 = \sqrt{2^6} $. Using our previous rule we could also write $ 2^3 = (2^6)^{1/2}$. So $ (2^6)^{1/2} = \sqrt{2^6} $ or more generally:

- $ x^{1/n} = \sqrt[n]{x} $

Exercise 1.2

- Write each of the following as a prime number raised to a power.
- 1. $ 2^5 \times 8^4 $
- 2. $ 3^2 \div 9^4 $
- 3. $ (4^3)^4 $
- 4. $ (7^2)^{0} $
- 5. $ 27^{1/3} $
- 6. $ 32^{1/5} $
- 7. $ -8^{1/3} $
- 8. $ (1/64)^{-1/3} $

## 1.3 Scientific and Engineering Notation

Avogadro's constant is quite a large number. It is $ 602214000000000000000000 $ and represents the number of atoms or molecules in 1 mole of substance. It is not easy to see how many million millions there are.

Plank's constant, by comparison, is quite small. It is $ 0.000000000000000000000000000000000662607 $. It is a a fundamental constant equal to the energy of a quantum of electromagnetic radiation divided by its frequency. How many million millionths are there?

### 1.3.1 Scientific Notation

Scientific notation, also known as **standard form**, was devised to help manage very large and very small numbers. In standard form we have a single digit before a decimal point, as many digits after the decimal point as we need and the number is multiplied by $ 10 $ raised to an integer power. The number is called the **mantissa** or the **significand**.

In scientific notation Avogadro's constant would be written $ 6.02214 \times 10^{23} $. Plank's constant would be written $ 6.62607 \times 10^{−34} $.

Multiplying numbers in standard form is easy. You multiply the significands and add the exponents. For division you divide the significands and subtract the exponents. For example:

- $ (3 \times 10^6) \times (2.5 \times 10^3) = 7.5 \times 10^9 $

- $ (7.4 \times 10^5) \div (3 \times 10^3) = 2.47 \times 10^2 $

### 1.3.2 Engineering Notation

Imagine you have a file that is $ 500,000 $ bytes long. You would probably not say it was $ 500,000 $ bytes long, you are more likely to say it was $ 500 $ kilobytes or maybe half a megabyte long.

Engineering notation, also known as **preferred standard form**, only uses powers that are factors of $3$.

Exercise 2.1

- Write each of the following in standard form
- 1. $ 56420 $
- 2. $ 0.0002975 $
- 3. $ 9751684 $
- 4. $ 0.005065 $
- Write each of the following in preferred standard form
- 5. $ 64.34 \times 10^4 $
- 6. $ 0.00231 \times 10^{-2} $
- 7. $ 0.009192 \times 10^5 $
- 8. $ 5546.44 \times 10^{-4} $

# 2 Algebra

Algebra is a way of generalising arithmetic by replacing numbers with letters. There are no rules about which letters to use but you will often find numbers replaced with $ a, b $ and $ c $ and variables represented by $ x, y $ and $ z $.

## 2.1 Terms

A term is a mathematical quantity that consists of a coefficient, a variable and an exponent. $ 3x^2 $ is a term. The coefficient is $ 3 $ the variable is $ x $ and the exponent is $ 2 $. $ ax^n $ is a more generalised term. The coefficient is $ a $, the variable is still x and the exponent is $ n $.

The coefficient can have any numeric or algebraic value. If the value of the coefficient is 0 then the value of the term is zero. If the value is 1 it is not normally written so $ 1x^2 $ is normally written $x^2$.

## 2.2 Collecting Like Terms

Two terms are like terms if each one has the same variable or variables and each variable is raised to the same power. $2x$ and $5x$ are like terms, $2x$ and $5xy$ are not. $4ax$ and $-3ax$ are like terms, $4ax^2$ and $-3ax$ are not.

**Example 2.2**: Collecting like terms

In the following expressions collect and simplify like terms. | ||

$2x+5x$ | $=$ | $7x$ |

$2x+5xy$ | $=$ | $2x+5xy$ |

$4ax-3ax$ | $=$ | $ax$ |

$4ax^2-3ax$ | $=$ | $4ax^2-3ax$ |

## 2.3 Expanding Brackets

Expanding brackets means multiplying each term inside the brackets by the term outside the bracket. Take $ 5(2 + 4) = 5 \times 2 + 5 \times 4 = 10+20=30 $. This can also be seen as $ 5(2 + 4) = 5 \times 6 = 30 $

In the same way the expression $ 5(x + y) $ implies $ 5 $ multiplied by $ x + y $ to produce $ 5x+5y $.

**Example 2.3**: Expanding brackets

Expand the brackets in the following expressions. | ||

$(2x-3y)$ | $=$ | $2x-3y$ |

$4(2x-3y)$ | $=$ | $8x-12y$ |

$-a(2x-3y)$ | $=$ | $-2ax+3ay$ |

You will often find brackets multiplied by other brackets like this $(x+3)(x-2)$. In cases like these every term in the second bracket is multiplied every term in the first bracket. In this example we will get 4 terms like this

$(x+3)(x-2)= x \times x + x \times (-2) + 3 \times x + 3 \times (-2)$.

Some people find the acronym **FOIL** helpful when expanding brackets. The letters stand for **F**irst, **O**utside, **I**nside and **L**ast.

Note the brackets round the $-2$. They are there because $\times$ is an operator and so is $-$. Operators act on terms not on other operators.

To complete our example we can collect like terms giving $(x+3)(x-2)= x^2 + x -6$. Notice the expression is written in decending powers of $x$. This is the correct way to write polynomials.

# 3 More Algebra

## 3.1 Introduction to Equations

An equation is a statement that asserts two quantities are equal. The left hand side is equal to the right hand side. $ x = 4 $, $ p+3 = -11 $, $ -2z = 20 $, $E=mc^2$ are examples of equations.

When solving an equation the aim is to get a single variable on the left hand side equal to an expression on the right. Addition, subtraction, multiplication and division operations can be used to solve an equation as long as they are applied equally to both sides of the equation. This is what keeps both sides equal.

**Example 3.1**: Rearranging equations

Rearrange the following equation to get $y$ equal to a function of $x$. | ||

$2x+3y-4$ | $=$ | $6x-y+2$ |

First, add $4$ to both sides | ||

$2x+3y-4+4$ | $=$ | $6x-y+y+2+4$ |

$2x+3y$ | $=$ | $6x-y+6$ |

Next, add $y$ to both sides | ||

$2x+3y+y$ | $=$ | $6x-y+y+6$ |

$2x+4y$ | $=$ | $6x+6$ |

Now, subtract $2x$ from both sides | ||

$2x-2x+4y$ | $=$ | $6x-2x+6$ |

$4y$ | $=$ | $4x+6$ |

Divide both sides by $4$ | ||

$4y/4$ | $=$ | $(4x+6)/4$ |

$y$ | $=$ | $(4x+6)/4$ |

Finally, notice all the terms on the right are even so we can simplify | ||

$y$ | $=$ | $x+3/2$ |

## 3.2 Factorisation

Factorisation is part of the process of simplification. Look at each term in the expression to see whether there are any common factors. Take $4x^2 + 6x -8$. All the coefficients are even so we can take $2$ outside a bracket so $4x^2+6x-8 = 2(2x^2+3x-4)$

# 4 Sketching Graphs

A graph shows the way an expression changes over a range of values, often the way $y$ changes for a range of $x$. If the polynomial is a straight line then we would want to know where it crosses the $x$ and $y$ axes. It doesn't take much imagination to understand what happens for values of $x$ away from the axes.

If our straight line is of the form $y = ax + b$ we would let $x = 0$ and find the value of $y$ then we would let $y = 0$ and find the value of $x$. With these two points we understand the behaviour of the line from $-\infty$ to $+\infty$.

As an example consider $y = x + 3$. When $x = 0$ and $y = 3$ and when $y = 0$ $x = -3$. Sketch the points on the axes and draw the line through the points.

Example 4.1: Sketch $y = x + 3$

For higher order curves we usually want to know:

- Where the curve crosses the axes
- The points at which the curve is a maximum or a minimum (turning points)

We can find the turning points with calculus but we can also find them by sketching the curve.

To sketch a curve select a range of $x$ values and calculate the corresponding $y$ values. As you calculate each $y$ value look at the preceding values to see whether you have crossed an axis or a turning point.

Example 4.2: Sketch $y = x^2 -2x - 1$

$x$ | |||||||

$y$ |

## 4.1 Intersecting Lines

If you were to travel along the line $y = 2x - 3$ from $-\infty$ to $+\infty$ at every point on the line it is true that $y = 2x - 3$.

In the same way if you travel along the line $y = -x + 3$ from $-\infty$ to $+\infty$ at every point it is true that $y = -x + 3$.

Where the lines cross each other, and at no other point in the universe, both $y = 2x - 3$ and $y = -x + 3$ are simultaneously true. What that means is the $x$ valuse and the $y$ values are identical at that point. We can sketch the two lines as one way of finding the point of intersection.

Example 4.3: Sketch $y = 2x - 3$ and $y = -x + 3$ and so find the point of intersection.

The techniques works for expressions of any order

# 5 Simultaneous Equations

In the previous section we saw how to use graphs to solve simultaneous equations. In this section we will look at ways to solve simultaneous equations algebraically.

## 5.1 Linear Equations

To solve a set of simultaneous equations you need to have as many equations as you have variables. For example, to find the point of intersection of two straight lines you need the equation of each of the lines. There are many ways to solve sets of equations but each method relies on creating an equation with one variable, solving that equation then back substituting to find the other variable(s). In Example 5.1 we have $y=$ one function of $x$ and $y=$ a different function of $x$. At the point of intersection $y$ is the same in both equations so we can set then equal to each other which eliminates the $y$ term.

**Sanity Check:** Once we have values for $x$ and $y$ we need to check whether our answer is correct. We do this by inserting the value for $x$ into the other equation. If the two values for $y$ are the same then you can be confident the answers are correct.

**Example 5.1**: Find the point of intersection of $y = 2x - 3$ and $y = -x + 3$

We have $y$ | $=$ | $2x-3$ | (1) | |

and $y$ | $=$ | $-x+3$ | (2) | |

so we can write $2x-3$ | $=$ | $-x+3$ | ||

Rearranging we get $2x+x$ | $=$ | $3+3$ | ||

simplifying $3x$ | $=$ | $6$ | ||

so $x$ | $=$ | $2$ | ||

Substituting $x=2$ into equation (1) we get $y=1$ | ||||

Sanity Check: | ||||

Substituting $x=2$ into equation (2) we get $y=1$ so we can be confident the point of intersection is at (2, 1) |

## 5.2 Non-linear Equations

Finding the point of intersection of two straight lines is straight forward. You set the lines equal to each other and solve for $x$ and $y$. If the lines are parallel they do not intersect otherwise you can calculate the point of intersection.

In principle finding points of intersection for higher order curves is the same as for straight lines; set the lines equal to each other then solve for $x$ and $y$. Naturally, the solution can be more involved than for the case of straight lines.

**Example 5.2**: Find the points of intersection between $y = x^2+2x - 3$ and $y = 3x-1$

We have $y$ | $=$ | $x^2+2x-3$ | (1) |

and $y$ | $=$ | $3x-1$ | (2) |

so $x^2+2x-3$ | $=$ | $3x-1$ | |

Rearranging $x^2-x-2$ | $=$ | $0$ | |

$=$ | $(x+1)(x-2)$ | ||

which means the lines intersect at $x=-1$ and $x=2$. Using equation (1) we can see that when $x=-1\ \ y=-4$ and when $x=2\ \ y=5$ so the points of intersection are at $(-1, -4)$ and $(2, 5)$ | |||

Sanity Check: | |||

Using equation (2) we can see that when $x=-1\ \ y=-4$ and when $x=2\ \ y=5$ so we can be confident that the points of intersection are at $(-1, -4)$ and $(2, 5)$ |

# 6 Partial Fractions

## 6.1 Partial Fractions

Polynomial fractions of the form $\frac{ax+b}{cx^2+dx+e} $ can often be simplified by means of partial fractions. If the denominator can be factorised then the fraction can be split into the sum of simpler fractions.

**Example 6.1**: Simplify the following expression $\frac{5x+1}{x^2+x-2} $

Start the process of simplification by factorising the denominator. | ||

$x^2+x-2$ | $=$ | $(x-1)(x+2)$ |

Next, imagine there exists $A$ and $B$ such that | ||

$\frac{5x+1}{x^2+x-2} $ | $=$ | $\frac{A}{x-1}+\frac{B}{x+2} $ |

Put the right hand side over a common denominator | ||

$\frac{5x+1}{x^2+x-2} $ | $=$ | $\frac{A(x+2)}{(x-1)(x+2)}+\frac{B(x-1)}{(x-1)(x+2)} $ |

which means $ 5x+1 $ | $=$ | $A(x+2)+B(x-1) $ |

If we let $x=1$ we can see $A=2$. If we let $x=-2$ $B=3$. | ||

so we have $\frac{5x+1}{x^2+x-2} $ | $=$ | $\frac{2}{x-1}+\frac{3}{x+2} $ |

## 6.2 Repeated Factors

If a fraction has repeated factors in the denominator we need partial fractions that account for all the possible factors. To do this we put $A$ over the factor, $B$ over the square of the factor and so on until we have all the possible factors. For example, an expression of the form $\frac{x+a}{(x+b)^2}$ would be factorised like this $\frac{A}{(x+b)}+\frac{B}{(x+b)^2}$.

$\frac{x+a}{(x+b)^2}=\frac{A}{(x+b)}+\frac{B}{(x+b)^2}$.

## 6.3 Non-linear Factors

If a fraction contains non-linear factor of the form $ax^2+bx+c$ we need a numerator that includes terms in $x$ that up to an order one less than the factor in the denominator. The partial fraction for a factor of the form $ax^2+bx+c$ would be $\frac{Ax+B}{ax^2+bx+c}$.

$\frac{x+a}{ax^2+bx+c}=\frac{Ax+B}{ax^2+bx+c}$.

## 6.4 Proper and Improper Fractions

In cases where the order of the numerator is the same as the order of the denominator extract a constant term and then find partial fractions for the remainder. For example if we have the fraction $\frac{x^2-3x+2}{x^2+2x+1}$ the numerator can be rewritten as $x^2+2x+1+(-5x+1)$ which means the fraction can be written as $\frac{x^2-3x+2}{x^2+2x+1}=1+\frac{(-5x+1)}{x^2+2x+1}$ which can be solved with the

In cases where the order of the numerator is higher than the order of the denominator we divide the numerator by the denominator which will give a function of $x$. You can then find partial freactions for the remainder.

# 7 Trigonometry

## 7.1 Sine and Cosine Rules

Figure 7.1 shows a triangle with sides a, b and c and angles subtending the sides A, B and C respectively.

Figure 7.1: Triangle with side lengths a, b and c.

For the triangle in Figure 7.1 we can write

$\frac{a}{sin A}=\frac{b}{sin B}=\frac{c}{sin C}$

These equations are called the sine rule.

For the same triangle we can also write

$a^2=b^2+c^2-2bc\ cos A$

This equation is called the cosine rule. When angle $A=\pi/2$, so we have a right angled triangle and the cosine rule simplifies to Pythagoras's theorem.

$a^2=b^2+c^2$

For right angled triangles we can write $cos \theta= \frac{x}{r}$ and $sin \theta= \frac{y}{r}$. Imagine standing at the angle $ \theta $ and look along the x-axis which is the side of the triangle. We could say we were looking in the central direction and the central direction gives us $ cos \theta = x/r$.

The line that is perpendicular to the x-axis goes sideways and sideways gives us $ sin \theta = y/r$.

Exercise 7.1: For the triangle in figure 7.1 calculate the following:

a) a = 4, b = 5 and c = 6. Find all the angles.

b) a = 5, b = 9 and c = 7. Find all the angles.

c) a = 3, b = 5 and C = 40°. Find the length of side c.

d) b = 2, c = 6 and A = 58°. Find the length of side a.

## 7.2 Cartesian and Polar Coordinates

So far we have been sketching our diagrams on x-y axes. This system is attributed to René Descartes and is called the **Cartesian coordinate system**. The system allows us to describe any point on a 2D plane.

An alternative way to describe a point on a 2D plane is by giving an angle from a fixed line and a radius. This system is calle the **polar coordinate system** and is used a lot in navigation.

To convert from cartesian coordinates to polar coordinates we have:

$r^2=x^2+y^2$

$\theta = tan^{-1}\ y/x$

To convert from polar coordinates to cartesian coordinates we have:

$x=r\ cos\ \theta$

$y=r\ sin\ \theta$

Exercise 7.2: For the triangle in figure 7.1 calculate the following:

a) a = 4, b = 5 and c = 6. Find all the angles.

b) a = 5, b = 9 and c = 7. Find all the angles.

c) a = 3, b = 5 and C = 40°. Find the length of side c.

d) b = 2, c = 6 and A = 58°. Find the length of side a.

## 7.3 Trigonometric Identities

Imagine a disc with a pen mounted near the edge. If the disc rotates about its centre the pen will draw a circle. If we now pull the paper from under the disc the pen will draw a sinusoidal curve and the type of curve will depend on the direction we pull the paper.

Pythagoras's theorem states $x^2+y^2=r^2$. If we keep $r$ constant and allow $x$ to vary from $x=r$ through $x=0$ to $x=-r$ we get

If we divide both sides by $r^2$ we get

$(\frac{x}{r})^2+(\frac{y}{r})^2=1$.

Looking at figure 7.1 we can see $cos \theta = \frac{x}{r}$ and $sin \theta = \frac{y}{r}$ so we can change our equation to:

$cos^2 \theta+sin^2 \theta=1$.

Here are some other trigonometric identities

$ \cos(\theta + \phi) = \cos \theta \cos \phi - \sin \theta \sin \phi $

$ \cos(\theta - \phi) = \cos \theta \cos \phi + \sin \theta \sin \phi $

$ \sin(\theta + \phi) = \sin \theta \cos \phi + \cos \theta \sin \phi $

$ \sin(\theta - \phi) = \sin \theta \cos \phi - \cos \theta \sin \phi $

$ \tan(\theta + \phi) = \frac{\tan \theta + \tan \phi}{1-\tan\theta \tan\phi} $

$ \tan(\theta - \phi) = \frac{\tan \theta - \tan \phi}{1+\tan\theta \tan\phi} $

If we let $\theta = \phi$ we get

$ \cos(2\theta) = \cos^2 \theta - \sin^2 \theta $

$ \sin(2\theta) = 2 \sin \theta \cos \theta $

$ \tan(2\theta) = \frac{2\tan \theta}{1-\tan^2 \theta} $

# 8 Trigonometric Functions

## 8.1 Cosine Wave

A cosine wave starts at its maximum, drops through zero to its minimum and then returns through zero to its maximum. This cycle is repeated again and again. The vertical distance from zero to the peak value is called the **amplitude**. The number of peaks per unit time is called the **frequency**. Frequency is generally given the symbol $\nu$ (called nu). The horizontal distance between two peaks is called the **wavelength**. Wavelength is usually given the symbol $\lambda$ (called lambda).

Figure 8.1: A cosine wave $y=cos \theta$

## 8.2 Sine Wave

A sine wave is similar to a cosine wave except it starts at zero, rises to its maximum, drops through zero to its minimum and then returns back to zero. This cycle, just like the cosine wave, is repeated again and again.

Figure 8.2: A sine wave $y=sin \theta$

## 8.3 Combined Wave

Imagine a cosine wave and a sine wave adding together to create a combined wave. What would the combined wave be like? To make the question a bit more general let the cosine wave have an amplitude of $a$ and the sine wave have an amplitude of $b$.

Figure 8.3: A combined wave $y=acos \theta+bsin \theta$

We know from section 7.3 that | ||

$ \cos(\theta - \phi)$ | $=$ | $\cos \theta \cos \phi + \sin \theta \sin \phi $. |

so we can write | ||

$ R\cos(\theta - \phi)$ | $=$ | $R\cos \theta \cos \phi + R\sin \theta \sin \phi $. |

For the combined wave we have | ||

$y$ | $=$ | $a\cos \theta + b\sin \theta $. |

let $a$ | $=$ | $R\cos \phi $ |

and $b$ | $=$ | $R\sin \phi $ |

then $a^2 + b^2$ | $=$ | $R^2 cos^2 \phi + R^2\sin^2 \phi $ |

$=$ | $R^2 (cos^2 \phi + sin^2 \phi) $ | |

we know | ||

$cos^2 \phi + sin^2 \phi$ | $=$ | $ 1 $ |

which means | ||

$a^2 + b^2$ | $=$ | $ R^2 $ |

so $R$ | $=$ | $\sqrt{a^2 + b^2} $. |

If we divide $b$ by $a$ we get | ||

$\frac{a}{b}$ | $=$ | $ \frac{R sin \phi}{ R cos \phi} $ |

$=$ | $ tan \phi $ | |

so $\phi$ | $=$ | $tan^{-1}(b/a)$. |

So when:

$a > 0, b>0 $ means $ 0 < \phi < \pi/2$

$a < 0, b>0 $ means $ \pi/2 < \phi < \pi$

$a < 0, b< 0 $ means $ \pi < \phi < 3\pi/2$

$a > 0, b>0 $ means $ 3\pi/2 < \phi < 2\pi$

Example 8.3: Find the amplitude and phase of the combined wave $y=3cos \theta+4sin \theta$ | ||

We know | ||

$ R\cos(\theta - \phi)$ | $=$ | $R\cos \theta \cos \phi + R\sin \theta \sin \phi $ |

and $y$ | $=$ | $3\cos \theta + 4\sin \theta $ |

so $R$ | $=$ | $\sqrt{3^2 + 4^2}$ |

$=$ | $\sqrt{25}$ | |

$=$ | $5$ | |

and $\phi$ | $=$ | $tan^{-1}(4/3)$ |

$=$ | $0.93$ radians (53.13°) | |

$y=3cos \theta+4sin \theta$ | $=$ | $5\cos(\theta-0.93)$ |

Exercise 8.3

- Transform the following expressions to the form $r\cos(\theta - \phi)$
- a. $ cos \theta - sin \theta $
- b. $ 3cos \theta + 4sin \theta $
- c. $ 5cos \theta + 12sin \theta $
- d. $ cos \theta + \sqrt{3} sin \theta $

## 8.4 Equations of the Form $a cos\theta+b sin\theta = c$

There is a set of problems that require us to solve equations of the form | ||

$a cos\theta+b sin\theta$ | $=$ | $c$ |

To solve these equations we find | ||

$Rcos(\theta-\phi)$ | $=$ | $c$ |

$cos(\theta-\phi)$ | $=$ | $c/R$ |

$\theta-\phi$ | $=$ | $cos^{-1}(c/R)$ |

$\theta$ | $=$ | $cos^{-1}(c/R)+\phi$ |

Example 8.4: Solve the following equation $3cos \theta+4sin \theta = 2$ | ||

$ R $ | $=$ | $\sqrt{3^2 + 4^2} $. |

$=$ | $5$ | |

and $tan \phi$ | $=$ | $4/3 $ |

$=$ | $0.93$ radians (53.13°) | |

$5\cos(\theta-0.93)$ | $=$ | $2$ |

$cos(\theta-0.93)$ | $=$ | $2/5$ |

$\theta-0.93$ | $=$ | $cos^{-1}2/5$ |

$\theta-0.93$ | $=$ | $1.16$ |

$\theta$ | $=$ | $1.16+0.93$ |

so $\theta$ | $=$ | $2.09$ radians (119.55°) |

Exercise 8.4

- Solve the following equations for $ \theta $ in the range $ 0 < \theta < \pi $
- a. $ cos \theta - sin \theta =-1$
- b. $ 2cos \theta - sin \theta =2 $
- c. $ 3cos \theta - 4sin \theta =-1$
- d. $ \sqrt{3}cos \theta + sin \theta=1 $

## 8.5 Combined Wave Turning Points

A combined wave is made from two or more sine and cosine waves. Once a combined wave has been calculated we would like to know the position and magnitude of the turning points, that is the points at which the combined wave is at a maximum or a minimum.

Consider $ y= a cos \theta + bsin \theta + c $. Cosines and sines vary between $+1$ and $-1$ so the maximum value is equal to $\sqrt{a^2+b^2}+c$ and the minimum value is equal to $-\sqrt{a^2+b^2}+c$.

Minimum = $-\sqrt{a^2+b^2}+c$

When the angle equals zero the cosine is at its maximum value of $1$. This means a maximum is at $\theta-\phi = 0$ so $\theta=\phi)$

The wave then drops through zero to its minimum value of $-1$ when the angle equals $\pi$. This means a minimum is at $\theta-\phi = \pi$ so $\theta=\pi+\phi$

There is an infinite number of maxima and minima but it is normal to give values in the range $0 ≤ \theta ≤ 2\pi$.

Minima are at $\theta=(2n+1)\pi+\phi$

It is normal to give values of $\theta$ in the range $0 ≤ \theta ≤ 2\pi$.

Example 8.5: Find the value and position of the first maximum and minimum of $y=3cos \theta+4sin \theta + 3$ | ||

$ R $ | $=$ | $\sqrt{3^2 + 4^2}=5 $. |

and $\phi$ | $=$ | $tan^{-1}(4/3) = 0.93$ radians |

Maximum | $=$ | $5 + 3=8$ |

Minimum | $=$ | $-5 + 3=-2$ |

Maximum $=8$ and is at | ||

$\theta-0.93$ | $=$ | $0$ |

so $\theta_{max}$ | $=$ | $0.93$ radians |

Minimum $=-2$ and is at | ||

$\theta-0.93$ | $=$ | $\pi$ |

so $\theta_{min}$ | $=$ | $\pi+0.93=4.07$ radians |

Exercise 8.5

- Find the position and magnitude of the maximum value for the following equations. Give your answer in the range $ 0 < \theta < 2\pi $
- a. $ y= 3 cos \theta + 4sin \theta + 4 $
- b. $ y= cos \theta - 2sin \theta -3 $
- c. $ y= 5cos \theta + 12 sin \theta +6$
- d. $ y= \sqrt{3}cos \theta + sin \theta +2 $

# 9 Matrices

15th century printers pioneered the use of movable type printing. Mirror images of each letter were cast in metal. These were arranged, letter by letter, in frames which printed one page at a time. A frame was called a matrix, several frames were called matrices. In mathematics, a matrix is a frame used to hold numbers or variables. Matrices were used before computers were invented but the advent of computers has made the use of matrices much more common.

A 2x2 matrix looks like this $\begin{bmatrix} 1 & 2 \\[0.3em] 4 & -3 \end{bmatrix}$

Matrices are always rectangular and can be any size. The size of an array is called its order.

Matrices are generally represented by capital letters and the individual numbers, called elements, are represented by lowercase letters. Annoyingly, the subscripts are written row then column.

$A=\begin{bmatrix} a_{11} & a_{12} \\[0.3em] a_{21} & a_{22} \end{bmatrix}$

**Figure 9.0:** Matrix $A$ with elements $a_{ij}$

## 9.1 Addition and Subtraction of Matrices

You can add and subtract matrices of the same order. To add two matrices together you need to add the corresponding terms.

If $A=\begin{bmatrix} a_{11} & a_{12} \\[0.3em] a_{21} & a_{22} \end{bmatrix}$ and $B=\begin{bmatrix} b_{11} & b_{12} \\[0.3em] b_{21} & b_{22} \end{bmatrix}$ | ||

then $A+B$ | $=$ | $\begin{bmatrix} a_{11} & a_{12} \\[0.3em] a_{21} & a_{22} \end{bmatrix}+ \begin{bmatrix} b_{11} & b_{12} \\[0.3em] b_{21} & b_{22} \end{bmatrix}$ |

$=$ | $\begin{bmatrix} a_{11}+b_{11} & a_{12}+b_{12} \\[0.3em] a_{21}+b_{11} & a_{22}+b_{22} \end{bmatrix}$ |

**Example 9.1**: Find $A+B$ given $A=\begin{bmatrix}
1 & 3 \\[0.3em]
-5 & 2
\end{bmatrix}$
and $B=\begin{bmatrix}
-2 & 4 \\[0.3em]
3 & 1
\end{bmatrix}$

$A+B$ | $=$ | $\begin{bmatrix} -1 & 7 \\[0.3em] -2 & 3 \end{bmatrix}$ |

To subtract one matrix from another you need to subtract the corresponding terms.

If $A=\begin{bmatrix} a_{11} & a_{12} \\[0.3em] a_{21} & a_{22} \end{bmatrix}$ and $B=\begin{bmatrix} b_{11} & b_{12} \\[0.3em] b_{21} & b_{22} \end{bmatrix}$ | ||

then $A-B$ | $=$ | $\begin{bmatrix} a_{11} & a_{12} \\[0.3em] a_{21} & a_{22} \end{bmatrix}- \begin{bmatrix} b_{11} & b_{12} \\[0.3em] b_{21} & b_{22} \end{bmatrix}$ |

$=$ | $\begin{bmatrix} a_{11}-b_{11} & a_{12}-b_{12} \\[0.3em] a_{21}-b_{11} & a_{22}-b_{22} \end{bmatrix}$ |

**Example 9.1a**: Find $A-B$ given $A=\begin{bmatrix}
1 & 3 \\[0.3em]
-5 & 2
\end{bmatrix}$
and $B=\begin{bmatrix}
-2 & 4 \\[0.3em]
3 & 1
\end{bmatrix}$

$A-B$ | $=$ | $\begin{bmatrix} 3 & -1 \\[0.3em] -8 & 1 \end{bmatrix}$ |

## 9.2 Multiplication of a Matrix by a Scalar

To multiply a matrix by a scalar you multiply each of the elements by the scalar.

If $A=\begin{bmatrix} a_{11} & a_{12} \\[0.3em] a_{21} & a_{22} \end{bmatrix}$ and $c$ is a scalar then $cA=\begin{bmatrix} ca_{11} & ca_{12} \\[0.3em] ca_{21} & ca_{22} \end{bmatrix}$

**Example 9.2**: Given $A=\begin{bmatrix}
1 & 3 \\[0.3em]
-5 & 2
\end{bmatrix}$
and $c=3$ find $cA$.

$cA$ | $=$ | $\begin{bmatrix} 3 & 9 \\[0.3em] -15 & 6 \end{bmatrix}$ |

## 9.3 Multiplication of a Matrix by another Matrix

You can multiply two matrices **iff** (iff means if and only if) the number of columns in the first matrix is equal to the number of rows in the second.

If $A=\begin{bmatrix} a_{11} & a_{12} \\[0.3em] a_{21} & a_{22} \end{bmatrix}$ and $B= \begin{bmatrix} b_{11} & b_{12} \\[0.3em] b_{21} & b_{22} \end{bmatrix}$ then the matrices can be multiplied together because the number of columns in $A$ is the same as the number of rows in $B$.

To multiply $A$ by $B$ we take the first column of $B$ and put it over $A$, multiply then sum the corresponding terms.

If $A=\begin{bmatrix} a_{11} & a_{12} \\[0.3em] a_{21} & a_{22} \end{bmatrix}$ and $B=\begin{bmatrix} b_{11} & b_{12} \\[0.3em] b_{21} & b_{22} \end{bmatrix}$ | ||

then $A \times B$ | $=$ | $\begin{bmatrix} a_{11} & a_{12} \\[0.3em] a_{21} & a_{22} \end{bmatrix} \times \begin{bmatrix} b_{11} & b_{12} \\[0.3em] b_{21} & b_{22} \end{bmatrix}$ |

$=$ | $\begin{bmatrix} a_{11} \times b_{11} + a_{12} \times b_{21} & a_{11} \times b_{12} + a_{12} \times b_{22} \\[0.3em] a_{21} \times b_{11} + a_{22} \times b_{21} & a_{21} \times b_{12} + a_{22} \times b_{22} \end{bmatrix}$ |

**Example 9.3**: Find $A \times B$ given $A=\begin{bmatrix}
1 & 3 \\[0.3em]
-5 & 2
\end{bmatrix}$
and $B=\begin{bmatrix}
-2 & 4 \\[0.3em]
3 & 1
\end{bmatrix}$

$A \times B$ | $=$ | $\begin{bmatrix} 1 & 3 \\[0.3em] -5 & 2 \end{bmatrix} \times \begin{bmatrix} -2 & 4 \\[0.3em] 3 & 1 \end{bmatrix}$ |

$=$ | $\begin{bmatrix} 1 \times (-2) + 3 \times 3 & 1 \times 4 + 3 \times 1 \\[0.3em] -5 \times (-2) + 2 \times 3 & -5 \times 4 + 2 \times 1 \\[0.3em] \end{bmatrix}$ | |

$=$ | $\begin{bmatrix} 7 & 7 \\[0.3em] 16 & -18 \end{bmatrix}$ |

Matrix division does not exist.

## 9.4 Determinants

The determinant of a matrix can be thought of as the magnitude of the matrix. You can only calculate determinants for square matrices. For a 2x2 matrix, $A=\begin{bmatrix} a_{11} & a_{12} \\[0.3em] a_{21} & a_{22} \end{bmatrix}$ the determinant is given by $a_{11} \times a_{22} - a_{12} \times a_{21}$.

**Example 9.4**: Find the determinant of $A=\begin{bmatrix}
1 & 3 \\[0.3em]
-5 & 2
\end{bmatrix}$.

$|A|$ | $=$ | $ 1 \times 2 - 3 \times (-5)$ |

$=$ | $17$ |

To find the determinant of a 3x3 matrix take each term in the top row one at a is found

# 10 Cramer's Method

Gabriel Cramer was a Swiss mathematician who lived in the first half of the 18th century. In 1750 he published his method for solving sets of linear equations which is in common use today.

## 10.1 Simultaneous Equations in Two Variables

If we have two simultaneous equations $a_1x+b_1y=c_1$ and $a_2x+b_2y=c_2$ we could write them in matrix form like this

$\begin{bmatrix} a_1 & b_1 \\[0.3em] a_2 & b_2 \end{bmatrix} \begin{bmatrix} x \\[0.3em] y \end{bmatrix}= \begin{bmatrix} c_1 \\[0.3em] c_2 \end{bmatrix}$

$AX=C$

The determinant of the matrix of coefficients is given by $det(A)=a_1b_2-a_2b_1$

Using Cramer's method we can write $x=\frac{\begin{bmatrix} c_1 & b_1 \\[0.3em] c_2 & b_2 \end{bmatrix}}{\begin{bmatrix} a_1 & b_1 \\[0.3em] a_2 & b_2 \end{bmatrix}}$ and $y=\frac{\begin{bmatrix} a_1 & c_1 \\[0.3em] a_2 & c_2 \end{bmatrix}}{\begin{bmatrix} a_1 & b_1 \\[0.3em] a_2 & b_2 \end{bmatrix}}$

**Example 10.1**: Solve the following simultaneous equations using Cramer's method.

$-5x+y=13$

$2x+4y=8$

The matrix form of the equation looks like this:

$\begin{bmatrix}-5 & 1 \\[0.3em]2 & 4\end{bmatrix} \begin{bmatrix}x \\[0.3em]y \end{bmatrix}= \begin{bmatrix}13 \\[0.3em]8 \end{bmatrix}$

so we can write

$x=\frac{\begin{bmatrix}13 &1 \\[0.3em]8 & 4\end{bmatrix}}{ \begin{bmatrix}-5 &1 \\[0.3em]2 & 4\end{bmatrix}}= \frac{13 \times 4 - 1 \times 8}{-5 \times 4 - 1 \times 2}= \frac{44}{-22}=-2$

$y=\frac{\begin{bmatrix}-5 &13 \\[0.3em]2 & 8\end{bmatrix}}{ \begin{bmatrix}-5 &1 \\[0.3em]2 & 4\end{bmatrix}}= \frac{-5 \times 8 - 13 \times 2}{-5 \times 4 - 1 \times 2}= \frac{-66}{-22}=3$

so $x=-2$ and $y=3$

## 10.2 Simultaneous Equations in Three Variables

We can extend Cramer's method to three dimensions by adding a third variable. If we have the following equations $a_1x+b_1y+c_1z=d_1$, $a_2x+b_2y+c_2z=d_2$ and $a_3x+b_3y+c_3z=d_2$ we could write them in matrix form like this

$\begin{bmatrix} a_1 & b_1 & c_1 \\[0.3em] a_2 & b_2 & c_2 \\[0.3em] a_3 & b_3 & c_3 \end{bmatrix} \begin{bmatrix} x \\[0.3em] y \\[0.3em] z \end{bmatrix}= \begin{bmatrix} d_1 \\[0.3em] d_2 \\[0.3em] d_3 \end{bmatrix}$

$AX=D$

The determinant of the matrix of coefficients is given by $det(A)=a_1(b_2 c_3-c_2b_3)-b_1(a_2c_3-c_2b_3)+c1(a_2b_3-b_2a_3)$

Using Cramer's method we can write

$x=\frac{\begin{bmatrix}
d_1 & b_1 & c_1 \\[0.3em]
d_2 & b_2 & c_2 \\[0.3em]
d_3 & b_3 & c_3
\end{bmatrix}}{\begin{bmatrix}
a_1 & b_1 & c_1 \\[0.3em]
a_2 & b_2 & c_2 \\[0.3em]
a_3 & b_3 & c_3
\end{bmatrix}}$, $y=\frac{\begin{bmatrix}
a_1 & d_1 & c_1 \\[0.3em]
a_2 & d_2 & c_2 \\[0.3em]
a_3 & d_3 & c_3
\end{bmatrix}}{\begin{bmatrix}
a_1 & b_1 & c_1 \\[0.3em]
a_2 & b_2 & c_2 \\[0.3em]
a_3 & b_3 & c_3
\end{bmatrix}}$ and $z=\frac{\begin{bmatrix}
a_1 & b_1 & d_1 \\[0.3em]
a_2 & b_2 & d_2 \\[0.3em]
a_3 & b_3 & d_3
\end{bmatrix}}{\begin{bmatrix}
a_1 & b_1 & c_1 \\[0.3em]
a_2 & b_2 & c_2 \\[0.3em]
a_3 & b_3 & c_3
\end{bmatrix}}$

**Example 10.2**: Solve the following simultaneous equations using Cramer's method.

$5x-4y-z=19$

$-3x+5y+5z=1$

$5x+y+3z=25$

The matrix form of the equation looks like this:

$\begin{bmatrix} 5 & -4 & -1 \\[0.3em] -3 & 5 & 5 \\[0.3em] 5 & 1 & 3\end{bmatrix} \begin{bmatrix}x \\[0.3em]y \\[0.3em]z \end{bmatrix}= \begin{bmatrix}19 \\[0.3em]1 \\[0.3em]25 \end{bmatrix}$

so we can write

$x=\frac{\begin{bmatrix}19 & -4 & -1 \\[0.3em] 1 & 5 & 5 \\[0.3em] 25 & 1 & 3\end{bmatrix}}{ \begin{bmatrix}5 & -4 & -1 \\[0.3em] -3 & 5 & 5 \\[0.3em] 5 & 1 & 3\end{bmatrix}} =\frac{-174}{-58}=-2$

$y=\frac{\begin{bmatrix}5 & 19 & -1 \\[0.3em] -3 & 1 & 5 \\[0.3em] 5 & 25 & 3\end{bmatrix}}{ \begin{bmatrix}5 & -4 & -1 \\[0.3em] -3 & 5 & 5 \\[0.3em] 5 & 1 & 3\end{bmatrix}} =\frac{116}{-58}=3$

$z=\frac{\begin{bmatrix}5 & -4 & 19 \\[0.3em] -3 & 5 & 1 \\[0.3em] 5 & 1 & 25\end{bmatrix}}{ \begin{bmatrix}5 & -4 & -1 \\[0.3em] -3 & 5 & 5 \\[0.3em] 5 & 1 & 3\end{bmatrix}} =\frac{-232}{-58}=3$

so $x=3$, $y=-2$ and $z=4$