0% found this document useful (0 votes)
9 views

Maths1_Lecture_Notes

The Mathematics 1 Lecture Notes cover various foundational topics in mathematics, including number systems, algebra, population statistics, sets, and propositional logic. Key concepts such as integers, rationals, real numbers, and their operations are defined, along with historical context and applications. The notes also introduce statistical measures and basic logic principles, providing a comprehensive overview for students.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Maths1_Lecture_Notes

The Mathematics 1 Lecture Notes cover various foundational topics in mathematics, including number systems, algebra, population statistics, sets, and propositional logic. Key concepts such as integers, rationals, real numbers, and their operations are defined, along with historical context and applications. The notes also introduce statistical measures and basic logic principles, providing a comprehensive overview for students.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

Mathematics 1 Lecture Notes

Kieran Hughes

September 23, 2024


Contents

1 Number Systems 5

1.1 A brief history of number systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.2 Definition of the integers, the rationals and the real numbers . . . . . . . . . . . . . . . . . . . . . . . 5

1.3 The real number line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.4 Addition and subtraction of real numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

1.5 Multiplication and division of real numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

1.6 Exponents of real numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

1.7 Properties of the real numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2 Ratios, Proportions and Percentages 10

2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.2 Ratios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.3 Percentages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.4 Weighted averages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3 Algebra 14

3.1 A very brief history of algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

3.2 Expressions and variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

3.3 Adding and subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.4 Multiplication and division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

3.5 Algebraic fractions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

2
CONTENTS 3

3.6 Factorising quadratics and the difference of 2 squares . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.7 Solving linear equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

3.8 Solving quadratic equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

3.9 Solving algebraic equations involving fractions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

3.10 Making a variable the subject of a formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

3.11 Solving linear equations simultaneously . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

3.12 Applications of algebra and problem solving . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

4 Introduction to Population Statistics 28

4.1 Measures of central tendency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

4.1.1 Mean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

4.1.2 Median . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

4.1.3 Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

4.2 Measures of spread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

4.3 Frequency tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

5 Introduction to Sets 34

5.1 The union and intersection of sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

5.2 The universal set, complement and set difference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

5.3 Subsets, the power set, cardinality and the Cartesian product . . . . . . . . . . . . . . . . . . . . . . . 36

6 Introduction to Propositional Logic 38

6.1 Propositions and the basic concepts of logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

6.1.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

6.1.2 Examples of propositions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

6.1.3 Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

6.1.4 Truth Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

6.2 Logical Equivalences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

6.3 Implications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4 CONTENTS

6.3.1 Tautology and Contradiction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42


Chapter 1

Number Systems

1.1 A brief history of number systems

Throughout history, the development of number systems has been essential for human civilisation’s progress in Math-
ematics and Science. It all began with the natural numbers, originating in ancient civilisations to represent quantities
of objects. As societies evolved, the need arose to handle debts, temperatures below zero, and other situations, leading
to the introduction of integers.

The concept of real numbers emerged to represent quantities on a continuous scale, including fractions, irrational
numbers, and decimal expansions. With the exploration of polynomial equations, mathematicians encountered roots
that couldn’t be expressed as real numbers, prompting the discovery of complex numbers. These numbers, involving
an imaginary unit i defined as the square root of −1, expanded the mathematical landscape further.

In the 19th century, Sir William Rowan Hamilton introduced quaternions, an extension of complex numbers featuring
two additional imaginary units, j and k. Despite their complexity, quaternions found applications in diverse fields
like computer graphics, robotics, and theoretical physics, particularly in describing three-dimensional rotations. The
journey through number systems reflects humanity’s ongoing quest to understand and represent the complexities of
the universe.

1.2 Definition of the integers, the rationals and the real numbers

In this chapter we will be considering the integers, the rationals and the real numbers. Complex numbers and the
quaternions will be studied in the Maths 2 module next semester.

Definition 1.2.1. The integers are the set of whole numbers that can be positive, negative, or zero. They are denoted
by the symbol Z.

a
Definition 1.2.2. The rationals are the set of numbers that can be expressed as a fraction , where a and b are
b
integers and b ̸= 0. They are denoted by the symbol Q.

Definition 1.2.3. The real numbers is the set of all points on the continuous number line. This set includes all
rational numbers and also all irrational numbers. The set of real numbers is denoted by the symbol R.

5
6 CHAPTER 1. NUMBER SYSTEMS

√ C
i= −1, 3 + 4i
√ R
3, π, ln(13)
Q
3 1
− , 0.15, −2
4 2
Z
, . . . , −2, −1, 0, 1, 2, . . . ,

Figure 1.1: Venn diagram showing the subset relationship between the integers, the rationals, the reals and the complex
numbers.

1.3 The real number line

A number line is a visual representation of the Real numbers. It helps in understanding the relative magnitude and
position of the elements of R.

6
0.15 6
√ R
-4 -3 1 -2 -1 3 03 1 3 2 ln(13) 3 π 4
−2 −
2 4 20

Figure 1.2: The real number line.

The real numbers can be ordered on a number line based on their magnitude.

Symbol Meaning in English Relative position on a number line


< Less than To the left of
≤ Less than or equal to To the left of or at
= Equal to At
≥ Greater than or equal to To the right of or at
> Greater than To the right of

Example 1.3.1. Is the following statement true or false. 3 < π.


The statement is true since 3 is to the left of π on the number line. Is the following statement true π ≥ 3.14? Why?

Definition 1.3.2. The absolute value of a Real number x, is its distance from zero (the origin) on the number line.
It is denoted by |x|.

As an example |2 − 7| = 5.
1.4. ADDITION AND SUBTRACTION OF REAL NUMBERS 7

Exercises 1.3.3. Which of the following statements are true:

9
(a) is an element of the integers. (b) −9 is not in Q as it is not a fraction.
3

2
(c) e is not on the real number line. (d) All integers are real numbers.

(e) All numbers are real numbers. (f) a + bi is not a real number for all a and b in R.

16 16
(g) 3≤ < . (h) −x ≤ x, for all x ∈ Z.
5 6

(i) There is no number which squares to give you a negative number.

1.4 Addition and subtraction of real numbers

The origin is the starting point and in the case of the real number line it is the point 0. A real number x can be
interpreted as the distance travelled from the origin to the number x on the number line. The sign giving the direction.
That is, a minus sign means ”left” and a plus signs (or no sign) means ”right”. In this context adding real numbers
is just combining the effects of moving on the number line multiple times and so the answer is just where you end at
on the number line.

Example 1.4.1. What is 5 + 2.


We start at the origin. The 5 means go right 5. The + means we combine with the 2 which is go right 2 and so we
go right a total of 7. Therefore the answer is 7 or +7.

Definition 1.4.2. The unary operator − is used to denote negation otherwise known as the additive inverse of a
number. In the context of directions on the number line it simply means change direction.

As an example −(3) simply means change direction of go right 3, in other words it means go left 3. Note that for all
Real numbers x, we have that x + −(x) = 0.

In algebra subtraction is adding the inverse of an element. So for example −5 − 9 is interpreted as −5 + −9 and is
read as follows go left 5 and go left 9. Therefore the answer is −14 (go left 14).

Note that in the context of real number arithmetic the binary operator Subtraction is superfluous, since it can be
achieved by combining the unary operator − and binary addition operator +. That is, x−y can be written as x+(−y),
for all real numbers x and y.

Exercises 1.4.3. Calculate each of the following without the use of a calculator:

2 2 1 2
(a) 6 − 9. (b) −7 + 9 − 8. (c) + . (d) − + .
3 10 3 10

1.5 Multiplication and division of real numbers

The rule for deciding the sign of a product or a quotient.

• signs are the same, use a +.

• signs are different, use a −.


8 CHAPTER 1. NUMBER SYSTEMS

2 3 2 3
The unary operator that is the inverse of multiplication is call the reciprocal. The reciprocal of
is , since ( ) = 1.
3 2 3 2
Recall when looking at subtracting we saw that x − y = x + (−y). Similarly, division is multiplication by the inverse
1
(reciprocal). That is, x ÷ y = x × , for all x, y ∈ R and y ̸= 0.
y

1
Example 1.5.1. What is 6 divided by ?
2

1 6 2
6÷ = ×
2 1 1
6×2
=
1×1
12
=
1
= 12.

Example 1.5.2. Calculate (−3 + 2)(−4 + 6) − 2.

Let us start by doing what is in the brackets first.


(−3 + 2)(−4 + 6) − 2 Left 3 and right 2 is overall left 1. Also, left 4 and right 6 is overall right 2,
(−1)(+2) − 2 signs are different use a −,
−2−2 left 2 and left 2 is overall left 4,
− 4.

Exercises 1.5.3. Evaluate each of the following expressions, without using a calulator

2 4 2 4
(a) −2 × −5 (b) −2 × −7 − 1 (c) × (d) ÷
3 7 3 7

1.6 Exponents of real numbers

Let p be a positive integer and let a be a real number. Then ap is the number you get when you multiply a by itself
p times. That is, ap = a × a × · · · × a.
| {z }
p times

Example 1.6.1. Evaluate 34 . To evaluate 34 we simply multiply 3 by itself 4 times. Therefore 34 = 3(3)(3)(3) = 81.

There are several laws of exponents listed below some of which can be use to calculate xy where x ∈ R and y ∈ Q.

ap 1
ap aq = ap+q = ap−q (ap )q = apq a−p =
aq ap
 a p ap
(ab)p = ap bp = p a1 = a a0 = 1
b b
1 √ 1 √
q p √
q
a2 = a aq = a aq = ap
1.7. PROPERTIES OF THE REAL NUMBERS 9

(53 )2 √
Example 1.6.2. Find the value for n such that −5
= ( 5)n .
5
(53 )2 √
−5
= ( 5)n
5
53(2) 1 1 √
= (5 2 )n Using (ap )q = apq and a 2 = a
5−5
56 n

−5
= 52 Using (ap )q = apq
5
n ap
56−(−5) = 5 2 Using q = ap−q
a
n
511 = 5 2

n
Therefore = 11 and so n = 22.
2
Exercises 1.6.3. Evaluate each of the following expressions, without using a calculator.

3 −2 5×5 1 23 × 8
(a) 3×3 ×3 (b) (c) (d) −
53 2−3 ((−2)2 )3

1.7 Properties of the real numbers

The real numbers together with the operations of addition and multiplication form a particularly nice algebraic
structure called a field and as such has many properties that make working with the real numbers easier. Some of
these properties are listed and defined below.

Property Meaning
Addition is commutative x + y = y + x, for all x, y ∈ R
Addition is associative (x + y) + z = x + (y + z), for all x, y, z ∈ R
Additive identity exists There exists an element 0 ∈ R such that x + 0 = x for all x ∈ R
Additive inverses exist For every x ∈ R, there exists y ∈ R such that x + y = 0
Multiplication is commutative xy = yx, for all x, y ∈ R
Multiplication is associative (x y) z = x (y z), for all x, y, z ∈ R
Multiplicative identity exists There exists an element 1 ∈ R such that x(1) = x for all x ∈ R
Multiplicative inverses exist For every nonzero x ∈ R, there exists y ∈ R such that x y = 1
Distributive property holds x (y + z) = x y + x z and (x + y) z = x z + y z, for all x, y, z ∈ R

Exercises 1.7.1. Calculate each of the following without the use of a calculator

1 1
(a) (6 − 9)2 − 3(1 − 8) + (−2). (b) ( − 2)−1 − (3 ÷ ) − 2(−4).
2 4

34 × 33 3
(c) . (d) (4) 2 − (2 − 2)(−2 + (−0)).
3−4
Chapter 2

Ratios, Proportions and Percentages

2.1 Introduction

Understanding ratios, proportions, and percentages forms the bedrock of mathematical literacy in various fields,
including computing. However, mathematical literacy is for all, everyone should be able to tell if their pay check is
correct! Ratios represent the relationship between two quantities, proportions refer to the distribution or allocation
of a quantity among different parts or shares, and percentages denote ratios expressed as fractions of 100. Mastery of
these concepts not only enables students to analyse data and solve problems but also equips them with essential tools
for interpreting and manipulating numerical information, making them indispensable skills for computing students
navigating the complexities of data analysis and algorithmic thinking.

2.2 Ratios

Definition 2.2.1. A ratio is a comparison of two or more quantities by division. It is often expressed in the form
a : b, where a and b represent numbers or quantities. Ratios can involve any number of quantities and can be written
a
in various forms, such as , a/b, or as a list.
b
Definition 2.2.2. Proportions refer to the distribution or allocation of a quantity (total) among different parts or
a b
shares. Therefore in a ratio of a : b, the proportions are and . Note that the sum of the proportions is
a+b a+b
always 1.

Example 2.2.3. The ratio of petrol to oil is typically 50 : 1 for 2 stroke engines. In a petrol oil mixture what
proportion of the mixture is oil and what proportion of the mixture is petrol.

1 50
Solution: The proportion of oil in the mixture is and the proportion of petrol in the mixture is .
51 51

Two ratios are equivalent if they result in the same proportions.

Example 2.2.4. Show that the ratios 2 : 5 and 6 : 15 are equivalent.

2 5
Solution: Using the ratio 2 : 5, the proportions are and . However, using the ratio 6 : 15, the proportions are
7 7
6 2 15 5
= and = . Therefore the ratios are equivalent.
21 7 21 7

10
2.3. PERCENTAGES 11

Multiplying (scaling) each quantity in ratio by any nonzero number results in an equivalent ratio. Therefore the
proportions can be expressed as an equivalent ratio.

Example 2.2.5. Ann, Barry and Cath share a prize of e140 in the ratio of 2 : 1 : 4 respectively. How much money
does each person receive?

Solution: We shall calculate the proportions and express them as a ratio (equivalent to 2 : 1 : 4). We will then scale
up by a factor of the amount (in this case 140). There are 2 + 1 + 4 = 7 shares in total. Thus the proportions are
2 1 4 2 1 4
: : , which is equivalent to (140) : (140) : (140) = 40 : 20 : 80. Therefore Ann receives e40, Barry receives
7 7 7 7 7 7
e20 and Cath receives e80.

1
In the previous example we essentially multiplied (scaled) the ratio first by and then by 140 which the the same as
7
multiplying by 20. We can often use this ”shortcut”. However, it is important to understand why it works.

Example 2.2.6. In a bag of marbles, the ratio of red marbles to blue marbles is 3:5. If there are 25 blue marbles,
how many red marbles are there?

Solution: Multiplying the ratio 3 : 5 by 5 gives the equivalent ratio 15 : 25. Therefore there are 15 red marbles.

Exercises 2.2.7.

(a) Divide e800 into the ratio 3 : 1 : 4. (b) Divide e1000 into the ratio 4 : 5 : 7.

1 1 1
(c) Find x such that 2 : 3 is equivalent to x : 7. (d) Divide 221 into the ratio : : .
2 3 4

2.3 Percentages

A percentage is a way of expressing a number as a fraction of 100. It is denoted by the symbol %. It represents a
portion or share of a whole, where 100% represents the entire quantity or total.

Example 2.3.1. Suppose that you have 30 out of a total of 100 marbles. Then you have 30 marbles. The proportion
30 30
of the marbles that you have is . The percentage of the marbles that you have is 30%. Note that 30% = .
100 100
1
Example 2.3.2. Suppose that there 80 marbles on a table. Ann takes 20 marbles from the table. You then take
2
of the remaining marbles. What percentage of the marbles do you have.

1
Solution: There are 60 marbles on the table after Ann takes 20. You take of these 60 marbles which means that
2
30
you have 30 out of the 80 marbles. Therefore you have × 100% = 37.5% of the marbles.
80

1
Note that at first glance it may appear that the proportion and the percentage 37.5% don’t seem to match up. This
2
is the most important learning outcome for percentages. A percentage is a proportion expressed in a particular way,
but it is a proportion nonetheless. Therefore, just like proportions, percentages depend on the total amount, i.e. what
1
is the 100% value? In the example above the total amount for the was 60, the amount of marbles remaining on the
2
table after Ann had removed 20. The total amount for the 37.5% was 80, the total amount of marbles.

When working with percentages and amounts there are essentially 4 possible questions, which are listed below. When
we know the 100% value we use multiplication and when we don’t we use division. When the percentage is an increase
we use a plus and when it is a decrease we use a minus.
12 CHAPTER 2. RATIOS, PROPORTIONS AND PERCENTAGES

1. Increase an known amount x by r%. Then the result is x(1+r%).

2. Decrease an known amount x by r%. Then the result is x(1−r%).

x
3. Increase an unknown amount by r%, where the result is x. Then the original amount is .
(1+r%)

x
4. Decrease an unknown amount by r%, where the result is x. Then the original amount is .
(1−r%)

Example 2.3.3. In a sale at pair of shoes were reduced by 15% to e120.70. What was the price of the shoes before
the sale.

Solution: We do not know the 100% value so we use division. The percentage lead to a reduction, i.e. a decrease
and so we use a minus sign. That is, we use number 4 in the list above. The price of the shoes before the sale is
120.7 120.7
= = e142.
(1 − 15%) 0.85

Definition 2.3.4. The percentage error is a measure of the accuracy of a measurement or estimate. It is calculated
as the absolute difference between the measured or estimated value and the true or accepted value, divided by the
true value, and multiplied by 100%.

Estimated (measured) Value − True Value


The formula for calculating the percentage error (PE) is given by: PE = ×
True Value
100%.

Example 2.3.5. A share price (in euros) opened at 2.70 and closed at 2.25. However, in a newspaper the closing
price was printed as 2.52. What was the percentage decrease in the share price and what was the percentage error in
the printed value.

0.45
Solution: The share price dropped by 2.70 − 2.25 = 0.45. The percentage decrease is × 100% = 16.66%.
2.70
Estimated Value − True Value 2.52 − 2.25
The percentage error, PE = × 100% = × 100% = 12%.
True Value 2.25

Exercises 2.3.6.

(a) A student got 23 marks out of 40 in a test. What percentage did they get.

(b) An exam has 55 marks. How many marks do you need to pass (40%).

(c) The cost of a car increases by 5% to e27,298.95. What was the cost before the increase.

(d) The attendance at a football game was estimated at 35,000. The actual attendance was 36,153. Calculate the
percentage error of the estimate.

(e) A share price increases by 20% in the year 2022 but decreases by 20% in 2023. Comparing the price at the
start of 2022 to the end of 2023, has the price increased, decreased or is it the same.

2.4 Weighted averages

To calculate the mean to two numbers x and y we simply add the two numbers x + y and then divide by 2 to get
x+y 1 1 1 1
= x + y. Written like this we can see that the fractions and are proportions (they sum to 1). Indeed
2 2 2 2 2
1
this is true in the general case of taking the mean of n numbers. The n fractions sum to 1.
n
2.4. WEIGHTED AVERAGES 13

The only difference in a weighted average (mean) is that any set of proportions can be used. That is, any set of values
between 0 and 1 that sum to 1 can be used. The set of proportions are called the weights. These weights are usually
given as proportions but could also be given as a ratio.
 
0 1 2 3 4
Example 2.4.1. let S = {2, 4, 2, 6, 7} and let W = , , , , . Calculate the mean of the data in the set
10 10 10 10 10
S. Also, using the set W as weights, calculate the weighted mean of the data in the set S.

2+4+2+6+7 21
Solution: The mean of the data in S is = = 4.2.
5 5

0 1 2 3 4
The weighted mean is given by (2) + (4) + (2) + (6) + (7) = 0.4 + 0.4 + 1.8 + 2.8 = 5.4.
10 10 10 10 10
Exercises 2.4.2.
 
1 1 2 3 4 1
(a) Calculate the weighted mean of {1, 5, 6, 6, 7, 8} using the set of weights , , , , , .
12 12 12 12 12 12

(b) A student gets 80% in CA which is worth 30% and 50% in the final exam which is worth 70%. Calculate the
students overall percentage for the module.

(c) A student gets 24 out of 40 marks in the CA which is worth 30%. What is the minimum percentage that the
student needs in the final exam (worth 70%) in order to pass the module overall. 40% or above is a pass.
Chapter 3

Algebra

3.1 A very brief history of algebra

Algebra, as we know it today, has roots that stretch back thousands of years. Its name is derived from the Arabic
word ”al-jabr,” meaning ”reunion of broken parts,” a term introduced by the mathematician Al-Khwarizmi in the
9th century. However, the principles of algebra were developed by ancient civilizations such as the Babylonians and
Egyptians. These early mathematicians used algebraic methods to solve practical problems in areas like trade, land
measurement, and construction, laying the foundation for the study of structures within mathematics.

One of the most significant developments in algebra came during the Islamic Golden Age, particularly with the
works of mathematicians like Al-Khwarizmi, who wrote ”Al-Kitab al-Mukhtasar fi Hisab al-Jabr wal-Muqabala” (The
Compendious Book on Calculation by Completion and Balancing). This treatise laid down the foundations of algebraic
manipulation and introduced systematic methods for solving linear and quadratic equations, thus delving into the study
of algebraic structures.

Algebra continued to evolve through the works of Persian mathematician Omar Khayyam and others, with advance-
ments in polynomial equations and geometric algebra. During the Renaissance, European mathematicians such as
François Viète and René Descartes further developed algebraic notation and techniques, paving the way for the modern
symbolic representation of mathematical relationships and the exploration of mathematical structures.

The 19th and 20th centuries witnessed profound developments in abstract algebra, with the emergence of new algebraic
structures like groups, rings, and fields, solidifying algebra’s status as the study of structures within mathematics.
These abstract structures provided frameworks for understanding and analyzing mathematical phenomena across
diverse fields, from cryptography and physics to computer science. Today, algebra remains a fundamental branch of
mathematics, essential for exploring the intricate structures that underpin mathematical theories and applications.

3.2 Expressions and variables

In algebra, expressions are mathematical phrases that can contain numbers, variables, and operations such as addition,
subtraction, multiplication, and division. Variables, represented by symbols like x, y, a, b, etc., are placeholders for
unknown quantities. Constants are numbers that have a fixed value.

An algebraic expression can consist of one or more terms. A term can be a variable, a constant, or a combination of
both, separated by arithmetic operations. For example, x + 2y − a + 3 is an algebraic expression with 4 terms. You
can think about each term having a sign (+ or −, no sign means +) and a coefficient (constant number, no coefficient

14
3.3. ADDING AND SUBTRACTION 15

means 1) and possibly a variable. Thinking about the terms this way can help understanding the rules of Algebra.
Therefore the above expression could be written as +1x + 2y − 1a + 3. Addition of real numbers is commutative and
so we can order the terms in whatever order we like. The above expression can also be written as −1a + 1x + 2y + 3.
Notice that the minus sign went with the 1a.

Evaluating expressions involves replacing the variables with specific values and then simplifying the expression using
the rules of arithmetic (including BIMDAS). As an example, let us evaluate the expression 2x2 + 5 when x = 3. We
substitute 3 for x to get 2(3)2 + 5, note that we use brackets when performing the substitution. Using BIMDAS we
square first, then multiply and finally add. Therefore the expression 2(3)2 + 5 simplifies to 2(9) + 5 and then to 18 + 5
and finally to 23.
Example 3.2.1. Evaluate the following expression, when x = −1 and y = −5.
1 − (1 − x3 + y)
− x(3 − y 2 )
2(3x2 − y)

We substitute −1 in for x and −5 in for y and then simplify the expression.



1 − 1 − (−1)3 + (−5)
− (−1) 3 − (−5)2


2
2 3(−1) − (−5)

1 − 1 − −1 + (−5) 
 − (−1) 3 − 25 performing the exponents (Indices)
2 3(1) − (−5)
1 − (1 + 1 − 5) 
 + 1 3 − 25 simplify the double signs
2 3(1) + 5)
1 − (−3)
+ 1(−22) simplify whats in the brackets if possible
2(3 + 5)
1+3
− 22 remove brackets, i.e. multiply
16
4
− 22 simplify the numerator
16
1
− 22 simplify the fraction by cancelling a common factor of 4
4
87 1
− right left 22 is overall left 21.75.
4 4

Variables in algebraic expressions can represent unknown quantities or variables in real-world problems. For this
module a variable represents any element of the real numbers.

Exercises 3.2.2. Evaluate the following expressions, when a = −2 and b = 3 and c = + 3.

7a − 2b3
(a) −(3a − b2 ) (b) (a + 2b)(c3 − 3c) (c)
1 − c2

3.3 Adding and subtraction

One method to simplify an algebraic expression is to add ”like” terms. Two terms are ”like” terms if the have the
same power of the same variables.

Recall that the unary operator − is used to denote negation otherwise known as the additive inverse of a number. In
the context of directions on the number line it simply means change direction. Therefore subtraction is just adding
the inverse (negative).

Consider the following terms 7x, −x, 7x2 , xy, 3xz, 4yx. Which of the terms are like? Both the +7x and the −1x terms
are x-terms and so are like. The only other like terms are the +1xy and the +4yx as they are both xy-terms since
multiplication of real numbers is commutative.
16 CHAPTER 3. ALGEBRA

Example 3.3.1. Simplify the expression 7x − x + 7x2 + xy + 3xz + 4yx

Combining (adding) the like terms gives 6x + 7x2 + 5xy + 3xz.

Exercises 3.3.2. Simplify each of the following expressions

(a) 3x + 4x − 19x (b) 3x − 4x − 19y (c) xyz+xzy+yxz+yzx−zxy+zyx

3.4 Multiplication and division

The operation of multiplication (or division) can be done in 3 parts, namely sign number variable. As an example
Multiply −x by 7x, That is, what is −x(7x). First include all signs and coefficients −1x(+7x).

1. Sign: The signs are different so use a minus −

2. number: 1 multiplied by 7 is 7.

3. variable: x multiplied by x is x2 . Note we are using the laws of exponents see Chapter 1.

Therefore the answer is −7x2 .

Example 3.4.1. Simplify the expression (2x − y)(3 − x + y)

(+2x − 1y)(+3 − 1x + 1y) put in all the signs and coefficients


+ 2x(+3 − 1x + 1y) − 1y(+3 − 1x + 1y) split the first bracket
2 2
+ 6x − 2x + 2xy − 3y + 1xy − 1y do sign number variable for each of the 6 terms
2 2
+ 6x − 2x + 3xy − 3y − 1y add the like terms.

Exercises 3.4.2. Simplify each of the following expressions

(a) −2(x + 3y − 7) (b) −2x(3y − y + 4 − x) (c) (x + 2x2 − 3y)(5x + y − 4y 2 )

Factorisation is writing an expression in the form of a product as opposed to a sum. For example 18 can be written
in the form of a sum 13 + 5 or in the form of a product (factorisation) 3(6) or indeed 2(9).

Example 3.4.3. Factorise 10a2 − 6ab

We factorise each term separately and then use the common factors.

10a2 − 6ab = 2 × 5 × a × a − 2 × 3 × a × b Factorise each term separately


=2×5×a×a−2×3×a×b Identify the common factors
= 2a(5a − 3b) Write the common factors then whatever is not underlined goes into a bracket.

Division can again be done in 3 parts sign number variable. Division of variables can be done by cancelling the common
factors or by using the laws of exponents.
−15a3 bc2
Example 3.4.4. Simplify the expression
5a2 c3
−15a3 bc2
   
a ×a × a × b × c × c a×b −3ab
2 3
= −3   = −3 = .
5a c ×a
a  × c × c × c c c
3.5. ALGEBRAIC FRACTIONS 17

Exercises 3.4.5. Simplify each of the following expressions

(−xy)2 4a3 c2 b −12ab


   
3x 12x z(2x)
(a) (b) (c) ÷
2y 2 3y x3 y 2 (3zy)2 −a2 dc 3dca

Remember that you can only cancel common factors.

6y
Example 3.4.6. Simplify .
x + 3y

There is nothing to be done here as there are no common factors between the numerator and the denominator. It is
already in its simplest form.

18x2 − 27x2 y
Example 3.4.7. Simplify .
(3xy)2

18x2 − 27x2 y 2
9x
 (2 − 3y) 2 − 3y
= 2 2
= .
(3xy)2 9x
 y y2

Exercises 3.4.8. Simplify each of the following expressions

12abc − 20a2 b 24xy − 30yz 5xy 2


(a) (b) (c)
28ab2 c 6y 2 − 36xy 5x + 5x2 + x5

3.5 Algebraic fractions

Recall the method of getting a common denominator for adding fractions.

2 5
Example 3.5.1. Evaluate −
15 6

The multiples of 15 are: 15, 30, 45, 60, 75, 90, . . . , The multiples of 6 are: 6, 12, 18, 24, 30, . . . , Therefore the lowest
common multiple (LCM) of 15 and 6 is 30. Multiplying the numerator and denominator of any fraction by the same
2 2×2 4 5 5×5 25
nonzero number does change the value of the fraction. Therefore = = and = = . Notice
15 2 × 15 30 6 5×6 30
that we chose the multipliers in such a way that the denominators became the LCM (30). Therefore

2 5 4 25 4 − 25 −21
− = − = = .
15 6 30 30 30 30

The same method is applied when the fractions involve variables. Note that the LCM of 6 and x is the product of 6
and x, that is, 6x. This is because we do not know if x has a factor of 2 or 3 as x is an unknown quantity. Likewise,
the LCM of x and y + 1 is x(y + 1).

2 5
Example 3.5.2. Simplify − , where x ̸= −1 and y ̸= −1.
x+1 y+1
18 CHAPTER 3. ALGEBRA

2 5

x+1 y+1
   
2 y+1 5 x+1
= − Multiply numerator and denominator by the same nonzero number
x+1 y+1 y+1 x+1
2(y + 1) 5(x + 1)
= − Multiply numerator by numerator and denominator by denominator
(x + 1)(y + 1) (x + 1)(y + 1)
2y + 2 5x + 5
= − Remove the brackets in the numerator. No need in denominator
(x + 1)(y + 1) (x + 1)(y + 1)
2y + 2 − (5x + 5)
= Express as a single fraction as we have a common denominator. Note how the − was handled
(x + 1)(y + 1)
2y + 2 − 5x − 5
= Remove the brackets in the numerator. No need in denominator
(x + 1)(y + 1)
2y − 5x − 3
= Add like terms in the numerator.
(x + 1)(y + 1)

Exercises 3.5.3. Simplify each of the following expressions

3 7 5 2 4 8 3 1
(a) + (b) − (c) − (d) +
p q x+y x x−3 x+1 (x + 1) (x + 1)2

3.6 Factorising quadratics and the difference of 2 squares

A polynomial in a variable x is a sum where each term is a constant times a nonnegative power of x. The expression
x3 + 7x2 − 2 is a polynomial in x, since −2 = −2x0 . A polynomial where the highest power of x is 2 is called quadratic.
The expression 7x2 − 2 is a quadratic polynomial in x.

There are several ways to factorise a quadratic expression. One such method is the Area (Array) method, described
below. The idea of the area method is to consider the quadratic expression as the area of a rectangle. Then factorising
the quadratic corresponds to finding the side lengths of the rectangle.

1. Draw a rectangle.
2. Divide the rectangle into 4 smaller rectangles by drawing a vertical and horizontal line.
3. Use the x2 -term as the label the top left area.
4. Use the constant term as the label the bottom right area.
5. Factorise the x2 -term and use these factors as the corresponding parts of the side lengths.
6. Factorise the constant term and use these factors as the corresponding parts of the side lengths in such a way
that the 2 remaining areas sum to the x-term.
7. The side lengths represent the factors of the quadratic expression.
Example 3.6.1. Factorise 2x2 + 7x − 15.

x x +5

2x2 2x 2x2 2x 2x2 +10x

−15 −15 −3 −3x −15


3.7. SOLVING LINEAR EQUATIONS 19

Note that the bottom left area −3x added to the top right area +10x gives a total area of +7x which is the x-term
in the quadratic expression. Therefore 2x2 + 7x − 15 = (2x − 3)(x + 5).

Another method that can be used to factorise a quadratic expression is the −b-formula which √ is given presently. The
−b ± b2 − 4ac
solution(s) of the quadratic equation ax2 + bx + c, where a ̸= 0 is (are) given by x = . We shall now
2a
use this formula to give an alternative method to the previous example question.

Example 3.6.2. Factorise 2x2 + 7x − 15.

First note that the question does not contain an equation as there is no equal sign. However, We shall use the −b-
formula to solve the related quadratic equation, namely 2x2 + 7x − 15 = 0. We label as follows: a = 2, b = 7 and
c = −15. Using the formula we get
√ p √ √
−b ± b2 − 4ac −(7) ± (7)2 − 4(2)(−15) −7 ± 49 + 120 −7 ± 169 −7 ± 13
x= = = = =
2a 2(2) 4 4 4

−20 6 3 3
Therefore x = = −5 or x = = . This implies that x = −5 and x = are the roots of the quadratic equation
4 4 2 2
3
2x2 + 7x − 15 = 0. Therefore (x + 5) and (x − ) are factors of the quadratic expression 2x2 + 7x − 15. However
2
we may have an additional factor that we need to include (in this case 2). Notice that if we remove the brackets in
3
(x + 5)(x − ) the coefficient of x2 is 1. However, in the quadratic expression in the question the coefficient of x2 is 2.
2
3
So we need to include a factor of 2. Therefore the factorisation of 2x2 + 7x − 15 is 2(x + 5)(x − ) = (x + 5)(2x − 3),
2
the same answer as we got using the area method.

The formula for factorising the difference of 2 squares is as follows:

a2 − b2 = (a − b)(a + b)

Exercises 3.6.3. Factorise each of the following expressions

(a) x2 − x + 12 (b) x2 − 6x + 8 (c) 6x2 − 11x − 10

(d) 1 − x2 (e) x2 − 3x (f) 4x2 − 13x + 3

3.7 Solving linear equations

A linear equation in a single variable x is an algebraic expression that contains an equal sign such that the highest
power of x is 1.

There are certain operations that you can perform on equations such that the resulting equation is equivalent that is,
it has the same solution set. Some of these operations are listed below.

• Add any number to both sides of the equation.

• multiply both sides of the equation by any nonzero number.

• Raise both sides of the equation to the same positive exponent.

The following procedure can be use to solve linear equations in 1 variable.


20 CHAPTER 3. ALGEBRA

1. Remove the brackets


2. Add like terms if possible
3. Remove all x-terms from 1 side of the equation by subtracting from both sides
4. Remove all constant terms from the other side of the equation by subtracting from both sides
5. Divide both sides by the coefficient of x.

Example 3.7.1. Solve the equation 3(x − 5) = 7(2 − 3x), for x.

3(x − 5) = 7(2 − 3x)


3x − 15 = 14 − 21x Remove the brackets
24x − 15 = 14 Add 21x to both sides
24x = 29 Add 15 to both sides
29
x= Divide both sides by 24.
24

29
Therefore, the solution to the equation is x = .
24
Exercises 3.7.2. Solve each of the following linear equations for x:

(a) x−3=4 (b) 3x = −5 (c) 3(x − 1) = 9

(d) 5(x + 1) = 3(x + 3) (e) 2(3x − 1) = 4(5 − x) (f) −2(3x−1)−1 = −(5−x+3+2x)

3.8 Solving quadratic equations

You can solve a quadratic equation by either the using factorisation or the −b-formula.
Example 3.8.1. Solve 2x2 + 3x = 4, for x.

First we write the equation so that it is in the form of ax2 + bx + c = 0 and so we have 2x2 + 3x − 4 = 0. Therefore
a = 2, b = 3 and c = −4. Using the formula we get
√ p √ √
−b ± b2 − 4ac −(3) ± (3)2 − 4(2)(−4) −3 ± 9 + 32 −3 ± 41
x= = = = .
2a 2(2) 4 4
√ √
−3 − 41 −3 + 41
Therefore x = ≈ −2.35 or x = ≈ 0.85.
4 4
Exercises 3.8.2. Solve each of the following quadratic equations for x:

(a) x2 − x − 20 = 0 (b) 3x2 − 5x + 1 = 0 (c) 3x2 − 5x = 1

3.9 Solving algebraic equations involving fractions

As mentioned previously in this chapter you can multiply both sides of the equation by any nonzero number and the
resulting equation has the same solution set. This fact allows us to simplify and solve algebraic equations involving
fractions.
3.10. MAKING A VARIABLE THE SUBJECT OF A FORMULA 21

3 4
Example 3.9.1. Solve − = 1, for x such that x ̸= 2 and x ̸= −1.
x−2 x+1

3 4
− =1
x−2 x+1
3 −
(x 2)(x + 1) 4(x − 2)(x
+ 1)
− = 1(x − 2)(x + 1) Multiply both sides by (x − 2)(x + 1)
x−
 2
 x+
 1

3x + 3 − 4x + 8 = x2 + x − 2x − 2 Removing the brackets
2
−x + 11 = x − x − 2 Adding like terms
2
11 = x − 2 Adding x to both sides
2
13 = x Adding 2 to both sides
√ √
13 = x Taking of both sides

√ √
Therefore the 2 solutions to the equation are x = + 13 and x = − 13.

Exercises 3.9.2. Solve each of the following equations for x:

6x + 3 7 3x −18 4 2
(a) = + (b) x+9= (c) + =2
4 x 2 x x−3 x+5

3.10 Making a variable the subject of a formula

p
In the formula q = r + 7s3 , q is the subject of the formula, since it appears on its own on one side of the equals
sign. This means that given values for r and s it would be relatively easy to calculate the corresponding value for q.
However, given values for q and r, it is not so easy to get the corresponding value for s. It is possible to rearrange the
formula so that s is the subject. However, in order to see how this is done first think about how you would calculate
the right hand side of the formula given a value of s. Lets list the operations in order. First we would cube s then ×7

then +r then . In order to make s the subject of the formula we simply need to do the opposite operations in the

reverse order. That is, first we would square then −r then ÷7 then 3 . The example below illustrates this method.
p
Example 3.10.1. Make s the subject of the formula q = r + 7s3 .
p
q= r + 7s3
q = r + 7s3
2
Square both sides
2 3
q − r = 7s Add −r to both sides
q2 − r
= s3 Divide both sides by 7
r 7
2
3 q − r
=s Take a cubed root on both sides
7

r
3 q2 − r
Therefore s = .
7
Exercises 3.10.2. make the underlined variable the subject of each formula

1 1 1 2 3
(a) E = mc2 (b) v 2 = u2 + 2as (c) = + (d) V = πr
f u v 3
22 CHAPTER 3. ALGEBRA

3.11 Solving linear equations simultaneously

Solving two non parallel linear equations simultaneously involves find the unique point where two straight lines
intersect on a coordinate plane. When we have two linear equations with two variables, each equation represents a
line. Solving the equations simultaneously means finding the values of the variables that satisfy both equations at
the same time, pinpointing the precise location where the two lines intersect. This intersection point serves as the
solution to the system of equations, providing values for both variables that make both equations true simultaneously.
We can employ various methods like substitution or elimination to determine these values systematically, enabling us
to solve problems across disciplines from economics to engineering and computing where multiple relationships must
be satisfied simultaneously. Let us now define what is meant by a linear equation.
Definition 3.11.1. A linear equation in the variables x and y is an equation that can be written in the form:
4x − y = 7
ax + by = c

where a, b, and c are constants (known elements of the reals), and x and y are variables raised to the power of 1.

The equation 3x + 2y = 8 satisfies the constraints of definition 3.11.1 and so the equation is linear and as such can
be represented graphically by a straight line as can be seen in Figure 3.1. There are solutions to this equation. As an
example, x = 0 and y = 4 is a solution since 3(0) + 2(4) = 8. Therefore the point (0, 4) is on the line 3x + 2y = 8, so
too is the point (2, 1), see Figure 3.1. Every solution to the equation is a point of the line and every point on the line
is a solution to the equation. We can see from the graph of 3x + 2y = 8 shown in Figure 3.1 that there are infinitely
many points on the line and so there are infinitely many solutions to the equation 3x + 2y = 8.

Likewise, the equation 4x − y = 7 also represents a line and so has infinitely many solutions. The lines 4x − y = 7 and
3x + 2y = 8 are not parallel, since they have different slopes. Therefore there is a unique solution to 4x − y = 7 that
is also a solution to 3x + 2y = 8. Graphically, this unique solution is the point of intersection, that is, the only point
that is on both lines. In the case of the lines 4x − y = 7 and 3x + 2y = 8, the point of intersection is (2, 1) as can be
seen from Figure 3.1.

5 y
3x + 2y = 8
4x − y = 7
4

(2, 1)
1

x
−2 −1 1 2 3 4 5

−1

−2

Figure 3.1: A graphical representation of the linear equations 3x + 2y = 8 and 4x − y = 7, together with their point
3x + 2y = 8
of intersection (2, 1).

As previously mentioned there are several methods for solving linear equations simultaneously. However, we shall
concentrate on just one of them. The method is outlined below
3.11. SOLVING LINEAR EQUATIONS SIMULTANEOUSLY 23

The method for solving linear equations simultaneously.

1. Decide which variable to cancel. I will call this var1, the other variable is var2.
2. Calculate the LCM of the coefficients of var1.
3. For each equation, multiply the equation by the number required to ensure that the resulting coefficient of var1
is the LCM.
4. If the signs of the coefficients of var1 are the same in both equations multiply one of the equations by −1.
5. Add both equations to form a new equation with var2 being the only variable.
6. Solve this newly formed equation for var2, you now have the value of var2.
7. Substitute this value in for var2 in either of the original equations and solve for var1.

Example 3.11.2. Solve 3x + 2y = 8 and 4x − y = 7 simultaneously for x and y.

We shall follow the method outlined above.

1. Decide which variable to cancel. I am going to cancel y and so var1 is y and var2 is x.
2. The coefficients of var1 (y) (ignoring signs) are 2 and 1 and so the LCM is 2.
3. For each equation, multiply the equation by the number required to ensure that the resulting coefficient of var1
(y) is the LCM. The equation 3x + 2y = 8 already has a y-coefficient of 2 so there is nothing to be done with
this equation. The equation 4x − y = 7 has a y-coefficient of 1 and so we shall multiple this equation by 2 to
get 8x − 2y = 14.
4. If the signs of the coefficients of var1 (y) are the same in both equations multiply one of the equations by −1.
The y-coefficients are now +2 and −2 and so the signs are different and so there is nothing to be done.
5. Add both equations to form a new equation with var2 (x) being the only variable.

3x + 2y = 8,
8x − 2y = 14

11x + 0y = 22

6. Solve this newly formed equation for var2 (x). 11x = 22 implies x = 2.
7. Substitute this value in for var2 (x) in either of the original equations and solve for var1 (y). Substituting 2 in
for x in the equation 3x + 2y = 8 gives 3(2) + 2y = 8. Thus 6 + 2y = 8 which implies 2y = 2 and so y = 1.
Therefore the solution is x = 2 and y = 1.
Example 3.11.3. Solve 2x + 5y = 13 and 14x + 3y = −5 simultaneously for x and y.

2x + 5y = 13, (Choosing to cancel x and so LCM is 14)


14x + 3y = −5,

14x + 35y = 91, (Multiply the equation by 7)


−14x − 3y = +5, (Multiply the equation by -1)

0x + 32y = 96, (Adding the equations)


96
y= = 3, (Solving for y)
32
24 CHAPTER 3. ALGEBRA

Substituting 3 in for y in the equation 2x + 5y = 13 gives 2x + 5(3) = 13. Thus 2x + 15 = 13 which implies 2x = −2
and so x = −1.

Therefore the solution is x = −1 and y = 3.

Exercises 3.11.4. Solve each of these pairs of linear equations simultaneously for x and y.

(a) (b)

x − 3y = −11, 3x + 5y = 13,
4x + 3y = 1 −x + 2y = 3

(c) (d)

8x − 5y = 20, −27x − 19y = 130,


5x + 3y = 16 −5x + y = 6

3.12 Applications of algebra and problem solving

There are many opportunities to apply our knowledge of algebra to solving problems that occur in everyday life.
Usually the first step is to reformulate the problem using the language of algebra which can involve choosing variables
to represent unknown quantities. We now have a related mathematical problem. The next step is to solve this
mathematical problem. Then finally, after solving the mathematical problem we need to translate and interpret the
answers back into the original problem. Below we give some examples of using this technique.

Example 3.12.1. Suppose you plan to purchase 2 computers, 4 monitors and 3 projectors and are comparing the
cost associated with purchasing these items from multiple suppliers. Let Pc , Pm and Pp be the price of the computers,
monitors and the projectors in euros respectively. Each supplier charges for delivery as a percentage r of the cost of
the items.

(a) Write a formula for C, the total cost of the order in euros.

The cost C is given by the formula C = (2Pc + 4Pm + 3Pp )(1 + r).
3.12. APPLICATIONS OF ALGEBRA AND PROBLEM SOLVING 25

(b) The prices in euros and delivery rate for 3 suppliers are given in the table below. What is the cost of purchasing
the items from each supplier?

Supplier Pc Pm Pp r
CompuTech 235 198 371 0.05
CompsRUs 249 178 353 0.06
TechWeDo 253 185 345 0.08

We now substitute the values from the table into the formula from part (a) to get the cost of purchasing the
items from each supplier.

CompuTech C = (2Pc + 4Pm + 3Pp )(1 + r) = (2(235) + 4(198) + 3(371))(1 + 0.05) = 2493.75
CompsRUs C = (2Pc + 4Pm + 3Pp )(1 + r) = (2(249) + 4(178) + 3(353))(1 + 0.06) = 2405.14
CompsRUs C = (2Pc + 4Pm + 3Pp )(1 + r) = (2(253) + 4(185) + 3(345))(1 + 0.07) = 2463.48

Example 3.12.2. A movie has a size of 2.8 GB (gigabytes). If your internet has a mean speed of 100 Mbps (megabits
per second). How long in will it take to download the movie to the nearest second?

First we shall find convert 1 GB to bits. 1 GB = 1 × 1024 × 8 Mb = 8192 Mb. Therefore the size of the movie is
2.8 × 8192 = 22937.6 Mb. The download time in seconds will be the size in Mb divided by the speed in Mbps. Thus
22937.6
the download time in seconds is given by = 229.376 seconds, which is 229 to the nearest second.
100
Exercises 3.12.3. A programmer has a choice of using 2 different computer functions, namely f1 and f2 (I know
these are terrible names to give computer functions) into a program and wants to use the quickest. Each function has
an array as its only input. let n be the length of this array. Let t1 and t2 be the execution time in seconds (s) for f1
38n 1 n2
and f2 respectively. It is known that t1 = + and t2 = + 1.
100 2 500

(a) How long will f1 take to execute an array of size 25

(b) What is the largest array that can be inputted into f2 to ensure that it will finish in under a minute.

(c) Given an array of size 190, which function is quickest.

(d) The programmer estimates that the mean size of the input arrays will be between 150 and 300. Which function
should he use. Justify your answer.
Example 3.12.4. In a video game, a projectile is launched from the ground at an angle θ with the horizontal direction.
The height h in meters of the projectile above the ground after t seconds is given by

h = 50t − 5t2 .

At what time is the missile be 100n m above the ground, for n = 0, 1, 2, 3, . . . ,?

Rearranging the formula we get the quadratic equation 5t2 − 50t + h = 0. We are asked to find the time at which the
projectile is at 100n meters above the ground. This means that we need to solve the quadratic equation 5t2 − 50t +
100n = 0 for t. We will use the −b-formula to solve for t. However, we can first divide the equation by 5 to simplify
to get t2 − 10t + 20n = 0 Let a = 1, b = −10 and c = 20n.

p p √
−b ± b2 − 4(a)(c) −(−10) ± (−10)2 − 4(1)(20n) 10 ± 100 − 80n √
t= = = = 5 ± 25 − 20n
2(a) 2(1) 2
26 CHAPTER 3. ALGEBRA
p
Letting n = 0 implies that t = 5 ± 25 − 20(0) = 5 ± 5, and so t = 0s or t = 10s,
p
Letting n = 1 implies that t = 5 ± 25 − 20(1), and so t = 2.764s or t = 7.236s,
p √
Letting n = 2 implies that t = 5 ± 25 − 20(2) = 5 ± −15. There is no real valued solution to this.

How do we relate the case n = 2 back to the original problem. Getting a negative under the square root sign in this
case simply means that the projectile never reaches this height. Therefore at t = 0 (launch) and t = 10s (landing),
the projectile was on the ground. At t = 2.764s the projectile was at 100m and rising at t = 7.236s the projectile was
at 100m and descending. The projectile never reaches a height of 200m (or 300m or 400m, . . . ).

Exercises 3.12.5. A cannonball is fired from a height of 2m above the ground on a cliff 50m above sea level. The
height h in meters of the cannonball above the ground after t seconds is given by

h = 2(20t − 2.5t2 + 1).

(a) At what time(s) is the cannonball 40m above the ground?

(b) What is the maximum height reached by the cannonball.

(c) After how long will the cannonball reach sea level (assuming it does).

Example 3.12.6. A computer program needs to allocate resources (processing time and memory) between two
different types of processes to ensure a smooth user experience. Process A requires 2 seconds of processing time and
40 megabytes (MBs) of memory, while Process B requires 7 seconds of processing time and 30 MBs of memory.

The objective is to allocate resources optimally while considering the following constraints and conditions:

1. Objective: The goal is to allocate resources in a way that minimises user wait time and maximises system
responsiveness, thus ensuring a smooth user experience.

2. Constraints:

• The total available processing time is limited to 15 minutes, which includes 5 seconds required for a separate
program.

• The total available memory is limited to 8550 megabytes (MBs).

3. Relationship between Resource Allocation and User Experience:

• Each process requires a certain amount of processing time and memory to execute.

• The user experience is affected by the combined processing time and memory usage of all processes running
concurrently.

Question: How many instances of each process should be allocated resources to meet the objectives while satisfying
the constraints?

Let x be the number of instances of process A and let y be the number of instances of process B. This allows use to
translate the problem into a pair of simultaneous linear equations. The available time is 14 minutes and 55 seconds
3.12. APPLICATIONS OF ALGEBRA AND PROBLEM SOLVING 27

which is 895 seconds.

2x + 7y = 895, (Choosing to cancel x and so LCM is 40)


40x + 30y = 8550,

40x + 140y = 17900, (Multiply the equation by 20)


−40x − 30y = −8550, (Multiply the equation by -1)

0x + 110y = 9350, (Adding the equations)


9350
y= = 85, (Solving for y)
110

Substituting 85 in for y in the equation 2x + 7y = 895 gives 2x + 7(85) = 895. Thus 2x + 595 = 895 which implies
2x = 300 and so x = 150.

Therefore the solution is to allocate resources to 150 instances of process A and 85 instances of process B.
Exercises 3.12.7.

(a) Paula has 31 coins each of which is either a 20 or a 50 cent coin. In total the coins are worth e10.10. Find
the number of each coin Paula has.

(b) Paul is leaving on holidays and wants to use up the eggs and milk that he has in his kitchen by making waffles
5
and pancakes for himself and his friends. That is just the kind of guy he is! The recipes he has requires of
16
1 1 1
a cup of milk and an egg per waffle and of a cup of milk and of an egg per pancake. How many waffles
2 8 6
and pancakes should he make to use up the 1.172 litres of milk and the 7 eggs that he has. Note a cup of milk
is 250ml.

(c) A university bought a number of computers at a cost of e9975. if the computers had of been e22.50 cheaper
they would have gotten 3 more for the same price. What was this reduced price for 1 computer?
Chapter 4

Introduction to Population Statistics

Statistics is a branch of mathematics that deals with the collection, analysis, interpretation, and presentation of
numerical data. Its primary aim is to make sense of large amounts of information by identifying patterns, trends, and
relationships within the data. Statistics provides methods for summarising data, making predictions, and drawing
conclusions from empirical observations. It enables researchers, scientists, businesses, and policymakers to make
informed decisions based on evidence rather than intuition or anecdotal evidence.

In practical terms, statistics is used in a wide range of fields and industries. In computing, statistics plays a vital role
in data analysis, machine learning, and algorithm development. It helps in extracting valuable insights from large
datasets, identifying patterns, and making predictions.

4.1 Measures of central tendency

A measure of central tendency is a statistical summary that represents the typical or central value of a dataset. It
provides insight into the typical value around which the data points tend to cluster. If you can only use 1 value to
describe a full data set then the centre point is a good option. There are different measure of central tendency each
having some pros and cons. The three primary measures of central tendency are the mean, median, and mode.

4.1.1 Mean

Definition 4.1.1. Given a set of numbers. The mean value is the sum all the numbers in the set divided by the size
of the set (number of numbers). It is often denoted by the Greek letter µ or by x̄.

• The pros of using the mean are:

1. Sensitive to all Data Points: The mean takes into account every value in the dataset, giving each
observation equal weight. This can provide a comprehensive representation of the central tendency when
the data is normally distributed or symmetrically distributed.
2. Mathematically Convenient: The mean is straightforward to calculate and is often used in statistical
formulas and analyses. It is the arithmetic average, making it intuitive and easy to understand.
3. Reflects Total Data: In many cases, the mean reflects the collective influence of all observations, making
it suitable for summarising the entire dataset.

• The cons are:

28
4.1. MEASURES OF CENTRAL TENDENCY 29

1. Sensitive to Outliers: The mean is highly influenced by extreme values or outliers in the dataset. Even a
single outlier can significantly skew the mean, leading to a misleading representation of the central tendency.
2. Affected by Skewed Distributions: In datasets with skewed distributions, where the data is not sym-
metrically distributed, the mean may not accurately represent the typical value. It can be pulled towards
the tail of the distribution, resulting in a measure that is not representative of the majority of the data.
3. Not Robust: The mean is not a robust measure, meaning it is not resistant to extreme values. If the
dataset contains outliers or data points with large deviations from the rest of the values, the mean may not
accurately reflect the central tendency.
4. Limited Applicability: The mean may not be suitable for datasets with non-numeric values or ordinal
data. Additionally, it may not provide meaningful insights in situations where the data is not quantifiable
or does not have a meaningful numerical interpretation.

Example 4.1.2. Find the mean µ of the following set of numbers {5, 8, 13, −5, 7}.

5 + 8 + 13 − 5 + 7 28
Solution: µ = = = 5.6.
5 5

4.1.2 Median

Definition 4.1.3. The median is the middle value of a set of numbers when they are arranged in order (ranked). If
the count of numbers is odd, the median is the middle value. If the count is even, the median is the mean of the two
middle values.

• The pros of using the median are:

1. Robust to Outliers: Unlike the mean, the median is not sensitive to extreme values or outliers in the
dataset. It provides a more robust measure of central tendency in the presence of outliers.
2. Applicable to Skewed Distributions: The median is suitable for datasets with skewed distributions,
where the data is not symmetrically distributed. It accurately represents the central value without being
influenced by the tail of the distribution.
3. Simple to Interpret: The median is easy to understand and interpret, as it represents the middle value
of the dataset when arranged in ascending or descending order. It is particularly useful when explaining
central tendency to non-specialists.

• The cons are:

1. Less Efficient for Large Datasets: Calculating the median can be computationally less efficient, espe-
cially for large datasets, compared to the mean. It requires sorting the data, which can be time-consuming
for large samples.
2. Loss of Information: The median only considers the middle value(s) of the dataset and ignores the rest
of the data points. This can lead to a loss of information, particularly in situations where a comprehensive
summary of the entire dataset is required.
3. Limited Applicability to Continuous Data: The median may not be suitable for datasets with con-
tinuous data or a large number of tied values. In such cases, it may not accurately capture the central
tendency, and alternative measures like the mean or mode may be preferred.

Example 4.1.4. Find the median of the following two sets of numbers {5, 8, 13, −5, 7} and {5, 8, 13, −5, 7, 22}.

Solution: First we shall rank the data: {−5, 5, 7, 8, 13}. There are 5 (an odd number) numbers, so the median is the
middle (3rd ) value, which is 7.

Ranking the second set gives {−5, 5, 7, 8, 13, 22}. There are 6 (an even number) numbers, so the median is the mean
7+8
of the (3rd ) and (4th ) values, which is = 7.5.
2
30 CHAPTER 4. INTRODUCTION TO POPULATION STATISTICS

4.1.3 Mode

Definition 4.1.5. The mode is the value that appears most frequently in a set of numbers. If there is one value that
appears with the highest frequency then this value is the mode and the set is said to be unimodal. If two or more
values have the joint highest frequency then each of these values are modes and the set is said to be multimodal.
However, if every element has the joint highest frequency then there is no mode.

• The pros of using the mode are:


1. Simple to Determine: The mode is straightforward to identify, as it is the value(s) that occur most
frequently in the dataset.
2. Applicable to Categorical Data: The mode can be used with categorical data, where numerical calcu-
lations such as mean and median may not be meaningful.
3. Useful for Skewed Distributions: The mode can provide a representative measure of central tendency,
especially in datasets with skewed distributions or outliers, where the mean and median may not accurately
reflect the central tendency.
4. Robust to Outliers: Unlike the mean, which is sensitive to extreme values, the mode is not affected by
outliers.
• The cons of using the mode are:
1. Not Unique: A dataset can have multiple modes (multimodal) or no mode if all values occur with the
same frequency. In the case of multimodality, it may not be clear which mode(s) best represent(s) the
central tendency.
2. Limited Applicability to Continuous Data: The mode may not be suitable for datasets with continuous
data or a large number of unique values. It can oversimplify the distribution of data, especially in cases
where there is no clear mode.
3. Not Always Representative: In some cases, the mode may not be representative of the entire dataset,
particularly when the dataset is large and complex. It may fail to capture the variability or spread of the
data.
4. Dependent on Bin Size for Grouped Data: When dealing with grouped data (data presented in
intervals or categories), the mode may depend on the choice of bin size or grouping method, leading to
different modes for different groupings.
Example 4.1.6. The mode of the set {2, 5, 7, 2, 4, 6, 2, 8 is 2.
The mode of the set {2, 5, 5, 7, 2, 4, 6, 5, 2, 8 is 2 and 5. There is no mode of the set {2, 5, 5, 2, 4, 4, 8, 1, 8, 1.
Exercises 4.1.7. Calculate the mean, median and mode of each of the following sets of data.

(a) {−2, 5, 8, 2, 4, 6, −10, 4, 8, 6} (b) {−1, −3, 0, 18, 22, 43, 16, 0, 4, 15, 23, 31, 0}
Exercises 4.1.8. Choose which measure of central tendency is the most applicable in each situation, you can assume
that the data is available.

(a) Calculating your potential earnings as a lawyer for an American football franchise using the companies current
salaries.

(b) Calculating the most popular car colour in a car park.

(c) Calculating the average height of students in a school.

4.2 Measures of spread

A measure of spread, also known as a measure of dispersion, is a statistic that describes the variability or spread of a
dataset. It quantifies how much the individual data points differ from the central tendency (such as the mean, median,
4.2. MEASURES OF SPREAD 31

or mode) of the dataset. Measures of spread provide important information about the distribution of data and how
tightly or loosely the values are clustered around the central value. The three primary measures of spread are the
range, standard deviation and variance.

Definition 4.2.1. The range is the difference between the largest (max) and smallest (min) values in a set of numbers.

range = max - min.

• The pros of using the range are:

1. Simple to Calculate: The range is easy to compute as it only requires finding the difference between the
maximum and minimum values in the dataset.
2. Easy to Understand: The range is intuitive and easy to interpret, making it suitable for quick assessments
of data variability.
3. Useful for Descriptive Purposes: The range provides a straightforward measure of the spread of the
data, making it useful for descriptive statistics and preliminary analysis.

• The cons of using the range are:

1. Sensitive to Outliers: The range is highly sensitive to extreme values or outliers in the dataset. A single
outlier can disproportionately affect the range, leading to an inaccurate representation of the spread.
2. Does Not Capture Internal Variation: The range only considers the spread between the two extreme
values (maximum and minimum) and does not account for the distribution of values within the dataset. It
may overlook important information about the variability of the data.
3. Limited Information: The range provides limited information about the variability of the dataset, es-
pecially when compared to other measures of spread such as the standard deviation or interquartile range
(IQR). It does not provide insights into the central tendency or the shape of the distribution.
4. Dependent on Sample Size: The range is affected by the size of the dataset. Larger datasets may have
a wider range simply due to the inclusion of more data points, regardless of the actual variability in the
data.

Definition 4.2.2. The standard deviation, denoted by σ, measures the dispersion or spread of a set of n numbers
from its mean µ. The standard deviation is calculated as follows:
rP rP
x2 (x − µ)2
σ= − µ2 or σ = .
n n
X
The notation x2 , means that each number in the data set is squared and the all the squared numbers are added.

• The pros of using the standard deviation are:

1. Reflects Data Variability: The standard deviation quantifies the average deviation of data points from
the mean, providing a measure of the variability or spread of the dataset.
2. Normalized Measure: Unlike the variance, which is in squared units, the standard deviation is in the
same units as the original data, making it easier to interpret and compare across different datasets.
3. Used in Statistical Inference: The standard deviation is commonly used in statistical hypothesis testing,
confidence interval estimation, and other inferential statistics, making it a widely accepted measure in
statistical analysis.

• The cons of using the standard deviation are:

1. Sensitive to Outliers: Similar to the range, the standard deviation is sensitive to extreme values or
outliers in the dataset. It may overestimate the spread of the data when outliers are present.
2. Requires Complete Data: The standard deviation requires complete data for all observations in the
dataset. Missing values or incomplete data may lead to inaccurate estimates of the standard deviation.
32 CHAPTER 4. INTRODUCTION TO POPULATION STATISTICS

3. Assumes Normality: The standard deviation assumes that the data follows a normal distribution. In
cases where the data is not normally distributed, the standard deviation may not accurately reflect the
variability of the data.
4. Affected by Sample Size: Like other measures of spread, the standard deviation is affected by the size
of the dataset. Larger datasets tend to have smaller standard deviations, even if the variability in the data
remains the same.

Definition 4.2.3. The variance is the square of the standard deviation.

Example 4.2.4. Given the data set: [1, 2, 3, 4, 4, 5, 6, 8, 10, 11]

1 + 2 + 3 + 4 + 4 + 5 + 6 + 8 + 10 + 11
• Mean: = 5.4
10
4+5
• Median: = 4.5
2
• Mode: 4

• Range: 11 − 1 = 10
r

r
12 + 22 + 33 + 42 + 42 + 52 + 62 + 82 + 102 + 112 392
• Standard Deviation: − 5.42 = − 29.16 = 10.04 =
10 10
3.17

• Variance: 10.04

Exercises 4.2.5. Calculate the mean, range, standard deviation and the variance of each of the following data sets:

(a) 0, 4, 6, -2, 9, 5, -13, 7, 8, 3, 5 (b) 0, 4, 6, -2, 9, 5, -13, 7, 8, 3, 500,

(c) 0.05, -0.06, 0.01, 0.0, -0.08, 0.07, -0.02, -0.01, 0.04 (d) -4000, -3000, -2000, -1000, 0, 1000, 2000, 3000, 4000

4.3 Frequency tables

A frequency table is a statistical tool used to organize and summarize the distribution of categorical or discrete
numerical data. It lists the categories or distinct values of a variable along with the frequency or count of each value
in the dataset.

A typical frequency table consists of two columns (or rows):

• Categories or Values: This column contains the categories or values of the variable being analysed. Each
category represents a distinct group or class into which the data can be classified.

• Frequency: This column displays the frequency or count of each category or value in the dataset. It indicates
how many times each category occurs in the dataset.

Frequency tables are used for several purposes in data analysis:

• Data Summarization: Frequency tables provide a concise summary of the distribution of data, making it
easier to identify patterns, trends, and outliers in the dataset.

• Frequency Distribution: By presenting the frequency of each category or value, frequency tables help in
visualising the distribution of data and understanding the relative frequency of different groups.
4.3. FREQUENCY TABLES 33

• Comparison of Groups: Frequency tables facilitate comparisons between different groups or categories within
the dataset, allowing analysts to identify differences or similarities in the distribution of data.
• Preparation for Further Analysis: Frequency tables serve as a preliminary step in data analysis, providing
the necessary information for more advanced statistical analyses such as chi-square tests, contingency tables, or
hypothesis testing.

P sP s P
fx f x2 f (x − µ)2
For a frequency table, the mean µ = P and the standard deviation is σ = P − µ2 = P .
f f f

Example 4.3.1. The number of goals scored in 30 soccer games is as follows:

0, 3, 4, 2, 1, 0, 2, 3, 1, 0, 2, 3, 6, 3, 2, 3, 1, 3, 2, 1, 0, 3, 4, 2, 2, 3, 3, 4, 5, 3

We shall present the data in the form of a frequency table with 2 rows.

Goals scored 0 1 2 3 4 5 6
frequency 4 4 7 10 3 1 1

• The mode number of goals scored is 3.


• There are 30 numbers so the median is the mean of the 15th and 16th numbers.
2+3
Therefore the median is = 2.5.
2
• The mean number of goals scored is 2.3667.
• The range is 6 − 0 = 6.

• The standard deviation is 1.44875


• The variance is 1.44875
Example 4.3.2. When presented with a frequency table where ranges are used, the mid interval values are used to
calculate the statistics. In the following example, 70 people had their height measured and recorded. The data was
then collated in the frequency table below.

height (meters) 0-1.2 1.2-1.6 1.6-1.8 1.8-2.0 2.0-2.4 2.4-3


frequency 1 9 20 28 12 0

We will now redraw the table including the mid interval values.

height (meters) 0-1.2 1.2-1.6 1.6-1.8 1.8-2.0 2.0-2.4 2.4-3


mid inteval values 0.6 1.4 1.7 1.9 2.2 2.7
frequency 1 9 20 28 12 0

The mean is calculated as 1.811 meters and the standard deviation is 0.2744 meters.
Exercises 4.3.3. Draw a frequency table and then calculate the mode, median, mean, range, standard deviation and
the variance of each of the following data sets:

(a) 0, 5, 7, 5, 8, 5, 6, 7, 8, 3, 5, 4, 5, 2, 7, 2, 7, 4, 1, 0, 8 (b) 6, 7, 3, 5, 4, 9, 7, 1, 5, 4, 8, 6, 7, 9, 3, 4, 1, 2, 3, 5
Chapter 5

Introduction to Sets

In mathematics, a set is a well-defined collection of distinct objects, considered as an abstract concept. These objects
can be anything: numbers, letters, or even other sets. By well-defined we mean that membership of a set is not open
for debate or opinion. For example the collection of all good songs released within the last 6 months is not a set, since
what makes a song good is subjective and therefore open to debate. The collection of countries that have won the
men’s soccer world cup is a set. Sets are fundamental in various branches of mathematics, including algebra, calculus,
and discrete mathematics.

Formally, a set is defined by listing its elements within curly braces, separated by commas. For example, the set of
all nonnegative even numbers less than 10 can be written as {0, 2, 4, 6, 8}. Sets can also be described using set-builder
notation, where a property defines the elements of the set. For instance, the set of all even numbers can be denoted
as {x | x is even}.

Sets are useful for organising and analysing data, solving equations, and defining relationships between objects. They
provide a foundation for more advanced mathematical concepts such as functions, relations, and probability.

5.1 The union and intersection of sets

Definition 5.1.1. The union of two sets, denoted A ∪ B, is the set that contains all elements that are in either set
A or set B or in both. In other words, the union of two sets includes all the distinct elements from both sets. For
example, if A = {1, 2, 3} and B = {3, 4, 5}, then A ∪ B = {1, 2, 3, 4, 5}.
Definition 5.1.2. The intersection of two sets, denoted A ∩ B, is the set that contains all elements that are common
to both set A and set B. In other words, the intersection of two sets includes only the elements that are present in
both sets. For example, if A = {1, 2, 3} and B = {3, 4, 5}, then A ∩ B = {3}.

U U
A∪B A∩B
A B A B

Example 5.1.3. Let A = {1, 2, 3, 4, 5} and let B = {4, 5, 6, 7, 9}. List the elements of the union and intersection of
the two sets A and B.

34
5.2. THE UNIVERSAL SET, COMPLEMENT AND SET DIFFERENCE 35

Solution: A ∪ B = {1, 2, 3, 4, 5, 6, 7, 9} and A ∩ B = {4, 5}.

Exercises 5.1.4. Let A = {1, 2, 3, 4, 5, 6}, let B = {x | x is a prime less than 10} and let C = {x | x is a positive
even number less than 16}. List the elements of the following sets.

(a) B (b) C (c) A∪B

(d) B∪A (e) A∪C (f) A∪B

(g) A∪B∪C (h) A∩B (i) A∩C

(j) C ∩A (k) C ∩B (l) A∩B∩C

5.2 The universal set, complement and set difference

The universal set, often denoted as U , is a set that contains all the objects or elements under consideration in a
particular context or discussion. It represents the entire space of interest for a given problem or situation.

In some contexts, the universal set may be explicitly defined, while in others, it may be understood implicitly based
on the context of the problem being discussed.

For example, if we are discussing sets of integers, then the universal set could be Z, the set of all integers. Then
1 1
defining a set A as the set all positive numbers less than 6, means that is not in A even though the number is
2 2
both positive and less than 6.

It’s important to note that the choice of the universal set depends on the problem or situation at hand and should be
defined accordingly to encompass all relevant elements of interest.

Definition 5.2.1. Given two sets A and B, the set difference A\B consists of all elements that are in set A but not
in set B. In other words, it includes all elements that are present in set A but are not present in set B. For example,
if A = {1, 2, 3, 4} and B = {3, 4, 5}, then the set difference A\B is {1, 2}, because 1 and 2 are in set A but not in set
B.

Definition 5.2.2. Let U be the universal set and let A be a set. Then the complement of the set A, denoted by A′
is the set of all elements in U that are not in A. This means that A′ = U \A.

Example 5.2.3. Consider a universal set U containing the positive integers less than 10. Let A be the set of even
numbers in U , that is, A = {2, 4, 6, 8}. The complement of A, denoted A′ , consists of all integers in U that are not
in A. Therefore, the complement of A is the set of odd numbers in U , which is A′ = {1, 3, 5, 7, 9}.

Exercises 5.2.4. Let U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}, A = {1, 2, 4, 5, 6}, let B = {x | x is a prime less than 10}
and let C = {x | x is divisible by 4}. List the elements of the following sets.

(a) B (b) C (c) A\B

(d) B\A (e) B\C (f) A′

(g) U \A′ (h) B′ (i) C′

(j) (A ∪ B)′ (k) A ∩ B′ (l) (A ∩ B)′


36 CHAPTER 5. INTRODUCTION TO SETS

5.3 Subsets, the power set, cardinality and the Cartesian product

A subset is a set that is contained within another set.


Definition 5.3.1. Let A and B be sets. Then the set B is said to be a subset of a set A, denoted as B ⊆ A, if every
element in set B is also an element of set A. In other words, for every element x in set B, it follows that x is also in
set A.
Example 5.3.2. Let U = {1, 2, 3, 4, 5, 6, 7, 8}, A = {1, 2, 3, 4, 5, 6, 7}, B = {1, 2, 3, 8} and let C = {1, 2, 3}. All sets
within a question will be subsets of the universal set. That is, A ⊆ U , B ⊆ U and C ⊆ U . Note that B is not a subset
of A (B ̸⊆ A) since 8 ∈ B but 8 ∈/ A. However, C is a subset of both B and A, since every element of C (1, 2, and 3)
are also in the sets B and A.
Definition 5.3.3. The power set of a set A, denoted P(A), is the set of all possible subsets of A, including the empty
set (null set, {} or ϕ) and A itself.
P(A) = {B | B ⊆ A}
In other words, the power set of A contains all possible combinations of elements from A, including the empty set and
the set A itself.
Example 5.3.4. For example, if A = {1, 2, 3}, then the power set P(A) would be:

P(A) = {{}, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}}

The power set is often used in mathematics, particularly in set theory and discrete mathematics.
Definition 5.3.5. The cardinal number of a finite set A, denoted |A|, is the number of elements in set A.
Example 5.3.6. Let A = {a, red, ∗, b}. Then the cardinal number of A, denoted |A| or #A, is 4. How many elements
are there in the power set of the set A. There is always 2 to the power of the size of A, that is, |P(A)| = 2|A| = 24 = 16.

The Cartesian product of two sets A and B, denoted A × B, is the set of all possible ordered pairs where the first
element comes from set A and the second element comes from set B.
Definition 5.3.7. In words, A × B contains all possible combinations of elements where the first element is from set
A and the second element is from set B.

A × B = {(a, b) | a ∈ A, b ∈ B}

Example 5.3.8. For example, if A = {1, 2} and B = {a, b, c}, then the Cartesian product A × B would be:

A × B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)}

The Cartesian product is often used in mathematics, particularly in the context of relations, functions, and geometry.
Exercises 5.3.9. Let U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}, A = {1, 2, 4, 5, 6}, let B = {2, 5, 6} and let C = {6}. State
whether each of these statements are true or false.

(a) U ⊆A (b) B⊆C

(c) C⊆U (d) C⊆A

(e) P(C) = {6} (f) ( ∪ A) ⊆ P(A)

(g) ( ∪ A) ⊆ P(C) (h) |U | = 12

(i) |A| ≥ |P(B)| (j) |B| + |C| = 4

(k) {(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), } ⊆ (A × C) (l) C × B = {(6, 2), (6, 5), (6, 6)}
5.3. SUBSETS, THE POWER SET, CARDINALITY AND THE CARTESIAN PRODUCT 37

Exercises 5.3.10. A survey of 100 students asked which of the subjects, English, Irish or Maths the liked learning.
The results indicated that: 54 liked English, 42 liked Irish while 82 liked Maths. 36 like English and Irish, 39 liked
English and Maths while 28 liked Irish and Maths. If 2 people did not like any of the subjects, how many liked all 3
subjects?
Exercises 5.3.11. Consider the Venn diagram of the sets U, A, B and C shown below. Using set notation name each
of the regions. For example, Region 1 is A\(B ∪ C).

A B

Region 2
Region 1 Region 3

Region 5
Region 4 Region 6
C

Region 7

Region 8
Chapter 6

Introduction to Propositional Logic

Propositional logic is a fundamental branch of mathematical logic that deals with propositions, which are statements
that are either true or false. It provides a formal system for reasoning about the truth values of these propositions,
using logical operators such as AND, OR, NOT, IMPLIES, and IF AND ONLY IF. In propositional logic, complex
statements are built by combining simpler statements using these logical operators, allowing for the analysis of the
logical relationships between propositions.

Propositional logic plays a crucial role in various areas of mathematics, including computer science, philosophy, and
artificial intelligence. In mathematics, it serves as the foundation for more advanced logical systems, such as predicate
logic and modal logic. It is also extensively used in the design and analysis of algorithms, particularly in fields like
automated reasoning, theorem proving, and formal verification. Furthermore, propositional logic provides a framework
for expressing and evaluating arguments in natural language, enabling rigorous reasoning and logical deduction in
philosophical discourse and everyday reasoning.

6.1 Propositions and the basic concepts of logic

6.1.1 Definitions

Definition 6.1.1. A proposition is a declarative statement that is either true or false, but not both simultaneously.
It is the basic unit of logical reasoning and can be expressed in simple terms without any ambiguity.

A word on the syntax and semantics of propositional logic.

• Propositional Symbols: These are symbols used to represent propositions. Commonly used symbols include
p, q, r, etc.

• Logical Operators: These are symbols used to combine propositions. The common logical operators include
∧ (AND), ∨ (OR), ¬ (NOT), ⇒ (IMPLIES), and ⇔ (IF AND ONLY IF).

• Parentheses: Parentheses i.e. brackets (), are used to specify the order of operations and to clarify the structure
of complex expressions.

38
6.1. PROPOSITIONS AND THE BASIC CONCEPTS OF LOGIC 39

6.1.2 Examples of propositions

Examples of propositions:

• The Earth orbits the Sun. (This is True)

• London is the capital of France. (This is false.)

• 2 + 2 = 4. (This is True)

• It is raining outside. (This is True at the time or writing)

• All squares are circles. (This is false.)

Examples of non-propositions:

• What time is it? (This is not a proposition as it is a question and does not assert truth or falsity.)

• Give me a glass of water. (This is not a proposition as it is a command, not a statement about truth or falsity.)

• Go to sleep! (This is not a proposition as it is an imperative sentence, not a statement.)

• I wonder if it will snow tomorrow. (This is not a proposition as it expresses a state of uncertainty or contemplation
rather than asserting a truth or falsity.)

6.1.3 Semantics

The semantics of propositional logic defines the meaning of these symbols and operators in terms of truth values. The
truth value of a proposition is either true or false, denoted by T and F respectively. The semantics of propositional
logic are determined by truth tables, which enumerate all possible combinations of truth values for the propositions
and specify the resulting truth value of the compound expressions formed by applying the logical operators.

The truth value of a compound proposition in propositional logic can depend on the truth values of its constituent
propositions and the application of logical operators according to their truth tables. For example, the conjunction
(AND) of two propositions p and q is true only if both p and q are true. The disjunction (OR) of p and q is true if at
least one of p or q is true.

Propositional logic, uses several logical operators. Let’s introduce them and provide their truth tables:

• AND (∧): Denoted by ∧, this operator represents the conjunction of two propositions. It is true only when
both propositions are true.

• OR (∨): Denoted by ∨, this operator represents the disjunction of two propositions. It is true when at least
one of the propositions is true.

• NOT (¬): Denoted by ¬, this operator represents the negation of a proposition. It flips the truth value of the
proposition.

• IMPLIES (⇒): Denoted by ⇒, this operator represents implication. It states that if the first proposition is
true, then the second proposition must also be true.

• IF AND ONLY IF (⇔): Denoted by ⇔, this operator represents equivalence. It states that the truth values
of the two propositions are the same.
40 CHAPTER 6. INTRODUCTION TO PROPOSITIONAL LOGIC

6.1.4 Truth Tables

p q p∧q p∨q ¬p p⇒q p⇔q


T T T T F T T
T F F T F F F
F T F T T T F
F F F F T T T

Exercises 6.1.2. Which of the following statements are propositions:

(a) 7 + (−7) ̸= 0 (b) What is the meaning of not false

(c) Stop raining for Pete’s sake! (d) All oranges are not green

1
(e) is a rational number (f) Get, your school bag or you will be late.
2
Exercises 6.1.3. Let p and q be propositions. Draw the truth table for:

(a) p ∧ ¬q (b) (p ∧ q) ∨ p (c) (q ∨ p) ∨ ¬q

6.2 Logical Equivalences

Logical equivalences are statements that assert the same truth value for corresponding inputs. These equivalences are
useful for simplifying logical expressions and proving the equivalence of different logical statements. Some common
logical equivalences include: (These are in the formula sheet also).

¬¬p ≡ p p∧T ≡p p∧F ≡F

p∨T ≡T p∨F ≡p p ∧ ¬p ≡ F

p ∨ ¬p ≡ T p ∧ (p ∨ q) ≡ p p ∨ (p ∧ q) ≡ p

p ∧ p ≡ p (Idem) p ∨ p ≡ p (Idem) p ∧ q ≡ q ∧ p (Com)

p ∨ q ≡ q ∨ p (Com) (p ∧ q) ∧ r ≡ p ∧ (q ∧ r) (Ass) (p ∨ q) ∨ r ≡ p ∨ (q ∨ r) (Ass)

p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r) (Dis) p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r) (Dis) ¬(p ∧ q) ≡ ¬p ∨ ¬q (DM)

¬(p ∨ q) ≡ ¬p ∧ ¬q (DM) p ∧ (p ∨ q) ≡ p (Abs) p ∨ (p ∧ q) ≡ p (Abs)

p ⇔ q ≡ (p ⇒ q) ∧ (q ⇒ p) p ⇒ q ≡ ¬p ∨ q

These equivalences can be proven using truth tables or logical reasoning. They provide a powerful tool for simplifying
logical expressions and demonstrating the equivalence of different formulations in propositional logic.

Example 6.2.1. Simplify the following logical expression using logical equivalences:

(A ∧ B) ∨ (B ∧ ¬A)
6.3. IMPLICATIONS 41

Solution: We will simplify the given expression by using some of the logical equivalence stated above:

(A ∧ B) ∨ (B ∧ ¬A) ≡ (B ∧ A) ∨ (B ∧ ¬A) (Commutative Law)


≡ B ∧ (A ∨ ¬A) (Distributive Law)
≡B∧T (Complement Law)
≡B

Therefore, the simplified form of the given logical expression is B.


Exercises 6.2.2. Simplify each of the given expressions by using the table of logical equivalences.

(a) (p ∧ T ) ∨ (q ∨ T ) (b) (p ∧ F ) ∨ (q ∨ F ) (c) (p ∨ (q ∨ ¬p)) ∧ (q ∧ T )

6.3 Implications

In propositional logic, implications play a crucial role in reasoning and making deductions. An implication, denoted
by the symbol ⇒, represents a logical relationship between two propositions, where the truth of one proposition (the
antecedent) implies the truth of another proposition (the consequent).
Definition 6.3.1. In an implication p ⇒ q, if proposition p is true, then proposition q must also be true. The
antecedent p is often referred to as the hypothesis, and the consequent q as the conclusion.
Definition 6.3.2. Let p and q be propositions. Then p ⇔ q is logically equivalent to p ⇒ q and q ⇒ p.

The truth table for p ⇒ q and p ⇔ q is given below.

p q p⇒q p⇔q
T T T T
T F F F
F T T F
F F T T

Inference Rules: Inference rules are logical principles that allow us to derive new propositions (conclusions) from
given propositions (hypotheses) using valid logical reasoning. Some common inference rules in propositional logic
include:

1. Modus Ponens (MP): If we have p ⇒ q and p, then we can infer q.


2. Modus Tollens (MT): If we have p ⇒ q and ¬q, then we can infer ¬p.
3. Hypothetical Syllogism (HS): If we have p ⇒ q and q ⇒ r, then we can infer p ⇒ r.
4. Disjunctive Syllogism (DS): If we have p ∨ q and ¬p, then we can infer q.
5. Conjunction (CONJ): If we have both p and q, then we can infer p ∧ q.
6. Simplification (SIMP): If we have p ∧ q, then we can infer p.
42 CHAPTER 6. INTRODUCTION TO PROPOSITIONAL LOGIC

7. Addition (ADD): If we have p, then we can infer p ∨ q.

8. Resolution (RES): If we have p ∨ q and ¬p ∨ r, then we can infer q ∨ r.

These inference rules form the basis of logical deduction in propositional logic and are used to derive new propositions
from existing ones, facilitating the process of logical reasoning and argumentation.

6.3.1 Tautology and Contradiction

Definition 6.3.3. In propositional logic, a tautology is a compound proposition that is always true, regardless of the
truth values of its constituent propositions. In other words, a tautology is a statement that is true under all possible
interpretations. Tautologies are denoted by the symbol ⊤ or the word ”true”.

For example, p ∨ ¬p is a tautology, as it is always true regardless of the truth value of p. This statement is known as
the law of excluded middle.
Definition 6.3.4. A contradiction, on the other hand, is a compound proposition that is always false, regardless
of the truth values of its constituent propositions. In other words, a contradiction is a statement that is false under
all possible interpretations. Contradictions are denoted by the symbol ⊥ or the word ”false”.

For example, p ∧ ¬p is a contradiction, as it is always false regardless of the truth value of p. This statement is known
as the law of non-contradiction.

Tautologies and contradictions play important roles in logic, as they provide the foundation for logical reasoning
and argumentation. Tautologies represent universally true statements, while contradictions represent universally false
statements. Negating a tautology gives a contradiction and visa versa.
Example 6.3.5. Let p and q be propositions. Construct the truth table for (p ⇒ (p ∨ q)) ⇒ ¬q. State whether the
expression is a tautology, a contradiction or neither.

Solution:

p q p∨q p ⇒ (p ∨ q) ¬q (p ⇒ (p ∨ q)) ⇒ ¬q
T T T T F F
T F T T T T
F T T T F F
F F F T T T

The expression (p ⇒ (p ∨ q)) ⇒ ¬q is neither a tautology nor a contradiction. This is because its value is neither
always true nor is it always false.
Exercises 6.3.6. Let p and q be propositions. Construct the truth table for each of the following expressions and
state whether the expression is a tautology, a contradiction or neither.

(a) (p ∧ q) ⇒ p (b) (p ⇔ q) ⇒ (q ∨ p) (c) ¬(p ∧ q) ⇒ (q ⇒ ¬p)

You might also like