You are on page 1of 104

Preparation Course for the Supplementary

Exam Mathematics

2023
Version 0.7

1
Contents
1 Sets 3
1.1 Important sets of numbers . . . . . . . . . . . . . . . . . . . . 3
1.1.1 Real numbers . . . . . . . . . . . . . . . . . . . . . . . 5
1.1.2 Complex numbers . . . . . . . . . . . . . . . . . . . . . 6
1.2 A more abstract notion of sets and set operations . . . . . . . 12
1.2.1 Definition of sets . . . . . . . . . . . . . . . . . . . . . 13
1.2.2 Subsets and supersets . . . . . . . . . . . . . . . . . . . 15
1.2.3 Set operations . . . . . . . . . . . . . . . . . . . . . . . 16

2 Unit conversion and transformation of expressions and equal-


ities 20
2.1 Unit conversion . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.1.1 Prefixes . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.1.2 Selected examples of (metric) units . . . . . . . . . . . 21
2.1.3 Scientific notation . . . . . . . . . . . . . . . . . . . . . 23
2.2 Transformation of terms . . . . . . . . . . . . . . . . . . . . . 24
2.2.1 Linear expressions . . . . . . . . . . . . . . . . . . . . 25
2.2.2 Rational expressions . . . . . . . . . . . . . . . . . . . 26
2.2.3 Quadratic expressions and expressions with roots . . . 27
2.2.4 Other expressions . . . . . . . . . . . . . . . . . . . . . 29

3 Elementary combinatorics 30
3.1 Permutations . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.1.1 Permutation without repetition . . . . . . . . . . . . . 32
3.1.2 Permutation with repetition . . . . . . . . . . . . . . . 33
3.2 Variation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.2.1 Variation without repetition . . . . . . . . . . . . . . . 36
3.2.2 Variation with repetition . . . . . . . . . . . . . . . . . 41
3.3 Combination . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
3.3.1 Combination without repetition . . . . . . . . . . . . . 43
3.3.2 Combination with repetition . . . . . . . . . . . . . . . 45
3.4 Exercises about combinatorics . . . . . . . . . . . . . . . . . . 47

4 Solving equations, inequalities and systems of linear equa-


tions 49
4.1 Equations in one variable . . . . . . . . . . . . . . . . . . . . . 49

2
4.1.1 Linear equations in one variable . . . . . . . . . . . . . 49
4.1.2 Quadratic equations in one variable . . . . . . . . . . . 51
4.1.3 Radical equations in one variable . . . . . . . . . . . . 62
4.1.4 Rational equations in one variable . . . . . . . . . . . . 64
4.1.5 Exponential and logarithmic equations in one variable . 66
4.2 Inequalities in one variable . . . . . . . . . . . . . . . . . . . . 70
4.2.1 Linear inequalities in one variable . . . . . . . . . . . . 72
4.2.2 Quadratic inequalities in one variable . . . . . . . . . . 74
4.2.3 Rational inequalities in one variable . . . . . . . . . . . 78
4.3 Systems of linear equations . . . . . . . . . . . . . . . . . . . . 80
4.3.1 Substitution method . . . . . . . . . . . . . . . . . . . 81
4.3.1.1 2-D . . . . . . . . . . . . . . . . . . . . . . . 81
4.3.1.2 3-D . . . . . . . . . . . . . . . . . . . . . . . 86
4.3.1.3 n-D . . . . . . . . . . . . . . . . . . . . . . . 89
4.3.2 Elimination method . . . . . . . . . . . . . . . . . . . . 90
4.3.2.1 2-D . . . . . . . . . . . . . . . . . . . . . . . 91
4.3.2.2 3-D . . . . . . . . . . . . . . . . . . . . . . . 93
4.3.2.3 n-D . . . . . . . . . . . . . . . . . . . . . . . 97
4.3.3 Under- and overdetermined systems . . . . . . . . . . . 102

1 Sets
We first introduce well-known but important sets of numbers. We will omit
for this section mentioning the well-known basic arithmetical rules, such as
“a negative times a positive is a negative” etc.
Then, we will consider sets in a more abstract sense and set operations.

1.1 Important sets of numbers


Most likely, the first set of numbers we were introduced to as children is the
set of natural numbers, which we use to count:

N := {0, 1, 2, 3, 4, . . . }.

Some authors define the natural numbers without 0, in this case N :=


{1, 2, 3, 4, . . . }. Sometimes the notation N0 is used to emphasize that in
this case 0 is included in the set.

3
For the set of natural numbers, the operations “Addition”, “Subtraction”,
“Multiplication” and “Division” are defined, but we have to be careful with
subtraction and division. It may happen that for natural numbers n and
m, their difference n − m is not a natural number; this is precisely the case,
if m > n. Furthermore, if n is not a multiple of m, then division is only
possible with remainder.
The integers solve parts of this problem. The set of integers is defined as
Z := {. . . , −3, −2, −1, 0, 1, 2, 3, . . . } = N ∪ {0} ∪ {−n | n ∈ N}.
Now, in contrast to the natural numbers, not only addition and multiplication
are always defined, but also subtraction. Furthermore, we notice, N is a
subset of Z,
N ⊆ Z.
In order to be able to perform the four basic arithmetic operations (al-
most) without any restrictions, we consider the set of rational numbers. The
rational numbers are defined to be the set of fractions, where numerator and
denominator are integer numbers, but the denominator is not allowed to be
equal to 0.
a
Q := { | a ∈ Z and b ∈ Z, b ̸= 0}.
b
As for any a ∈ Z we have a = a1 , it holds that Z is a subset of Q, the set
of integers is a subset of the set of fractions, hence
N ⊆ Z ⊆ Q.
The decimal representation of a rational number is either finite, e.g. 27 =
3.5, −18
8
= −2.25, or infinite but with eventually periodic digits, e.g. 31 =
0.33333 . . . = 0.3̇, −10
7
= −1.428571428571 . . . = −1.428571.
One may think that the rational numbers contain already sufficiently
many elements to represent every number on the number line, i.e., this would
mean that every number that can be expressed via its decimal representation
ultimately “ends” in a sequence of periodic digits. For example, we can
describe the number π = 3.14159265 . . . as precisely as we want considering
the sequence of fractions
3 31 314 3141 31415
, , , , ,...,
1 10 100 1000 10000

however, it can be shown that there are numbers, √ such as π, e, or even 2,
which are not contained in Q. The result that 2 ∈ / Q is usually one of the
prime examples for proofs by contradiction in mathematical textbooks.

4
1.1.1 Real numbers
Now, for many applications, it is not enough to consider only those numbers,
which can be represented by fractions. E.g. consider a right triangle with
sides a = 1 and b = 1, then by the Pythagorean theorem, the hypotenuse
√ c
can be determined by solving c2 = a2 + b2 = 12 + b2 . Thus, c = 2.
The set of irrational numbers is the collection of √
the numbers whose deci-
mal representation is neither finite nor periodic, e.g. 2 = 1.41421 . . . , −π =
−3.14159 . . . .
The set we typically work with in many applications, the set of real num-
bers, is defined to be the union of the rational numbers and the irrational
numbers:
R := Q ∪ {r | r is an irrational number}.
Hence, every point on the number line represents a real number.
18 10 1 √ 7
−π - 8 - 7 3 2 2

−5 −4 −3 −2 −1 0 1 2 3 4 5

As Q ⊆ R, we have
N ⊆ Z ⊆ Q ⊆ R.

R Q Z N

Within the set of real numbers, we can, as with the rational numbers,
perform all the arithmetic operations - of course, we are again not allowed to
divide by 0. Although the real numbers contain sufficiently many numbers
already for us to solve most problems, which stem from real life applications,
we will see that there are still some “simple” problems, which do not have a
solution within the real numbers.

5
1.1.2 Complex numbers
Consider the quadratic polynomial f (x) = x2 − 1. There are many problems,
which can essentially be solved by finding so-called roots or zeros of a poly-
nomial p, i.e., finding those values x0 in the domain, for which p(x0 ) = 0. For
the example we are considering, solving f (x0 ) = 0 means solving x20 − 1 = 0.
It can be easily checked that the real numbers x1 = 1 and x2 = −1 solve this
problem.
If we consider now the very similar polynomial g(x) = x2 + 1, we find out
that there are no real numbers, which solve this problem. This motivates the
definition of the so-called complex numbers. We will first define the set and
the corresponding arithmetic operations, and then consider the motivating
example again. A complex number z can be expressed using two real numbers
x and y and the so-called imaginary unit, which “separates” those numbers:

z = x + iy.

If we would not use the imaginary unit i, then the expression x+y would just
produce a real number. After some further considerations, we will explore
some further properties of the imaginary unit i.
Writing a complex number z ∈ C in the form z = x + iy is called the
canonical representation or Cartesian form. Hereby the real number x is
called the real part, and y is called the imaginary part of the corresponding
complex number. Hence, we define the set of complex numbers as

C = { x + iy : x, y ∈ R}.

The complex number 0 ∈ C can be represented as 0 = 0 + i0, i.e., it


has real part and imaginary part both equal to 0. We say that two complex
numbers are equal, if and only if their real parts are equal and their imaginary
parts are equal. In formulae, for z1 = x1 + iy1 and z2 = x2 + iy2 ,

z1 = z2 means x1 = x2 and y1 = y2 and vice versa.

Before we define the arithmetic operations, we first define complex con-


jugation. For any complex number z ∈ C, with z = x + iy, the complex
conjugate z = x + i(−y) = x − iy. Hence, in order to compute a complex
conjugate, we simply subtract instead of add the imaginary part. The real
part does not change under this operation.

6
Example 1.1. Given z1 = 5 + i3 and z2 = 1 + i2, we get

z1 = 5 + i(−3) = 5 − i3 and z2 = 1 − i2.

Given z1 = 1 + i20 and z2 = 2 + i8, we get

z1 = 1 − i20 and z2 = 2 − i8.

Given z1 = 4 + i1, we have z = 4 − i1, or even simpler z1 = 4 − i.


Now, we define the arithmetic operations, i.e., we define, how we can
perform addition, subtraction, multiplication and division when we are con-
sidering complex numbers.
1. Addition: Given two complex numbers z1 , z2 ∈ C, with z1 = x1 + iy1
and z2 = x2 + iy2 , we can compute their sum z1 + z2 by

z1 + z2 = (x1 + x2 ) + i(y1 + y2 ).

This means, if we add two complex numbers, for the real part of the
sum, we simply add the real parts of the summands, and for the imag-
inary part of the sum, we simply add the imaginary parts of the sum-
mands.
Example 1.2. Given z1 = 5 + i3 and z2 = 1 + i2, we get

z1 + z2 = (5 + 1) + i(3 + 2) = 6 + i5.

Given z1 = 1 + i20 and z2 = 2 + i8, we get

z1 + z2 = (1 + 2) + i(20 + 8) = 3 + i28.

We immediately see that addition is commutative and associative, as we


are in fact just always computing sums of real numbers (the real parts
and imaginary parts), when we compute the sum of complex numbers.

2. Subtraction: In order to be consistent with the operations in the real


numbers, we define for a complex number z ∈ C: −z = −x + i(−y).
Now, it is clear, how to subtract two complex numbers z1 , z2 ∈ C from
each other, i.e., we compute

z1 − z2 = (x1 − x2 ) + i(y1 − y2 ).

7
Example 1.3. Given z1 = 5 + i3 and z2 = 1 + i2, we get

z1 − z2 = (5 − 1) + i(3 − 2) = 4 + i(−1).

Given z1 = 1 + i20 and z2 = 2 + i8, we get

z1 − z2 = (1 − 2) + i(20 − 8) = −1 + i12.

3. Multiplication: Given two complex numbers z1 , z2 ∈ C, with z1 =


x1 + iy1 and z2 = x2 + iy2 , we can compute their product z1 + z2 by

z1 · z2 = (x1 x2 − y1 y2 ) + i(x1 y2 + x2 y1 ).

Important, this means we do not simply multiply real parts and imag-
inary parts, but compute a more complicated expression. The reason
will be explained later.

Example 1.4. Given z1 = 5 + i3 and z2 = 1 + i2, we get

z1 · z2 = (5 · 1 − 3 · 2) + i(5 · 2 + 3 · 1) = −1 + i13.

Given z1 = 1 + i20 and z2 = 2 + i8, we get

z1 · z2 = (2 − 160) + i(8 + 40) = −158 + i48.

Something interesting happens, if we multiply any complex number


z ∈ C with its complex conjugate z.

z · z = (x + iy) · (x − iy) = (x2 − y(−y)) + i(x(−y) + xy) = (x2 + y 2 ) + i0.

Complex numbers with imaginary part 0 can be represented just via


their real part, i.e., they just represent real numbers. Thus, for any
z ∈ C, zz ∈ R.

Example 1.5. Given z = 5 + i3, we get

z · z = (5 · 5 + 3 · 3) + i(5 · (−3) + 5 · 3) = 34 + i0 = 34.

It is very clear that multiplication is again commutative and associative.

8
4. Division: Let us define this arithmetic operation in two steps, first let
us define what it means to divide a complex number by a real number,
then let us define what it means to divide a complex number by a
complex number. As before, division by 0 is not defined, hence not
allowed.

(a) Let z ∈ C and r ∈ R \ {0}. Then,


z x + iy x y
= = +i .
r r r r
Thus, in order to compute the quotient of a complex number and
a real number, we simply divide the real part by the divisor and
the imaginary part by the divisor.
Example 1.6. Given z = 5 + i3 and r = 5, we get
z 5 + i3 5 3 3
= = +i =1+i .
r 5 5 5 5

(b) For the quotient of two complex numbers, the complex conjugate
will be helpful, as. we will expand the corresponding fraction with
the complex conjugate. Let z1 , z2 ∈ C and z2 ̸= 0. Then,
z1 z1 z2 z1 z2
= · = .
z2 z2 z2 z2 z2
As we just found out, when considering multiplication, z2 z2 will
result in a real number, hence we can perform the division.
Example 1.7. Given z1 = 5 + i3 and z2 = 1 + i2, we get

z1 5 + i3 5 + i3 (5 + i3)(1 − i2) 11 − i7 11 7
= = · = = −i .
z2 1 + i2 1 + i2 (1 + i2)(1 − i2) 5 5 5

Given z1 = 1 + i20 and z2 = 2 + i8, we get

z1 1 + i20 1 + i20 (1 + i20)(2 − i8) 162 + i32 81 8


= = · = = −i .
z2 2 + i8 2 + i8 (2 + i8)(2 − i8) 68 34 17

Let us now explore a fundamental property of the complex number i,


which will explain the seemingly complicated definition of multiplication of

9
complex numbers. We saw, that in fact most operations, except for multipli-
cation, “carry over” from the real numbers. Recall that for z1 , z2 ∈ C, their
product is defined as

(x1 x2 − y1 y2 ) + i(x1 y2 + x2 y1 ) = x1 x2 − y1 y2 + i(x1 y2 + x2 y1 ).

If we “forget” for a moment that we are computing with complex numbers,


and just treat all symbols as variables, it would be natural to compute

z1 · z2 = (x1 + iy1 ) · (x2 + iy2 ) = x1 x2 + x1 iy2 + iy1 x2 + iy1 iy2 .

Rearranging those terms leads to

x1 x2 + i(x1 y2 + x2 y1 ) + i2 y1 y2 .

If we compare this to the definition of multiplication, we see that certain


terms match:

x1 x2 + i(x1 y2 + x2 y1 ) + i2 y1 y2 compared to x1 x2 − y1 y2 + i(x1 y2 + x2 y1 ).

If we want both terms to match, then for any y1 , y2 ∈ R, we must have


!
i2 y1 y2 = −y1 y2 .

For any y1 , y2 ∈ R means in particular for any y1 , y2 ∈ R \ {0}. Hence, we


can divide by y1 · y2 , as this is not 0 and get

i2 = −1.

This is often presented as the defining property of the imaginary unit, which
then implies that multiplication of complex numbers produces the result
we stated above. But we saw that defining multiplication the way we did,
ultimately lead to this property as well.
How does this help with our motivating problem of finding solutions of
the equation x2 + 1 = 0? If instead of searching for a real number solution,
we could now try to find a complex number, which solves this problem. For
notational convenience, let us restate the problem as finding z ∈ C, so that
z 2 + 1 = 0. Using the canonical representation, and subtracting 1 from both
sides of the equation, we get

(x + iy)(x + iy) = −1.

10
We multiply out and write −1 = −1 + i0,

(x2 − y 2 ) + i(xy + xy) = −1 + i0.

We know, in order to be equal, complex numbers must have the same real
part and the same imaginary part. This leads to the following equation,
which we must solve for x, y ∈ R(!).
 2
x − y 2 = −1,
2xy = 0.

From the second equation, we get that either x = 0, or y = 0. If y = 0, then


from the first equation, we have x2 = −1, and we know this equation has no
solution in the real numbers. Hence, x = 0. This yields −y 2 = −1, which is
equivalent to y 2 = 1, which has the solution y ∈ {−1, 1}.
For x = 0, y1 = 1, we get the complex number z1 = 0 + i1 = i, for x = 0,
y2 = −1, we get the complex number z2 = 0 − i1 = −i. In order to verify
that what we found is in fact a solution to the initial problem, we just plug
in the complex numbers we found:

z12 + 1 = i2 + 1 = −1 + 1 = 0,
z22 + 1 = (−i)2 + 1 = i2 (−1)2 + 1 = i2 1 + 1 = −1 + 1 = 0.

Hence, we found two solutions. To emphasize again: The equation


√ z2 =
−1 has no real solutions, as we would need to compute z = ± −1, which
does not yield a real number, but the equation z 2 = −1 has two complex
solutions, namely
√ ±i. Therefore, when computing with complex numbers,
we set i = −1.
This of course allows us to solve any negative root in the set of complex
numbers, e.g.
√ p √ √
−25 = (−1) · 25 = −1 · 25 = i25.

Example 1.8. First, we solve x2 −6x+13 for x ∈ R. In one of the following


chapters, a solution formula for this problem will be presented. For now, we
just assume that we know that this problem can be solved by computing
6 √
x1,2 = ± 9 − 13,
2

11
if 9 − 13 ≥ 0. But 9 − 13 = −4 < 0. Hence, this problem does not have a
solution.
Now, we solve z 2 − 6z + 13 for z ∈ C. Again, we consider
6 √
z1,2 = + −4,
2

but now, we get the following: solving −4 is equivalent to solving v 2 = −4
for v ∈ C, which yields v1 = 2i and v2 = −2i. Hence, the set of solutions is
given by
{3 + 2i, 3 − 2i} ⊂ C.

We noticed that for both equations z 2 + 1 = 0 and z 2 − 6z + 13 = 0, if


z1 ∈ C is a solution, then also the complex conjugate z1 is a solution. This
statement is true for solving p(z) = 0 for any polynomial p of any degree,
not only for degree 2.
By interpreting x ∈ R as x + i0 ∈ C, we have

N ⊆ Z ⊆ Q ⊆ R ⊆ C.

A visual representation of complex numbers and the arithmetic operations


will be given in section ??.

1.2 A more abstract notion of sets and set operations


First, we state a definition of sets, which was given by Georg Cantor (1845-
1918).

Definition 1.9 (Cantor). A set is a gathering together into a whole of def-


inite, distinct objects of our perception or our thought - which are called
elements of the set.

Example 1.10. We give a few examples for sets:

• the set of Students in this course,

• the set of letters in this document,

• the set of solutions of an equation,

• the set of real numbers.

12
Sets contain objects, for a set M and an object x, the notation

x∈M

is used to express x belongs to M , x is an element of M , M contains x. One


usually writes
x∈/M
to indicate x does not belong to M , x is not an element of M , M does not
contain x.
√ √
Example 1.11. We have that 4 ∈ Q, but 2 ∈ / Q.

1.2.1 Definition of sets


There are three main ways to define sets:

1. definition via enumeration,

2. definition using dot notation,

3. definition by the properties of the elements, which are contained.

Finite sets can be defined by explicitly listing their elements between


curly braces “{” and “}”.

Example 1.12. We list a few examples.

• The set of vowels in the (Latin) alphabet: {a, e, i, o, u}.

• The set of natural numbers between 5 and 10: {5, 6, 7, 8, 9, 10}.

• The set of federal provinces in Austria: {V, T, Sbg, St, K, B, W, Nö, Oö}.

• The empty set: ∅ = { }.

Infinite and finite sets can be defined by using dot-notation.

Example 1.13. We list a few examples.

• The set of natural numbers: N = {0, 1, 2, 3, 4, . . . }.

• The set of natural numbers between 5 and 100: {5, 6, 7, . . . , 99, 100}.

13
• The set of integers: Z = {. . . , −3, −2, −1, 0, 1, 2, 3, . . . }.

The most powerful notion to define sets is defining them by the properties
of the elements, which are contained.

Example 1.14. We list a few examples.

• All even positive integers: {n ∈ N : n is even}.

• All real numbers between −3 and 2: {x ∈ R : −3 ≤ x ≤ 2}.

• The set of solutions of an equation L = {x ∈ R : x2 − 1 = 0}.

This way of defining sets follows a certain pattern, consisting of two main
parts, let us consider {x ∈ R : −3 ≤ x ≤ 2}:

1. We have opening parenthesis “{”, then we start with the first part.

2. We declare (at least) a variable, e.g. x,

3. we declare a superset, i.e. we define which values we want to consider


for the variable, e.g. R.

4. We write a colon “:” to separate the first part and the second part.

5. The second part consists of a predicate, P . Now, for any element x in


the superset, we determine, if the statement P (x) is true. If yes, the
element is contained in the set, if no, the element is not contained in the
set. Here the predicate is “Is . . . between −3 and 2?”. The predicate
is true for x = 0, thus 0 is contained in this set, but the predicate is
false for x = −10, thus −10 is not contained in this set.

6. We have closing parenthesis “}”.

This notation is so powerful, because as for the presented example of


“the solutions of the equation”, we can write down the definition of the set,
without explicitly knowing the elements, e.g. the solutions of the equation,
beforehand.
For finite sets, we introduce the notion of the size of a set: If A is a finite
set, then |A| is the number of elements contained in A.

Example 1.15. We list a few examples.

14
• |{a, e, i, o, u}| = 5.

• |{5, 6, 7, 8, 9, 10}| = 6.

• |{V, T, Sbg, St, K, B, W, Nö, Oö}| = 9.

• |∅| = 0.

1.2.2 Subsets and supersets


We have already used the notion of subsets and supersets, let us properly
define it.
Definition 1.16 (Sub- and Superset). We say a set M is a subset of an-
other set N , if every element of M is an element of N . We denote this by
M ⊆ N . We also may write N ⊇ M , to indicate N is a superset of M .
If we only work with subsets M ⊆ Ω for a fixed Ω, we call Ω the underly-
ing/universal set.
Example 1.17. Some important examples of subsets of the real numbers are
real intervals. Let a, b ∈ R, with a < b, then sets of the form
• (a, b) = {x ∈ R : a < x < b} are called open intervals,

• [a, b) = {x ∈ R : a ≤ x < b} or (a, b] = {x ∈ R : a < x ≤ b} are called


half open intervals,

• [a, b] = {x ∈ R : a ≤ x ≤ b} are called closed intervals.


For any a, b ∈ R, with a < b, we have (a, b) ⊆ R, [a, b) ⊆ R, (a, b] ⊆ R and
[a, b] ⊆ R.
Moreover, for any set A, it holds that A ⊆ A and ∅ ⊆ A.
For notational convenience, we define also intervals, which are either only
bounded from above or only bounded from below.
Definition 1.18. Let c ∈ R. We define
• (−∞, c) = {x ∈ R : x < c},

• (−∞, c] = {x ∈ R : x ≤ c},

• (c, ∞) = {x ∈ R : c < x},

15
• [c, ∞) = {x ∈ R : c ≤ x}.
We notice, using the set builder notation via the properties of the elements
(see p. 14), we always get subsets of the corresponding superset.
As a set is defined by the elements, which are contained, two sets are
equal, if they contain precisely the same elements. Hence, if A and B are
sets, then A = B iff A ⊆ B and B ⊆ A.
Example 1.19. Given A = {1, 2} and B = {2, 1} then A ⊆ B and B ⊆ A,
as every element from A is also contained in B and vice versa. Hence,
A = B.

1.2.3 Set operations


In this section, we want to explore set operations. Given some sets, those
operations allow us to construct new sets.

1. Intersection: The first operation is the intersection of sets. If A and B


are sets, then A ∩ B is the set that contains all the elements, which are
contained in both A and B.

A B

Example 1.20. We first list a simple example. If A = {1, 2, 3, 4} and


B = {5, 6, 1, 2}, then
A ∩ B = {1, 2}.
Now a more “useful” example. Consider the equations e1 : x − y = 2
and e2 : x + y = 0, which correspond to lines in 2D space. We can
define the set of 2D points, which fulfil the first equation,

L1 = x, y ∈ R2 : x − y = 2 ,
 

and we can define the set of 2D points, which fulfil the first equation,

L2 = x, y ∈ R2 : x + y = 0 .
 

16
Now, the intersection L1 ∩ L2 corresponds to all those 2D points, which
fulfil e1 and e2 , i.e. the point(s) of intersection of both lines.

2. Union: If A and B are sets, then A ∪ B is the set that contains all the
elements, which are contained in A or in B (or both).

A B

Example 1.21. We first list a simple example. If A = {1, 2, 3, 4} and


B = {5, 6, 1, 2}, then

A ∪ B = {1, 2, 3, 4, 5, 6}.

Now a more “useful” example. Consider the very simple inequality


x2 > 4. Then, clearly, for all x ∈ (2, ∞) the inequality holds. But,
those are not the only real numbers, for which the inequality holds, if
x ∈ (−∞, −2), then the inequality holds as well. Hence, the inequality
is true for

(−∞, 2) ∪ (2, ∞) = {x ∈ R : x < −2 or x > 2}.

3. Set Difference: We will see that this operation allows us to write the
result of the previous example in another way. If A and B are sets,
then A \ B is the set, which contains all the elements of A that are not
contained in B.

A B

17
Example 1.22. We first list a simple example. If A = {1, 2, 3, 4} and
B = {5, 6, 1, 2}, then
A \ B = {3, 4}.
Considering again the very simple inequality x2 > 4, we already know
the set of solutions is given by (−∞, 2) ∪ (2, ∞) this can be expressed
as
R \ [−2, 2].

4. Set complement: Let A be any set, and let Ω be the universal set. The
complement of A, denoted by AC or Ω \ A, is defined as the set of all
elements (in Ω), which are not an element of A.

A AC

Example 1.23. We first list a simple example. If A = {1, 2, 3, 4} and


Ω = {n ∈ N : n ≤ 10}, then

AC = {0, 5, 6, 7, 8, 9, 10}.

Considering again the very simple inequality x2 > 4, we already know


the set of solutions is given by (−∞, 2) ∪ (2, ∞), if Ω = R, then this
can be expressed as
[−2, 2]C .

5. Power Set: If A is a set, then P(A) is the set that contains all subsets
of A.

Example 1.24. Let H denote “Heads” and T denote “Tails”. If A =


{H, T }, then
P(A) = { ∅, {H}, {T }, {H, T } } .
If we flip a coin, it can either land on “Heads” or “Tails”. The power
set in this example describes the set of possible events.

18
Set Corresponding event
∅ “The coin does not land on Heads, but also not on Tails.”
{H} “The coin lands on Heads.”
{T } “The coin lands on Tails.”
{H, T } “The coin lands on Heads or Tails.”

In probability theory, we would then be interested in the corresponding


probabilities, e.g. for a fair coin P{H} = P{T } = 12 .

If A is finite and |A| = n, then P(A) is finite and |P(A)| = 2n .

6. Cartesian product: A set is an unordered list of elements, we already


know that e.g. {1, 2} = {2, 1}. However, sometimes we want to define
a list of elements, for which the order of the elements is important.
This can be done via so-called tuples.

Definition 1.25. A n-tuple is an ordered list of elements which has


length n ∈ N. The order of the elements is important, and elements
may appear more than once. Let A be a set and a1 , a2 , ..., an ∈ A be
any elements. Then (a1 , a2 , ..., an ) is a n-tuple.

The word “tuple” is commonly used for 2-tuples, 3-tuples are often
called triples. Two tuples are only equal, if they have the same length,
and if they coincide in each position.
 
x
Example 1.26. A 2D vector can be represented as (x, y) or ,
y
where x is the x-coordinate and y is the y-coordinate. The tuple (vector)
(1, 2) describes a different point than the
 tuple
 (vector) (2, 1). A 3D
x
vector can be represented as (x, y, z) or y , where the additional z-
z
coordinate is represented by z. The tuple (vector) (0, 1, 2) describes a
different point than the tuple (vector) (0, 2, 1).

From any two non-empty sets, we can generate the so-called Cartesian
product, which is a set of tuples of elements of this set.

Definition 1.27. Given sets A, B we define the Cartesian product

19
A × B := {(a, b) : a ∈ A, b ∈ B}.

In order to generate tuples of length d, we can generalize this definition


to the d-fold Cartesian product

A1 × A2 × · · · × Ad := {(a1 , a2 , . . . , ad ) : ai ∈ Ai for i = 1, . . . , d}.

(The letter d should refer to “dimension”.)

| ×A×
Remark 1.28. For A {z· · · × A}, i.e., if we compute a Cartesian
d−times
product of a set with itself, we use shorthand Ad .

Example 1.29. A simple example for the Cartesian product is given


by A = {1, 2}, B = {x, y}, then A × B = {(1, x), (1, y), (2, x), (2, y)}.
Note, the first entry of each tuple must come from the first set in the
Cartesian product (here A) and the second entry must come from the
second set (here B). In this example, (x, 1) ∈
/ A×B and (x, x) ∈/ A×B.
The set R2 = R × R = {(x, y) : x ∈ R and y ∈ R} is the set of all 2D
vectors, where each component is a real number. Similarly, R3 is the
set of all 3D vectors.

If A and B are finite, i.e., |A| = k and |B| = ℓ for some k, ℓ ∈ N, then
also A × B is finite and

|A × B| = k · ℓ.

2 Unit conversion and transformation of ex-


pressions and equalities
In this section, we will first discuss unit conversion. To this end, we present
certain prefixes, which represent very large or very small quantities of metric
units and present some examples. We will then use the so-called scientific
notation to be able to more quickly convert from one unit into the other. As
e.g. the conversion from ◦ C (degrees Celsius) into ◦ F (degrees Fahrenheit)
or K (degrees Kelvin) is a bit more involved, we also discuss how we can
transform certain expressions and equalities.

20
2.1 Unit conversion
2.1.1 Prefixes
In many applications, prefixes allows us to easily express and communicate
measurements that are much larger or smaller than the base unit in a uni-
form way. E.g. in the case of distances, it may be easier to understand that
“Linz and Vienna are around 184 km (kilometre) apart” than to state that
“Linz and Vienna are around 184000 m (metre) apart”, although technically
both statements share of course the same information. Similarly, one might
understand the statement “An adult fruit fly’s mass is around 100 µg (mi-
crogram)” better than the equivalent statement “An adult fruit fly weighs
around 0.0000001 kg (kilogram)”.
The most common prefixes are given in the following table.
tera- T 1012 deci- d 10−1
giga- G 109 centi- c 10−2
mega- M 106 milli- m 10−3
kilo- k 103 micro- µ 10−6
hecto- h 102 nano- n 10−9
deca- da 101 pico- p 10−12

2.1.2 Selected examples of (metric) units


1. Data: The bit (binary digit) [b] is the most basic unit of information,
it has precisely 2 different states, as the word “binary” suggests. The
two different states can be represented as 0 and 1 (true or false, etc.).
A byte [B] consists of 8 bit and is, on many computer architectures,
the smallest addressable unit of memory.
Attention, some authors use powers of 2 are instead of powers of 10, to
express larger and smaller quantities. This creates some ambiguity!
Example 2.1. Some CD-ROMs were labelled with 700 MB (megabytes),
which would correspond to 0.7 GB (Gigabyte) or 700000 KB (kilobyte)
of accessible memory. (The actual capacity of such a CD-ROM would
be a bit over 700 MB.)

2. Length: The SI unit of length is metre [m].


Example 2.2. One (1) metre consists of 10 dm (decimetre), 100 cm
(centimetre) and 1000 mm (millimetre).

21
3. Area: The standard unit for area is thus square metres, with symbol
[m2 ].
Example 2.3. As a metre consists of 10 dm, 1 square metre has 10 · 10
dm2 . As 1 decimetre has 10 cm 1 square metre has 100 · (10 · 10) =
10000 cm2 . Moreover, as 1 centimetre has 10 mm, 1 square metre has
10000 · (10 · 10) = 1000000 m2 .

Other commonly used units for area are ar [a], with 1 ar is equal to
100 m2 , and hectare [ha] (houndred-ar), with 1 ha is equal to 100 a or
10000 m2 .
4. Volume: The standard unit for volume, as the one before, stems from
the unit for length and is m3 . One interesting fact is that 1 litre [l],
which is often used to measure the volume of liquids, is equal to 1 dm3 .
You may want to verify as an exercise that 1 cm3 = 1 ml (millilitre).
5. Mass: The SI unit for mass is the kilogram [kg]. The modern definition
of the kilogram is based on the definition of second and metre, histor-
ically it was defined as the mass of 1 l of water. As the substances,
which are dissolved in water, and thus the mass of water varies a lot,
it may be obvious that the latter definition does not give a uniform or
universal definition of mass.
Example 2.4. It holds that 1 kg is 1000000000 µg.

6. Time: The standard unit for time is the second [s]. For smaller amounts
of time, the above prefixes are used, but for larger amounts of time,
usually different units, like minutes [min] or hours [h] etc. are used.
Example 2.5. If a computer is able to perform a floating point addi-
tion (“addition of two decimal numbers”) on average in 10 ns (nanosec-
onds), then it can perform 100000000 such operations per second.
One (1) minute [min] consists of 60 s, 60 min equal 1 hour [h], 24 h
are 1 day [d]. Thus, 1 d is equal to 24 · 60 · 60 = 86400 s.

7. Speed: As speed is distance divided by time, its standard unit is metres


m
per second, often written as m/s or . Another commonly used unit
s
km
for speed is kilometres per hour, km/h or .
h
22
8. Angles: In everyday usage, one typically uses degrees [◦ ] to measure
angles. Hereby, it is defined that a full circle is divided into 360 ◦ . In
scientific applications, typically radians [rad] are used instead of de-
grees. The definition of 1 radian again stems from how many radians
are needed for a full rotation. One radian is defined as the angle sub-
tended at the centre of a circle by an arc equal in length to the radius.

Example 2.6. In the simple case of a unit circle, i.e., a circle with
radius 1, the angle that corresponds to a full rotation is equal to 2π rad.
For a half rotation, 180 rad are required.

9. Temperature: The most common units to measure temperature are


degrees Celsius [◦ C], degrees Fahrenheit [◦ F] and Kelvin [K], with the
Kelvin scale primarily employed for scientific applications.

Example 2.7. The absolute zero of temperature is at −273.15 ◦C,


which is −459.67 ◦F or simply 0 K. Water starts freezing at around
0 ◦C, which is 32 ◦F or 273.15 K. Water boils at around 100 ◦C, which
is 212 ◦F or 373.15 K.

2.1.3 Scientific notation


In order to write very small or very large numbers, in the so-called scientific
notation, powers of ten are used. Non-zero numbers are written in the form

m · 10n ,

with |m| ∈ [1, 10) and n ∈ N. In this form, m is called the mantissa and n
is called the exponent.

Example 2.8. We discuss a few examples:

1. 6.02214076 · 1023 is in scientific notation,

2. 1.616255(18) · 10−35 is in scientific notation,

3. −2 · 100 is in scientific notation.

4. 400 is not in scientific notation, but 4 · 102 is,

5. 0.000022 is not in scientific notation, but 2.2 · 10−5 is,

23
6. 602214.076 · 1018 is not in scientific notation, but 6.02214076 · 1023 is.

Besides the advantage of providing a standard format for numbers, which


makes very large and very small numbers “more readable”, the main advan-
tages of scientific notation are that it makes it easier to compare numbers,
and it simplifies arithmetic operations.

Example 2.9. We again discuss several examples.

• Which of the two following numbers is bigger, 800000000000000000000


or 20000000000000000000? If we look at the representation in scientific
notation, it will be immediately clear: 8 · 1020 is bigger than 2 · 1019 .

• As 1 km is equal to 1 · 103 m and 1 m is equal to 1 · 106 µm, 1 km is


equal to (1 · 1) · (103 · 106 ) = 1 · 103+6 = 1 · 109 µm.

• The mass of the earth is around 5.9 · 1024 kg. The mass of the sun is
around 3.3 · 105 times the mass of the earth. As 3.3 · 5.9 = 19.47 =
1.947 · 101 , the mass of the sun is around 1.947 · 1030 kg.

2.2 Transformation of terms


While conversion from one metric unit (of the same physical quantity/dimension)
into another is quite easy, especially when using scientific notation, e.g. con-
version from the above-mentioned units that describe temperature is not so
simple.

Example 2.10. Assume that the outside temperature is 14 ◦C. How much
would that be in ◦F? You could use the formula
9
c + 32 = f, (1)
5
where c represents the temperature in ◦C and f represents the temperature in

F.
Thus, as 95 · 14 + 32 = 57.2, an outside temperature of 14 ◦C corresponds
to 57.2 ◦F.
But what if you measured the outside temperature in ◦F and you want to
convert it to ◦C? You would need to modify formula (1) first.

24
In formula (1), we see that the variable f , which corresponds to temper-
ature in ◦ F, is isolated. In order to solve the above-mentioned problem, we
want to transform the equation in an equivalent equation, where the vari-
able c, which corresponds to temperature in ◦ C, is isolated. We will call this
“solving” equation (1) for the variable c.
If not specified otherwise, the domain for all the variables, which occur is
always the set of real numbers R.
We omit mentioning all the required steps for any equation in full gener-
ality and detail, instead we will present some examples.

2.2.1 Linear expressions


The example we mentioned above is an example of a linear equation. We
will continue it.

Example 2.11. For solving equation (1) for c, in order to isolate the desired
variable by adding/subtracting, we get the following equivalent equation in a
first step (subtraction of 32):
9
· c = f − 32 (2)
5
Now, in order to further isolate the variable c, we perform multiplication/division.
Attention: Multiplication/Division is only allowed by terms that are not equal
5
to 0. By multiplication with ̸= 0, we arrive at the equivalent equation
9
5
c = (f − 32) , (3)
9
which can be further simplified to
5f − 160
c= . (4)
9
Now, we can easily answer questions like “What does a temperature of 5

F correspond to in ◦ C?” .
5 · 5 − 160 135
=− = −15.
9 9
Hence, a temperature of 5 ◦ F corresponds to −15 ◦ C.

25
In this particular example, from a “mathematical” point of view, there
was no further restricion on the domain needed. From the viewpoint of a
physicist, absolute zero is at −273.15 ◦ C, which corresponds to
9
(−273.15) + 32 = −459.67 ◦ F.
5
Thus, the restriction c ∈ [−273.15, ∞) translates to f ∈ [−459.67, ∞).
Follwing the next example, we will see that sometimes, we have to be
more careful with restrictions:
Example 2.12. Newtons second law:
F = ma.
Again, we assume F, m, a ∈ R. If we want to solve this equation for m, we
would need to divide by a. But, as division by 0 is not possible, we would
need to restrict the domain of a to R \ {0}, i.e. a ̸= 0. The solution is then
F
m= .
a
We note: each time we divide by an expression, we have to restrict the
corresponding domains to not include 0. This is related to the fact that the
1
natural domain of the function f (x) = is R \ {0}.
x

2.2.2 Rational expressions


With similar reasoning as above, if an equation contains fractions, we may
need to restrict the domains accordingly.
1
Example 2.13. Let K, r, h ∈ R, solve the equation K = r−1 · h for r. First
we note, r − 1 ̸= 0, which is equivalent to r ̸= 1, thus we restrict the domain
of r to R \ {1}. Then we multiply by r − 1, which yields
K(r − 1) = h,
which is equivalent to Kr − K = h. Adding K yields
Kr = h + K.
Now, in order to divide by K, we restrict the domain of K to R \ {0}. Thus,
h+K h
r= = + 1.
K K
26
2.2.3 Quadratic expressions and expressions with roots
If we want to solve for a variable, which occurs not only linearly, but in a
quadratic expression, remembering that we are usually solving in R, we have
to be more careful. Let us consider the following example.
The energy of an object in motion can be described as the sum of potential
energy and kinetic energy.
1
E= · m · v 2 + m · g · h, (5)
2
where g ≈ 9.81 can be interpreted as a constant. We solve the above equation
for v, using the solution techniques from the previous sections. Subtraction
of mgh yields
1
· m · v 2 = E − mgh.
2
In order to further simplify, we want to multiply by 2 and divide by m, hence
m ̸= 0:  
2 E
v =2 −g·h .
m
Now, in order to solve for v, we might want to just take the square
root. But, first of all, taking a square root is not always
√ an equivalent
transformation of equations. As for any x ∈ R, we have x2 = |x|, we may
“loose” a solution, if we just apply the square root on both sides.

Example
√ 2.14. Consider as a very simple example 22 = 4 and (−2)2 = 4,
but 4 = 2. Hence, if we want to solve x2 = 4, if we just use the square
root, we would loose the solution x = −2.
√ In order to avoid this, we always
first consider both solutions e.g. x = ± 4 = ±2.

Sometimes, depending on the context (e.g. maybe lengths are assumed


to be non-negative etc.) we we may disregard some of the solutions, in other
instances, substituting the solution back into the initial equation may yield
that we are required to disregards an intermediate solution.

Example 2.15. Consider the following square:

27
A=4

Assuming the area of the square is 4 square units, what is the length of the
side a? Using the formula for area of a square, A = a2 , we solve a2 = 4,
which yields a = 2 or a = −2. In this context, we can safely say that a = 2
is the only solution.

Continuing the above example of enery of an object, given by equation (5),


we get r
√ E
v=± 2 − g · h.
m

Now, as the domain of the function f (x) = x is given by R≥0 = [0, ∞), i.e.
E
the non-negative numbers, we get the additional restriction that −g·h ̸= 0,
m
E
equivalently m ̸= g · h.
Usually equations depend on more than one variable, so we could also
solve for another one:

Example 2.16. We can also solve equation (5) for m. As m appears in


more than one term in the expression on the right, we first factor m:
 
1 2
E =m· ·v +g·h .
2
1 1
Now, we want to divide by 2
· v 2 + g · h, hence we restrict 2
· v 2 ̸= −g · h.
Hence,
E
m= 1 2 .
2
v +g·h
When we wanted to take the square root on both sides of the equation,
we noticed that we might unintentionally loose a solution. Similarely, if

28
we want to square both sides of an equation, we might introduce solutions,
which were not present in the beginning. Thus, as before, by considering
the appropriate context and by substituting back the intermediate solutions,
which were found, into the starting equation, we may decide to disregard
some of the intermediate solutions.

2.2.4 Other expressions


We just quickly list a few more problems when solving for a certain variable
that stem from the domains of definition of the corresponding functions.
Given an expression involving trigonometric functions sin : R → [−1, 1]
and cos : R → [−1, 1], we might want to consider the inverse trigonometric
functions  
−π π
arcsin : [−1, 1] → , ,
2 2
and
arccos : [−1, 1] → [0, π] .

Example 2.17. Let y, r, α ∈ R, solve the following equation for α.

y = r sin(α).

We see that we have to restrict r ̸= 0 in order to divide both sides by r and


get
y
sin(α) = .
r
−1
Now, in order to isolate r, we apply sin = arcsin on both sides:
y 
α = arcsin .
r
y
For the latter, we need to be sure that −1 ≤ ≤ 1.
r
It is also easy to see that expressions, which involve logarithms need
to be treated with care, as the domain for the function ln(x) is given by
R+ = R>0 = (0, ∞).

29
3 Elementary combinatorics
Combinatorics is often referred to as the mathematics of counting and ar-
rangement. Hence, in this chapter, we will explore the basics of systemati-
cally counting and arranging objects. Being able to determine the number of
elements in certain sets is very important in discrete probability theory, but
of course, the applications of combinatorics are by no means just limited to
probability theory.
We already know that if A, B are finite sets and |A| = n and |B| = k
then |A × B| = n · k, thus, there are n · k possibilities to choose one element
from each set.

Example 3.1. If for a menu the options for a meal are A := {soup, rice, noodles},
and the options for a drink are B = {water, juice}, then we have 3 · 2 = 6
possibilities to choose a menu, which consists of a meal and a drink.

In order to solve more difficult counting problems, first we will see a


very useful notation, the so-called binomial coefficient, then we will study
variation and combination of objects.
In order to define the binomial coefficient, we define what we understand
by a factorial.

Definition 3.2. For n ∈ N, the factorial of n, denoted by n!, is defined as


n
Q
0! = 1 and n! = n · (n − 1)! = n · (n − 1) · · · 2 · 1 = i.
i=1

Example 3.3. We have 3! = 3 · 2! = 3 · (2 · 1!) = 3 · (2 · (1 · 0!)) = 3 · 2 · 1 = 6


and 10! = 10 · 9 · 8 · · · 2 · 1 = 3628800.

Now, to the binomial coefficient.

Definition 3.4. For n, k ∈ N and n ≥ k, the binomial coefficient is defined


as  
n n!
= .
k k! · (n − k)!

Example 3.5. The binomial coefficient 41 simplifies to 4, as 1!·(4−1)!


4!

= 4.
10 10! 10·9·8

The binomial coefficient 3 = 3!·7! = 6 = 120.

We explore another example, before we present some computation rules


for the binomial coefficient, which stem directly from the definition.

30
Example 3.6. For n = 2 and k ∈ {0, 1, 2}, we get
• 20 = 0!·(2−0)!
2!
= 22 = 1,


• 21 = 1!·(2−1)!
2!
= 21 = 2,


• 22 = 2!·(2−2)!
2!
= 22 = 1.


For n = 3 and k ∈ {0, 1, 2, 3}, we get


• 30 = 0!·(3−0)!
3!
= 66 = 1,


• 31 = 1!·(3−1)!
3!
= 62 = 3,


• 32 = 2!·(3−2)!
3!
= 62 = 3,


• 33 = 3!·(3−3)!
3!
= 66 = 1.


The binomial coefficients, nk “n choose k”, are called like this, because


they represent the positive integers, which occur as coefficients in the so-
called binomial theorem:
n  
n
X n n−i i
(a + b) = a b.
i=0
i

Let us verify the above statement for the cases n = 2 and n = 3 presented
in the last example. We know

(a + b)2 = a2 + 2ab + b2 = 1 · a2 + 2 · ab + 1 · b2 ,

and      
2 2 2
= 1, = 2, = 1.
0 1 2
Furthermore

(a + b)3 = a3 + 3a2 b + 3ab2 + b3 = 1 · a3 + 3 · a2 b + 3 · ab2 + 3 · b3 ,

and        
3 3 3 3
= 1, = 3, = 3, = 1, .
0 1 2 3
We now examine further properties of the binomial coefficient:

31
• n n
 
0
= = 1 for all n ∈ N0 , this is easy to verify. Try it yourself.
n

• nk = n−k n
 
for all n, k ∈ N0 , this is called the symmetry of binomial
coefficients. Assume n, k ∈ N and k < n. Then
   
n n! n! n! n
= = = = .
k k! · (n − k)! (n − k)! · k! (n − k)! · (n-(n-k))! n−k

• n n−1 n−1
  
k
= k
+ for all n, k ∈ N \ {0}.
k−1

Example 3.7. We compare 10 10! 10 10 10!


  
3
= 3!(10−3)!
and 10−3
= 7
= 7!(10−7)! and
10 10−1
 
see that they are equal, as
 we expected. Furthermore, 3 = 120, 3 =
9 10−1 9

3
= 84 and 3−1 = 2 = 36. And, again, as expected 84 + 38 = 120.

3.1 Permutations
3.1.1 Permutation without repetition
With permutations, we can count in how many ways the distinguishable
objects of a finite set can be ordered. Assume that we are looking at a finite
set A with n elements. We count, in how many different ways we can order
(sort) them. We will have to put one object in the first place, for this we can
choose any of the n objects in A. Assume that we have already chosen the
first object, we then have n − 1 objects left to put in order. For the second
place, we can thus choose n − 1 objects. In other words, for each of the n
choices for the first element, we still have n−1 choices for the second element,
in total we thus have n · (n − 1) choices for the first two objects. It is easy
to see that this pattern will continue, for the third element we can choose
(n − 2) objects (2 are already chosen), so we have a total of n · (n − 1) · (n − 2)
choices for the first three elements of the sequence. In total, we will have
n · (n − 1) · (n − 2) · · · · · 2 · 1 = n! choices, each corresponds to a different
sequence. Thus, the number of permutations of a set with n elements is n!.
Example 3.8. Assume, we want to sort 3 balls coloured in red r, green g
and blue b. Then for the first element, we can choose one of the three.
Options for choice 1 r g b
Now, assume that we have chosen the first element, in each of the cases,
there are still 3 − 1 = 2 elements left to choose for the second element. E.g.,

32
if we chose r for the first element, we can still choose g or b for the second
element.
Choice 1 r r g g b b
Options for choice 2 g b r b r g
Now, if we have chosen already two elements, then there is 3 − 2 = 1 option
left for the third (and last) element of the sequence. E.g., if we chose r and
then g, we can only choose b.
Choice 1 r r g g b b
Choice 2 g b r b r g
Options for choice 3 b g b r g r
We see that there are 6 = 3! different columns in the above table, thus there
are 6 permutations of a set of three elements.
Often, combinatorial questions are “hidden” in word problems.
Example 3.9. Consider the following set of Books: A := {Math, History, German}.
In how many different ways could we sort them into a bookshelf ?
Answer: There are 3! = 6 different ways to sort those 3 books into a bookshelf.
Written down explicitly, they are
• Maths, History, German,

• Maths, German, History,

• History, Maths, German,

• History, German, Maths,

• German, Maths, History,

• German, History, Maths.

3.1.2 Permutation with repetition


In the previous section, we had n distinguishable objects, and we counted
in how many ways we could sort them. Sometimes, we may consider indis-
tinguishable objects, e.g. what if we have one red, two green and one blue
bead, and we put them on a necklace. This means, we would sort them, in
how many ways could this be done. Certainly, we have 4 objects, so the first

33
assumption may be that we have again 4! = 24 possibilities. If we make the
beads indistinguishable, e.g. by labelling them with the numbers 1, 2, 3, 4,
we would in fact get 24 different permutations.
But, it turns out that some of the permutations, e.g.

2, 3, 1, 4

and
3, 2, 1, 4
are indistinguishable, if we remove the labels. After all, both start with a
green bead, then another green bead, and then red and blue beads.
For each of the unique ways of sorting the beads, there are 2! = 2 copies
4!
counted, if we just compute 4!. Hence, there should be only = 12 different
2!
ways to create such a necklace. The reason for the 2! copies is that no matter
how we permute the 2 green beads, we will get the same necklace, as soon
as we remove the labels.
This observation can be generalized: Assume that there are n objects
which can be sorted into i different categories, where we assume that all ob-
jects that fall into the same category are indistinguishable. For k = 1, 2, . . . , i,
with “nk ”, we will denote the number of elements in the k-th category. E.g.
n1 is the number of elements in the first category, n2 is the number of ele-
ments in the second category, etc. and ni is the number of elements in the
i-th (which is the last) category.

Example 3.10. In our previous example, we had n = 4 beads and i = 3


categories red, green and blue. Furthermore, there was 1 red bead, thus n1 =
1, there were 2 green bears, hence n2 = 2 and there was again one blue bead,
which means n3 = 1.

We notice: n1 + n2 + · · · + ni = n, i.e., if we count all objects in all


categories, we get the total number of objects.
Now, as before, the key observation is that given any permutation of
the n objects, we get the same permutation, if we just permute the objects
in a certain category, as those are indistinguishable. Hence, the number of
permutations with repetition is
n!
.
n1 ! · n2 ! · . . . ni !

34
Example 3.11. Question: In how many ways can the letters of the word
“REFERENCE” be arranged? We also want to count arrangements that do
not give a word, which makes sense, e.g. we also count “RREEFEECN” as
a possible arrangement.
Answer: First we notice, the word “reference” has n = 9 letters in total.
There are i = 5 different letters, thus there are five different categories n1 ,
n2 , n3 , n4 and n5 .
Letter Category Number of elements in that category
R n1 2
E n2 4
F n3 1
N n4 1
C n5 1
We note n1 + n2 + n3 + n4 + n5 = 2 + 4 + 1 + 1 + 1 = 9 = n.
As n! = 9! = 362880, n1 ! = 2! = 2, n2 ! = 4! = 24, n3 ! = 1! = 1,
n4 ! = 1! = 1 and n5 ! = 1! = 1, we have that the total number of arrangements
is
362880
= 7560.
2 · 24 · 1 · 1 · 1
(This would already take some time to write down all possible arrangements
explicitly.)
Example 3.12. Question: In kindergarten, a child wants to decorate a rect-
angle with 11 · 10 pins. It uses 20 blue, red and green iron-on beads each;
18 purple and orange beads each; and 14 yellow beads. How many possible
arrangements are there?
We provide one example arrangement:

35
Answer: First, we notice, the rectangle has n = 11 · 10 = 110 pins. There
are i = 6 different colours, thus there are six different categories: there are
n1 = 20 blue beads, n2 = 20 red beads, n3 = 20 green beads, n4 = 18 purple
beads, n5 = 18 orange beads and n6 = 14 yellow beads.
Hence, the total number of different arrangements is
110!
.
20! · 20! · 20! · 18! · 18! · 14!
This number is equal to

308640846655952322940599636727733117453663086496971340636955780648256830396000000,

which is approximately 3.1 · 1080 . As some authors estimate that the number
of atoms in the observable universe ranges between 1 · 1078 and 1 · 1082 ,
it is impossible that you can write down all arrangements and count them
explicitly.
As the above example for an arrangement was chosen “randomly”, this
also implies that we can be almost certain that never before in history, some-
one presented the exact same arrangements of beads in any textbook.

3.2 Variation
Variations again describe how we can order/arrange objects, or create se-
quences of objects.The concept of variation is thus closely related to per-
mutation, in fact we will see that permutation without repetition is just a
special case of a variation without repetition. In many applications, if the
order in which elements are chosen, put or drawn etc. matters, it is highly
likely that variation is the key for solving the underlying problem.

3.2.1 Variation without repetition


For variation without repetition, we are considering a finite set A, with
|A| = n. From this set, we choose k ≤ n elements and bring them in
order. The total number of all possible such arrangements is called the num-
ber of variations of the k-th class from n objects, or k-element variations of
n objects. A popular model for this problem is drawing from an urn, which
contains n differently labelled (or differently coloured) balls. For variation
without repetition, we would draw without replacement, i.e. we do not put

36
balls we have drawn back in the urn, so we cannot re-draw them. The order
in which balls are drawn is important.
We can derive a formula for this number in a very similar way to what
was presented in section 3.1.1: Again, we compile a list of length k, choosing
some of the n objects. For the first element in the list, we can put any of the
n objects. For each of those choices, it holds that now we can only choose
one of the n − 1 remaining objects for the second entry in the list, etc.
Thus, there are
n!
n · (n − 1) · (n − 1) · · · · · (n − k + 1) =
(n − k)!

k-element variations of n objects.

Example 3.13. Question: You are looking at 4 different pictures, and you
should tell, what is your favourite and what is your least favourite of the
pictures. In how many ways could you do that?
Answer: Let us, for simplicity, say that the four pictures are as follows:

Now, we say that we will first choose the picture, which we like the most
and label it with +, and we will then choose the picture, which we like the
least and label it with −. The result will then have the format:

+ −

For the picture, we like the most, we have 4 different options:

37
+ −

If we have chosen the red picture as our favourite picture, then for the second
picture, we have the following 3 options for the other picture, we must select:

+ −

If we have chosen the green picture as our favourite picture, then for the
second picture, we have the following 3 options for the other picture, we
must select:

38
+ −

If we have chosen the blue picture as our favourite picture, then for the second
picture, we have the following 3 options for the other picture, we must select:

+ −

If we have chosen the orange picture as our favourite picture, then for the
second picture, we have the following 3 options for the other picture, we must
select:

39
+ −

We see that we have 12 different options, and in fact,


4! 24
= = 12.
2! 2
This example with small numbers shows again that in general, it will
not be possible to write down every possible arrangement explicitly to count
them, we have to rely on the above-mentioned formula.
Example 3.14. Question: From 150 runners, who participate in a compe-
tition, the first three receive a prize. The first prize is 2000 e, the second
prize is 1000 e and the third price is 500 e. What is the total number of
possibilities in which the prizes could be awarded?
Answer: We compute,
150! 150 · 149 · 148 · 147!
= = 3307800.
(150 − 3)! 147!
We see that writing down all possible results down explicitly and then counting
them may take a while.
In the introduction, we briefly mentioned that permutation is just a spe-
cial case of variation. The number of n-element variations of n objects is the
same as the number of permutations of n objects.
Example 3.15. We quickly prove this statement. The number of permuta-
tions of n objects is n! (see section 3.1.1), the number of n-element variations
of n objects is
n! n! n!
= = = n! .
(n − n)! 0! 1

40
Example 3.16. Question: For the running competition mentioned in a pre-
vious example, results are also recorded. The most important part of this
record is of course in what order the 150 runners finished. How many possi-
bilities are there?
Answer: 150!, which is a number so large, the authors’ calculator, a
TI-34II, gave up with an error. With a CAS (computer algebra system)
the author was able to compute the result, which is approximately 5.71 · 10262 ,
thus a number too large to put here explicitly.
We mentioned in a previous example that the number of atoms in the
observable universe is around 1 · 1080 , if we imagine that each of these atoms
is its own universe, with again 1 · 1080 “(sub)-atoms” and each of those is
again a whole universe with another 1 · 1080 “(sub-sub)-atoms”. Then the
total number of possible final results of the race would still be 10 trilliards
more than the total number of those sub-sub-atoms.

For the last exercise, it is impossible to write down all the possible out-
comes explicitly and count them. Still, using the formula we developed, we
are (theoretically) able to determine the number of arrangements.

3.2.2 Variation with repetition


In the previous section, variation without repetition, we counted the number
of possible arrangements, when choosing k elements from n different objects,
when order was important, and when we were not allowed to choose the
same element more than once. In this section, we will discuss variation with
repetition, i.e. we still have n objects to choose from, order is still important,
but now we are allowed to choose the same element twice. In the urn model,
variation without repetition, is drawing with replacement, i.e. we put balls
we have drawn back in the urn, so we can draw them again. The order in
which balls are drawn is still important. Furthermore, we note that now k
may be bigger than n, as we are allowed to choose every object as often as
we want.
We derive the formula for k-element variation of n objects with repetition.
In a similar way as in the previous sections, we compile a list (this is again
due to the fact that order is important) with k entries. For the first entry,
we can choose any one of the n objects. But, for the second entry, we can
again choose any one of the n objects, as repetition is allowed. Thus, the

41
total number of k-element variations of n objects with repetition is

· · · · · n} = nk .
| · n {z
n
k−times

Example 3.17. Question: A password for a certain website has to be built


out of 6 characters, each can be either from the 10 digits 0-9 or from the 26
letters of the lowercase Latin alphabet a-z. How many possible passwords are
there?
Answer: We have 36 choices for the first character, 36 choices for the
second etc. so we have in total

366 = 2176782336

different possible passwords.


Example 3.18. Question: The PIN of a debit card is typically a 4-digit
number, each digit a number between 0-9. How many different debit cards
does a bank have to issue, until they certainly gave out two debit cards with
the same PIN?
Answer: There are 4 digits, for each we have to choose a number between
0-9, thus there are
104 = 10000
possible PIN codes. In order to make sure that at least 2 customers have the
same PIN, the bank needs to issue 10000 + 1 = 10001 debit cards.

3.3 Combination
As in the previous sections, we still count in how many ways we can choose
some objects. In contrast to variation, sometimes it just matters, if a certain
object was chosen or not, not in what order the objects were chosen. The
prime example for this is “Lotto”, a certain game of change.
Example 3.19. In the Austrian version of Lotto, “6 aus 45”, everyone who
participates fills their lottery ticket by marking 6 from the 45 possible num-
bers, submits their ticket and gets a receipt. During the drawing, 45 balls of
the same size, which are labelled with the numbers 1 − 45, are then placed in
a transparent urn. A mechanism randomly chooses 6 from them for the main
prize. In order to win the main prize, the numbers that were selected on the
lottery ticked have to precisely match the ones that were drawn.

42
It is obvious that order is not important here, e.g. it does not matter if
you decide to mark the number 1 on the lottery ticket as your first or your
final choice, it only matters, if you have marked it or not. Similar with the
drawing procedure, it does not matter, if the ball with the number 1 was drawn
in the beginning, or at the end, just if it was drawn or not.

3.3.1 Combination without repetition


In the example of “Lotto”, any ball can only be drawn once - repetition is
not allowed. We will try to derive a formula to determine in how many ways
k elements can be chosen from n objects, if repeats are not allowed and the
order in which they are chosen is not important. Obviously, if k > n, there
is no way to achieve this, thus we assume k ≤ n.
In order to determine the total number of k-element combinations of n
objects, we will do the following:

1. let us first assume that the order was important, in the example of
Lotto drawings, this makes perfect sense, as the Lotto drawings are
sometimes broadcasted in television and there we are able to see in
which order the balls are drawn by the machine,

2. let us then consider, in how many ways the chosen elements could have
been ordered, and let us divide by that number, after all, in the end
it should not matter, in which order the elements were chosen. For
the Lotto results, only the sorted list of drawn numbers (in ascending
order) is published, i.e. if 1 was drawn it will always be the first number
that is shown in the list of results, no matter when it was drawn, if 45
is among the winning numbers, it will always be the last element of the
list of results.

We already know (see section 3.2.1) that the total number of choosing k el-
ements from n objects if order is important (and repeats are not allowed) is
n!
. Now we have k elements that are chosen, and as order was impor-
(n − k)!
tant so far, we know in what order they were chosen. From section 3.1.1, we
know there are k! possible arrangements for those k numbers. Thus, in the
n!
list of possible results (when order matters), there are k! lists, that
(n − k)!

43
contain the same k elements, just in different order. Hence, if we just divide,
n!
(n−k)! n!
= ,
k! k!(n − k)!
we get the desired number. Note that
 
n! n
= ,
k!(n − k)! k
hence the binomial coefficient nk is often spelled out as “n choose k”.


Example 3.20. Question: How many subsets that contain precisely 2 ele-
ments does the set {a, b, c} have?
Answer: We see that this is combination without repetition, we should
select k = 2 elements from the set {a, b, c}, which has n = 3 elements. It
does not matter in which order we do it (this is a property of sets we studied
in section 1.2). It is easy to see that there are 3 possibilities:
1. either we do not choose a, which gives us {b, c},
2. or either we do not choose b, which gives us {a, c},
3. or either we do not choose c, which gives us {a, b}.
And in fact,  
3 3!
= = 3.
2 2!(3 − 1)!
Reflecting what we did in the derivation of the formula, we could also
solve this problem like this. First we consider all tuples with non-repeating
elements we can make from the set {a, b, c}:

1. (a, b), 3. (b, a), 5. (c, a),

2. (a, c), 4. (b, c), 6. (a, c).


3!
There are (3−2)! = 6 such tuples. But always 2! = 2 contain the same
objects, just in a different order - matching pairs are highlighted with the
same colour. Thus, we have 26 = 3 possibilities to select 2 elements from the
set {a, b, c}.
 
45
Example 3.21. For “Lotto 6 aus 45”, this means that there are =
6
8145060 different possible results.

44
3.3.2 Combination with repetition
In this chapter, we present k-element combination of n objects with repeti-
tion, which represents choosing k elements from n objects, when the order
in which elements are chosen is not important, and when we are allowed to
choose the same element more than once. Similar as in section 3.2.2, we
allow k > n, as any object can be chosen multiple times. The corresponding
urn model is to draw balls with replacement, order does not matter.
In order to derive the formula for k-element combination of n objects
with repetition, we imagine n different objects x1 , x2 , . . . , xn . We create a
table where the columns are labelled with the xi , i = 1, 2, . . . , n, and put one
“+” in the corresponding column, if we want to select it once, two “+”, if we
want to select it twice, etc. and we simply leave the corresponding column
entry empty, if we do not want to select it. The total number of “+” has to
be k of course - after all, we want to choose k elements.
x1 x2 x3 ... xn
++ + +
In this example table, x1 would be chosen twice, x2 would not have been
chosen, . . . and xn would be chosen once.
Now, we could also represent this choice in another way. We could write
down a list of length n + k − 1 the following way. We start at x1 and write
down as many “+” as it was chosen. Then we write down a vertical bar “|”
to indicate that now we list a “+” for each choice of x2 . Then after adding as
many “+” as x2 was chosen, we write down another vertical bar, indicating
that we now consider how often x3 was chosen, etc. As there are n different
objects (x1 - xn ), we have to write down n − 1 vertical bars “|”; and as we
choose k elements, we have to write down k times a “+”. Hence, in total, we
really have a list containing n − 1 + k = n + k − 1 entries.
Example 3.22. The above table would correspond to the list
No. 1. 2. 3. 4. 5. 6. . . . n+k-2. n+k-1.
Symbol + + | | + | ... | +
or short: + + || + | . . . |+.
Example 3.23. Gummy bears are a very popular fruit gum candy, one brand
sells them in 6 different flavours, which are indicated by different colours:
pineapple (white), apple (green), lemon (yellow), orange (orange), strawberry

45
(pink) & raspberry (red). You offer a bag of gummy bears to some of your
friends and allow them to choose any 3 of them. We provide some examples
for possible choices (those are certainly not list all possible choices):
Friend # white # green # yellow # orange # pink # red
A 1 1 1
B 2 1
C 3
D 1 2
E 1 1 1
The corresponding lists in short form would be
A: +| + ||| + |,
B: | + +| + |||,
C: |||| + + + |,
D: +||| + +||,
E: +| + ||||+.
If we are ale to compute how many such lists there are, then we are
able to determine the number of k-element combinations of n objects with
repetition. The key insight is now: from the n + k − 1 positions in the list,
we choose k where we will put “+”, and we just put “|” in the remaining
n − 1 entries. It clearly does not matter in which order we choose positions,
and as we can only place one of the two symbols in each position, we have to
choose without repetition. Thus, we have k-element (the positions where we
put “+”) combination of n + k − 1 objects (the numbers from 1-n + k − 1,
which correspond to entries in the list), and the total number is given by (see
section 3.3.1)  
n+k−1
.
k
Alternatively, we could also have chosen the  positions,where we put the
n+k−1
n − 1 vertical bars “|”, which would result in possibilities. This
n−1
is not a contradiction, as in section 3 we already discussed the symmetry of
binomial coefficients,
     
n+k−1 n+k−1 n+k−1
= = .
k (n + k − 1) − k (n − 1

46
Example 3.24. Let us continue the example with choosing 3 gummy bears,
when there are 6 different flavours. We have that the total number of possible
choices is    
6+3−1 8
= = 56.
3 3

3.4 Exercises about combinatorics


Exercise 3.25. Question: Gummy bears (see example in section 3.3.2) are
sold in small 200 g packages, let us assume that each always contains exactly
84 gummy bears. Let us also assume that packages could contain any number
of gummy bears, i.e. we assume it would even be fine that a package only
contains bears of one colour/flavour. How many different bags are possible?
Answer: It does not matter, in which order the gummy bears are put into
the bag, hence it is combination. We are allowed to have more than one
gummy bear from each flavour, hence repetition is allowed, thus we want to
compute 84-element combination of 6 objects with repetition. Therefore, the
total number is    
6 + 84 − 1 89
= = 41507642.
84 84
Exercise 3.26. Question: To save money, you have 5 booked remaining
seats for a flight to your favourite holiday destination. You were really lucky,
because you got 2 First Class seats, one Economy, one Premium Economy
and one Business class seat very cheap. You take one of the First Class seats,
and you decide to invite four of your friends. You have 20 friends, how many
possibilities do you have to give four of them the seats?
Answer: You will give each friend only one seat, this means no repetition.
As the seats are all in different categories, we can imagine that you give
the other First Class seat away first, then the Business Class seat, then the
Premium Economy and finally the Economy Class seat. Hence, the order in
which you give away seats matters. This is 4 element (the seats) variation of
20 objects (your friends) without repetition. Thus, the number of possibilities
is equal to
20!
= 116280.
(20 − 4)!
Exercise 3.27. Question:The game “Mastermind” (Original version) is a
board game, with 10 rows of bigger holes for the coloured “code pegs” (6

47
different colours) and 4 smaller holes for the “key pegs” (black and white).
Additionally, at the end of the board, there is a row with 4 more holes for
code pegs and a shield to hide this row from one player. The first player, the
“code maker”, chooses a pattern of 4 coloured code pegs, which is then called
the “code”, and puts it into 4 holes at the end of the board and hides it from
the second player. There are 6 different colours to choose from, and a code
may contain multiple pegs of the same colour.
The other player, the “codebreaker”, should now try to find the code. To
this end, the codebreaker chooses a pattern as well and places it into the first
row of 4 holes. Then the code maker has to give feedback: for each peg of
the correct colour that was also placed in the correct position, the code maker
places a black key peg into a small hole next to the first row. For each peg in
the correct colour, but in an incorrect position, the code maker places a white
key peg.
Using this information, the codebreaker will now attempt to guess the
pattern using the second row of the board, etc.

10
1

In the above example, we see that the codebreaker already used 3 rows and is
close to breaking the code. How many possible codes are there?
Answer: We see that order (the position where the pegs are placed) mat-
ters, and we are allowed to use multiple pegs of the same colour. Thus, we
can answer the question by using 4-variation of 6 objects with repetition,

64 = 1296.

Exercise 3.28. Question: The local supermarket sells 15 different kinds of


apples. You want to buy 5 different apples. How many options do you have?

48
Answer: This is 5-combination of 15 objects without repetition. Hence,
the total number of options is
 
15
= 3003.
5

4 Solving equations, inequalities and systems


of linear equations
In this chapter, we are looking at equations, inequalities in one variable and
systems of linear equations in more than one variable. By solving, we under-
stand finding all possible assignments of values from the so-called universe
(or underlying set) to all variables, s.t. all equations or inequalities under
consideration are true. The universe U is the set of admissible values for the
variable(s). If no universe is explicitly specified, we assume U = R.
Similarly, as presented in section 2.2, we first always make sure that the
expressions we are considering are well-defined, possibly by restricting the
domain of definition D for some of the variables.
Finally, usually after some transformation steps, we want to describe
the solution set L., which contains all possible assignments of values to the
variables, s.t. all equations or inequalities under consideration are true. The
solution set may be empty, i.e. it can happen that L = ∅, in this case, we
say “The equation/inequality etc. has no solution”.
We will first, very briefly, mention linear equations in one variable. Then
we will discuss quadratic equations, equations containing roots and rational
equations in one variable. For inequalities, we will discuss linear inequalities
and rational inequalities. Finally, we will study systems of linear equations
in more than one variable.

4.1 Equations in one variable


4.1.1 Linear equations in one variable
Linear equations in one variable are most likely the simplest equations to
solve. Assuming U = R, a general linear equation in the variable x is of the
form
ax + b = c,

49
for a, b, c ∈ R and a ̸= 0. The set of solutions is then given by
 
c−b
L= .
a
If a = 0, then the above equation would simplify to b = c, which either has
no solution for x, i.e., L = ∅, this is the case when b ̸= c, or it has infinitely
many solutions, i.e., L = R, this is the case when b = c.
Example 4.1. Solve in R: x − 3 = 4.
Solution: We have U = R and D = R. We transform
4 − (−3)
x= ,
1
thus L = {7}.
Example 4.2. Solve in Z: x · 2 = 7.
Solution: We have U = Z and D = Z. We transform
7
x= ∈
/ Z,
2
hence L = ∅.
Example 4.3. Solve: 2x + 3 = 4 + x − 1 + x.
Solution: We have U = R and D = R. We isolate x and get

2x − x − x = 4 − 1 − 3,

which simplifies to 0 = 0. Therefore L = R.


Not always is the problem already stated this way, quite often, we have
first to determine the linear equation we want to solve from a word problem.
Example 4.4. Find a number, with the following property: multiplying the
number by 3 gives the same result as adding 2 to this number.
If we introduce the variable x for the number in question, the correspond-
ing linear equation is
3x = x + 2,
which we solve for x ∈ R. Simple transformation steps as above yield L =
{1}.

50
4.1.2 Quadratic equations in one variable
Quadratic equations in one variable (often x) in canonical form are equations
of the form
ax2 + bx + c = 0,
for a ∈ R \ {0} and b, c ∈ R. If a = 0, then the equation simplifies
to a linear equation, which we already considered in section 4.1.1. By
adding/subtracting terms, any quadratic equation can be brought into the
canonical form. We hereby assumed again that, if not specified explicitly
otherwise, the underlying set is the set of real numbers.
Example 4.5. If we consider the quadratic equation
x2 − 9 = −8x,
by adding 8x to both sides of the equation, we get
x2 + 8x − 9 = 0.
Here a = 1, b = 8, c = −9.
A fact, which is particularly useful to determine the solution set, is that
the product of any real numbers r, s ∈ R is equal to 0, if and only if (at least)
one of the factors is equal to 0:
r · s = 0, iff r = 0 or s = 0.
Example 4.6. For solving x2 + 8x − 9 = 0, we may notice
x2 + 8x − 9 = (x − 1)(x + 9),
therefore x − 1 = 0 or x + 9 = 0. The solutions of those linear equations are
1 and −9 respectively, therefore L = {−9, 1}.
There are various special cases, but in the general case, we solve the
quadratic equation by the following transformations, which yield equivalent
equations:
ax2 + bx + c = 0 | · 4a
4a2 x2 + 4abx + 4ac = 0 | + b2 − 4ac
2 2
| {zx} + 4abx
4a b2 = b2 − 4ac
|{z} + |{z}
(2ax)2 2·(2ax)·(b) (b)2

(2ax + b)2 = b2 − 4ac

51
Then, we introduce an auxillary variable y = 2ax + b and solve

y 2 = b2 − 4ac.

Thus, we reduced the problem to a special case, which yields the intermediate
solutions

y = ± b2 − 4ac,

if b2 − 4ac ≥ 0. In order to solve the initial equation, we solve the two (very
similar) linear equations

2ax + b = ± b2 − 4ac.

Hence the solution is given by



−b ± b2 − 4ac
x= ,
2a
n √ o
−b± b2 −4ac
i.e. L = 2a
.

Example 4.7. For the equation x2 + 8x − 9 = 0, we already know a = 1, b =


8, c = −9. We have b2 − 4ac = 64 + 36 = 100 ≥ 0. Therefore, the set of
solutions is  
−8 + 10 −8 − 10
, = {1, −9} .
2 2
A fact that we want to emphasize is, when we solve a quadratic equation in
canonical form for x ∈ R, there are three possible cases for the solution set L.
Depending on the so-called discriminant d, which is defined as d = b2 − 4ac,
we distinguish the following cases:

• Case d > 0: two solutions, i.e. |L| = 2.

• Case d = 0: one solution, i.e. |L| = 1.

• Case d < 0: no solutions, i.e. |L| = 0.

52
Given a quadratic equation in canonical form, by dividing by a, which is
assumed to be non-zero, we can represent the equation equivalently as
b c
x2 + x + = 0.
a a
b
Using the variables p = a
and q = ac , we have the equivalent equation

x2 + px + q = 0.

Example 4.8. For the quadratic equation

x2 + 8x − 9 = 0,

we have p = 8, q = −9.
b c
Using a
= p and= q, the solution formula can be transformed to:
a
√ √
−b ± b2 − 4ac −b b2 − 4ac
x= = ±
r2a 2a r 2a
p 2
b − 4ac p b2 4ac
=− ± 2
= − ± 2
− 2
2 r 4a 2 4a 4a
p  p 2

=− ± −q
2 2
Example 4.9. For the quadratic equation

x2 + 8x − 9 = 0,

using the formula we just derived for p = 8 and q = −9, we have


s 
2 √
8 8
x=− ± + 9 = −4 ± 25 = −4 ± 5,
2 2

which yields (again) L = {−9, 1}.


The first solution formula we derived is often called abc-formula. It may
look a bit more complicated, but it works for any quadratic equation. The
second formula is often referred to as the pq-formula. It has the disadvantage
that you may need to divide by a first, but it may look simpler. Moreover,
with this representation, we may state Vieta’s theorem.

53
Assume that x1 and x2 are the solutions for the quadric equation

x2 + px + q = 0, (6)

i.e. x21 + px1 + q = 0 and x22 + px2 + q = 0. Clearly, x1 and x2 are also the
solutions of
(x − x1 )(x − x2 ) = 0.
Expanding the above expression yields

x2 − xx1 − xx2 + x1 x2 = 0,

which, by factoring x can be transformed to

x2 − (x1 + x2 )x + x1 x2 = 0. (7)

Comparing equation (6) and equation (7), we see

p = −(x1 + x2 ) and q = x1 x2 .

This result is known as Vieta’s Theorem.


Example 4.10. For the quadratic equation

x2 + 8x − 9 = 0,

we know, p = 8 and q = −9. If we label the solutions of this equation x1 and


x2 , then
x1 + x2 = −8 and x1 x2 = −9.
An application of Vieta’s theorem is that we may find the solutions of the
above equation, if we assume that the two solutions x1 , x2 ∈ Z (note that this
assumption may not be justified in general). We then, under this assumption,
need to find two integers x1 , x2 ∈ Z, s.t. x1 x2 = −9, i.e. both x1 and x2 need
to be integer factors of −9. The set of integer factors of −9 is {±1, ±3, ±9}.
Moreover, as −9 < 0, we know that either x1 > 0 and x2 < 0 or vice versa.
We now simply try out the finitely many possibilities, until we found the
two solutions. For x = 1, we get

12 + 8 · 1 − 9 = 0.

Thus, we already found one solution, let us denote this one by x1 . As x1 ·x2 =
−9, we have x2 = −9 , and we found the two solutions.

54
If we tried e.g. x = (−1), we would get

(−1)2 + 8 · (−1) − 9 = −16 ̸= 0,

thus −1 is not a solution.

The geometric interpretation of a quadratic equation is finding the zeros


(roots) of a parabola. If a > 0 then the parabola opens upwards, if a < 0,
then the parabola opens downwards.

Example 4.11. For the quadratic equation x2 + 8x − 9 = 0 we have the


following geometric interpretation:

x
−9 1

We present a slightly more complicated example:

Example 4.12. Given the two quadratic functions (parabolas) f : R → R,


f (x) = 5x − 2x2 , and g : R → R, g(x) = x2 − 2, determine their points of
intersection (if there are any).
Before we start computing, we visualize the problem:

55
g(x) = x2 − 2

x
− 13 2

f (x) = 5x − 2x2

Now, in order to find the solutions, we compute all values x0 ∈ R, such


that f (x0 ) = g(x0 ). Hence, we solve

5x − 2x2 = x2 − 2

. Bringing this into canonical form yields

−3x2 + 5x + 2 = 0. (8)

Using the solution formula, we find the two solutions


p √
−5 ± 25 − 4 · (−3) · 2 −5 ± 49 −5 ± 7
x= = = ,
2 · (−3) −6 −6

hence L = − 31 , 2 .


The geometric interpretation of equation (8) is

56
x
− 31 2

We also briefly discuss solving equations of degree 3 and 4 (and higher).


For those cases, solution formulas, similar to the solution formulas for quadratic
equations (abc- or pq-formula) exist, but they are too complicated, and we
are not required to memorize them. Hence, we do not state them. Instead,
we just emphasize that for some special cases those problems can be solved,
using that a product of real numbers is equal to 0, if and only if at least
one of the factors is equal to 0 and using the fact that we are able to solve
quadratic equations. We also remark that for (polynomial) equations of de-
gree 5 or higher, it is proven that no general solution formulas exist.
A special case for a cubic equation, i.e. an equation of degree 3, we may
solve, is given, when we are able to bring it in the form
ax3 + bx2 + cx = 0,
for a, b, c ∈ R. If a = 0, then this is just a quadratic, and we are able to
solve. If a ̸= 0, then we factor x and get
x(ax2 + bx + c) = 0,
which has the solution x1 = 0, and we may determine all other solutions by
solving
ax2 + bx + c = 0.
Although this was already mentioned above, let us emphasize that we have
used here that a product of real numbers is equal to 0, iff at least one of the
factors is equal to 0.

57
Example 4.13. Solve x3 − x = 0. We factor x and solve x(x2 − 1) = 0. We
recognize x2 − 1 = (x + 1)(x − 1) and solve x(x + 1)(x − 1) = 0, hence the
three solutions are x1 = 0, x2 = 1, x3 = −1.

Obviously, in a similar way as shown above, for an equation of any degree,


whenever we are able to factor a linear or quadratic expression, we are able
to solve it (at least partially).

Example 4.14. Solve x4 − x2 = 0.


We factor x2 and solve x2 (x2 −1) = 0. We recognize x2 −1 = (x+1)(x−1)
and solve x · x · (x + 1)(x − 1) = 0. Hence, the three solutions are given by
x1 = 0, x2 = 1, x3 = −1. Here one solution, namely x1 = 0 “appears two
times”.

Example 4.15. Solve x4 − 16 = 0. We see x4 − 16 = (x2 + 4)(x2 − 4) and


solve (x2 + 4)(x2 − 4) = 0. Using for example the pq-formula, we get that
x2 + 4 = 0 has no solution, we emphasize that this means there is no real
number x, such that x2 + 4 = 0. On the other hand, x2 − 4 has the solutions
x1 = 2 and x2 = −2, hence x4 −16 has the real solutions x1 = 2 and x2 = −2.

For equations of degree 4, there is another special case, namely, if the


equation is of the form
ax4 + bx2 + c = 0.
As this equation can be represented as

a(x2 )2 + b(x2 ) + c = 0,

we introduce an auxiliary variable y = x2 , and solve first

ay 2 = by + c = 0,

which is a quadratic equation in y. Then, for every intermediate solution,


we solve
x2 = y.

Example 4.16. Solve for x ∈ R:


41 2 81
x4 − x + = 0.
8 256

58
As described above, we introduce the auxiliary variable y = x2 , and first solve
the following equation of degree 2
41 81
y2 − y+ = 0,
8 256
which yields
s 2
41 41 81
y= ± −
16 16 256
r
41 1681 81
= ± −
16 256 256
r
41 1600
= ±
16 256
41 40
= ± .
16 16
1
Hence we get the intermediate solutions y1 = 16 and y2 = 81
16
. Now, as we
2 2 1 2 81
set x = y, we solve both x = 16 = 0 and x = 16 . From the first equation,
we get the solutions x1 = 14 and x2 = − 14 , the second equation yields x3 = 49
and x4 = − 94 . Hence, for this equation, |L| = 4.
The geometric interpretation of this equation is

59
x
− 94 1
4

To end this section, we discuss solving quadratic equations for x ∈ C, i.e.


we now allow complex solutions. We will see that in this case, any quadratic
equation always has two solutions, if we count multiplicity.
We remember ourselves that a motivation for defining complex numbers
came from the equation x2 +1 = 0. Solving this equation using the pq-formula
yields r
0 0 √
x=− ± − 1 = ± −1.
2 4
As explained above, for d = −1 < 0, we have no real solutions, but using
complex numbers, we get the solutions i and −i.
When we solve in C, and d > 0, as described in examples above, we will
get two solutions with imaginary part 0 (i.e., real numbers). If d = 0, we get
one real solution, with multiplicity 2, which again corresponds
√ to a √ complex
solution with imaginary part 0. If d < 0, then −d > 0 and d = i · −d. In
this case, we have no real solution, but two complex solutions.
Example 4.17. Solve for x ∈ C: x2 − 2x + 5 = 0.

60
We use the pq-formula and get
2 √ √
x= ± 1 − 5 = 1 ± −4.
2
√ √
As −4 = i 4 = i2, we get

x1 = 1 + i2 and x2 = 1 − i2.

The solution set is L = {1 + i2} ⊂ C.

If we inspect the solutions of the equation in the previous example a


bit closer, we see that x1 = x2 . This means, we found that in this case,
the solution is given by a complex number and its complex conjugate. This
is not a coincidence, if a complex number is the solution of a quadratic
equation with real coefficients a, b, c or p, q, then also its complex conjugate
is a solution. This implies that if one of the solutions is a complex number
with imaginary part not equal to 0, we immediately found the other solution
as well.
The reason for this can be found looking at the pq-formula. The expres-
sion − p2 is always a real number and corresponds to the real part of both
solutions (remember that a complex number and its complex conjugate q  only
p 2
differ in the imaginary part). This means that only the expression −q
√2
(the discriminant d) can give an imaginary number.√ If d <, then d yields
an imaginary number. But, as we compute ± d, we get the aforementioned
structure of the solutions.
We note that Vieta’s theorem still holds when we allow complex solutions.

Example 4.18. We compute p = − ((1 + i2) + (1 − i2)) = −2 and q =


(1 + i2) · (1 − i2) = 1 · 1 + 1 · i2 − 1 · i2 − i2 · 2 · 2 = 5.

It is a good exercise to verify this statement for a generic complex number


z = x + iy, i.e. assume that x + iy solves

z 2 + pz + q = 0,

then p = −((x + iy) + (x − iy)) and q = (x + iy)(x − iy) and vice versa.

61
4.1.3 Radical equations in one variable
In this section, we briefly mention how to solve equations in one variable,
which contain square roots (radicals).

Example 4.19. We solve for x ∈ R: x + 2 = 3.
First, we determine the domain of definition, which is D = [−2, ∞).
Then, by squaring both sides of the equation, we get

x + 2 = 9,

which yields x = 7.

It can happen that such an equation has no solution, which can be easily
seen by considering the next example.

Example 4.20. We solve for x ∈ R: x + 2 = −3. The square root is
always a non-negative number, thus there cannot be a solution.

However, when we square an equation, we might introduce extraneous


solutions.

Example 4.21. We solve for x ∈ R: x + 2 = −3. We know the domain
of definition is D = [−2, ∞), when we square this equation, we get

x + 2 = (−3)2 = 9,

which yields x = 7. But, already in the previous example, we discussed that


this equation cannot have a solution. If we test the solution, i.e., if we plug
the solution x = 7 into the equation we started with, we see

9 = 3 ̸= −3

Thus, whenever we squared both sides, we test all intermediate solutions


we found, in order to be sure they really solve the initial problem. Note: in
section
√ 4.1.2, we did not just take the square root on both sides, we considered
“± d” to not lose solutions.
Let us consider a slightly more difficult example.

62

Example 4.22. Solve for x ∈ R: x + 2 = x. As before, the domain of
definition is D = [−2, ∞) Squaring both sides of the equation yields

x + 2 = x2 ,

which can be transformed in the quadratic equation x2 − x − 2 = 0, with the


intermediate solution set Lint = {−1, 2}. Let us test both solutions in the
original equation: p √
(−1) + 2 = 1 = 1 ̸= (−1),
and √ √
2+2= 4 = 2.
Hence, the set of solutions is L = {2}.
Note that the other solution −1 is contained in the corresponding domain
of definition, hence, without testing, we would not have detected that −1 is
not a solution to the equation.

In order to solve radical equations by squaring, it is necessary to isolate


the radical expression on one side of the equation (if possible).

Example 4.23. We solve x − 1 + 1 = x, for x ∈ R. We have D = [1, ∞)
and by subtracting 1 on both sides, we get

x − 1 = x − 1.

Now, as the radical expression is isolated, we square and get

x − 1 = x2 − 2x + 1,

which is equivalent to the equation

x2 − 3x + 2 = 0,

√ Lint = {1, 2}. Testing


which has the solutions √ both solutions yields the two
correct statements 1 − 1 + 1 = 1 and 2 − 1 + 1 = 2. Hence, L = Lint =
{1, 2}. Here, by squaring, we did not introduce extraneous solutions.

If we did not isolate the radical expression, using the binomial theorem,
squaring would yield an equation that contains a product of the root, i.e. the
radical expression would not vanish in general.

63

Example 4.24. Solving the equation x − 1 + 1 = x for x ∈ R, by squaring,
we get √
(x − 1) + 2 x + 2 · 1 = x2 ,
which is more complicated to solve than the initial equation.

Clearly, if there is more than one radical expression, isolating the root
expressions is not always possible. We present two even more involved ex-
amples.
√ √
Example 4.25. Solve for x ∈ R: 4x − 3 − 3x + 2 = 0. We determine
the domain of definition D = [ 43 , ∞) ∩ [ 32 , ∞) = [ 34 , ∞). Then, we see that
although there are two expressions√containing roots, we still are able to isolate
the radical expressions by adding 3x + 2 to both sides of the equation. Thus,
we have √ √
4x − 3 = 3x + 2,
and squaring yields
4x − 3 = 3x + 2,
which gives only one intermediate solution x = 5. Testing this solution shows
that the set of solutions L = {5}.
√ √
20 − 3 − 15 + 2 = 0.
√ √
Example 4.26. Solve for x ∈ R : x + 1 = x + 9. The domain of
definition is given by D = R≥0 . We cannot isolate both radical expressions
here. By squaring, we get

x + 2 x + 1 = x + 9,

which simplifies to √
x = 4,

which,
√ by squaring,
√ yields the intermediate solution x = 16. As 16 + 1 =
5 = 25 = 16 + 9, the set of solutions is indeed L = {16}.

4.1.4 Rational equations in one variable


In this short section, we want to study solving equations, where the variable
appears in the denominator of a fraction. Similarly, as in the previous section,
we have to take special care about the domain of definition, as in order to be

64
well-defined, the expressions in the denominator of a fraction are not allowed
to be equal to 0.
The central technique is to clear the denominators, usually by multiplying
with the least common multiple (LCM) of all denominators. We call this
factor the least common denominator (LCD).
Example 4.27. Solve for x ∈ R: x1 = 4. As indicated, we note D = R \ {0}.
The LCD is x, thus we solve 1 = 4x, which yields x = 14 . Checking, if this
solution candidate really solves the equation confirms L = { 41 } ⊂ D.
We present more examples.
1 2
Example 4.28. Solve for x ∈ R: x−1 = 3x . We determine D = R \ {0, 1}
and the LCD (x − 1) · 3x. Hence, we solve

3x = 2(x − 1),

which yields x = −2 ∈ D. Again, checking this solution:


1 2
= .
−3 −6
2 4
Example 4.29. Solve for x ∈ R: x+2 + x−2 = xx−1
2 −4 . We determine D =
2
R \ {−2, 2} and the LCD x − 4 = (x + 2)(x − 2). Hence, we solve

2(x − 2) + 4(x + 2) = x − 1,

which yields x = −1 ∈ D. Checking this solution candidate confirms it is the


solution.
x
Example 4.30. Solve for x ∈ R: 12 + x+3
3x
= x1 .. We determine D = R \ {0}
and the LCD 12x. Hence, we solve

x2 + 4x + 12 = 12,

which simplifies to
x(x − 4) = 0.
Hence, we consider the solution candidates x = 0 or x = −4. As 0 ∈
/ D, we
checkx = −4,
4 1 1
− + =− ,
12 12 4
hence L = {−4}.

65
4.1.5 Exponential and logarithmic equations in one variable
The topic of this section is solving equations, which contain exponentials or
logarithms, which are equations that contain expressions of the form bp or
logb (c), usually for b > 0, b ̸= 1. For such an expression bp , the number b is
called the base and p is called the exponent or power.
In high school, exponents are usually introduced as a shorthand notation
for repeated multiplication.

Example 4.31. x2 = x · x, x3 = x · x · x and for n ∈ N \ {0}, we have

xn = x
| · x {z
· · · · · x} .
n-times

Extending this notion first to exponents that are integers, then to rational
numbers and finally to all real numbers, we get the following computation
rules for exponents.
 p
• x1 = x and x0 = 1, • xy = xyp .
p

• xp · xq = xp+q , • (xp )q = xp·q ,


xp
• xq
= xp−q , • x−p = 1
xp
,
m √
• (xy)p = xp y p , • xn = n
xm .

The logarithm of c with base b is defined as the number p ∈ R, such that


bp = c. This means the logarithm is the inverse operation to exponentiation,
in the following sense: if for addition we ask what number x do we need to
add to n to get m, we solve n + x = m, and the solution can be found via
subtraction, x = m − n. How we presented logarithms, taking the logarithm
of c with base b is asking which number do we need to put in the exponent of
b to get c, bx = c and the solution can be determined by x = logb (c). From
the computation rules for exponents, we get the following computation rules
for logarithms.

• As x1 = x, we have logx (x) = logx (x1 ) = 1,

• as x0 = 1, we have logx (1) = logx (x0 ) = 0,

• for p ∈ R, log(xp ) = p,

66
• logx (c · d) = logx (c) + logx (d),
• logx ( dc ) = logx (c) − logx (d),
• logx (cd ) = d logx (c).

Another important rule is the change of base. This rule allows us to


represent any logarithm in another base. Assume that logb (a) = p, then by
definition bp = a. By taking logc on both sides, we get
logc (bp ) = logc (a),
which, by using the computation rules for logarithms presented above, sim-
plifies to
p logc (b) = logc (a).
If logc (b) ̸= 0, i.e., if b ̸= 1 then we can divide both sides by logc (b). As b
was the base of a logarithm, it cannot be 0, hence
logc (a)
p= .
logc (b)
As we defined p = logb (a), we have
logc (a)
logb (a) = .
logc (b)
This rule is particularly useful, if we want to compute logarithms with a
calculator. Most calculators are able to solve logarithms with base e (Euler’s
number), the so-called natural logarithm ln = loge , or the logarithm with
base 10.
Example 4.32. If we need to determine log3 (9), we immediately see, as 32 =
9, log3 (9) = 2. If we want to determine log3 (100), it is clear that the result
must be a number between 4 and 5, as 34 = 81 < 100 and 100 < 243 = 35 .
But what exactly is the number? We represent
log10 (100)
log3 (100) = ,
log10 (3)
and see log10 (100) = 2. By using a calculator, we find that log10 (3) ≈ 0.477,
hence
2
log3 (100) ≈ = 4.19 .
0.477
67
Example 4.33. Solve x = log4 (8) for x ∈ R. We not that as 8 is not an
integer power of 4, we cannot solve the problem immediately. But, as both
8 and 4 are integer powers of 2, we have the idea to change the base of the
logarithm. We represent
log2 (8) 3
log4 (8) = = .
log2 (4) 2
As it is very easy in this example to check our solution, we compute
3 √ √
4 2 = 43 = 64 = 8.

Now, using the computation rules we presented, we will solve some ex-
ponential and logarithmic equations. The central technique to solve those
equations is by taking corresponding logarithms on both sides of the equation
and writing both sides of the equation as the exponent of a corresponding
base respectively.
Example 4.34. We solve for x ∈ R: 3x+2 = 92x−3 . We notice 9 = 32 , hence
92x−3 = 34x−6 . We solve 3x+2 = 34x−6 by taking log3 on both sides, which
yields the linear equation
x + 2 = 4x − 6,
This equation can be solved using the methods from section 4.1.1, and has
the solution x = 83 . Checking this solution yields
8 14
3 3 +2 = 3 3 ,

and
8 7 14
92· 3 −3 = 9 3 = 3 3 .
Example 4.35. We solve 7 · 9x + 4x = 8 · 6x . As 6x ̸= 0 for all x ∈ R, we
can divide both sides by 6x . Hence, we solve
 x  x
9 4
7· + = 8.
6 6
9
As simplifies to 32 and 64 simplifies to 23 = 13 , we introduce the auxiliary
6
x 2
variable t = 32 , substitute this variable and solve the rational equation
1
7t + = 8,
t
68
x
for t. The LCD is t, we remark t ̸= 0 (see section 4.1.4), but as 32 > 0 for
all x ∈ R, this does not restrict the set of solutions. We multiply both sides
of the equation with t and get the quadratic equation

7t2 + 1 = 8t,

which we bring in canonical form

7t2 − 8t + 1 = 0.

Using the abc-formula (see section 4.1.2), we get the intermediate solutions
1
t1 = 1 and t2 = .
7
x
Now, we solve t = 32 for each intermediate solution. By taking log 3 on
x x 2
both sides, 1 = 23 yields x1 = 0. Similarly, from solving 17 = 32 we get
 
1 ln(7)
x2 = log 3 = log 3 (1) − log 3 (7) = − .
2 7 | {z2
} 2 ln(3) − ln(2)
=0

· 9}0 + |{z}
While checking the solution x1 = 0, is quite easy, we have 7| {z 40 =
=7 =1
· 6}0 , checking the solution x2 = − log 3 (7) is non-trivial.
8| {z
2
=8

Example 4.36. We solve for x ∈ R: log5 (x + 2) + log5 (3) = log5 (27). First,
we determine D = (−2, ∞), then we transform the equation to

5log5 (x+2)+log5 (3) = 5log5 (27) ,

which simplifies to
5log5 (x+2) · 5log5 (3) = 27
and
(x + 2) · 3 = 27.
This is a linear equation (see section 4.1.1) and has the solution x = 7 > −2.
Checking the solution candidate confirms we have found a solution

log5 (7 + 2) + log5 (3) = log5 (9 · 3) = log5 (27).

69
Example 4.37. We solve for x ∈ R: logπ (x) + logπ (x − 2) = logπ (x + 10).
First, we determine D = (0, ∞) ∩ (2, ∞) ∩ (−10, ∞) = (2, ∞), then we
transform the equation to

π logπ (x)+logπ (x−2) = π logπ (x+10) ,

which simplifies to
π logπ (x) · π logπ (x−2) = x + 10
and
x · (x − 2) = x + 10.
This is a quadratic equation (see section 4.1.2) and has the solutions x1 = 5
and x2 = −2. As x2 ∈ / D, we only check the solution candidate x1 .

logπ (5) + logπ (5 − 2) = logπ (5 · 3) = logπ (15) = logπ (10 + 5).

4.2 Inequalities in one variable


An inequality is a relation used to compare two numbers or other mathemat-
ical expressions, showing that one is

• less than or equal to, • greater than or equal to,

• less than, • greater than

the other. In all four cases, the numbers or expressions are not equal to
one another.

• a ≤ b means that a is less than or equal to b.

• a < b means that a is less than b.

• a ≥ b means that a is greater than or equal to b.

• a > b means that a is greater than b.

• a ̸= b simply means that a is not equal to b, but their relation is not


further specified.

70
Note, that a < b is equivalent to b > a and that a ≤ b is equivalent to
b ≥ a.
Sometimes, inequalities are only used as statements which can be true or
false. For example, 3 < 4 is a true statement and 5 ≥ 7 is a false statement.
But, most of the time, inequalities contain an unknown variable, mostly
denoted by x, for example, 4x − 1 ≥ 32 or − 14 x2 < 3x + 7. Then, we want
to determine which value(s) of x satisfy the inequality. This is called solving
an inequality. When not otherwise specified, as in previous sections, R is the
base set for the solution of an inequality. Usually, but not necessarily, the
solution of an inequality is a set, not a number. Therefore, the solution of
an inequality is (again) called the solution set, we will again denote it by L.
Similar to working with equations, there are four types of equivalent trans-
formations which can be used to solve inequalities: addition, subtraction,
multiplication, and division.
• Addition: Adding the same number to each side of an inequality leads
to an equivalent inequality. The inequality sign does not change.
• Subtraction: Subtracting the same number from each side of an in-
equality leads to an equivalent inequality. The inequality sign does not
change.
• Multiplication: There are two cases.
1. Multiplying both sides of an inequality with the same positive
number yields an equivalent inequality. The inequality sign does
not change.
2. Multiplying both sides of an inequality with the same negative
number does not yield an equivalent inequality; for this, the di-
rection of the inequality sign has to be reversed as well.
Example 4.38. Let us have a look at the inequality 5 < 8. We want
to multiply it with −3. In order to get an equivalent inequality, we not
only have to multiply 5 and 8 with −3, but we also need to reverse the
inequality sign. We get −15 > −24, which is equivalent to 5 < 8.

• Division: There are two cases.


1. Dividing both sides of an inequality by the same positive num-
ber yields an equivalent inequality. The inequality sign does not
change.

71
2. Dividing both sides of an inequality by the same negative number
does not yield an equivalent inequality; for this, the direction of
the inequality sign has to be reversed as well.

Example 4.39. Let us have a look at the inequality 16 ≥ −4. We


want to divide it by −4. In order to get an equivalent inequality, we
not only have to divide 16 and −4 by −4, but we also need to reverse
the inequality sign. We get −4 ≤ 1, which is equivalent to 16 ≥ −4.

4.2.1 Linear inequalities in one variable


As already mentioned in the introduction of this section, not only num-
bers, but also more complex mathematical expressions can be compared by
inequalities. We now look at a special inequality type, namely linear in-
equalities. An inequality of the form ax + b ≤ 0, ax + b < 0, ax + b ≥ 0 or
ax + b > 0 with a, b ∈ R and a ̸= 0 is called linear inequality in x.
Note, that a linear inequality can also have the form ax + b ≤ cx + d,
ax + b < cx + d, ax + b ≥ cx + d, or ax + b > cx + d with a, b, c, d ∈ R
and a ̸= 0. By subtracting cx and d on both sides, we obtain an equivalent
inequality, which has the form we presented.

Example 4.40. We present examples of linear inequalities.

• 5x + 3
7
≤0

• −7x + 1 > 0

• 4
5
x −3≥4

• 1 > −2x − 91

• x < − 12
34

• 52 ≤ −4x

Similar as with equations, linear inequalities can be solved by isolating the


unknown variable on one side of the inequality. This is done by applying the
aforementioned equivalent transformations on both sides of the inequality.
When the inequality is solved, the solution set is stated. The solution set
can also be visualized on the number line.

72
Example 4.41. Solve the linear inequality 4x − 3 > 21 for x ∈ R. State the
solution set and visualize it on the number line.
We look at the inequality 4x − 3 > 21. Since we want to isolate x,
we begin with adding 3 on both sides and obtain the equivalent inequality
4x > 24. Now we need to divide both sides of the inequality by 4. Since 4 is
a positive number, we do not need to reverse the inequality sign. We obtain
the equivalent inequality x > 6 and have already isolated x.
The solution set of the linear inequality 4x − 3 > 21 (for x ∈ R) is
the set of all real numbers which are greater than 6, i.e., the solution set is
L = {x ∈ R : x > 6} = (6, ∞). We visualize the solution set on the number
line:

5 6 7 8 9 10 11 12 13 14 15 16

Example 4.42. Solve in R: x − 3 ≤ 4.


Solution: We have L = (−∞, 7].

−3 −2 −1 0 1 2 3 4 5 6 7 8

Example 4.43. You are saving money to buy a new smartphone. You cur-
rently have 200 e, and you want to save enough money to buy a smartphone
that costs 700 e within the next 9 months. Let m represent the amount of
money you have to save each month. Write a linear inequality to represent
this situation, and find the range of values for m that would allow you to buy
the smartphone.
This problem can be modelled by the following linear inequality. Solve for
m ∈ R: 9 · m + 200 ≥ 700. We subtract 200 from both sides and get
9 · m ≥ 500.
The interpretation for this inequality is “How much money do we need to
save each of the nine months, to get the 500 e we still need?”. Dividing both
sides by 9, the number of months yields
500
m≥ = 55.5̇.
9
Considering this is a “real world problem”, we have to save at least 55.56 e
per month.

73
4.2.2 Quadratic inequalities in one variable
After studying linear inequalities, as for equalities, we consider the quadratic
case. In fact, solving quadratic inequalities heavily depends on being able to
solve quadratic equalities (see section4.1.2).
We will only study quadratic inequalities that are of the form x2 +px+q >
0, x2 + px + q < 0, x2 + px + q ≥ 0 or x2 + px + q ≤ 0, for p, q ∈ R. Using
the equivalent transformations presented on page 71 it should be clear that
any quadratic inequality can always be brought in any of these forms.
We discuss the case that the inequality is of the form x2 + px + q > 0, the
other cases work analogously, the differences will be discussed further below.
The solution algorithm in this case can be summarized as:
1. Solve x2 + px + q = 0. Assume there are 2 distinct solutions x1 and x2 .
2. Rewrite the inequality as a product of the linear factors (x − x1 )(x −
x2 ) > 0.
3. In order that the above inequality is fulfilled, either both x − x1 > 0
and x − x2 > 0, or both x − x1 < 0 and x − x2 < 0. Recall, for a
product of two factors to be positive, either both are positive or both
are negative, they need to have the same “sign”.
4. Let L1,1 be the solution of x − x1 > 0 and L1,2 be the solution of
x − x2 > 0, then we compute L1 = L1,1 ∩ L1,2 . Furthermore, let L2,1 be
the solution of x − x1 < 0 and L2,2 be the solution of x − x2 > 0, then
we compute L2 = L2,1 ∩ L2,2 .
5. The solution is given by L = L1 ∪ L2 .
Example 4.44. We solve for x ∈ R: 2x2 + x − 3 > 0. First, by division by
2, we bring it into the required form: x2 + 12 x − 32 > 0.
1. We solve x2 + 21 x − 32 = 0, which has the solutions x1 = − 23 and x2 = 1.
2. We rewrite the inequality to (x + 32 )(x − 1) > 0.
3 3
3. We inspect x + 2
> 0 and x − 1 > 0, and we inspect x + 2
< 0 and
x − 1 < 0.
4. We determine L1,1 = (− 23 , ∞) and L1,2 = (1, ∞), hence L1 = (1, ∞).
Furthermore, we have L2,1 = (−∞, − 32 ) and L2,2 = (−∞, −1), thus
L2 = (−∞, − 32 ).

74
5. The solution is therefore L = (−∞, − 23 ) ∪ (1, ∞) = R \ [− 32 , 1].

−3 −2 −1 −1 1 2
−2

−3

If we are considering a quadratic inequality of the form “<”, assuming


again that there are two distinct solutions x1 , x2 ∈ R, we represent the in-
equality as (x − x1 )(x − x2 ) < 0, which is true, if and only if either x − x1 < 0
and x − x2 > 0, or x − x2 > 0 and x − x2 < 0, i.e. the two factors must be
of opposite sign.

Example 4.45. We solve for x ∈ R: 2x2 + x − 3 < 0. First, by division by


2, we bring it into the required form: x2 + 12 x − 32 < 0.

1. We solve x2 + 21 x − 32 = 0, which has the solutions x1 = − 23 and x2 = 1.

2. We rewrite the inequality to (x + 32 )(x − 1) < 0.


3 3
3. We inspect x + 2
< 0 and x − 1 > 0, and we inspect x + 2
> 0 and
x − 1 < 0.

4. We determine L1,1 = (−∞, − 23 ) and L1,2 = (1, ∞), hence L1 = ∅.


Furthermore, we have L2,1 = (− 32 , ∞) and L2,2 = (−∞, −1), thus L2 =
(− 32 , 1).

5. The solution is therefore L = ∅ ∪ (− 32 , 1) = (− 32 , 1).

75
9

−3 −2 −1 −1 1 2
−2

−3

We remark that for strict inequalities, i.e. inequalities of the forms “>” or
“<”, we always have to exclude the solutions of the corresponding quadratic
equation. In the cases “≥” and “≤”, we include them.
Let us now deal with the special cases, when in step 1 we did not find
two distinct solutions.
• If the corresponding quadratic equation has no solution, either the
inequality under consideration is always true, then L = R, or the in-
equality under consideration is always false, then L = ∅.
In order to find out, which of those two cases we have for a given
inequality, we only need to consider what happens when we set x =
0, which means the inequality simplifies to q > 0, q < 0, q ≥ 0 or
q ≤ 0 respectively. As described in the introduction to this section,
this statement can be either true or false, if the statement is true, then
L = R, otherwise L = ∅.
Example 4.46. We consider possibly the simplest examples for those
cases.
– Solve for x ∈ R: x2 +1 > 0. The corresponding equation x2 +1 = 0
has no real solutions, hence we inspect 1 > 0. As this statement
is true, the solution set is L = R.
– Solve for x ∈ R: −x2 − 1 > 0. The corresponding equation −x2 −
1 = 0 has no real solutions, hence we inspect−1 > 0. As this
statement is false, the solution set is L = ∅.

76
10

2
x +1>0 8

7 L=R
6

−3 −2 −1 −1 1 2 3
−2

−3

−4

−5

−6

−7 L=∅
2
−x − 1 > 0−8
−9

−10

• If the corresponding quadratic equation has a unique solution x1 , de-


pending on the form of the inequality we are considering, we may
rewrite the quadratic inequality as
– either (x − x1 )2 ≥ 0, which has the solution set L = R,
– or (x − x1 )2 > 0, which has the solution set L = R \ {x1 },
– or (x − x1 )2 ≤ 0, which has the solution set L = {x1 },
– or (x − x1 )2 < 0, which has the solution set L = ∅.
Example 4.47. Let us discuss a concrete example for the four different
versions.
– Let us consider the quadratic inequality x2 − 2x + 1 ≥ 0. The
corresponding quadratic equation is x2 − 2x + 1 = 0, which has the
solution x1 = 1. Hence, we represent the inequality as (x−1)2 ≥ 0.
The corresponding solution set is L = R.

77
– If we solve x2 − 2x + 1 > 0, we have L = R \ {1}.
– If we solve x2 − 2x + 1 ≤ 0, we have L = {1}.
– If we solve x2 − 2x + 1 < 0, we have L = ∅.

6 6 6 6

5 5 5 5
2 2 2
4 (x − 1) ≥ 0 4 (x − 1) > 0 4 (x − 1) ≤ 0 4 (x2 − 1) < 0

3 3 3 3

2 2 2 2

1 1 1 1

−1−1 1 2 3 −1−1 1 2 3 −1−1 1 2 3 −1−1 1 2 3

4.2.3 Rational inequalities in one variable


Rational inequalities are inequalities, where the variable we want to solve
for appears in the denominator of a fraction. Mostly, we will use the same
solution techniques as for rational equalities, presented in section 4.1.4. But,
whenever we multiply with the LCD (the least common denominator), we
have to be careful: if the expression we multiply with is negative, then the
inequality sign needs to be “reversed” (see the introduction to the chapter
about solving inequalities), if the expression is positive, the inequality sign
is not reversed. We remark that the LCD cannot be equal to 0, hence it is
either positive or negative.
Example 4.48. Solve for x ∈ R: x1 < 2. We have D = R \ {0} and the
LCD is equal to x.We consider two cases, either x < 0 or x > 0.
1. Case 1: x < 0. Multiplication with x means we have to reverse the
inequality sign. Thus, we solve x1 · x > 2x, which is equivalent to

1 > 2x.

This linear inequality has the solution set L1 = (−∞, 0) ∩ (−∞, 12 ) =


(−∞, 0).
2. Case 2: x > 0. Multiplication with x means we do not reverse the
inequality sign. Thus, we solve x1 · x < 2x, which is equivalent to

1 < 2x.

78
This linear inequality has the solution set L2 = (0, ∞) ∩ ( 12 , ∞) =
( 12 , ∞).
Hence, the result is L = L1 ∪ L2 = R \ [0, 21 ].

−3 −2 −1 1 2 3
−1

−2

−3

We present one more complicated example:


1 1
Example 4.49. We solve for x ∈ R: x−1 − x+1 ≥ 21 . We determine d =
R \ {±1} and the LCD is equal to (x − 1)(x + 1) = x2 − 1. We study when
the LCD is negative, and when it is positive.
Solving (x + 1)(x − 1) < 0 with the methods presented in the previous
chapter yields the LCD is negative, if x ∈ (−1, 1). Similarly, the LCD is
positive, if (x + 1)(x − 1) > 0, which holds for x ∈ R \ [−1, 1] and should not
be a surprise.

1. Case 1: x ∈ (−1, 1). Multiplication with the LCD means we have to


reverse the inequality sign. Thus, we solve
1 2 
(x + 1) − (x − 1) ≤ x −1 .
2
This can be simplified to
x2 − 5 ≥ 0.
Solving the corresponding quadratic equation, we determine
√ √
(x − 5)(x + 5) ≥ 0,

79
√ √
which holds for x ∈ R \ (−
√ √5, 5). Hence, the intermediate solution
set L1 = (−1, 1) ∩ R \ (− 5, 5) = ∅.

2. Case 2: x ∈ R \ [−1, 1]. Multiplication with the LCD means we do not


reverse the inequality sign. Thus, we solve
1 2 
(x + 1) − (x − 1) ≥ x −1 .
2
This can be simplified to
x2 − 5 ≤ 0.
Solving the corresponding quadratic equation, we determine
√ √
(x − 5)(x + 5) ≤ 0,
√ √
which holds for x ∈ √[− √5, 5]. Hence,
√ the
 intermediate
√  solution set
L2 = R \ [−1, 1] ∩ [− 5, 5] = − 5, −1 ∪ 1, 5 .
 √  √ 
Hence, the result is L = L1 ∪ L2 = − 5, −1 ∪ 1, 5 .

−3 −2 −1 1 2 3
−1

−2

−3

4.3 Systems of linear equations


A system of linear equations is a collection of linear equations involving
the same set of variables, a solution to a system of linear equations is an

80
assignment of numbers to the variables, s.t. all the equations are satisfied
simultaneously. We present two solution methods, solving by substitution
method and solving by elimination method.
A system of equations is called consistent, if it has at least one solution,
it is called inconsistent, if it has no solution.

4.3.1 Substitution method


To solve a system of linear equations, one method, which can be used, is
the so-called substitution method. This method works by solving one of the
linear equations for one of the variables, then substituting the corresponding
expression for the same variable in all the other linear equations, effectively
reducing both the number of variables and the number of remaining equations
by 1. This step is then repeated as often as necessary, until ideally we arrive
at one remaining linear equation in one variable, which can be solved using
the method presented in section 4.1.1. Then, by repeatedly substituting back
the solutions for the variables that have already been solved, we try to find
solution for all the variables.

4.3.1.1 2-D Before we study more complicated systems of linear equa-


tions, we first inspect examples with 2 linear equations and 2 variables, and
solve them using the substitution method.
 
x
Example 4.50. Solve for ∈ R × R, i.e. x ∈ R and y ∈ R:
y

5x −2y =1
3x +3y =9
We decide that we want to solve the first equation for x, i.e. to isolate
the variable x (we could have also chosen differently). This yields (see sec-
tion 2.2).
1 + 2y
x= , (9)
5
and replacing x in the second equation with this expression we get
1 + 2y
3· + 3y = 9.
5

81
Thus, after simplification, we have y = 2. We substitute this back into
equation
  (9),  which then simplifies
  to x = 1. We have a unique solution
x 1 1
= , therefore L = { }.
y 2 2
The geometric interpretation of solving a system with 2 linear equations
in 2 variables is to compute all points of intersection of the corresponding
affine linear functions.
Example 4.51. For the example above, the geometric interpretation is

3x + 3y = 9 y 5x − 2y = 1
4

2 (1, 2)

1
x
−4 −3 −2 −1 1 2 3 4
−1

−2

−3

−4

In the previous case, we found one unique solution, and the geometric in-
terpretation is that we compute the point of intersection of the corresponding
affine linear functions. However, we could easily think of two affine linear
functions, where the corresponding graphs are parallel lines. How would
solving a corresponding system of linear equations look like?
Example 4.52. Solve for x, y ∈ R:
5x −2y =1
10x −4y = −12

82
We decide, as before, that we want to solve the first equation for x, i.e. to
isolate the variable x (again, we could have also chosen differently). We have
1 + 2y
x= , (10)
5
and replacing x in the second equation with this expression we get
1 + 2y
10 · − 4y = −12,
5
which simplifies to
2 = −12.
This statement is a contradiction, no values for x or y satisfy this equation.
Hence, we have no solution, i.e. L = ∅. As two parallel lines do not intersect,
we expected to find no intersection.
y
4 10x − 4y = 12

1
x
−4 −3 −2 −1 1 2 3 4
−1

−2

−3

−4
5x − 2y = 1

One case that we did not yet consider is the case, when for a given system
of linear equations, the graphs of the corresponding affine linear functions
coincide, i.e. when the geometric interpretation is twice the same line. Then,
we expect infinitely many solutions, as the two lines then have infinitely many
points of intersection.

83
Example 4.53. Solve for x, y ∈ R:
5x −2y =1
10x −4y =2
We decide, as before, that we want to solve the first equation for x, i.e. to
isolate the variable x (again, we could have also chosen differently). We have
1 + 2y
x= . (11)
5
Replacing x in the second equation with this expression we get
1 + 2y
10 · − 4y = 2,
5
which simplifies to
2 = 2.
As this is a tautology, the second equation does not give an additional con-
straint. I.e. the solution set is the set of solutions
  of equation (11). We have
x
infinitely many solutions, as every point ∈ R2 , with x = 52 y + 15 is a
y
1
 
solution. Choosing y = 0, leads to the solution 5 , choosing y = 5 leads
 11  0  
−1
to the solution 5 , choosing y = −3 leads to the solution etc. We
5 −3
can denote the solution set by
     
x 2 2 1 x 2 5 1
L= ∈R : x= ·y+ = ∈R : y = ·x− ,
y 5 5 y 2 2

or equivalently
 1  2      
0 1
L= 5 +λ· 5 : λ∈R = +λ· 5 : λ∈R .
0 1 − 12 2

The second way of representing the solution set, which corresponds to all
points on the corresponding line, will be easier to understand after studying
vectors in section ??.

84
y
4 10x − 4y = 2

1
x
−4 −3 −2 −1 1 2 3 4
−1

−2

−3

−4
5x − 2y = 1

To end this section, about systems of linear equations with 2 equations


and 2 variables, we give an example that is stated as a word problem.

Example 4.54. At his lemonade stand, Chris sells two types of drinks:
lemonade soda and strawberry soda. On the first day, 9 lemonade and 12
strawberry sodas for a total of 54 e are sold. Chris took in 36 e on the sec-
ond day, by selling 12 lemonade sodas and 4 strawberry sodas. What is the
price each of one lemonade and one strawberry soda?
We set x . . . price of one lemonade soda and y . . . price of one strawberry
soda. Therefore, we solve for x, y ∈ R+ 0:

9x +12y = 54
12x +4y = 36

This time, we choose to consider the second equation and solve for y (we
could have also chosen differently). This yields
36 − 12x
y= = 9 − 3x. (12)
4

85
Substituting this expression into the first equation gives

9x + 12(9 − 3x) = 54.

Hence, we get x = 2.Substituting


 this into equation (12) yields y = 9−3·2 =
2
6. Therefore, L = { }, i.e. the price of a lemonade soda is 2 e and the
3
price of a strawberry soda is 3 e.

4.3.1.2 3-D In this section, we consider systems of linear equations in 3


variables. The corresponding geometric interpretation is to find the points
of intersection of the corresponding planes, i.e. each equation now does not
represent a line in 2D space, but a plane in 3D space.
Here, the possible solution cases are:

1. One unique solution, which corresponds to a point in R3 ,

2. no solution, this can happen for example when at least 2 planes are
parallel,

3. infinitely many solutions,

(a) all planes intersect in a line,


(b) all planes are identical.

Let us consider some examples for those cases.

Example 4.55. We solve for x, y, z ∈ R:


x −2y +3z =9
−x +3y −z = −6
2x −5y +5z = 17
We isolate the variable x in the first equation, which yields x = 2y − 3z + 9.
Substituting this into the remaining equations and simplifying gives
y +2z =3
−y −z = −1

86
Now, as discussed in the previous section, we solve this 2D system. We
isolate y in the first equation of this 2D system of linear equations, which
gives y = −2z +3. Substituting this into the other equation, we get a solution
for z,
z = 2.
Now, we are able to solve for y,

y = −2 · 2 + 3 = −1,

and finally for x,


x = 2 · (−1) − 3 · 2 + 9 = 1.
 
1
Hence, we have one unique solution, L = { −1}.

2
Example 4.56. We solve for x, y, z ∈ R:
3x +2y −5z = −8
−11x +y +10z = −29
−x −9y +10z = −39
We isolate the variable x in the third equation, which yields x = −9y + 10z +
39. Substituting this into the remaining equations and simplifying gives
−y +z = −5
y −z = 3.8
This 2D system has no solution, as the equations describe two parallel lines.
We may see this, if we isolate y in the second equation, which gives y =
z + 3.8. Substituting this into the other equation, we get z,

−3.8 = −5,

which is a contradiction. Hence, we have no solution, L = ∅. The geometric


interpretation of the system of linear equations given in this example are three
planes that pairwise intersect in (one of ) 3 parallel lines.
Example 4.57. We solve for x, y, z ∈ R:
3x −4y +2z = −9
−4x +4y +10z = 32
−x +2y −7z = −7

87
We isolate the variable x in the third equation, which yields x = 2y − 7z + 7.
Substituting this into the remaining equations and simplifying gives
2y −19z = −30
2y −19z = −30
As these two equations are the same, it is obvious that we will get infinitely
many solutions. We could choose for any value for the variable z, which
would then first yield a value for y, and then a corresponding value for x.
(In this situation, we could also choose any value for y, which would then
yield corresponding values for z and x.)
In order to explicitly indicate that the solution depends on some choice,
we introduce a parameter λ. We then set z = λ, which yields y = −15 + 19 2
λ.
Therefore, x = 2 −15 + 19 2
λ − 7λ + 7 = −23 + 12λ.
Hence, using z = λ = 0 + 1 · λ, the set of solutions is
    
 −23 12 
19 
L=  −15 + λ 2 : λ ∈ R .
 
0 1
 

In the example above, we had to introduce 1 parameter, hence the geo-


metric interpretation is that we have 3 planes, which intersect in a line. A
line can be considered as a 1D object.
We consider one more example with infinitely many solutions.

Example 4.58. We solve for x, y, z ∈ R:


x y z =1
2x +2y 2z =2
−3x −3y −3z = −3
It is easy to check that the three equations describe the same plane, therefore
we expect the infinitely many solutions to describe a plane, which could be
considered a 2D object in 3D space. We isolate the variable x in the first
equation, which yields x = −y − z + 1. Substituting this into the remaining
equations and simplifying gives
0y +0z =0
0y +0z =0

88
Those statements are tautologies, if we choose a value for the variable z and
choose a value for y, from x = −y − z + 1, we get the corresponding value
for x. (Again, we could have chosen e.g. values for x and y and get the
corresponding value for z.)
In order to explicitly indicate that the solution depends on some choice,
we again first introduce a parameter λ. We then set z = λ = 0 + λ, which
yields x = −y − λ + 1. As we still have some choice, we introduce another
parameter µ and set y = µ = 0 + µ. Then, the value for x is determined by
x = −µ − λ + 1.
Hence, the set of solutions is
      
 1 −1 −1 
L = 0 + λ  0  + µ  1  : λ, µ ∈ R .
0 1 0
 

4.3.1.3 n-D It is clear that the substitution method also works, if we


have more than 2 or 3 variables and more than 2 or 3 linear equations to
consider. To illustrate this, we present one example with 5 linear equations
and 5 variables.

Example 4.59. Solve for x1 , x2 , x3 , x4 , x5 ∈ R:


2x1 +3x2 −4x3 +5x4 +6x5 = 10
3x1 −2x2 +4x3 −5x4 +6x5 = 15
4x1 +5x2 +6x3 −2x4 +3x5 = 20
5x1 −4x2 +3x3 +6x4 −2x5 = 25
6x1 +2x2 −5x3 +4x4 +3x5 = 30

We isolate x1 in the first equation. x1 = − 23 x2 + 2x3 − 52 x4 − 3x5 + 5.


Substituting x1 with this expression in the remaining 4 equations yields
− 13
2 2
x +10x3 − 25
2 4
x −3x5 =0
−x2 +14x3 −12x4 −9x5 =0
− 23
2 2
x +13x3 − 13
2 4
x −17x5 =0
−7x2 +7x3 −11x4 −15x5 =0
We isolate x2 in the second of the resulting equations. x2 = 14x3 −12x4 −9x5 .
Substituting x2 with this expression in the remaining 3 equations yields

89
−81x3 + 131
2
x4 + 111
2
x5 =0
−148x3 + 263
2
x4 + 173
2
x5 =0
−91x3 +73x4 +48x5 =0

We isolate x3 in the first of the resulting equations. x3 = 131 111


x + 162
162 4
x5 .
Substituting x3 with this expression in the remaining 2 equations yields
1915
162 4
x − 2415 x
162 5
=0
95
− 162 x4 − 2325 x
162 5
=0
483
We isolate x4 in the first of the resulting equations. x4 = x.
383 5
Substituting
x4 with this expression in the remaining equations yields
 
95 483 2325
− x5 − x5 = 0,
162 383 162

which simplifies to
 
45885 890475 5780
− − x5 = − x5 = 0.
62046 62046 383

Therefore x − 5 = 0. Substituting this back yields, x4 = 0, then x3 = 0 and


x2 = 0. Hence, x1 = 5.  
5
0
  5
Thus, we have a unique solution 0 ∈ R .

0
0

4.3.2 Elimination method


Another method to solve systems of linear equations is the so-called elim-
ination method. For this method, we first choose a variable, which occurs
in more than one equation, and one of the equations, in which this variable
occurs. Now, for each other equation, in which the chosen variable occurs,
we identify the coefficient of the variable under consideration, and multiply
the fixed equation with such a term that the coefficients for the fixed variable
match (are the same). Then we subtract the scaled equation from the other,
which leads to elimination of the variable in each equation, except the fixed

90
one, as all corresponding coefficients will be equal to 0. Then, by just con-
sidering the system of all linear equations except the one we fixed, we again
reduced the number of variables and the number of equations by 1, and we
may repeat the procedure.
We illustrate how the algorithm works again by first considering a few
2-D examples.

4.3.2.12-D First, an example with one unique solution.


 
x
Example 4.60. We solve for ∈ R2 :
y

3x −2y =1 (I)
6x +3y =9 (II)
Note that we have labelled the equations, which makes it easier to illustrate
what we are doing. We are now choosing to eliminate the variable x, which
occurs in both equations. We have again some freedom of choice, but we
choose equation (I). The goal is now to multiply the equation (1) by a number,
s.t. the coefficients for x in this equation and equation (II) match. I.e., we
solve c1 · 3 = 6.
3x −2y =1 (I)
6x +3y =9 (II)

It is clear that c1 = 2. Thus, we compute a new equation (II 1 ) : (II) − 2 · (I)


- the exponent should indicate that the corresponding equation has changed,
but we keep track that it came from “the old” second equation. Multiplica-
tion/Division of an equation should mean multiplying/dividing both sides, the
left-hand side and the right-hand side of the equation, by the corresponding
number. This yields the following system of linear equations, which has the
same solution set as the original problem:
3x −2y =1 (I)
0x +7y =7 (II 1 )

From equation (II 1 ), we immediately see y = 1, we could also find this by


dividing both sides of the equation by 7.
3x −2y =1 (I)
0x +y =1 (II 1 )

91
Now, we could, similar as in the section about the substitution method, sub-
stitute this expression for y into equation (I) and get corresponding solutions
for x. We present an alternative, we use equation (II 1 ) to eliminate the
variable y in equation (I). Hence, we solve c2 · 1 = −2, which yields c2 = −2.

3x -2y =1 (I)
0x +1y =1 (II 1 )

We determine a new equation (I 1 ) : (I) + 2 · (II 1 ). This yields the following


system of equations.
3x +0y =3 (I 1 )
0x +y =1 (II 1 )

Dividing equation (I 1 ) by 3 finally gives

x +0y =1 (I 1 )
0x +y =1 (II 1 )
From this very simplesystem
 of equations, we can immediately read off the
1
set of solutions L = { }.
1
Now, let us see how the elimination method works for an example of a
system of linear equations that has no solution.
 
x
Example 4.61. We solve for ∈ R2 :
y

2x −2y =1 (I)
6x −6y =9 (II)
We are now choosing to eliminate the variable x, which occurs in both equa-
tions. We have again some freedom of choice, but we choose equation (I).
The goal is now to multiply equation (1) by a number, s.t. the coefficients for
x in this equation and equation (II) match. I.e., we solve c1 · 2 = 6. We have
that c1 = 3. Thus, we compute a new equation (II 1 ) : (II) − 3 · (I). This
yields the following system of linear equations, which has the same solution
set as the original problem:
2x −2y =1 (I)
0x +0y =6 (II 1 )

92
Equation (II 1 ), 0 = 6, is a contradiction, no choice for x, y ∈ R can fulfil
this equation. Thus, L = ∅.
Finally, let us see how the elimination method works for a 2-D example
of a system of linear equations, which has infinitely many solutions.
 
x
Example 4.62. We solve for ∈ R2 :
y
2x −2y =1 (I)
6x −6y =3 (II)
The system of equations is almost the same as before, hence we apply the
same solution strategy. We are now choosing to eliminate the variable x,
which occurs in both equations, and we choose equation (I). We compute a
new equation (II 1 ) : (II) − 3 · (I). This yields the following system of linear
equations, which has the same solution set as the original problem:
2x −2y =1 (I)
0x +0y =0 (II 1 )
Equation (II 1 ), 0 = 0, is a tautology, every choice for x, y ∈ R fulfils this
equation. Thus, as equation (II 1 ) does not present any restriction, we just
consider the linear equation 2x − 2y = 1. In the previous section, we already
noticed that now for every choice of y, we get a corresponding solution for the
variable x and vice versa. We parametrize y = λ = 0+λ and get 2x−2λ = 1,
which is equivalent to x = 21 + λ. Thus,
1  
1
L={ 2 +λ· : λ ∈ R}.
0 1

4.3.2.2 3-D We present how to solve a system of linear equations with


3 equations and 3 variables with the elimination method, by inspecting two
examples: one example of such a system with a unique solution and one
example of a system with infinitely many solutions, which represent a line.
We inspect example 4.55 again.
Example 4.63. We solve for x, y, z ∈ R:
x −2y +3z =9 (I)
−x +3y −z = −6 (II)
2x −5y +5z = 17 (III)

93
We choose to eliminate the variable x from equations (II) and (III) by using
equation (I). We determine (II 1 ) : (II) + 1 · (I) and (III 1 ) : (III) − 2 · (I).

x −2y +3z =9 (I)


0x +y +2z =3 (II 1 )
0x −y −z = −1 (III 1 )

We choose to eliminate the variable y from equation (III 1 ) by using equa-


tion (II 1 ). We determine (III 2 ) : (III 1 ) + 1 · (II 1 ).

x −2y +3z =9 (I)


0x +y +2z =3 (II 1 )
0x +0y +z =2 (III 2 )

We choose to eliminate the variable z from equations (I) and (II 1 ) by using
equation (III 2 ). We determine (I 1 ) : (I) − 3 · (III 2 ) and (II 2 ) : (III 2 ) − 2 ·
(III 2 ).

x −2y +0z =3 (I 1 )
0x +y +0z = −1 (II 2 )
0x +0y +z =2 (III 2 )
Finally, before we are able to read off the solution very easily, we eliminate
the variable y from equation (I 1 ) by using equation (II 2 ). We determine
(I 2 ) : (I 1 ) + 2 · (II 2 ).

x +0y +0z =1 (I 2 )
0x +y +0z = −1 (II 2 )
0x 0y +z =2 (III 2 )

From equation (I 2 ), we read off x = 1, from equation (II 2 ), we read off


y = −1 and from equation (III 2 ), we read off z = 2. Hence, unsurprisingly,
 
1
L = { −1}.

2

It is worth noting that we proceeded in two phases: Phase 1: We first


eliminated one variable (x) from all but one equation (namely equation (I)).
When we leave this equation until we are in phase 2. Essentially, by con-
sidering the equations where we eliminated the variable, we have a system

94
of linear equations in one less variable and one less equation. (Here: equa-
tions (II 1 ) and (III 1 ) can be treated as equations that only depend on the
variables y and z.) We then eliminated the next variable (y) from all but
one equation of the “reduced” system.
Now, we inspect again example 4.57, to see how this would be solved
using the elimination method.
Example 4.64. We solve for x, y, z ∈ R:
3x −4y +2z = −9 (I)
−4x +4y +10z = 32 (II)
−x +2y −7z = −7 (III)
We choose the variable x and use equation (III) to eliminate the variable x
from the other equations, hence, we compute (I 1 ) : (I) + 3(III) and (II 1 ) :
(II) − 4(III).
0x +2y −19z = −30 (I 1 )
0x −4y +38z = 60 (II 1 )
−x +2y −7z = −7 (III)
For now, we leave equation (III), and use equation (I 1 ) to eliminate the
variable y in equation (II 1 ). We determine (II 2 ) : (II 1 ) + 2(I 1 ).
0x +2y −19z = −30 (I 1 )
0x +0y +0z =0 (II 2 )
−x +2y −7z = −7 (III)
As equation (II 2 ) is a tautology, it does not represent an additional con-
straint, we see that we will have infinitely many solutions. We now eliminate
the variable y also from equation (III).
0x +2y −19z = −30 (I 1 )
0x +0y +0z =0 (II 2 )
−x +0y +12z = 23 (III 1 )
It is now maybe even more obvious that, if we choose a value for z, by
equation (I 1 ) we will find a corresponding value for the variable y, and by
equation (III 1 ) we will find a corresponding value for the variable x. We
parametrize z = 0 + λ, and we get y = −15 + 19 2
λ and x = −23 + 12λ. Thus,
    
 −23 12 
L = −15 + λ  19 2
: λ∈R .
0 1
 

95
Many other sources, and also the author, find it more convenient, to al-
ways write the equation, which is used to eliminate the first, second, third,
etc. variable, as the first, second, third, etc. equation, if possible. It should
be clear that just presenting the equations in different order does not change
the solution set. (After all, the solution set is the intersection of the solu-
tion sets for the first, second, third, etc. equation and set intersection is
commutative and associative.)
Example 4.65. The solution set L1 ⊂ R3 of the system of linear equations
3x −4y +2z = −9 (I)
−4x +4y +10z = 32 (II)
−x +2y −7z = −7 (III)
and the solution set L2 ⊂ R3 of the system of linear equations
−x +2y −7z = −7 (III)
3x −4y +2z = −9 (I)
−4x +4y +10z = 32 (II)
are the same. We just swapped equations (I) and (III).
Moreover, when we chose an equation that is used to eliminate a variable,
often (but not always) it is slightly transformed in such a way that the
coefficient of the variable that gets eliminated is equal to 1. As we are only
able to eliminate variables with non-zero coefficient, this can always be done
by dividing the left-hand side and the right-hand side of the equation by this
coefficient. This certainly does not change the solution set.
Example 4.66. The solution set L1 ⊂ R3 of the system of linear equations
−x +2y −7z = −7 (I)
3x −4y +2z = −9 (II)
−4x +4y +10z = 32 (III)
and the solution set L2 ⊂ R3 of the system of linear equations
x −2y +7z =7 (I 1 )
3x −4y +2z = −9 (II)
−4x +4y +10z = 32 (III)
are the same. We just divided equation (I) by (−1) to get the equivalent
equation (I 1 ).

96
4.3.2.3 n-D We illustrate the power of clever use of the elimination
method, given when we have some experience in using this method, by con-
sidering example 4.67 again. We remember that for solving this system using
the substitution method, we had to consider a lot of fractions, which is cer-
tainly a great source of errors, when computing by hand. And even, when
we use a calculator, it may be difficult to not lose track, which decimal rep-
resentation of which fraction is stored in which part of the memory - not to
speak of round errors. We cannot fully avoid the problem of large numbers
here, but using the greatest common divisor sometimes, we are able to avoid
fractions.

Example 4.67. Solve for x1 , x2 , x3 , x4 , x5 ∈ R:


2x1 +3x2 −4x3 +5x4 +6x5 = 10 (I)
3x1 −2x2 +4x3 −5x4 +6x5 = 15 (II)
4x1 +5x2 +6x3 −2x4 +3x5 = 20 (III)
5x1 −4x2 +3x3 +6x4 −2x5 = 25 (IV )
6x1 +2x2 −5x3 +4x4 +3x5 = 30 (V )
We start the first phase. First, our goal is to have an equation, where the
variable x1 appears with coefficient 1. It may not be too hard to spot, that if
we compute (I 1 ) : −(I) + (II), we have such an equation, namely

x1 −5x2 +8x3 −10x4 +0x5 =5 (I 1 ).

Using this equation to eliminate the variable x1 in all other equations, we get
x1 −5x2 +8x3 −10x4 +0x5 =5 (I 1 )
0x1 +13x2 −20x3 +25x4 +6x5 =0 (II 1 )
0x1 +25x2 −26x3 +38x4 +3x5 =0 (III 1 )
0x1 +21x2 −37x3 +56x4 −2x5 =0 (IV 1 )
0x1 +32x2 −53x3 +64x4 +3x5 =0 (V 1 )
Now, in order to get an equation with coefficient 1 for the variable x2 , we
determine (II 2 ) : 2(II) − (III).

0x1 +x2 −14x3 +12x4 +9x5 =0 (II 2 ).

We eliminate the variable x2 in the equations (III), (IV ) and (V ).

97
x1 −5x2 +8x3 −10x4 +0x5 =5 (I 1 )
0x1 +x2 −14x3 +12x4 +9x5 =0 (II 2 )
0x1 +0x2 +324x3 −262x4 −222x5 =0 (III 2 )
0x1 +0x2 +257x3 −196x4 −191x5 =0 (IV 2 )
0x1 +0x2 +395x3 −320x4 −285x5 =0 (V 2 )
Finding a combination of equations that produces a coefficient 1 for the vari-
able x3 is not so easy, but computing the gcd (greatest common divisor) of 324
and 257 yields gcd(324, 257) = 1 = −233̇24 + 29 · 257. Hence, we determine
(III 3 ) : −23(III 2 ) + 29(IV 2 ):

0x1 +0x2 +x3 +342x4 −433x5 =0 (III 3 ).

Thus, we consider
x1 −5x2 +8x3 −10x4 +0x5 =5 (I 1 )
0x1 +x2 −14x3 +12x4 +9x5 =0 (II 2 )
0x1 +0x2 +x3 +342x4 −433x5 = 0 (III 3 )
0x1 +0x2 +0x3 −88090x4 +111090x5 = 0 (IV 3 )
0x1 +0x2 +0x3 −135410x4 +170750x5 =0 (V 3 )

We divide equations (IV 3 ) and (V 3 ) by the common factor 10, and then, in
order to eliminate the variable x4 , we determine (IV 4 ) : −6264 · (IV 3 ) +
4075 · (V 3 ), which gives

0x1 +0x2 +0x3 +x4 −6151x5 =0 (IV 4 ).

The system of linear equations under consideration is now


x1 −5x2 +8x3 −10x4 +0x5 =5 (I 1 )
0x1 +x2 −14x3 +12x4 +9x5 =0 (II 2 )
0x1 +0x2 +x3 +342x4 −433x5 = 0 (III 3 )
0x1 +0x2 +0x3 +x4 −6151x5 = 0 (IV 4 )
0x1 +0x2 +0x3 +0x4 −83273616x5 =0 (V 4 )
Although 83273616 is quite a large number, the system is now quite easy to
solve. We just divide equation (V 4 ) by −83273616 and get

0x1 +0x2 +0x3 +0x4 +x5 =0 (V 5 ).

In the second phase, using this equation, from which we already see x5 = 0,
to eliminate the variable x5 from every other equation.

98
x1 −5x2 +8x3 −10x4 +0x5 =5 (I 2 )
0x1 +x2 −14x3 +12x4 +0x5 =0 (II 3 )
0x1 +0x2 +x3 +342x4 +0x5 =0 (III 4 )
0x1 +0x2 +0x3 +x4 +0x5 =0 (IV 5 )
0x1 +0x2 +0x3 +0x4 +1x5 =0 (V 5 )
(Note: Technically, equation (I 1 ) did not change.) We repeat this procedure
for the other variables, which yields the systems
x1 −5x2 +8x3 +0x4 +0x5 =5 (I 3 )
0x1 +x2 −14x3 +0x4 +0x5 =0 (II 4 )
0x1 +0x2 +x3 +0x4 +0x5 = 0 (III 5 )
0x1 +0x2 +0x3 +x4 +0x5 = 0 (IV 5 )
0x1 +0x2 +0x3 +0x4 +1x5 =0 (V 5 )
and
x1 −5x2 +0x3 +0x4 +0x5 =5 (I 4 )
0x1 +x2 +0x3 +0x4 +0x5 =0 (II 5 )
0x1 +0x2 +x3 +0x4 +0x5 = 0 (III 5 )
0x1 +0x2 +0x3 +x4 +0x5 = 0 (IV 5 )
0x1 +0x2 +0x3 +0x4 +1x5 =0 (V 5 )
and
x1 +0x2 +0x3 +0x4 +0x5 =5 (I 5 )
0x1 +x2 +0x3 +0x4 +0x5 =0 (II 5 )
0x1 +0x2 +x3 +0x4 +0x5 = 0 (III 5 )
0x1 +0x2 +0x3 +x4 +0x5 = 0 (IV 5 )
0x1 +0x2 +0x3 +0x4 +1x5 =0 (V 5 )
From this last system, we are able to read off the solution x1 = 5, x2 = x3 =
x4 = x5 = 0.
Another thing we may have noticed is that we had to write the “names”
of the variables x1 , x2 , . . . again and again and again, which consumes a lot
of paper. We could avoid this by using a table and the following convention:
In the first column, we always write the coefficient of the first variable, in the
second column, we always write the coefficients of the second variable and
so on. The last column represents the coefficient on the right-hand side of
the equation. If we transform a system of linear equations into an equivalent
one, we separate them using two horizontal lines in the table. We now use
the very first column to label the equation.

99
Example 4.68. We solve for x1 , x2 , x3 , x4 ∈ R:
2x1 −4x2 +8x3 +4x4 = −40 (I)
6x1 −3x2 −2x3 −3x4 = 51 (II)
6x1 +3x2 −10x3 −10x4 = 122 (III)
−6x1 +6x2 +8x3 = −48 (IV )
The corresponding table would look like this.

x1 x2 x3 x4
(I) 2 −4 8 4 −40
(II) 6 −3 −2 −3 51
(III) 6 3 −10 −10 122
(IV ) −6 6 8 0 −48

We now solve this example using the elimination method. You may want to
check the computation by writing out each row of the table explicitly.

100
x1 x2 x3 x4
(I) 2 −4 8 4 −40
(II) 6 −3 −2 −3 51
(III) 6 3 −10 −10 122
(IV ) −6 6 8 0 −48
(I 1 ) 1 −2 4 2 −20
(II 1 ) 0 −9 −26 −15 171
(III 1 ) 0 15 −34 −22 242
(IV 1 ) 0 −6 32 12 −168
(I 1 ) 1 −2 4 2 −20
(IV 2 ) 0 1 − 32
6
−2 28
(II 2 ) 0 0 22 3 −81
(III 2 ) 0 0 46 8 −178
(I 1 ) 1 −2 4 2 −20
(IV 2 ) 0 1 − 32
6
−2 28
3
(II 3 ) 0 0 1 22
− 81
22
38
(III 3 ) 0 0 0 22
− 190
22

(I 1 ) 1 −2 4 2 −20
(IV 2 ) 0 1 − 32
6
−2 28
3
(II 3 ) 0 0 1 22
− 81
22
(III 4 ) 0 0 0 1 −5
(I 2 ) 1 −2 4 0 −10
(IV 3 ) 0 1 − 32
6
0 18
(II 4 ) 0 0 1 0 −3
(III 4 ) 0 0 0 1 −5
(I 3 ) 1 −2 0 0 2
(IV 4 ) 0 1 0 0 2
(II 4 ) 0 0 1 0 −3
(III 4 ) 0 0 0 1 −5
(I 4 ) 1 0 0 0 6
(IV 4 ) 0 1 0 0 2
(II 4 ) 0 0 1 0 −3
(III 4 ) 0 0 0 1 −5

101
Hence, the solution set is  
6
2
L = {
−3}.

−5
We see that this way of writing down the equivalent systems of linear
equations is much more efficient than repeating all the variable names for
each equation each time - all in all, it is just the coefficients that matter.
In section ??, an even more compact way of writing down the equivalent
systems which appear when solving this system with the elimination method
will be presented.
Exercise 4.69. Solve all systems of linear equations, which were presented
during this section (section 4.3), using the “table”-notation.

4.3.3 Under- and overdetermined systems


We want to end this section by giving a few remarks on so-called underde-
termined or overdetermined systems of linear equations. We call a system
of linear equations underdetermined, if there are fewer equations than vari-
ables. In this case, the system cannot have a unique solution, but it may
have infinitely many or no solution. We call a system of linear equations
overdetermined, if there are more equations than variables.
Some simple examples:
Example 4.70. We consider the underdetermined system of equations
2y −19z = −30 (I)
−x +12z = 23 (II)
Here, we have 3 variables, x, y, z, but only 2 equations. We get infinitely
many solutions,
    
 −23 12 
19 
L=  −15 + λ 2 : λ ∈ R .
 
0 1
 

Comparing the last example with example 4.64, we immediately see that
sometimes undetermined systems occur naturally: whenever we study a sys-
tem of linear equations with equal number of variables and equations, and

102
it turns out at least one of the equations does not represent an additional
constraint, i.e., using the other equations, we can transform (or reduce) it
to the form “0 = 0”, then, by omitting this equation, we are left with an
underdetermined system.
The next simple example shows that underdetermined systems also may
have no solutions.
Example 4.71. We determine the solution set L ⊆ R3 of
x +y +z =0 (I)
x +y +z =1 (II)
Choosing to eliminate the variable x by using equation (I), we get the equa-
tion (II 1 ) : (II) − (I),
0 +0y +0z =1 (II 1 )
which is a contradiction. The system is hence inconsistent, we have no solu-
tion.
L = ∅.
It may be obvious, but the next example shows that trivially, overdeter-
mined systems also may be inconsistent.
Example 4.72. We solve for x ∈ R:
x =0 (I)
x =1 (II)
This is a system of two linear equations and one variable. By computing
(II) − (I), we get the contradiction 0 = 1. Hence, L = ∅.
However, when we are able to transform sufficiently many equations into
the form “0 = 0”, we may find that also an overdetermined system of equa-
tions can be consistent, i.e., it may have either one unique solution or even
infinitely many solutions.
 
x
Example 4.73. We solve for ∈ R2 :
y
x +y =2 (I)
x −y =0 (II)
3x +y = 4 (III)
−2x +8y = 6 (IV )

103
We use the “table”-notation (by now you should have enough practise to read
this):

x y
(I) 1 1 2
(II) 1 −1 0
(III) 3 1 4
(IV ) −2 8 6
(I) 1 1 2
(II 1 ) 0 −2 −2
(III 1 ) 0 −2 −2
(IV 1 ) 0 10 10
(I) 1 1 2
(II 1 ) 0 1 1
(III 2 ) 0 0 0
(IV 2 ) 0 0 0
(I 1 ) 1 0 1
(II 1 ) 0 1 1
(III 2 ) 0 0 0
(IV 2 ) 0 0 0
Thus, we have a unique solution
 
1
L={ }.
1

104

You might also like