0% found this document useful (0 votes)
28 views55 pages

MA138 Lecture Notes

The document consists of lecture notes for MA132 Foundations and MA138 Sets and Numbers, covering fundamental mathematical concepts such as natural numbers, integers, rational and real numbers, complex numbers, sets, functions, relations, and polynomials. It includes definitions, theorems, and proofs related to topics like proof by induction, the well-ordering principle, and unique factorization. The notes aim to provide an alternative perspective on the same subjects as the original lecture notes by David Mond.

Uploaded by

r4jvpatel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views55 pages

MA138 Lecture Notes

The document consists of lecture notes for MA132 Foundations and MA138 Sets and Numbers, covering fundamental mathematical concepts such as natural numbers, integers, rational and real numbers, complex numbers, sets, functions, relations, and polynomials. It includes definitions, theorems, and proofs related to topics like proof by induction, the well-ordering principle, and unique factorization. The notes aim to provide an alternative perspective on the same subjects as the original lecture notes by David Mond.

Uploaded by

r4jvpatel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

MA132 Foundations

MA138 Sets and Numbers


Daan Krammer
December 24, 2018

Contents
1 Introduction 3

2 Natural numbers, Proof by Induction and the Fundamental Theo-


rem of Arithmetic 3
2.1 The well-ordering principle and division . . . . . . . . . . . . 3
2.2 Induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.3 Unique factorisation for integers . . . . . . . . . . . . . . . . 6
2.4 The Euclidean algorithm . . . . . . . . . . . . . . . . . . . . . 8

3 Integers and Modular Arithmetic 9


3.1 Subgroups of Z . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2 The extended Euclidean algorithm . . . . . . . . . . . . . . . 12
3.3 Binary operations . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.4 Rings and fields . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5 Zn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.6 Congruence modulo n . . . . . . . . . . . . . . . . . . . . . . 16

4 Rational and Real Numbers 17


4.1 Construction of Q . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2 Not examinable: axioms for Q . . . . . . . . . . . . . . . . . . 18
4.3 Not examinable: Construction of R by Dedekind cuts . . . . . 18
4.4 Not examinable: axioms for R . . . . . . . . . . . . . . . . . . 20
4.5 Decimal expansions . . . . . . . . . . . . . . . . . . . . . . . . 20

5 Complex Numbers 23
5.1 The field of complex numbers . . . . . . . . . . . . . . . . . . 23
5.2 Complex conjugation and the absolute value . . . . . . . . . . 24
5.3 The exponential function . . . . . . . . . . . . . . . . . . . . . 25
5.4 Trigonometry . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.5 The complex plane . . . . . . . . . . . . . . . . . . . . . . . . 28
5.6 The quadratic formula . . . . . . . . . . . . . . . . . . . . . . 28
5.7 Roots of unity . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.8 Polar form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

6 Sets, functions and relations 31


6.1 True and false . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
6.2 Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
6.3 An analogy between sets and logic . . . . . . . . . . . . . . . 35
6.4 Not examinable: Russell’s paradox . . . . . . . . . . . . . . . 35
6.5 Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
6.6 Bijections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
6.7 Composition and identity . . . . . . . . . . . . . . . . . . . . 37
6.8 One-sided inverses . . . . . . . . . . . . . . . . . . . . . . . . 38
6.9 Inverses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
6.10 Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

7 Polynomials 42
7.1 Polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
7.2 Division with remainder for polynomials . . . . . . . . . . . . 44
7.3 Unique factorisation for polynomials . . . . . . . . . . . . . . 45
7.4 The Euclidean algorithm . . . . . . . . . . . . . . . . . . . . . 47
7.5 Roots of polynomials . . . . . . . . . . . . . . . . . . . . . . . 48
7.6 C is algebraically closed . . . . . . . . . . . . . . . . . . . . . 49
7.7 Algebraic numbers . . . . . . . . . . . . . . . . . . . . . . . . 50

8 Counting: to infinity and beyond? 51


8.1 Cardinals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
8.2 Countable sets . . . . . . . . . . . . . . . . . . . . . . . . . . 52
8.3 The Schroeder-Bernstein theorem . . . . . . . . . . . . . . . . 53
8.4 Power sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
8.5 The continuum hypothesis . . . . . . . . . . . . . . . . . . . . 55
MA132 Foundations / MA138 Sets and Numbers 3

1 Introduction
The modules MA132 Foundations and MA138 Sets and Numbers come with
the same set of lecture notes written by David Mond.
You’re now looking at my alternative lecture notes which cover more or
less the same topics. For your convenience I have used the same titles for
chapters. Titles for sections are different.
If you carefully study either set of lecture notes then you’re in good shape
for the exam. More important than looking at a second set of lecture notes,
is doing lots of exercises.

2 Natural numbers, Proof by Induction and the


Fundamental Theorem of Arithmetic
2.1 The well-ordering principle and division

We assume that you are familiar with the basics of the integers

Z= . . . , −2, −1, 0, 1, 2, . . . .

You may study the integers from the ground up (and much deeper) in later
modules.
The natural numbers are 0, 1, 2, . . .. In words, they are the nonnegative
integers. We write N for the set of natural numbers.

Definition 1. Let a, b ∈ Z. We say that a divides b, and write a | b, if there


exists c ∈ Z such that ac = b.

Lemma 2. Let a, b, c ∈ Z. If a | b and a | c then a | b + c.

Proof. Exercise. 

Lemma 3. Let a, b, c ∈ Z. If a | b and b | c then a | c.

Proof. Exercise. 

Lemma 4. Let a, n be integers and 0 < a < n. Then n does not divide a.

Proof. Suppose n divides a. Say, b ∈ Z and a = bn. As a, n > 0 we must have


b > 0. But then b ≥ 1 so bn ≥ n > a = bn, a contradiction. This proves that
n does not divide a. 

Theorem 5: The well-ordering principle or WOP. Let A be a nonempty set


of natural numbers. Then A has a least element, that is, an element x ∈ A such
that x ≤ y for all y ∈ A.

Proof. We cannot prove this here because it goes too close to the axioms of
mathematics for our scope. 
4 Chapter 2 December 24, 2018

Exercise (2.1) Use the WOP to prove that there exists a greatest integer n
such that n2 < 1000.

Definition 6. A prime number is a number p ∈ Z>1 such that there are no


a, b ∈ Z>1 with p = ab.

The prime numbers are 2, 3, 5, 7, . . .

Lemma 7. Let n ∈ Z≥2 . Then n is divisible by a prime number.

Proof. Put D = {d ≥ 2 : d | n}. Then n ∈ D so D is nonempty. By the WOP


D has a least element p. We claim that p is a prime number. Suppose it is
not: p = ab with a, b ≥ 2. Then a ∈ D and a < p, contradicting the fact that
p is least in D. So p is a prime number that divides n. 

Proposition 8. There are infinitely many prime numbers.

Proof. Suppose there are only finitely many prime numbers. Denote them by
p1 , . . . , pk and put n = p1 · · · pk + 1. Then pi ∤ n for all i. Also, n ≥ 2 so n
is divisible by a prime number q by lemma 7. So q is a prime number not in
{ p1 , . . . , pk }. This is a contradiction and finishes the proof. 

Proposition/Definition 9. Let m, n ∈ Z with n > 0. Then there exist unique(1)


q, r ∈ Z such that m = qn + r and 0 ≤ r < n. We say that r is the remainder
on division of m by n and q is the quotient.

Proof. Equivalent is: there exists unique r ∈ Z such that n | m − r and


0 ≤ r < n. We shall prove it in this form. Exercise: prove that the two forms
are equivalent.
Existence. Let P = {r ≥ 0 : n | m − r}. Then P is nonempty because if
m ≥ 0 then m ∈ P; and if m ≤ 0 then m(1 − n) ∈ P.
By the WOP the set P has a least element r.
It remains to prove that r < n. Suppose not. Put r1 = r − n. Then
n | m − r1 and r1 ≥ 0, that is, r1 ∈ P. Also, r is the least element of P. So
r ≤ r1 = r − n. This contradiction proves existence.
Uniqueness. Suppose that r1 , r2 have the required properties, that is,
n | m − ri and 0 ≤ ri < n for all i ∈ {1, 2}. We must prove r1 = r2 .
Put s = r1 − r2 . We may assume s ≥ 0 because otherwise we interchange
r1 and r2 . Then 0 ≤ s < n. We have

n | (m − r2 ) − (m − r1 ) = r1 − r2 = s.

From n | s and 0 ≤ s < n it follows that s = 0 by lemma 4. So r1 = r2 . This


proves uniqueness. 

(1) In
this case, unique means that there is at most one such pair (q, r). This is the first
time we are seeing uniqueness. It is all over mathematics. Proofs often treat existence and
uniqueness separatedly, as is the case here.
MA132 Foundations / MA138 Sets and Numbers 5

2.2 Induction

Proposition 10: Induction, first form. Let T ⊂ N. Assume:


(a) We have 0 ∈ T.
(b) For all n ∈ T we have n + 1 ∈ T.
Then T = N.

Proof. Write U = N r T. Assume T 6= N. Then U is nonempty. By the WOP,


U has a least element k. We have k 6= 0 by (a). We have k − 1 6∈ U because
k is the least element of U. So k − 1 ∈ T. By (b) it follows that k ∈ T, a
contradiction. 

The above proposition is one form of the principle of induction. A better-


known form is the following.

Proposition 11: Induction, second form. For all natural numbers n let P(n)
denote a statement (2) . Assume that P(0) is true. Assume P(n) ⇒ P(n + 1)
for all n ≥ 0. Then P(n) holds for all n.

Proof. Let T be the set of natural numbers n such that P(n) is true. Then
conditions (a) and (b) of proposition 10 hold. So T = N. That is, P(n) is
true for all n. 

Example 12. We are now ready for our first example of proof by induction.
Prove that for all n ≥ 0 we have

1 + 2 + · · · + n = n(n + 1)/2.

Solution. As this is our first proof of induction we shall use rather formal
language. For n ≥ 0 let P(n) denote the statement that 1 + 2 + · · · + n =
n(n + 1)/2.
The assertion P(0) states that 0 = 0 and is therefore true.
Assuming that P(n − 1) is true for a fixed n ≥ 1, we shall prove P(n):
 
1 + 2 + · · · + n = 1 + 2 + · · · + (n − 1) + n
= n(n − 1)/2 + n by P(n − 1)
= n(n + 1)/2

which proves P(n). The proof is finished by the principle of induction. 

Let’s do another example in less formal language. At the point where we


prove P(n) ⇒ P(n + 1), the statement P(n) is called the induction hypoth-
esis.

Example 13. Let x ∈ R. Prove that for all n ≥ 0 we have


n−1 1 − xn
Σ xk = .
k= 0 1−x

(2) A statement is the sort of thing that’s true or false.


6 Chapter 2 December 24, 2018

Solution. This is our second example of induction and is put in less formal
language.
Induction on n. For n = 0 the equation reads 0 = 0 which is true.
Assuming the result for n (n ≥ 0) we prove it for n + 1:
n  n−1 
Σ xk = Σ xk + xn
k= 0 k= 0

1 − xn
= + xn by the induction hypothesis
1−x
1 − xn + (1 − x) xn 1 − xn+1
= = . 
1−x 1−x
Proposition 14: Induction, third form. Let T ⊂ N. Assume that for n ≥ 0
we have
{0, . . . , n − 1} ⊂ T ⇒ n ∈ T.
Then T = N. Note that for n = 0 the convention is {0, . . . , n − 1} = ∅.

Proof. Exercise. 

2.3 Unique factorisation for integers

The following is sometimes called the fundamental theorem of arithmetic.

Theorem 15. Let n ∈ Z≥1 . Then n can be written as a product of prime


numbers. This factorisation is unique up to reordering the factors.

Remark 16. Here is a more precise way to state the uniqueness part in the
theorem. Let p1 , . . . , pk and q1 . . . , qℓ be prime numbers and assume

p1 · · · pk = q1 · · · qℓ .

Then k = ℓ and there exists a bijective (3) map s: Ik → Ik where we write


Ik = {1, . . . , k} such that ps(i ) = qi for all i ∈ Ik .

Proof. Existence. Induction on n. For n = 1 there is nothing to prove: it is


the empty product. We prove that it is true for n, assuming that it is true for
all elements of {1, . . . , n − 1}.
If n is prime there is nothing to prove. Suppose n is not prime. Say,
n = ab with a, b > 1. Then a, b admit factorisations

a = p1 · · · pk , b = q1 · · · qℓ

with pi and q j prime. Then

n = ab = p1 · · · pk q1 · · · qℓ

which is a factorisation of n. This proves existence.

(3) See definition 133 for the definition of bijective.


MA132 Foundations / MA138 Sets and Numbers 7

Uniqueness. Suppose factorisation of natural numbers is not unique. Let


n be the least counterexample (which exists by the WOP). Write

n = p1 · · · pk = q1 · · · qℓ

where pi and q j are prime numbers, and the two factorisations are distinct
even up to reordering.
Suppose p1 = q1 . Then n/ p1 would have two distinct factorisations,
contradicting minimality of our counterexample n. Likewise, pi 6= q j for all
i, j. Moreover, pi ∤ q j and q j ∤ pi for all i, j because the pi and the q j are
prime.
We may assume p1 < q1 . Put s = (q1 − p1 )q2 · · · qℓ . Then s < n so s
admits a unique factorisation by minimality of the counterexample n.
We have

s = q1 · · · qℓ − p1 q2 · · · qℓ
= p1 · · · pk − p1 q2 · · · qℓ = p1 ( p2 · · · pk − q2 · · · qℓ ).

So p1 | s. So one of the factors in (q1 − p1 )q2 · · · qℓ is divisible by p1 . It can’t


be q j for j > 1. So p1 | q1 − p1 . So p1 | q1 . Contradiction. 

Exercise (2.2) Prove existence in the above theorem using the WOP instead
of induction. Prove uniqueness in the above theorem using induction instead
of the WOP.

Corollary 17. Let p be a prime number. Let a, b ∈ Z be such that p | ab. Then
p | a or p | b.

Proof. Exercise. Hint: Use theorem 15. 

Proposition/Definition 18.
(a) Let m, n ∈ Z not both be zero. A common divisor of m, n is an integer
dividing both m and n. Among the common divisors of m, n there is
greatest one. It is written hcf(m, n) or gcd(m, n) and called the highest
common factor or greatest common divisor of m, n.
(b) Let m, n ∈ Z r {0}. A common multiple of m, n is an integer divisible
by both m and n. Among the positive common multiples of m, n there is
least one. It is written lcm(m, n) and called the least common multiple
of m, n.

Proof. Exercise. 

Proposition 19. Let p1 , . . . , pk be distinct prime numbers. For i ∈ {1, . . . , k}


let mi , ni ∈ N and put

m= Πi pimi , n= Πi pini .
(a) We have m | n if and only if mi ≤ ni for all i.
(b) We have hcf(m, n) = ∏i min(mi , ni ).
(c) We have lcm(m, n) = ∏i max(mi , ni ).
8 Chapter 2 December 24, 2018

(d) Every common divisor of m, n divides hcf(m, n).


(e) Every common multiple of m, n is a multiple of lcm(m, n).
(f) We have lcm(m, n) hcf (m, n) = mn.

Proof. It is clear that (b)–(e) follow from (a). Also (f) follows from (b) and
(c).
Proof of (a). The proof of ⇐ is an easy exercise. Proof of ⇒. Suppose
m | n, say, n = md.
We may assume that { p1 , . . . , pk } contains all prime divisors of d (if not,
enlarge this set by more prime numbers and set m j = n j = 0 for the new
indices). Write
d
d = Π pi i
i

with di ∈ N for all i. Then

Πi pimi +di = md = n = Πi pini .


By uniqueness of factorisation, and since the pi are distinct, it follows that
mi + di = ni for all i. So mi ≤ ni . This proves (a). 

2.4 The Euclidean algorithm

Let m, n ∈ Z>0 . One way to find hcf(m, n) is to factorise both and use
proposition 19(b). We won’t use that method because there is a much faster
method known as the Euclidean algorithm.

Lemma 20. Let m, n, q, r ∈ Z with n 6= 0 and suppose m = qn + r. Then


hcf(m, n) = hcf(r, n).

Proof. Let d = hcf(m, n) and e = hcf(r, n). Let m1 , n1 ∈ Z be such that


m = dm1 , n = dn1 . Then

r = m − qn = dm1 − qdn1 = d(m1 − qn1 ).

So d | r. Also d | m which proves d | hcf(r, m) = e.


Note that if (m, n, q, r) satisfies the given equation m = qn + r then so
does (r, n, −q, m). Using this symmetry it follows that e | d as well. So d = e
as required. 

Proposition 21. Fix m > 1. For 1 ≤ i ≤ m let ni , qi ∈ Z with (n1 , n2 ) 6=


(0, 0). Assume
ni − 1 = q i ni + ni + 1
for 1 < i < m and nm = 0. Then hcf(n1 , n2 ) = |nm−1 |.

Proof. By lemma 20 we have hcf(ni −1 , ni ) = hcf(ni , ni +1 ) for 1 < i < m. By


an obvious induction it follows that

hcf(n1 , n2 ) = hcf(nm−1 , nm ) = hcf(nm−1 , 0) = |nm−1 |. 


MA132 Foundations / MA138 Sets and Numbers 9

The Euclidean algorithm has as input n1 , n2 ∈ Z with (n1 , n2 ) 6= (0, 0)


and as output m and the ni as in the above proposition. In particular, it finds
hcf(n1 , n2 ) by the above proposition (it is |nm−1 |).
It remains to explain how the Euclidean algorithm finds m and the ni .
Well, one way is to choose (recursively) ni +1 to be the remainder on division
of ni −1 by ni (this determines qi ). It halts as soon as some nm is defined and
equals zero.
But there are other possibilities. For example, on denoting by ri the re-
mainder of ni −1 on division by ni then ni +1 could be chosen to be whichever
among ri , ri − ni has least absolute value.
Note that we can finish the algorithm earlier than expected if we already
know hcf(ni −1 , ni ) for some reason. Then computing n j for j > i isn’t neces-
sary because hcf(n1 , n2 ) = hcf(ni −1 , ni ) by a similar argument as in proposi-
tion 21.

Example 22. We shall show how to compute hcf(226, 126) by the Euclidean
algorithm. We write n1 = 226, n2 = 126.
Next we put n3 = n1 − n2 = 226 − 126 = 100.
Next we put n4 = n2 − n3 = 126 − 100 = 26.
Next we put n5 = n3 − 4n4 = 100 − 4 × 26 = 100 − 104 = −4.
Next we put n6 = n4 + 6n5 = 26 − 6 × 4 = 26 − 24 = 2.
Finally, n7 = n5 + 2n6 = −4 + 2 × 2 = −4 + 4 = 0.
So hcf(n1 , n2 ) = |n6 | = 2.
Imagine though that we knew already that hcf(26, −4) = 2. Then com-
puting ni for i > 5 wouldn’t be necessary.

3 Integers and Modular Arithmetic


3.1 Subgroups of Z

Definition 23. A subgroup of Z is a subset A ⊂ Z such that 0 ∈ A and for


all a, b ∈ A we have a − b ∈ A.

Remark 24. This is a special case of something not considered here. We


shall not define groups; and we shall not define subgroups of groups. These
are taught, for example, in MA136 Introduction to Abstract Algebra.

Definition 25. For n ∈ Z we define nZ := {nx | x ∈ Z}.

Proposition 26. Let n ∈ Z. Then nZ is a subgroup of Z.

Proof. Firstly, 0 = n · 0 ∈ nZ. Let a, b ∈ nZ. We must prove a − b ∈ nZ. By


definition of nZ there are x, y ∈ Z such that a = nx and b = ny. Therefore
a − b = nx − ny = n( x − y) ∈ nZ. 

Exercise (3.1) Let A be a subgroup of Z.


(a) Prove that m ∈ A implies −m ∈ A.
10 Chapter 3 December 24, 2018

(b) Prove that for all a, b ∈ A we have a + b ∈ A.


(c) Prove that for all n ∈ A we have nZ ⊂ A. Hint: by induction on x
prove that nx ∈ A for all x ∈ N.

Exercise (3.2) Let A be a subset of Z. Prove that A is a subgroup of Z if


and only if 0 ∈ A, and for all a, b ∈ A we have a + b ∈ A and − a ∈ A. Hint:
Use exercise 3.1.
This gives us an alternative definition of subgroup of Z. It is the definition
in the lecture notes by David Mond.

Proposition 27. Let A be a subgroup of Z. Then there exists unique n ≥ 0


such that A = nZ.

Proof. Existence. Suppose first A ⊂ {0}. Since 0 ∈ A we have A = {0} =


0Z which proves one case of (a).
From now on we assume that A 6⊂ {0}. Let m ∈ A r {0}. Then
{m, −m} ⊂ A by exercise 3.1(a). So |m| ∈ A. So A contains a positive
integer. By the WOP the set A ∩ Z>0 has a least element n.
We shall prove that A = nZ.
Firstly we have A ⊃ nZ by exercise 3.1(c). It remains to prove that
A ⊂ nZ.
Let p ∈ A. By proposition 9 (division with remainder) there exist q, r ∈ Z
such that p = qn + r and 0 ≤ r < n. Fix such q, r.
We shall argue that r ∈ A. We have qn ∈ A because nZ ⊂ A by exer-
cise 3.1(c). So r = p − qn ∈ A.
Since r ∈ A and r < n and n is the least element of A ∩ Z>0 we must
have r ≤ 0. But we know that 0 ≤ r so r = 0. Therefore p = qn ∈ nZ and
the proof of existence is finished.
Uniqueness. Suppose mZ = nZ and 0 ≤ m < n. From m ∈ nZ and
0 ≤ m < n it follows that m = 0. Therefore n ∈ nZ = mZ = 0Z = {0}. So
n = 0. This contradiction proves uniqueness. 

There is a remarkable relation between inclusion of subgroups and divi-


sion.

Lemma 28. Let m, n ∈ Z. Then nZ ⊂ mZ is equivalent to m | n.

Proof. Proof of ⇒. Suppose nZ ⊂ mZ. Then n ∈ nZ ⊂ mZ. So there exists


d ∈ Z such that n = dm. This proves ⇒.
Proof of ⇐. Suppose m | n. Let d ∈ Z be such that n = dm. In order
to prove nZ ⊂ mZ, let x ∈ nZ. Then there exists y ∈ Z such that x = ny.
Therefore x = ny = (dm) y = m(dy) ∈ mZ. This proves ⇐. 

Exercise (3.3) Find an example of subgroups A, B ⊂ Z such that A ∪ B is


not a subgroup of Z.

Definition 29. Let A, B be subgroups of Z. We define



A + B := x + y x ∈ A, y ∈ B .

Proposition 30. Let A, B, C be subgroups of Z.


MA132 Foundations / MA138 Sets and Numbers 11

(a) The set A ∩ B is a subgroup of Z.


(b) The set A + B is a subgroup of Z.
(c) We have A + B ⊂ C if and only if A ⊂ C and B ⊂ C. In words: A + B is
the least subgroup of Z containing A ∪ B.

Remark 31. We could extend the above proposition by the following coun-
terpart to (c) which is completely trivial. We have C ⊂ A ∩ B if and only if
C ⊂ A and C ⊂ B. In words: A ∩ B is the greatest subgroup of Z contained
in A and B.

Proof. Proof of (a). We have 0 ∈ A and 0 ∈ B (because A, B are subgroups)


so 0 ∈ A ∩ B. Let now x, y ∈ A ∩ B. Since x, y ∈ A and A is a subgroup
we have x − y ∈ A. Likewise, since x, y ∈ B and B is a subgroup we have
x − y ∈ B. It follows that x − y ∈ A ∩ B.
Proof of (b). We have 0 ∈ A and 0 ∈ B so 0 = 0 + 0 ∈ A + B. Let now
x, y ∈ A + B. We must prove x − y ∈ A + B. By definition of A + B there
are p, q ∈ A and r, s ∈ B such that x = p + r and y = q + s. Since A is
a subgroup, we have p − q ∈ A. Likewise, since B is a subgroup, we have
r − s ∈ B. Therefore

x − y = ( p + r) − (q + s) = ( p − q) + (r − s) ∈ A + B.

Proof of (c). Proof of ⇒. We have A ⊂ A + B ⊂ C and B ⊂ A + B ⊂ C.


Proof of ⇐. Let x ∈ A + B. We must prove x ∈ C. By definition of
A + B there are p ∈ A and q ∈ B such that x = p + q. We have p ∈ A ⊂ C
and q ∈ B ⊂ C so { p, q} ⊂ C. But C is a subgroup, so x = p + q ∈ C by
exercise 3.1(b). 

Finally our endeavours with subgroups pay off in the following theorem.

Theorem 32. Let x, m, n ∈ Z.


(a) Suppose m and n are not both zero and put h = hcf(m, n). Then

mZ + nZ = hZ.

(b) Retain the notation of (a). Then x is a common divisor of m, n if and only
if it divides h.
(c) Suppose m and n are both nonzero and put ℓ = lcm(m, n). Then

mZ ∩ nZ = ℓZ.

(d) Retain the notation of (c). Then x is a common multiple of m, n if and


only if ℓ | x.

We’ve proved parts (b) and (d) of the above theorem before (using unique
factorisation of integers) but we prove them again as a byproduct of (a) and
(c). Parts (a) and (c) are new.

Proof. Proof of (a) and (b). By proposition 27 there exists unique d > 0 with
mZ + nZ = dZ. We must prove: x is a common divisor of m, n if and only if
12 Chapter 3 December 24, 2018

x | d. Well,

x|m and x | n
⇔ xZ ⊃ mZ and xZ ⊃ nZ by lemma 28
⇔ xZ ⊃ mZ + nZ by proposition 30(c)
⇔ xZ ⊃ dZ
⇔ x|d by lemma 28.

Proof of (c) and (d). By proposition 27 there exists unique d > 0 with
mZ ∩ nZ = dZ. We must prove: x is a common multiple of m, n if and only
if d | x. Well,

m | x and n | x
⇔ xZ ⊂ mZ and xZ ⊂ nZ by lemma 28
⇔ xZ ⊂ mZ ∩ nZ
⇔ xZ ⊂ dZ
⇔ d|x by lemma 28. 

Corollary 33. Let m, n ∈ Z, not both zero. Then there are a, b ∈ Z such that
am + bn = hcf(m, n).

Proof. Easy from theorem 32(a). 

Remark 34. Let m, n ∈ Z. So far, hcf(m, n) is only defined if (m, n) 6= (0, 0),
and lcm(m, n) is only defined if m, n are nonzero.
It is common to define them in the remaining cases by the conditions that
parts (a) and (c) of theorem 32 hold for all integers m, n; and hcf(m, n) ≥ 0
and lcm(m, n) ≥ 0.
Equivalently: hcf(m, 0) = |m| and lcm( p, q) = 0 if pq = 0.

3.2 The extended Euclidean algorithm

Let m, n ∈ Z be not both zero and put d = hcf(m, n). Recall the Euclidean
algorithm (example 22 and the material just before it) for computing d.
The extended Euclidean algorithm does the same, then goes on to find
a, b such that am + bn = d which we know to exist by corollary 33. It works
by going backwards through the sequence nm , nm−1 , . . . , n1 .
Let’s do this in the case of example 22. Recall: n1 = 226, n2 = 126 and

n3 = n1 − n2 n4 = n2 − n3 n5 = n3 − 4n4
n6 = n4 + 6n5 = 2 = d n7 = n5 + 2n6 = 0.

The new part of the extended Euclidean algorithm goes as follows:

d = 2 = n6 = n4 + 6n5 = n4 + 6(n3 − 4n4 )


= 6n3 − 23n4 = 6n3 − 23(n2 − n3 )
= −23n2 + 29n3 = −23n2 + 29(n1 − n2 ) = 29n1 − 52n2 .
MA132 Foundations / MA138 Sets and Numbers 13

3.3 Binary operations

Definition 35. Let A be a set and write A2 or A × A for the set of pairs (a, b)
with a, b ∈ A. A binary operation on A is a map f : A2 → A.

In practice we prefer a different (shorter) notation than f (a, b). Usually


we choose a new symbol, say, ∗, and write a ∗ b instead of f (a, b). Often we
even prefer to forget all about f and say that ∗ is the binary operation.

Example 36. Here are a few common examples of binary operations:

A Z C C R {maps R → R}
f (a, b) a + b a + b ab max(a, b) a◦b
name sum sum product maximum composite.

The shortest of all notations is to write ab instead of f (a, b). Unfortu-


nately, this can be done for only one binary operation at a time.

3.4 Rings and fields

Definition 37. A ring is a set A together with two specified elements 0 =


0 A ∈ A and 1 = 1 A ∈ A and binary operations A2 → A written (a, b) 7→
a + b and a − b and ab satisfying the following properties for all a, b, c ∈ A:

a+b = b+a addition is commutative


( a + b) + c = a + (b + c ) addition is associative
0+a = a
( a − b) + b = a
(ab)c = a(bc) multiplication is associative
1a = a = a1
a(b + c) = ab + ac left distributive
(a + b)c = ac + bc right distributive.

A ring A is said to be commutative if for all a, b ∈ A we have ab = ba.

Definition 38. A field is a commutative ring A with the property that for all
nonzero a ∈ A there exists b ∈ A such that ab = 1. Notation: b = a−1 . We
say that b is an inverse to a. We pronounce a−1 as: a inverse.

Example 39. Examples of fields are Q, R, C. An example of a commutative


ring which is not a field is Z. It is not a field because there is no a ∈ Z such
that 2a = 1.

Remark 40. You don’t need to remember the definition of ring by heart for
this module. You should know the names and meanings of associative and
commutative.
Definitions as the above one, and their study, belong to what is sometimes
called abstract algebra. It is supposed to be outside our scope. On the other
14 Chapter 3 December 24, 2018

hand, maybe you find things easier to understand when the full definitions
are at least briefly presented.
All our examples of rings are commutative.

Exercise (3.4) This is outside our scope. Some basic consequences of the
axioms of rings and fields. Let A be a ring.
(a) Suppose that A is a field. Let a, b ∈ A be such that ab = 0. Prove that
a = 0 or b = 0. (This fails in some rings.)
(b) Prove (a + b) − b = a for all a, b ∈ A.
(c) Prove 0a = 0 = a0 for all a ∈ A.
(d) Let z ∈ A and suppose z + a = a for all a ∈ A. Prove: z = 0. In words:
There is only one zero.
(e) Let e ∈ A and suppose ea = a = ae for all a ∈ A. Prove: e = 1. In
words: There is only one identity.
(f) Prove that distributivity holds for − instead of +, that is, a(b − c) =
ab − ac and (a − b)c = ac − bc for all a, b, c ∈ A.
(g) Higher associativity. For a1 , . . . , ak ∈ A we define the product a1 · · · ak
recursively by a1 · · · ak = (a1 · · · ak−1 )ak . Prove:
a1 · · · ak (b1 · · · bℓ )c 1 · · · c m = a1 · · · ak b1 · · · bℓ c 1 · · · c m
whenever k, ℓ, m ≥ 0 and ai , bi , ci ∈ A. Hint: induction on k + ℓ + m.
(h) State and prove higher associativity for addition in a ring (it is almost
the same as for multiplication and possibly easier because addition is
commutative).

We shall not construct Z. In later modules you may learn how it is con-
structed, or study it more deeply.
In later modules you may learn how Q and R are constructed from Z. We
spend a few words on this later on in chapter 4. In chapter 5 we construct C
from R even though our tool set is limited.
But first we use Z to construct a new ring Zn for n ∈ Z>0 , in the next
section.

3.5 Zn

In this section we fix n ∈ Z>0 .

Definition 41. We define Rn or simply R to be the map R: Z → Zn defined


by n | x − R( x) for all x ∈ Z. In words, R( x) is the remainder of x on division
by n. That R( x) exists and is unique was proved in proposition 9.

Lemma 42. Let x, y ∈ Z. Then


R( R( x) + R( y)) = R( x + y) , R( R( x) R( y)) = R( xy).
Proof. We’ll just do the second one. The first one is similar and easier. There
are p, q ∈ Z such that R( x) = x + pn and R( y) = y + qn. Therefore
R( x) R( y) = ( x + pn)( y + qn) = xy + n( py + qx + pqn).
MA132 Foundations / MA138 Sets and Numbers 15

So n divides a1 := R( x) R( y) − xy.
But n | R( z) − z for all z ∈ Z. So n divides a2 := R( R( x) R( y)) −
R( x) R( y) and a3 := xy − R( xy).
So n divides a1 + a2 + a3 (by lemma 2 used twice), that is, n divides
R( R( x) R( y)) − R( xy). So R( R( x) R( y)) and R( xy) are two elements of Zn
whose difference is divisible by n. They must be equal and the proof is
finished. 

Definition 43. We put Zn = {0, . . . , n − 1}. For x, y ∈ Zn we define

x + n y : = Rn ( x + y ), x ×n y := Rn ( xy).

Note that these belong to Zn again.

Remark 44. Here is an overview of four (sometimes conflicting) notations


for the elements of Zn .
(1) Zn = {0, 1, . . . , n − 1}. This is the notation we use. Note: Zn ⊂ Z.
(2) Zn = {0, 1, . . . , n − 1 }. This notation may or may not be combined
with notation (3).

(3) Zn = { x + kn | k ∈ Z} x ∈ Z . This is the best and most common
notation and used in most later modules. Also see example 167.
(4) Congruence modulo n. This is the topic of section 3.6. It is a matter of
taste whether to call this a notation for Zn .
One of the advantages of (2) and (3) is that it isn’t ambiguous to write x + y
for x, y ∈ Zn (rather than x +n y), because Zn has no elements in common
with Z.

Example 45. Here are the tables for addition and multiplication in Z3 :

+ 0 1 2 × 0 1 2
0 0 1 2 0 0 0 0
1 1 2 0 1 0 1 2
2 2 0 1 2 0 2 1

Subtraction in a ring is determined by the other operations. That’s why


we usually leave it out.

Proposition 46. The 5-tuple (Zn , 0, 1, +n , ×n ) is a commutative ring.

Proof. We’ll do just one axiom. The others are similar. Let x, y, z ∈ Zn . We
prove
( x × n y) × n z = x × n ( y × n z)
as follows:

( x ×n y) ×n z
= R( R( xy) z) by definition of ×n
= R( R( xy) R( z)) by lemma 42 and since R2 = R
16 Chapter 3 December 24, 2018

= R(( xy) z) by lemma 42


= R( x( yz)) because x( yz) = ( xy) z for all x, y, z ∈ Z
= R( R( x) R( yz)) by lemma 42
= R( xR( yz)) by lemma 42 and since R2 = R
= x × n ( y × n z) by definition of ×n . 

Exercise (3.5) Prove a ×n (b +n c) = a ×n b +n a ×n c for all a, b, c ∈ Zn


(distributivity).

Exercise (3.6) Put n = 25. Solve the equation 6 ×n x = 1 in Z25 .

Exercise (3.7) Find an example of n > 0 and a, b ∈ Zn r {0} such that


a ×n b = 0.

Exercise (3.8) Outside our scope. Let n ≥ 1. In this exercise you will prove
that Zn is a field if and only if n is a prime number.
(a) Prove ⇒. Hint: if a, b belong to a field and ab = 0 then a = 0 or b = 0.
(b) Assume n is a prime number and let x ∈ Zn r {0}. Prove that x, n are
coprime. Use theorem 32(a) to deduce that there exists y ∈ Zn such
that x ×n y = 1.
(c) Assume n is a prime number and let x ∈ Zn r {0}. Define f : Zn → Zn
by f ( y) = x ×n y. Prove that f is injective (see definition 133). It fol-
lows that f is surjective by the pigeon hole principle (proposition 136).
Deduce that there exists y ∈ Zn such that x ×n y = 1.

Exercise (3.9) Solve the equation x2 + 1 = 0 in Zn for 1 ≤ n ≤ 6.

Exercise (3.10) For all odd prime numbers p with p ≤ 17 find out if there
exists x ∈ Z p such that x2 + 1 = 0. (The values of x are less important).
Guess a pattern.

Exercise (3.11) Find a map f : Z → Zn such that f (1) = 1 and f ( xy) =


f ( x) ×n f ( y) and f ( x + y) = f ( x) +n f ( y) for all x, y ∈ Z.

3.6 Congruence modulo n

In this section we fix n ∈ Z>0 . Recall the map R = Rn : Z → Zn , remainder


on division by n.

Definition 47. Let x, y ∈ Z. We write x ≡n y (this is less common) or


x ≡ y (mod n) (this is more common) to mean R( x) = R( y). If these hold
we say: x is congruent to y modulo n.

Remark 48. Another condition equivalent to x ≡n y is: n | x − y.

Remark 49. Some people use the notation x mod n := Rn ( x).

What’s the use of ≡n ? It is a different notation for working with Zn . The


MA132 Foundations / MA138 Sets and Numbers 17

notation seems to deal with Z; but in reality it is about Zn . It is somewhat


old-fashioned, but still widely used and you should be aware of it.

Proposition 50. Let x, y, z, x1 , x2 , y1 , y2 ∈ Z. Then:


(a) We have x ≡n x.
(b) If x ≡n y then y ≡n x.
(c) If x ≡n y and y ≡n z then x ≡n z.
(d) If x1 ≡n x2 and y1 ≡n y2 then x1 + y1 ≡n x2 + y2 .
(e) If x1 ≡n x2 and y1 ≡n y2 then x1 y1 ≡n x2 y2 .

Proof. Proof of (c). We have R( x) = R( y) and R( y) = R( z) so R( x) = R( z)


so x ≡n z.
Proof of (e). There are p, q ∈ Z such that x2 = x1 + pn and y2 = y1 + qn.
Then

x2 y2 − x1 y1 = ( x1 + pn)( y1 + qn) − x1 y1 = n( py1 + qx1 + pqn)

so x2 y2 ≡n x1 y1 .
The other parts are left as an exercise. 

Remark 51. Parts (a)–(c) of proposition 50 say that ≡n is an equivalence


relation which will be discussed in section 6.10. Parts (d) and (e) express in
the language of congruences that +n and ×n exist.

Example 52. Let’s compute R29 (219 ) without computing 219 . Write n = 29:

25 ≡n 32 ≡n 3,
215 ≡n (25 )3 ≡n 33 ≡n −2,
219 ≡n 215 · 24 ≡n (−2) · 24 ≡n −32 ≡n 26.

But 26 ∈ Z29 so R29 (219 ) = 26.

4 Rational and Real Numbers


4.1 Construction of Q

Exercise (4.1) In this exercise you construct Q from Z. We put:


n o
2
Q = (a, b) ∈ Z b > 0, hcf(a, b) = 1 .

Informally, (a, b) stands for ab−1 but we cannot use that (yet). For (a, b) ∈ Q
and x ∈ Z r {0} we define

[ xa, xb] := (a, b) ∈ Q.

For (a, b), (c, d) ∈ Q we define

(a, b)(c, d) := [ ac, bd], (a, b) + (c, d) := [ ad + bc, bd].


18 Chapter 4 December 24, 2018

(a) Let u, v ∈ Z not both be zero. Prove that [u, v] is well-defined and
express it in u, v only.
(b) Prove:

[ a, b][c, d] = [ ac, bd], [ a, b] + [c, d] = [ ad + bc, bd]

whenever [ a, b], [c, d] are defined.


(c) Prove the hardest axiom for fields, namely, ( x + y) + z = x + ( y + z)
for all x, y, z ∈ Q.

4.2 Not examinable: axioms for Q

We’ve seen the definition of fields in definition 38. And Q is a field. There are
other fields than Q but only a small number of additional axioms are needed
to single out Q.

Definition 53. Two fields K, L are isomorphic if there exists a bijective (4)
map f : K → L such that f ( x + y) = f ( x) + f ( y) and f ( xy) = f ( x) f ( y) for
all x, y ∈ K.

Definition 54. Let L be a field. A subfield of L is a subset K ⊂ L such that


1 ∈ K and for all a, b ∈ K and c ∈ K r {0} we have a − b ∈ K and ac−1 ∈ K.

Theorem 55: Axioms for Q, first version. There exists an infinite field Q
without subfields other than itself. It is unique up to isomorphism. 

Definition 56. An ordered field is a field K along with a total ordering (5)

≤ on K satisfying the following. Let a, b, c ∈ K and c > 0. Then

a≤b ⇔ a+c ≤ b+c ⇔ ac ≤ bc.

Example 57. Examples of ordered fields are Q and R.

Theorem 58: Axioms for Q, second version. There exists an ordered field
Q without subfields other than itself. It is unique up to isomorphism. 

Exercise (4.2) Prove that every ordered field is infinite.

Exercise (4.3) Let K be an ordered field. Prove x2 ≥ 0 for all x ∈ K. Prove


that there is no x ∈ K such that x2 + 1 = 0.

4.3 Not examinable: Construction of R by Dedekind cuts

Definition 59. A Dedekind cut is a set A ⊂ Q such that:


(a) Let x ∈ A and y ∈ Q be such that x ≤ y. Then y ∈ A.
(b) We have A 6= ∅ and Q r A 6= ∅.

(4) See definition 133 for the definition of bijective.


(5) See definition 170 for the definition of total ordering.
MA132 Foundations / MA138 Sets and Numbers 19

(c) There is no least element of A.

We shall construct R≥0 using Dedekind cuts, then construct R from R≥0 .

Definition 60. We define R≥0 to be the set of Dedekind cuts that are con-
tained in Q>0 . We put 0R := Q>0 and 1R := Q>1 . For A, B ∈ R≥0 we
define

A + B := { x + y | x ∈ A, y ∈ B}, AB := { xy | x ∈ A, y ∈ B}. (61)

For nonzero A ∈ R≥0 (that is, A 6= Q≥0 ) we define

A−1 = { x ∈ Q>0 | ax > 1 for all a ∈ A}.

Exercise (4.4) Prove that A + B, AB and A−1 defined above are again in
R≥0 , that is, are Dedekind cuts contained in Q>0 .

Exercise (4.5) Let A, B, C ∈ R≥0 . Prove:

(a) A + B = B + A. (b) AB = BA.


(c) ( A + B) + C = A + ( B + C ). (d) ( AB)C = A( BC).
(e) A( B + C) = AB + AC. (f) 0 + A = A.
(g) 1A = A. (h) AA−1 = 1.

Exercise (4.6) There exists a natural bijection between R and the set of
Dedekind cuts. What would go wrong if we defined the sum and product of
any two Dedekind cuts by (61)?

Exercise (4.7) We define A, B ∈ R≥0 by

A = x ∈ Q> 0 x 2 > 2 ,

B = Q> 2 .

Prove: A2 = B.

We define K to be the set of pairs ( A, B) such that A, B ∈ R≥0 and A = 0R


or B = 0R . Informally, ( A, B) stands for A − B but we cannot use that (yet).
In our notation, R≥0 is not a subset of K. That’s why we write K not R.
For ( A, B) ∈ K and C ∈ R≥0 we define [ A + C, B + C] := ( A, B).

Exercise (4.8) Prove that there exists a bijection K × R≥0 → R≥0 × R≥0
defined by (( A, B), C) 7→ ( A + C, B + C). So [ X, Y ] is well-defined.

For ( A, B), (C, D ) ∈ K we define

( A, B) + (C, D ) := [ A + C, B + D ],
( A, B)(C, D ) := [ AC + BD, AD + BC].

Also, ( A, 0)−1 = ( A−1 , 0) and (0, A)−1 = (0, A−1 ). Finally, 0K := (0R , 0R )
and 1K := (1R , 0R ).
20 Chapter 4 December 24, 2018

Exercise (4.9) For A, B, C, D ∈ R≥0 prove:


[ A, B] + [C, D ] = [ A + C, B + D ],
[ A, B][C, D ] = [ AC + BD, AD + BC].
Exercise (4.10) Prove that (K, + , ×) satisfies the same properties that you
proved in exercise 4.5 for R≥0 . Moreover, ( A, B) + ( B, A) = (0R , 0R ). So K
is a field.

4.4 Not examinable: axioms for R

Definition 62: Supremum. Let K be an ordered field. We say that K has


supremums if the following holds. Let A, B ⊂ R be nonempty. Suppose
B = { y ∈ R | x ≤ y for all x ∈ A}. Then B has a least element z, that is,
an element such that z ≤ y for all y ∈ B. We call z the supremum of A and
write z = sup ( A).

Definition 63. Two ordered fields K, L are isomorphic if there exists a bijec-
tive map f : K → L such that f ( x + y) = f ( x) + f ( y) and f ( xy) = f ( x) f ( y)
for all x, y ∈ K; and such that f takes positive elements in K to positive
elements in L.

Theorem 64: Axioms for R. There exists an ordered field R with supremums.
Moreover, any two such are isomorphic.

Proof. This is outside our scope. It is a nice topic for a 2nd year essay. 

Theorem 65. There exists a bijective map from the set of the Dedekind cuts to
R taking a Dedekind cut to its infimum. 

There are two ways for constructing the real numbers. One uses Dedekind
cuts as we’ve done in section 4.3. The other uses Cauchy sequences which
we won’t go into here.

Exercise (4.11) Let K be an ordered field with supremums. We agree that


Q ⊂ K. Prove from first principles that there doesn’t exist an element x ∈ K
such that x > y for all y ∈ Q.

4.5 Decimal expansions

Agreement 66. We ignore all issues belonging to analysis. Infinite sums


converge unless stated otherwise. We don’t prove that they converge nor
do we assume you to prove this. We don’t even assume you to know what
converge means if you’re willing to accept that some infinite sums of real or
complex numbers make sense, some don’t.

Proposition 67: Geometric series. Let x ∈ R and | x| < 1. Then ∑n≥0 xn =


(1 − x)− 1 .

Proof. Exercise. 
MA132 Foundations / MA138 Sets and Numbers 21

Definition 68. Let k1 , k2 , . . . ∈ {0, 1, . . . , 9}. We call (k1 , k2 , . . .) a decimal


expansion. We call ki its digits. Every decimal expansion (k1 , k2 , . . .) gives
rise to a real number written

S(k1 , k2 , . . . ) : = Σ kn · 10−n .
n≥1

Strictly speaking, we should not call S(k1 , k2 , . . .) a decimal expansion.


Only (k1 , k2 , . . .) is. But we may do so anyway if there is no danger of confu-
sion.

Remark 69. You are certainly familiar with the decimal expansions of real
numbers x such that x ≥ 1; they involve digits to the left of the decimal
point. We won’t be interested in these. It is easy and left to you to generalise
our results to real numbers outside the range 0 ≤ x < 1.

Proposition 70. Every real number x with 0 ≤ x < 1 is given by at least one
decimal expansion.

Proof. Exercise. 

The identity

S(1, 0, 0, . . . ) = 10−1 = S(0, 9, 9, . . . )

follows from proposition 67 (geometric series) and shows that some real
numbers admit more than one decimal expansion.

Definition 71. A decimal expansion (k1 , k2 , . . .) is said to be reduced if for


all m ∈ Z there exists n ∈ Z≥m such that kn 6= 9. In words, infinitely many
of the digits are different from 9.

Proposition 72. Every real number x with 0 ≤ x < is given by exactly one re-
duced decimal expansion. Conversely, the sum y associated to a reduced decimal
expansion satisfies 0 ≤ y < 1.

Proof. Exercise. 

There is a neat description of the decimal expansions of rational numbers.

Definition 73. A decimal expansion (k1 , k2 , . . .) is said to be periodic if there


exist p > 0 and ℓ ≥ 0 such that kn = kn+ p for all n > ℓ. (The lecture notes
by David Mond call this eventually periodic.)
If these hold then we use the following notation:

(k1 , k2 , . . .) = (k1 , . . . , kℓ | kℓ+1 , . . . , kℓ+ p ) = (k1 , . . . , kℓ , kℓ+1 , . . . , kℓ+ p ).

If ℓ can be taken to be 0 we call it purely periodic.

Proposition 74. A decimal expansion (k1 , k2 , . . .) is periodic if and only if


S(k1 , k2 , . . .) is rational.
22 Chapter 4 December 24, 2018

Proof. Proof of ⇒. It is enough to prove this for purely periodic decimal


expansions (exercise). So let (k1 , k2 , . . .) be a purely periodic decimal ex-
pansion. Let p > 0 be such that kn = kn+ p for all n ≥ 1. There exists a
bijection
Z≥0 × {1, 2, . . . , p} → Z≥1 : (m, r) 7→ mp + r.
It follows that
p
S(k1 , k2 , . . . ) = Σ kn · 10−n = Σ Σ kmp+r · 10−mp−r
n≥1 m≥ 0 r= 1
p   p 
= Σ Σ kr · 10−mp−r = Σ 10−mp Σ kr · 10−r
m≥ 0 r= 1 m≥ 0 r=1
p
− p −1
= (1 − 10 ) Σ kr · 10−r
r=1
(75)

which is clearly rational.


Proof of ⇐. Suppose
t
S(ℓ1 , ℓ2 , . . .) = x =
s
where (ℓ1 , ℓ2 , . . .) is a decimal expansion and x ∈ Q and 0 ≤ x < 1 and
s, t ∈ Z and s > 0. We must prove that (ℓ1 , ℓ2 , . . .) is periodic.
For y ∈ R define ⌊ y⌋ := max{n ∈ Z | n ≤ y}.
We may suppose hcf(s, 10) = 1 because otherwise we replace x by ⌊10k x⌋
for some k > 0.
Among the numbers Rs (10k ) with k ≥ 0 two must be equal because they
range over the finite set Zs . Say, Rs (10k ) = Rs (10ℓ ) and 0 ≤ k < ℓ.
Write p = ℓ − k. Then s | 10ℓ − 10k = (10 p − 1) · 10k . But hcf(s, 10) = 1
so s | 10 p − 1, say, 10 p − 1 = ds. We may assume d = 1 because otherwise
we replace (s, t) by (ds, dt). So s = 10 p − 1.
Then 0 ≤ t < s = 10 p − 1 so there are k1 , . . . , k p ∈ {0, 1, . . . , 9} such that
p
t · 10− p = Σ kr · 10−r .
r=1

For n > p we define kn by the condition kn = kn+ p for all n ≥ 1. So


(k1 , k2 , . . .) is purely periodic. We find

S(k1 , k2 , . . . )
p
= (1 − 10− p )−1 Σ kr · 10−r (this was proved in (75))
r=1
1  p p  t
= p 10 Σ kr · 10−r = = S(ℓ1 , ℓ2 , . . .).
10 − 1 r=1 s
Suppose first that x admits only one decimal expansion. Then kn = ℓn and
the result follows.
Suppose finally that x admits more than one decimal expansion. In fact,
there are then two decimal expansions, one ending in zeroes only and one
ending in nines only. Both decimal expansions are periodic as required. 
MA132 Foundations / MA138 Sets and Numbers 23

Exercise (4.12) Let x ∈ R and 0 ≤ x < 1. Prove that x admits a purely


periodic decimal expansion if and only if it is of the form t/s with s, t ∈ Z
such that s is coprime with 10.

Example 76. The decimal expansion of a rational number is found by long


division. Here is an example.
7|3 | .428571
30
28
20
14
60
56
40
35
50
49
10
07
3

so 3/7 = .428571.

5 Complex Numbers
5.1 The field of complex numbers

Starting with R we construct the complex numbers. We intentionally avoid


pictures for complex numbers during the first half of the chapter because we
believe this makes the construction clearer.

Definition 77. A complex number is a pair of real numbers (ba). The set
of complex numbers is written C. Addition and multiplication of complex
numbers are defined as follows:
+c −bd
(ba) + (dc ) = (ba+ d ), (ba)(dc ) = (ac
ad+bc ) . 

You are probably used to a different notation for complex numbers. We’ll
come to that. The above definition is better than saying something like a
complex number is an expression of the form a + bi because that would use +
and i before they’ve even been defined!

Lemma 78. Let x, y, z ∈ C. Then x( y + z) = xy + xz.


a c e
Proof. Say, x = (b), y = ( d), z = ( f ). Then

a c e a c+e a(c+e)−b(d+ f )
x( y + z) = (b )(( d ) + ( f )) = (b )( d+ f ) = ( )
a(d+ f )+b(c+e)
ac−bd ae−b f a c a e
= ( ad+bc ) + ( a f +be ) = (b )(d ) + (b )( f ) = xy + xz. 
24 Chapter 5 December 24, 2018

Lemma 79. Let a, b ∈ R. Then (0a) + (0b) = (a+0 b), (0a)(0b) = (ab0 ).
Proof. This is easy. 

Enouraged by the foregoing lemma we shall from now on identify every


real number a with the complex number (0a ). So R ⊂ C.

Definition 80. We put i := (01).


a
Lemma 81. We have i 2 = −1. For a, b ∈ R we have (b) = a + bi.

Proof. We have

0 2
i 2 = (1) by definition of i
−1
=(0) by multiplication in C
= −1 ;
a b 0 b 0
a + bi = (0) + (0)(1) because b = (0) and i = ( 1)
a 0
= (0) + ( b) by multiplication in C
a
= (b) by addition in C. 

Lemma 82. Every nonzero complex number a + bi with a, b ∈ R has an inverse


(a − bi )(a2 + b2 )−1 .

Proof. We have a2 ≥ 0 and b2 ≥ 0. So a2 + b2 ≥ 0.


It is given that a + bi 6= 0. So one among a2 , b2 is nonzero. It follows that
a2 + b2 > 0. In particular, a2 + b2 6= 0.
We have (a + bi )(a − bi ) = a2 − (bi )2 = a2 + b2 . So (a − bi )(a2 + b2 )−1 is
an inverse to a + bi. 

Recall the definition of field, definition 38.

Theorem 83. The triple (C, + , ×) is a field.

Proof. Exercise. The hardest axiom is that multiplication is associative. The


second hardest is distributivity which we already proved in lemma 78. We’ve
already proved that a nonzero element has an inverse in lemma 82. 

5.2 Complex conjugation and the absolute value

Definition 84. The complex conjugate x of a complex number x is defined


as follows. Let a, b ∈ R. Then

a + bi = a − bi.

Lemma 85. For x, y ∈ C we have xy = x y and x + y = x + y.

Proof. Exercise. 
MA132 Foundations / MA138 Sets and Numbers 25

Lemma 86.
(a) Let n ≥ 0 and define f : C → C by f ( x) = xn . Then f ( x ) = f ( x) for all
x ∈ C.
(b) Let n ≥ 0 and a0 , . . . , an ∈ R. Define f : C → C by
n
f ( x) = Σ ak xk
k= 0

(more about such maps in chapter 7). Then f ( x ) = f ( x) for all x ∈ C.

Proof. Proof of (a). Induction on n. For n = 0 there is nothing to prove.


Assuming it for n we prove it for n + 1 (n ≥ 0):

f ( x ) = x n = x n−1 x = xn−1 x = xn−1 x = xn = f ( x).

Proof of (b). Induction on n. For n = −1 there is nothing to prove


because then f = 0. Assuming it for n − 1 we prove it for n (n ≥ 0). Write
n−1
g( x) = Σ ak xk , h( x) = an xn
k= 0

for all x ∈ C. So f = g + h. Let now x ∈ C. By (a)

h( x) = an xn = an xn = an x n = h( x ).

By the induction hypothesis g( x) = g( x ). So

f ( x) = g( x) + h( x) = g( x) + h( x) = g( x ) + h( x ) = f ( x ). 

Definition 87.
(a) For x ∈ R we define | x| := max( x, − x).
(b) For x ∈ C we define | x| = ( x x )1/2 . Note that x x ∈ R≥0 ; we take the
positive square root.

We call | x| the absolute value of x. Note that for real numbers x the two
definitions of | x| agree.

Theorem 88.
(a) For a, b ∈ R we have | a + bi |2 = a2 + b2 .
(b) For x ∈ C we have | x| = 0 if and only if x = 0.
(c) For x, y ∈ C we have | xy| = | x| · | y|.
(d) For x, y ∈ C we have the triangle inequality | x + y| ≤ | x| + | y|.

Proof. Exercise. 

5.3 The exponential function

In this section and the next, agreement 66 about infinite sums applies again.
26 Chapter 5 December 24, 2018

xn
Definition 89. For x ∈ C we define exp( x) = Σ .
n ≥ 0 n!

Theorem 90: Functional equation. We have exp( x + y) = exp( x) exp( y)


for all x, y ∈ C.

We shall sketch two proofs of the functional equation.

Definition 91. For k, n ∈ Z with 0 ≤ k ≤ n we define the binomial coeffi-


cient
(nk) = k! (nn!− k)! .
Theorem 92: Binomial theorem. Let n ≥ 0 and x, y ∈ C. Then
n
( x + y)n = Σ (nk) xk yn−k .
k= 0

Proof. Exercise. Hint: First prove the recursion formula (nk) = (n− 1 n−1
k ) + ( k− 1 )
for 1 ≤ k ≤ n assuming (nk) = 0 if 0 ≤ n < k. Then prove the binomial
theorem by induction on n. 

First proof of theorem 90. Put

A = (n, k) ∈ Z2 0 ≤ k ≤ n


B = (k, ℓ) ∈ Z2 k ≥ 0, ℓ ≥ 0 .


There exists a bijection A → B: (n, k) 7→ (k, n − k). We find

( x + y)n
exp( x + y) = Σ
n≥0 n!

1 n n!  xk yn−k
= Σ Σ xk yn−k = Σ
n ≥ 0 n! k= 0 k! (n − k)! (n,k)∈ A k! (n − k)!

xk yℓ  xk  yℓ 
= Σ k! ℓ!
= Σ Σ = exp( x) exp( y). 
(k,ℓ)∈ B k≥ 0 k! ℓ≥ 0 ℓ!

Second proof of theorem 90. This uses all sorts of analysis including com-
plex differentiation. Fix y ∈ C and put f ( x) = exp( x + y) for x ∈ C. Using
the transformation n − 1 = k we find
 ( x + y)n  ′  ( x + y)n  ′
f ′ ( x) = Σ = Σ
n≥0 n! n≥1 n!
n( x + y )n − 1 ( x + y)k
= Σ = Σ k! = f (x).
n≥1 n! k≥ 0

Put g( x) = exp( x)−1 exp( x + y). Then g′ ( x) = 0. So g( x) = g(0) = exp( y).


The result follows. 
MA132 Foundations / MA138 Sets and Numbers 27

Remark 93. If you’re unwilling to use complex differentation but are willing
to use real differentiation then you may still benefit from the second proof.
It then proves the functional equation for real x, y.
It is possible to make sense of the functional equation and its two proofs
in a way that rules out all analysis, keyword: power series. This is outside
our scope.

Exercise (5.1) Prove the binomial theorem using differentiation.

Definition 94. We put e = exp(1). Suggested by theorem 90 we write e x


instead of exp( x). The functional equation becomes: e x+ y = e x e y .

5.4 Trigonometry

The best way to develop trigonometry uses complex numbers and the expo-
nential function.

Proposition 95. For x ∈ C we have exp( x) = exp( x ).

Proof. Let sn be the partial sum


n xk
sn ( x) = Σ k!
.
k= 0

Then sn ( x) = sn ( x) for x ∈ C by lemma 86(b). Passing to the infinite sum is


analysis and cannot be done here. 

Proposition 96. For x ∈ R we have | exp(ix)| = 1.

Proof. By proposition 95 and theorem 90


| exp(ix)|2 = exp(ix) exp(ix) = exp(ix) exp(ix ) = exp(ix) exp(i x)
= exp(ix) exp(−ix) = exp(ix − ix) = exp(0) = 1.
So | exp(ix)| = 1. 

Theorem/Definition 97. There exists unique least π > 0 such that e2π i = 1.
For x ∈ C we have e x = 1 if and only if x ∈ 2π iZ. 

If you see sin ( x) or cos ( x) in practice then x is likely to be real as opposed


to complex. But there are exceptions so we’ll define sin ( x) or cos ( x) for
complex x.

Definition 98. For x ∈ C we define


eix + e−ix eix − e−ix
cos ( x) = , sin ( x) = .
2 2i
Proposition 99.
(a) For x ∈ C we have
(−1)n x2n (−1)n x2n+1
cos ( x) = Σ (2n)! ,
n≥0
sin ( x) = Σ
n ≥ 0 (2n + 1)!
.
28 Chapter 5 December 24, 2018

(b) For x ∈ R we have cos ( x), sin ( x) ∈ R.


(c) For x ∈ C we have eix = cos ( x) + i sin ( x).
(d) For x ∈ C we have cos 2 ( x) + sin 2 ( x) = 1.
(e) For x, y ∈ C we have

cos ( x + y) + i sin ( x + y) = (cos x + i sin x)(cos y + i sin y)


cos ( x + y) = cos x cos y − sin x sin y
sin ( x + y) = cos x sin y + sin x cos y.

(f) De Moivre’s formula. For x ∈ C and n ∈ N we have

cos (nx) + i sin (nx) = (cos x + i sin x)n .

Proof. Exercise. All of these follow from properties of exp. 

Example 100. Let x ∈ R. Then

sin (nx) 1 enix − e−nix 1 eix n e−ix n


Σ
n≥0 2n
= Σ
2i n≥0 2n
= Σ
2i n≥0 2

2
1 1 1  1 1 1 
= − = −
2i 1 − eix /2 1 − e−ix /2 i 2 − eix 2 − e−ix
(2 − e−ix ) − (2 − eix ) eix − e−ix 2 sin ( x)
= ix − ix
= ix − ix
= .
i (2 − e )(2 − e ) i (5 − 2e − 2e ) 5 − 4 cos ( x)

Example 101. Let x ∈ R. Then

cos nx einx (eix )n


Σ
n≥0 n!
= Re Σ
n ≥ 0 n!
= Re Σ
n ≥ 0 n!

= Re exp(exp(ix)) = Re ecos x+i sin x = Re ecos x ei sin x

= Re ecos x (cos (sin x) + i sin (sin x)) = ecos x cos (sin x).

5.5 The complex plane

For the present purpose, let’s identify R2 with C. Choose a point on the
blackboard and call it the orign. A number or vector (a, b) = a + bi ∈ C = R2
defines the following point on the blackboard. Starting at the origin, go right
by a and go up by b.

5.6 The quadratic formula

Let a, b, c ∈ C with a 6= 0. The complex solutions x to the quadratic equa-


tion ax2 + bx + c = 0 are given by the quadratic formula

−b ± b2 − 4ac
x= .
2a
MA132 Foundations / MA138 Sets and Numbers 29

The proof of this is left to you. It is the same proof as for real numbers. We
shall soon see that every complex number has a square root (see proposi-
tion 109). We call b2 − 4ac the discriminant. If the discriminant is nonzero
then our quadratic equation has precisely two complex solutions.

5.7 Roots of unity

Definition 102. Let n ∈ Z>0 . We put µ (n) = { z ∈ C | zn = 1} and


ζn = exp(2π i /n).

Lemma 103. Let n ∈ Z>0 .


(a) We have ζn ∈ µ (n).
(b) We have µ (n) = {ζnk | k ∈ Z}.
(c) We have #µ (n) = n.
(d) For k, ℓ ∈ Z we have ζnk = ζnℓ if and only if n | k − ℓ.

Proof. Proof of (a). We have (ζn )n = (e2π i /n )n = e2π i = 1. So ζn ∈ µ (n).


This proves (a).
Proof of (b). Proof of ⊃. Let k ∈ Z. Then ((ζn )k )n = ((ζn )n )k = 1k = 1.
So (ζn )k ∈ µ (n).
Proof of ⊂. Let z ∈ C. We must prove that z is a power of ζn . Note first
| z| = | zn | = |1| = 1 so | z| = 1. So there exists a ∈ R such that z = exp(ia).
n

From z ∈ µ (n) it follows that


1 = zn = (eia )n = enia .
By theorem 97 this implies that there exists k ∈ Z such that na = 2π k So
a = 2π k/n and
z = eia = e2π ik/n = ζnk
which proves ⊂ and thereby part (b).
Proof of (d). Assume ζnk = ζnℓ . Then

1 = ζnk−ℓ = e2π i (k−ℓ)/n .


By theorem 97 this implies that there exists m ∈ Z such that (k − ℓ)/n = m.
That is, n | k − ℓ. This prove ⇒. The converse is left to you. This proves (d).
Part (c) follows from (d) and (b). 

Remark 104. This is outside our scope and aimed at those of you who know
about groups. The above proposition follows from the fact that µ (n) is a
group under multiplication. It is cyclic of order n and generated by ζn .

Proposition 105. For n ≥ 2 we have Σ x = 0.


x∈µ (n )

Proof. Write y = ζn . Using example 13 (finite geometric sum)


n−1 1 − yn 1−1 0
Σ x= Σ yk = 1 − y
k= 0
=
1−y
=
1−y
= 0. 
x∈µ (n )
30 Chapter 5 December 24, 2018

Figure 1. Let n > 1. We shall not define convex hull or regular n-gon but just say that
the convex hull of µ (n) is an example of a regular n-gon. Here are pictures of them.

ζ3 b
i
b

b
−1 b b

1 1

b
b

ζ32 −i

ζ5 ζ62 ζ6
b
b b
ζ52 b

ζ63
b b b

1 1
b

ζ53 b
b b

ζ54 ζ64 ζ65

Example 106. Put x = ζ3 and y = ζ6 . We shall compute x and y explicitly.


By proposition 105 we have 1 + x + x2 = 0. Solving by the quadratic formula
we find √ √
−1 ± 1 − 4 −1 ± 3 i
x= = .
2 2
It easily follows that

−1 + 3 i
x= .
2
We turn to y. We have y3 = −1 so (− y)3 = 1, that is, − y ∈ µ (3) =
{1, x, x2 }. It easily follows that

1 + 3i
2
y = −x = .
2

5.8 Polar form

Proposition/Definition 107. Let z ∈ C r {0}. Then z can uniquely be written


aeix with a, x ∈ R and a > 0 and 0 ≤ x < 2π . This is the polar form of z.

Proof. Exercise. Use theorem 97. 

The argument of aeix (with a, x ∈ R and a > 0) is x.


MA132 Foundations / MA138 Sets and Numbers 31

Instead of 0 ≤ x < 2π in the above proposition we prefer to say that


x ∈ R, with the understanding that the polar form aeix is only unique up to
adding a multiple of 2π to x.
The proofs of the following are left to you.

Proposition 108: Multiplication in polar form. Let a, b, x, y ∈ R. Then


(aeix )(beiy ) = abei (x+ y) . 

Proposition 109. Let a be a nonzero complex number. Then there are n distinct
solutions x ∈ C to xn = a. The solution set is { x0 y | y ∈ µ (n)} whenever x0
is one solution. One nth root of aeix (with a, x ∈ R and a > 0) is given by
a1/n eix/n . 

6 Sets, functions and relations


6.1 True and false

Definition 110. Let Ω be a set of two elements. Common notations for the
elements of Ω are:

0 = F = False, 1 = T = True.

In these notes we prefer 0 and 1. An element of Ω is called an assertion or


statement.

Example 111. Normally we say that 2 + 3 = 4 is false. More formally we


may write (2 + 3 = 4) = 0. Just like we don’t distinguish between 5 + 7 and
12 we don’t distinguish between 2 + 3 = 4 and 0.

Example 112. It may be surprising that there are only two statements. For
example, the statement P(n): n is divisible by 3 seems neither true nor false.
What’s going on is, this is a map P: Z → Ω!

Remark 113. If you study logic at a higher level then you learn that, in-
avoidably, there are statements which are neither true nor false (and not of
the sort in example 112). See section 8.5 for an example. For us it doesn’t
do any harm to ignore this.

Definition 114. We define a map : Ω → Ω by 0 = 1 and 1 = 0. We


pronounce a as not a.

Definition 115. Let a, b ∈ Ω. We define two more statements a ∨ b and a ∧ b


by the following table.
a 0 0 1 1
b 0 1 0 1
a∨b 0 1 1 1
a ∧ b 0 0 0 1.
Pronounciation: a ∨ b = a or b; a ∧ b = a and b.
32 Chapter 6 December 24, 2018

This agrees with intuition: a ∨ b is true if and only if a is true or b is true.


Likewise, a ∧ b is true if and only if a is true and b is true.

Exercise (6.1) Let a, b ∈ Ω.


(a) Prove: (a ∨ b) = a ∧ b.
(b) Prove: (a ∧ b) = a ∨ b.

Exercise (6.2) Write down the table for a or b but not both. This is different
from a ∨ b!

Definition 116. Let a, b ∈ Ω. We define a statement a ⇒ b by its table:


a 0 0 1 1
b 0 1 0 1
a ⇒ b 1 1 0 1.
There are many ways to pronounce a ⇒ b. Here are some:
(a) a implies b. (d) For b to hold, a is sufficient.
(b) b follows from a. (e) For a to hold, b is necessary.
(c) If a then b.
Example 117. Let P denote the following statement:
P: If n, n + 2, n + 4, n + 6 are prime numbers then n = 5.
Is this false or true? Some beginning students wrongly say: 5 + 4 equals 9
which is not a prime number so P is false. If you don’t understand why this is
incorrect, consider this. Let X be the set of those n such that n, n + 2, n + 4,
n + 6 are prime numbers. What P asserts is X ⊂ {5}. In words, X is a subset
of {5}. Well, it can be shown that X = ∅ (a proof of this is not the point
right now but it’s not hard). So X = ∅ ⊂ {5} so P is true. The statement
Q: If n = 5 then n, n + 2, n + 4, n + 6 are prime numbers
is the called the converse of P and is, of course, false.

Exercise (6.3) Suppose a, b are statements. We say that b ⇒ a is the con-


verse to a ⇒ b. A common mistake is to confuse the two.
(a) Prove that b ⇒ a and a ⇒ b are not necessarily equal.
(b) Prove that b ⇒ a isn’t determined by a ⇒ b, that is, it depends on
knowing a and b individually. Hint: All statements are elements of Ω.

Proposition 118. Let a, b ∈ Ω. Then


a⇒b = a∨b = b⇒ a.
Proof. There are four cases. We inspect each of them separately in a table.
a 0 0 1 1
b 0 1 0 1
a⇒b 1 1 0 1 
a∨b 1 1 0 1
b⇒ a 1 1 0 1.
MA132 Foundations / MA138 Sets and Numbers 33

Example 119. A widely used method for proving theorems is proof by con-
tradiction. Behind it is the fact that (a ⇒ b) is ( b ⇒ a).
Proof by contradiction works as follows. We want to prove a ⇒ b. In
order to do this we assume a and b. Then the actual arguments follow. We
conclude a. This is a contradiction. This proves a ⇒ b.

Definition 120. Suppose a, b ∈ Ω. We define a third statement a ⇔ b by its


table:
a 0 0 1 1
b 0 1 0 1
a⇔b 1 0 0 1.
Here are two ways to pronounce a ⇔ b:
(a) a is equivalent to b.
(b) a holds if and only if b holds.

Strictly speaking a ⇔ b just means a = b. In practice we use ⇔ rather


than = if we are dealing with statements (except in this chapter).

Proposition 121. Let a, b ∈ Ω. Then

a⇔b = ( a ⇒ b) ∧ (b ⇒ a).

Proof. Exercise. 

Remark 122. By proposition 121, instead of proving a theorem of the form


a ⇔ b one may provide separate proofs of a ⇒ b and b ⇒ a. This is a widely
used method in practice.

Remark 123. Some beginning students fail to accept the definition of ⇒.


They expect (0 ⇒ 1) = 0. Let’s motivate why that would not be good. It
would follow that 0 ∧ (0 ⇒ 1) = 0 ∧ 0. Well, 0 ∧ 0 = 0 so 0 ∧ (0 ⇒ 1) = 0.
It would follow that

1 = 0 ∧ (0 ⇒ 1) ⇒ 1 = 0 ⇒ 1 = 0

which is absurd.

6.2 Sets

Definition 124. Let A, B be sets. We define more sets written A ∪ B, A ∩ B


and A r B. In order to define a set it is enough to specify its elements. Well,

x ∈ A∪B ⇔ x ∈ A or x ∈ B
x ∈ A∩B ⇔ x ∈ A and x ∈ B
x ∈ ArB ⇔ x ∈ A and x 6∈ B.

Proposition 125. Let A, B, C be sets. Then

A∪B = B∪A ∪ is commutative


A∩B = B∩A ∩ is commutative
34 Chapter 6 December 24, 2018

( A ∪ B) ∪ C = A ∪ ( B ∪ C) ∪ is associative
( A ∩ B) ∩ C = A ∩ ( B ∩ C) ∪ is associative.
Proof. This is easy. 

A Venn diagram means that every set is a subset of the blackboard. You
start with two or three discs called A, B, C. Then more sets are obtained
using the set operations such as union and intersection. In the following, to
make clear which set is meant we colour it gray.

Example 126. Here are the Venn diagrams of A ∪ B, A ∩ B and A r B.

A B A B A B

A∪B A∩B ArB

Proposition 127. Let A, B, C be sets. We have the distributivity laws


( A ∪ B) ∩ ( A ∪ C) = A ∪ ( B ∩ C)
( A ∩ B) ∪ ( A ∩ C ) = A ∩ ( B ∪ C ).
Proof. For each law there are 8 cases. One way to do this is to inspect all 8
cases. Maybe it is slightly faster to draw Venn diagrams. As an example we
prove ( A ∪ B) ∩ ( A ∪ C) = A ∪ ( B ∩ C) using Venn diagrams:
C B C B
1 2 3
5
4 6
A A
7 8
B∩C A ∪ ( B ∩ C)

C B C B C B

A A A

A∪B A∪C ( A ∪ B) ∩ ( A ∪ C ).
The picture in the top left corner shows that all 8 cases are dealt with as
required. 

Definition 128. From now on we assume that the union of all sets exists,
and is written U (the universe). For us, this assumption doesn’t do any
harm though it is known that it isn’t necessarily correct (see Russell’s paradox
below). The complement of a set A is Ac := U r A.

Proposition 129: De Morgan’s laws. Let A, B be sets. Then


( A ∪ B)c = Ac ∩ Bc , ( A ∩ B)c = Ac ∪ Bc .
MA132 Foundations / MA138 Sets and Numbers 35

Proof. This is obvious. 

6.3 An analogy between sets and logic

Proposition 130. Suppose A, B are sets and x an element. Consider the state-
ments a := ( x ∈ A), b := ( x ∈ B). Then
(a) x ∈ ( A ∪ B) ⇔ a ∨ b.
(b) x ∈ ( A ∩ B) ⇔ a ∧ b.

Proof. This is just the definition of ∪ and ∩. 

This proposition can be remembered by the optical similarities of ∨ with


∪ and ∧ with ∩.

Proposition 131. Let a, b, c be statements. We have the distributivity laws

( a ∨ b) ∧ ( a ∨ c ) = a ∨ (b ∧ c )
( a ∧ b) ∨ ( a ∧ c ) = a ∧ (b ∨ c ).
Proof. A first proof is by inspection of 8 cases for each law. A second proof is
by using the analogy between logic and sets.
There exist sets A, B, C and an element x such that a = ( x ∈ A), b =
( x ∈ B), c = ( x ∈ C). Using proposition 130 and the distributivity laws for
sets (proposition 127)

( a ∨ b) ∧ ( a ∨ c )
⇔ [( x ∈ A) ∨ ( x ∈ B)] ∧ [( x ∈ A) ∨ ( x ∈ C)]
⇔ ( x ∈ A ∪ B) ∧ ( x ∈ A ∪ C) ⇔ x ∈ ( A ∪ B) ∩ ( A ∪ C)
⇔ x ∈ A ∪ ( B ∩ C) ⇔ ( x ∈ A) ∨ ( x ∈ B ∩ C)
⇔ ( x ∈ A) ∨ [( x ∈ B) ∧ ( x ∈ C)] ⇔ a ∨ (b ∧ c).
Likewise for the other law. 

Exercise (6.4) Let a, b, c ∈ Ω and put



p = ( a ∨ b) ∧ ( a ∨ c ) = a ∨ (b ∧ c )

q = ( a ∧ b) ∨ ( a ∧ c ) = a ∧ (b ∨ c ) .

Use the results of exercise 6.1 to prove p ⇔ q (don’t use proposition 131).

Example 132. Here are some more examples of the analogy between logic
and sets. Let A, B be sets and x an element. Define a := ( x ∈ A), b := ( x ∈
B). Then
a = ( x ∈ Ac ), ( a ⇒ b) = ( x ∈ Ac ∪ B).

6.4 Not examinable: Russell’s paradox

This section is not examinable. Russell’s paradox isn’t a paradox because


paradoxes don’t exist. Russell’s paradox proves something that’s absurd, us-
36 Chapter 6 December 24, 2018

ing methods that only seem to be admissible. It goes as follows. Let


A = { B | B 6∈ B}.
In words: A is the set of those sets B that are not an element of themselves.
By construction we have
( A ∈ A) ⇔ ( A 6∈ A).
This is absurd. The whole of mathematics would fall apart if we’d allow this
to happen. Fortunately (or unfortunately), logicians know how to set things
up so that Russell’s paradox doesn’t occur.

6.5 Mappings

The naive definition of map is good enough for us, and goes like this. Let
A, B be sets. A map f : A → B is something that provides us with an element
f ( x) of B for each x ∈ A.
We call A the source or domain of f and B the target or codomain of f .
Don’t confuse the target of f with the image { f ( x) | x ∈ A}. In some areas
of mathematics, including most of these notes, source and target are ‘part’
of the map f , that is, a map has exactly one source and exactly one target.
Other areas of mathematics are more relaxed about this.

Definition 133. Let f : A → B be a map of sets.


(a) We say that f is injective if the following holds for all x, y ∈ A: If
f ( x) = f ( y) then x = y.
(b) We say that f is surjective if, for all y ∈ B, there exists x ∈ A such that
f ( x) = y.
(c) We say that f is bijective if it is both injective and surjective.

A bijection is just a bijective map. Likewise for injection and surjection.

Exercise (6.5) Is the following map injective? Surjective? Bijective?


(a) R → R: x 7→ x2 . (b) C → C: x 7→ x2 .
(c) R> 0 → R> 0 : x 7 → x 2 . (d) exp: R → R r {0}.
(e) exp: C → C r {0}. (f) Z → Zn , remainder on division by n.
(g) Zn → Z: x 7→ x. (h) Z × Z2 → Z: ( x, y) 7→ 2x + y.

6.6 Bijections

Bijections are a bit easier to understand than injections and surjections. So


let’s look at them first.
There is only one empty set. It is written ∅.

Definition 134. A set A is said to be finite of n elements if there exists a


bijection A → Zn . Here we write Z0 = ∅ for consistency. If this is the case
then we write #A = n. So #A denotes the number of elements of A, also
called cardinality of A.
MA132 Foundations / MA138 Sets and Numbers 37

Definition 135. A set A is said to be infinite if it is not finite. We write


#A = ∞ if A is infinite.

Proposition 136: Pigeon hole principle. Let A, B be finite sets such that
#A = n = #B. Let f : A → B be a map. Then f is injective if and only if it is
surjective.

Proof. This cannot be proved here because it goes too close to the axioms of
mathematics for our scope. 

Example 137. There are maps N → N which are injective or surjective but
not both. An injective example is f : N → N defined by f ( x) = x + 1. A
surjective example is g: N → N defined by g( x) = max( x − 1, 0). We say
that the pigeon hole principle is false for infinite sets.

Exercise (6.6) Let A, B be finite sets and write #A = m, #B = n. How


many maps A → B are there? How many of them are injective? How many
surjective? How many bijective?

6.7 Composition and identity

Definition 138. Let f : A → B and g: B → C be maps. The composite map


g ◦ f is defined by ( g ◦ f ) x = g( f ( x)) for all x ∈ A.

A f
B

g
g◦ f

Exercise (6.7) True or false? Give a proof or a counterexample.


(a) If f and g are injective then g ◦ f is injective.
(b) If f and g are surjective then g ◦ f is surjective.
(c) If g ◦ f is injective then f is injective.
(d) If g ◦ f is injective then g is injective.
(e) If g ◦ f is surjective then f is surjective.
(f) If g ◦ f is surjective then g is surjective.

f g h
Proposition 139. Let sets and maps A −−−→ B −−−→ C −−−→ D be given.
Then (h ◦ g) ◦ f = h ◦ ( g ◦ f ).

Proof. We write f x instead of f ( x) to avoid useless brackets. For x ∈ A we


have

((h ◦ g) ◦ f ) x = (h ◦ g)( f x) = h( g( f x)) = h(( g ◦ f ) x) = (h ◦ ( g ◦ f )) x.

This shows that (h ◦ g) ◦ f and h ◦ ( g ◦ f ) give the same output on any input.
So they are equal. 
38 Chapter 6 December 24, 2018

Remark 140.
(a) Consider maps f : A → B and g: C → D. Then g ◦ f is only defined if
B = C. In words, the target of f is the source of g. So far for the strict
view. A less strict view says g ◦ f is even defined if B ⊂ C.
(b) Composition is a bit like a binary operation on the ‘set’ of maps. It is not
quite because a composite g ◦ f may not be defined as we saw in (a).
(c) Proposition 139 is known as associativity of composition.

Definition 141. Let A be a set. We define the map id A : A → A by id A ( x) =


x for all x ∈ A. It is called identity or the identity map of A.

Proposition 142. Let f : A → B be a map. Then f ◦ id A = f and idB ◦ f = f .

Proof. Exercise. 

Other notations for id A are id or 1 A or 1.

6.8 One-sided inverses

Definition 143. Let f : A → B and g: B → A be maps. If g ◦ f = id A then


we say that g is a left inverse to f , and f is a right inverse to g.

Example 144. Define f , g: N → N by f ( x) = x + 1 and g( x) = max( x −


1, 0). We considered these maps before in example 137 where we saw that f
is injective but not surjective, and g is surjective but not injective. Note now:
g ◦ f = idN but f ◦ g 6= idN . So g is a left inverse to f but not a right inverse.

Example 145. A map may have two or more right inverses as the following
example shows. Let f be the unique map {1, 2} → {3}. Define g1 , g2 : {3} →
{1, 2} by gi (3) = i. Then f ◦ gi = id{3} for all i. So f has two right inverses.

Exercise (6.8) Show by an example that a map can have two or more left
inverses.

Definition 146. Let f : A → B a map.


(a) For a subset X ⊂ A we put f (X ) := { f ( x) | x ∈ X }.
(b) For a subset Y ⊂ B we put f −1 (Y ) := { x ∈ A | f ( x) ∈ Y }. This
is known as the inverse image of Y under f . Warning: this is unre-
lated to the inverse f −1 as defined in definition 150 below. Also see
remark 151.
For z ∈ B we write f −1 ( z) := f −1 ({ z}) which is known as a fibre
of f .

Proposition 147. Let f : A → B be a map.


(a) Then, f has a right inverse if and only if it is surjective.
(b) Assume that A 6= ∅. Then, f has a left inverse if and only if it is injective.

Proof. Proof of (a). Proof of ⇒. Let g be a right inverse to f . Let x ∈ B. Then


MA132 Foundations / MA138 Sets and Numbers 39

x = idB ( x) = ( f ◦ g) x = f ( gx) so x is in the image of f .


Proof of ⇐. We define g: B → A as follows. Let y ∈ B. Then f −1 ( y)
is nonempty because f is surjective. We pick an arbitrary element of f −1 ( y)
and declare it to be g( y).
It remains to prove f ◦ g = idB . Let y ∈ B. Then gy ∈ f −1 ( y) so
f ( gy) = y so ( f ◦ g) y = y. So f ◦ g = idB . This proves ⇐ and thereby (a).
Proof of (b). The proof of ⇒ is an exercise. Proof of ⇐. We define
g: B → A as follows. Let y ∈ B. Then f −1 ( y) has at most one element
because f is injective. If f −1 ( y) = { x y } we define g( y) := x y . If however
f −1 ( y) is empty then we choose an arbitrary element of A and declare it to
be g( y). This can be done because A 6= ∅.
It remains to prove that g ◦ f = id A . Let x ∈ A and write y := f ( x).
Then f −1 ( y) = { x}. So g( y) = x. So ( g ◦ f ) x = g( f x) = g( y) = x. So
g ◦ f = id A . This proves ⇐ and thereby (b). 

Exercise (6.9) Prove ⇒ in proposition 147(b).

Exercise (6.10) Find all injective maps without a left inverse.

6.9 Inverses

Definition 148. Let f : A → B and g: B → A be maps. We say that f is an


inverse to g if f is both a left inverse and a right inverse to g. In formula:
f ◦ g = idB and g ◦ f = id A .

Clearly, if f is an inverse to g then g is an inverse to f .

Proposition 149.
(a) Let g be a map having a left inverse f and a right inverse h. Then f = h.
(b) Let g be a map having two inverses f , h. Then f = h.

Proof. Proof of (a). Write g: A → B and f , h: B → A. So f ◦ g = id A and


g ◦ h = idB . It follows that

f = f ◦ idB by proposition 142


= f ◦ ( g ◦ h) as given
= ( f ◦ g) ◦ h by proposition 139
= id A ◦ h as given
=h by proposition 142.

Proof of (b). By definition of inverse, f is a left inverse to g and h is a


right inverse to g. By (a) it follows that f = h. 

Definition 150. Let g be an inverse to a map f . As g is determined by f (by


part (b) of the foregoing proposition) we may say that g is the inverse rather
than an inverse. We write g =: f −1 which is pronounced as f inverse.
40 Chapter 6 December 24, 2018

Remark 151. Let f : A → B be a map admitting an inverse f −1 and let


Y ⊂ B. Then the two meanings of f −1 (Y ) coincide. What are the two
meanings? One is the inverse image of Y under f as in definition 146(b) and
ignores the fact that f has an inverse. The other is as in definition 146(a)
with f −1 instead of f .

Proposition 152. A map f has an inverse if and only if it is bijective.

Proof. Easy using proposition 147. 

Exercise (6.11) Prove proposition 152 without using proposition 147.

6.10 Relations

Definition 153. Let A be a set. A relation on A is a subset R ⊂ A × A. We


usually write xRy instead of ( x, y) ∈ R.

Example 154. Let A = R and R = {( x, y) ∈ A2 | x ≤ y}. Then R is the


relation of ordering on A. Moreover xRy is equivalent to x ≤ y.

Definition 155. Here are a few properties that a relation R on a set A may
or may not have.
◦ Reflexive: xRx for all x ∈ A. (156)
◦ Anti-reflexive: xRx for no x ∈ A. (157)
◦ Symmetric: For all x, y ∈ A we have xRy ⇒ yRx. (158)
◦ Anti-symmetric: For all x, y ∈ A we have (159)
( xRy and yRx) ⇒ x = y.
◦ Transitive: For all x, y, z ∈ A we have ( xRy and yRz) ⇒ xRz. (160)

Exercise (6.12) Which of the above five properties are satisfied by (R, ≤)?

Definition 161. An equivalence relation is a relation R which is reflexive


(156), symmetric (158), and transitive (160).

Example 162. Let n ∈ Z>0 . Recall that ≡n is the relation on Z defined by


x ≡n y if and only if n | x − y. This is an equivalence relation.

Definition 163. Let R be an equivalence relation on A and x ∈ A. We define


C( R, x) := { y ∈ A | xRy}. As R is usually fixed we also write C( x). It is
known as the R-class of x, or equivalence class of x with respect to R.

Example 164. Let x ∈ Z. Then C(≡n , x) = { x + kn | k ∈ Z}.

Recall that two sets are said to be disjoint if their intersection is empty.

Proposition 165. Let R be an equivalence relation on A. Then any two R-


classes are equal or disjoint. Moreover, C( R, x) = C( R, y) is equivalent to xRy.

Proof. Let x, y ∈ A. We must prove that the following are equivalent:


MA132 Foundations / MA138 Sets and Numbers 41

(1) xRy.
(2) C( x) = C( y).
(3) C( x) ∩ C( y) 6= ∅.
Proof of (1) ⇒ (2). We shall prove C( x) ⊃ C( y). Let z ∈ C( y), that is,
yRz. From xRy and yRz it follows that xRz by transitivity of R. But xRz
says z ∈ C( x). This proves C( x) ⊃ C( y). The reverse inclusion C( x) ⊂ C( y)
follows by ( x, y)-symmetry of the situation and since clearly yRx. This proves
(1) ⇒ (2).
Proof of (2) ⇒ (3). Assume C( x) = C( y). By reflexivity of R we have
xRx and so x ∈ C( x). So x ∈ C( x) = C( x) ∩ C( y). This proves (2) ⇒ (3).
Proof of (3) ⇒ (1). Say w ∈ C( x) ∩ C( y). That is, xRw and yRw. By
symmetry of R we have yRw. From xRw and wRy and transitivity of R it
follows that xRy. 

Definition 166. Let R be an equivalence relation on a set A. We define A/ R


to be the set of equivalence classes with respect to R. It may be called the
quotient of A by R.

Example 167. Recall our definition Zn := {0, 1, . . . , n − 1}. We’ll stick to


this definition during the module but in future you’re likely to use the best
definition which is Zn := (Z/≡n ). This is a set of n sets. The only difference
with the previous definition of Zn is that it changes the names of the elements
of Zn . See remark 44 for an overview of four notations for Zn .

Often, when we encounter an equivalence relation R on a set A, we don’t


wish to consider two elements of A different if they are R-equivalent. The
way to do this is to pass to the quotient A/ R.

Exercise (6.13) Let R be an equivalence relation on a set A. Prove that A


and R are determined by A/ R.

Exercise (6.14) Let Q be a set of sets. Prove that the following are equiva-
lent.
(1) There exist a set A and an equivalence relation R on A such that Q =
A/ R. (In the previous exercise you proved that A, R are unique.)
(2) For all distinct X, Y ∈ Q we have X ∩ Y = ∅. Moreover, ∅ 6∈ Q.
Sometimes people say that Q is a partition of A if these hold.

Exercise (6.15) For 1 ≤ k ≤ n let a(n, k) be the number of equivalence


relations on Zn of exactly k equivalence classes. Prove:

a(n, k) = a(n − 1, k − 1) + k a(n − 1, k).

Definition 168. An ordering (some people say partial ordering) on a set A


is a relation R which is reflexive (156), anti-symmetric (158), and transitive
(160).

Example 169.
42 Chapter 7 December 24, 2018

(a) Let A = R and R = {( x, y) ∈ A2 | x ≤ y}. This is an ordering.


(b) Let A = R and R = {( x, y) ∈ A2 | x < y}. This is not an ordering.
(c) Recall that X ⊂ Y means X is a subset of Y: they may be equal. Let
A be the ‘set’ of all sets. (Never mind that this isn’t allowed.) Put
R = {(X, Y ) ∈ A2 | X ⊂ Y }. Then R is an ordering on A.

Definition 170. A total ordering or linear ordering on a set A is an or-


dering R with the additional property that for all x, y ∈ A we have xRy or
yRx.

Example 171. The ordering ≤ on R is a total ordering. The ordering ⊂ on


the ‘set’ of all sets is not total because, for example, neither of the sets {1, 2}
and {2, 3} is contained in the other.

7 Polynomials
Throughout this chapter we fix a field K. If you don’t know what a field is,
simply choose one of the examples of fields that you surely know, like Q, R,
C, Z p with p prime. The reasoning is usually the same for all fields.

7.1 Polynomials

We distinguish polynomials from polynomial mappings. We start with the


latter.

Definition 172. A map f : K → K is said to be a polynomial mapping if


there exist n ≥ 0 and a0 , . . . , an ∈ K such that
m
f ( x) = Σ ai x i
i=0

for all x ∈ K. In the above we often define ai := 0 for all i > m. Then we can
write
f ( x ) = Σ ai x i .
i≥0

This is a finite sum in the sense that only finitely many terms are nonzero.

Lemma 173. Let f , g: K → K be polynomial mappings and define h to be the


product h = f g, that is, h( x) = f ( x) g( x) for all x ∈ K. Then h is also a
polynomial mapping.

Proof. Write
f ( x) = Σ ai x i ,
i≥0
g( x) = Σ bj xj
j≥0

for all x ∈ K. These are assumed to be finite sums. For k ≥ 0 define


k
ck = Σ ai b k − i .
i=0
MA132 Foundations / MA138 Sets and Numbers 43

Note that ck = 0 whenever k > m + n. For all x ∈ K


  
i j
h ( x ) = f ( x ) g ( x ) = Σ ai x Σ bj x
i≥0 j≥0
 k 
= Σ Σ ai b k − i x k = Σ ck xk
k≥ 0 i = 0 k≥ 0

so h is a polynomial mapping. 

Let f , g: K → K be polynomial mappings and write

f ( x) = Σ ai x i , g( x) = Σ bj xj
i≥0 j≥0

for all x ∈ K. It may happen that f = g (that is, f ( x) = g( x) for all x ∈ K)


even though there exists i such that ai 6= bi (see exercise 7.2).
On the other hand, it can be shown that if K is infinite then the ai are
determined by f (see exercise 7.5). For infinite K we could already define
a polynomial to be just a polynomial mapping K → K. This is not incorrect
but not optimal. A better definition of polynomial applies to all fields, finite
or infinite, and is as follows.

Definition 174.
(a). A polynomial over K is a sequence

a = ( a0 , a1 , . . .)

such that ai ∈ K for all i, and only finitely many ai are nonzero.
(b). The polynomial mapping associated with a is the mapping K → K
taking x to ∑i ≥0 ai xi .
(c). Let a, b be polynomials over K and write

a = ( a0 , a1 , . . .), b = (b0 , b1 , . . .).

For k ≥ 0 define
k
ck = Σ ai b k − i .
i=0

We define ab := (c0 , c1 , . . .). This is again a polynomial, that is, only finitely
many of the ck are nonzero. Also, we define a + b := (a0 + b0 , a1 + b1 , . . .)
which also a polynomial.
(d). Another notation for the polynomial a = (a0 , a1 , . . .) is

a( x) = Σ ai x i
i≥0

(this is a finite sum). This is the notation we use from now on. Any other
variable than x is also good. The set of polynomials (in the variable x) is
written K [ x]. So multiplication and addition, defined in (c), are binary oper-
ations on K [ x].
44 Chapter 7 December 24, 2018

Exercise (7.1) Let f , g ∈ K [ x], say,


m n
i
f = Σ ai x , g= Σ b j x j.
i=0 j=0

Write f g in a similar notation and justify your answer.

Exercise (7.2) Let K be a finite field. Prove that there exists a polynomial
f ∈ K [ x] such that f (α ) = 0 for all α ∈ K but f 6= 0.

Definition 175. Let f ∈ K [ x], say,


m
f = Σ ai x i .
i=0

Assume also am 6= m. We say that m is the degree of f which is written


deg( f ). Also, the degree of the zero polynomial is −1. We call am the leading
coefficient of f . We say that f is constant if its degree is at most 0.

We identify K with the set of constant polynomials in K [ x].

Lemma 176. Let f , g ∈ K [ x] be nonzero. Then deg( f g) = deg( f ) + deg( g).

Proof. Exercise. 

7.2 Division with remainder for polynomials

Recall that the zero polynomial has degree −1.

Proposition 177: Division with remainder for polynomials. Let f , g ∈


K [ x] with g 6= 0. Then there are unique q, r ∈ K [ x] such that
f = qg + r
and deg(r) < deg( g).

Proof. Equivalent is: there is unique r ∈ K [ x] such that g | f − r and deg(r) <
deg( g). We shall prove it in this form.
Uniqueness. Say r1 and r2 both have the above properties. Put s = r1 − r2 .
Then
g | ( f − r2 ) − ( f − r1 ) = r1 − r2 = s.
Also deg(s) < deg( g). By lemma 176 it follows that s = 0. So r1 = r2 . This
proves uniqueness.
Existence. Let A be the set of r ∈ K [ x] such that g | f − r. Note first that
A 6= ∅, because f ∈ A. By the well-ordering principle there exists r ∈ A
with minimal degree. Choose r like that.
We claim that deg(r) < deg( g). Suppose not. Let axd be the leading term
of g and bxd+e of r (a, b ∈ K r {0}). Then r and ba−1 xe g have equal leading
terms. Put
r1 = r − ba−1 xe g.
MA132 Foundations / MA138 Sets and Numbers 45

Then
g | ( f − r) + ba−1 xe g = f − r1 .
So r1 ∈ A but deg(r1 ) < deg(r) contradicting the minimality of deg(r). This
proves existence. 

Example 178. Division of polynomials is done by long division not unlike


long division for natural numbers. As an example we divide x5 + 3x3 + 1 by
x2 − 2x with remainder.

x2 − 2x | x5 + 3x3 + 1 | x3 + 2x2 + 7x + 14
x5 − 2x4
2x4 + 3x3
2x4 − 4x3
7x3
7x3 − 14x2
14x2
14x2 − 28x
28x + 1

So x5 + 3x3 + 1 = ( x2 − 2x)( x3 + 2x2 + 7x + 14) + 28x + 1.

7.3 Unique factorisation for polynomials

Definition 179.
(a) Let f , g ∈ K [ x]. We say f divides g and write f | g if there exists
h ∈ K [ x] such that f h = g.
(b) Let f ∈ K [ x] be nonconstant. We say that f is irreducible if it has no
divisors of degree different from 0 and deg( f ). It is reducible other-
wise.
(c) A polynomial is monic if it is nonzero and its leading coefficient is 1.

Example 180.
(a) Every polynomial of degree 1 is irreducible.
(b) Here are some factorisations of monic polynomials into monic irre-
ducible polynomials:

x3 − 1 = ( x − 1)( x2 + x + 1) if K = Q
3 2
x − 1 = ( x − 1)( x − α )( x − α ) if K = C, α = exp(2π i /3)
x6 − 1 = ( x − 1)( x + 1)·
· ( x2 + x + 1)( x2 − x + 1) if K = Q
x2 − 2 = ( x − 21/2 )( x + 21/2 ) if K = R
x2 − 2 is irreducible if K = Q

Theorem 181. Let f ∈ K [ x] be monic. Then f is a product of monic irreducible


polynomials. The factorisation is unique up to reordering.
46 Chapter 7 December 24, 2018

Proof. Proof of existence. Let f = g1 · · · gn where gi are nonconstant monic


polynomials. (Such a factorisation exists by choosing n = 1 and g1 = f .)
We have deg( gi ) ≥ 1. So deg( f ) = deg( g1 ) + · · · + deg( gn ) ≥ n. This
shows that n is bounded above and therefore there is a factorisation as above
with the additional property that n maximal. From now on we assume that
n is maximal.
Suppose g1 is not irreducible. Then we can write g1 = pq with p, q
nonconstant and monic. But then f = p q g2 · · · gn contradicting maximality
of n. So g1 is irreducible and likewise gi is irreducible for all i. This proves
existence.
Proof of uniqueness. Suppose that factorisation of f is not unique. As-
sume that, subject to that, f has the least possible degree. Write

f = p1 · · · ps = q1 · · · qt .

Here pi , q j are irreducible monic. Suppose that these are different factorisa-
tions even up to reordering.
Suppose p1 = q1 . Then f / p1 has two distinct factorisations

f / p1 = p2 · · · ps = q2 · · · qt

contradicting minimality of deg( f ). So p1 6= q1 . Likewise, pi 6= q j for all i, j.


So pi ∤ q j and q j ∤ pi for all i, j.
After interchanging the pi with the q j we may assume deg( p1 ) ≤ deg(q1 ).
Let r be any monic polynomial of degree deg(q1 ) − deg( p1 ). Then the leading
terms of q1 and p1 r coincide and deg(q1 − p1 r) < deg(q1 ).
We have

p1 ( p2 · · · ps − rq2 · · · qt ) = p1 · · · ps − p1 rq2 · · · qt
= q1 · · · qt − p1 rq2 · · · qt = (q1 − p1 r)q2 · · · qt =: g.

We call the latter g. Then deg( g) < deg( f ). By minimality of deg( f ) the
polynomial g has only one factorisation. Also p1 divides g. So p1 must divide
one of the factors in (q1 − p1 r)q2 · · · qt . So p1 divides q1 − p1 r. So p1 | q1 . So
p1 = q1 . Contradiction. This proves uniqueness. 

Corollary/Definition 182. Let f , g ∈ K [ x] be monic. Then there exists


a unique monic common divisor of f , g of greatest degree. It is written
hcf( f , g). 

Uniqueness in the above corollary is by no means easy, contrary to the


uniqueness of the hcf of two natural numbers. This is because deg( f ) =
deg( g) does not imply f = g.

Exercise (7.3) Let K be a finite field of q elements. For n ≥ 1 let a(n) be the
number of monic irreducible elements of K [ x] of degree n. Prove:

(1 − qt)−1 = Π (1 − t)− a(n ) .


n≥1
MA132 Foundations / MA138 Sets and Numbers 47

7.4 The Euclidean algorithm

Just like for integers there is a Euclidean algorithm to compute hcf( f , g). At
the same time that we look at it, we shall reprove the uniqueness of hcf( f , g)
(corollary 182).

Definition 183. Let f , g ∈ K [ x]. We write F( f , g) for the set of common


divisors of f , g.

Lemma 184. Suppose f , g, q, r ∈ K [ x] and f = qg + r. Then F( f , g) =


F( g, r).

Proof. Let d ∈ K [ x]. We must prove that d is a common divisor of f , g if and


only if it is a common divisor of g, r. Proof of ⇒: Suppose f = d f 1 , g = dg1 .
Then r = f − qg = d f 1 − qdg1 = d( f 1 − qg1 ). This proves ⇒. The converse
is proved in a similar way. Alternatively, the converse needs no proof by an
( f , r)-symmetry. 

Corollary 185. For 1 ≤ i ≤ m + 1 let f i , qi ∈ K [ x]. Suppose f i −1 = f i qi + f i +1


for all 2 ≤ i ≤ m. Suppose also that for all i we have deg( f i +1 ) < deg( f i −1 )
and f m+1 = 0. Then F( f 1 , f 2 ) = F( f m , 0).

Proof. By the previous lemma, F( f i −1 , f i ) = F( f i , f i +1 ) for all i. Therefore


F ( f 1 , f 2 ) = F ( f m , f m + 1 ). 

Example 186. The Euclidean algorithm has as input f 1 , f 2 ∈ K [ x] (such


that deg( f 1 ) > deg( f 2 )). It outputs m and f i and qi as in the corollary with
the additional property deg( f i ) < deg( f i −1 ) for all i. So the Euclidean algo-
rithm also outputs hcf( f 1 , f 2 ) which is f m . See example 189 for an example
of the Euclidean algorithm.

The following has been proved before. Here is our second proof.

Theorem 187. Let f , g ∈ K [ x] be nonzero. Then there exists a unique monic


common divisor of f , g of greatest degree.

Proof. Existence. This is easy and left to you.


Uniqueness. The Euclidean algorithm works. The output is d such that
F( f , g) = F(d, 0). After rescaling d we may suppose that d is monic. It
follows that F( f , g) is just the set of divisors of d. So hcf( f , g) is unique and
equals d. 

Proposition 188. Let f , g ∈ K [ x] be nonzero. Then there are a, b ∈ K [ x] such


that a f + bg = hcf( f , g).

Proof. Exercise. 

Example 189. There is an extended Euclidean algorithm to find a, b in the


above proposition. Here is an example of the extended Euclidean algorithm.
Assume K = Q. Let f 1 = x4 − 1 and f 2 = x3 + x + 2. Put d = hcf( f 1 , f 2 ). We
shall find d and a, b ∈ K [ x] such that a f 1 + b f 2 = d.
48 Chapter 7 December 24, 2018

Note that the leading terms of f 1 and x f 2 coincide. We put

f 3 := f 1 − x f 2 = ( x4 − 1) − x( x3 + x + 2) = − x2 − 2x − 1.

Note that the leading terms of f 2 and − x f 3 coincide. We put

f 4 := f 2 + x f 3 = ( x3 + x + 2) + x(− x2 − 2x − 1) = −2x2 + 2.

Note that the leading terms of 2 f 3 and f 4 coincide. We put

f 5 := 2 f 3 − f 4 = 2(− x2 − 2x − 1) − (−2x2 + 2) = −4( x + 1).

Note that x + 1 divides f 4 . So d = x + 1. Going backwards through our


computations we find

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

Proposition/Definition 190. Let f , g ∈ K [ x] be nonzero. Then there ex-


ists a unique common monic multiple d of f , g of least degree. We write
lcm( f , g) := d. 

7.5 Roots of polynomials

Lemma 191: Remainder lemma. Let f ∈ K [ x]. Let α ∈ K. Then the remain-
der on division of f by x − α is f (α ).

Proof. Let the result of division with remainder be f = ( x − α )q + r. We


have deg(r) < deg( x − α ) = 1, that is, r is constant. Setting x := α gives
f (α ) = r(α ) = r as required. 

Definition 192. Let f ∈ K [ x] and α ∈ K. We say that α is a root of f if


f (α ) = 0. Note that this implies x − α | f by lemma 191.
We say that f has a root at α of multiplicity d if ( x − α )d divides f but
( x − α )d+1 doesn’t, and d > 0.

Exercise (7.4) Prove that f := x2 + 1 is irreducible in R[ x]. Hint: Clearly, f


has no roots in R.

Lemma 193. Let f ∈ K [ x]. Let α1 , . . . , αk be distinct roots of f . Let di denote


the multiplicity of the root αi . Then f is divisible by

h := ( x − α 1 )d1 · · · ( x − α k )dk .

Proof. It is given that f is divisible by gi := ( x − αi )di , for all i. So f is


divisible by their lcm which is h. 

Exercise (7.5) Prove that a nonzero polynomial cannot have infinitely many
zeroes.
MA132 Foundations / MA138 Sets and Numbers 49

Lemma 194. Let K be a field. Then, the following are equivalent:


(1) Every nonconstant polynomial over K has a root.
(2) Every irreducible polynomial over K has degree 1.
(3) Every monic polynomial over K is a product of polynomials of degree 1.

Proof. Proof of (2) ⇒ (1). Let f ∈ K [ x] be nonconstant. We may assume f


is monic. By existence in theorem 181 we can write f as a product g1 · · · gk
with gi monic and irreducible for all i. Note k ≥ 1. By (2) then, g1 has
degree 1, say, g1 = x − α . Then f (α ) = 0. This proves (1).
Proof of (1) ⇒ (2). Let f ∈ K [ x] be irreducible. By (1) f has a root α . By
lemma 191 f is divisible by x − α , say f = ( x − α ) g. But f is irreducible, so
g = 1. So deg( f ) = 1. This proves (2).
(2) ⇔ (3). Exercise. Use existence in theorem 181. 

Definition 195. The field K is said to be algebraically closed if every non-


constant polynomial in K [ x] has a root in K.

Example 196. The field R of the real numbers is not algebraically closed
because x2 + 1 has no real roots.

Remark 197. Let K be a field. Then there exists an algebraically closed field
L containing K as a subfield. This belongs to Galois Theory (year 3).

7.6 C is algebraically closed

The following is sometimes called the fundamental theorem of algebra (silly


name).

Theorem 198. The field C of the complex numbers is algebraically closed.

The proof of theorem 198 is given below and it won’t be on a test or


exam.

Lemma 199. Let f ∈ C[ x] and put A = {| f ( x)| : x ∈ C}. Then A has a least
element, that is, an element p ∈ A such that p ≤ q for all q ∈ A.

Proof. This belongs to analysis and cannot be done here. 

Proof of theorem 198. Let f ∈ C[ x] be nonconstant and put A = {| f ( x)| :


x ∈ C}. Lemma 199 tells us that A has a least element p. We must prove
p = 0. Suppose not.
There exists a ∈ C such that | f (a)| = p. We may suppose a = 0 because
otherwise we replace f by f ( x + a). Furthermore, we may suppose p = 1
and f (0) = 1 because otherwise we replace f by f (0)−1 f .
We can write

f = 1+ Σ ai x i
i=k
50 Chapter 7 December 24, 2018

where ai ∈ C for all i and ak 6= 0. Also write



g( x) = ak xk , h( x) = Σ ai x i .
i = k+ 1

So f = 1 + g + h. Clearly there exists z ∈ C with |1 + g( z)| < 1. We shall


prove that the same holds for f by showing that z can be chosen such that
h/ g is small.
Claim 1: there exists δ > 0 such that for all x ∈ C with | x| ≤ δ we have
|2h( x)| ≤ | g( x)|.
Proof of claim 1. Put r = h/ g. This is a polynomial. Let S be the sum of
the absolute values of the coefficients of r. Then |r( y)| ≤ S whenever y ∈ C
with | y| ≤ 1.
Also, r( x) is divisible by x so the assumption | y| ≤ δ := max(1, (2S)−1 )
implies |2r( y)| ≤ |2Sy| ≤ 1. This proves claim 1.
There exists z ∈ C such that | z| < δ and ak zk (that is, g( z)) is real
and in the range −1 < g( z) < 0. Then 1 + g( z) is also real and in the
range 0 < 1 + g( z) < 1. Moreover, |h( z)| is at most half | g( z)| so | f ( z)| =
|1 + g( z) + h( z)| < 1. This contradicts minimality of p. 

7.7 Algebraic numbers

Definition 200. An algebraic number is a complex number α ∈ C such that


there exists nonzero f ∈ Q[ x] with f (α ) = 0. The set of algebraic numbers
is written Q.

Example 201.
√ √
(a) Let f = x2 − 2. Then 2 is a root of f . Therefore 2 is algebraic.
(b) Let n ∈ Z>0 . Let α ∈ C be an nth root of unity. Then α is algebraic: it
is a root of f ( x) = xn − 1.

Without proof here are some properties of Q.

Theorem 202. Let α , β ∈ Q. Then α + β ∈ Q and α β ∈ Q. Moreover, Q is a


field, and it is algebraically closed. 

Example 203. Let k, n ∈ Z with n > 0. Put α = exp(2π ik/n). In exam-


ple 201 we’ve seen that α ∈ Q. It is easy to deduce that α −1 ∈ Q. Let’s
put
β := 2 cos (2π k/n) = α + α −1 .
From theorem 202 it follows that β ∈ Q. So there exists f ∈ Q[ x] such that
f (β) = 0. Let’s find such f for k = 1 and n = 5. We have
β2 = (α + α −1 )2 = α 2 + 2 + α −2
so
0 = α −2 + α −1 + 1 + α + α 2
= (α 2 + 2 + α −2 ) + (α + α −1 ) − 1 = β2 + β − 1
MA132 Foundations / MA138 Sets and Numbers 51

so f ( x) = x2 + x − 1 works.
√ √
Example 204. We know that √ 2 and√ 3 are algebraic. Assuming theo-
rem 202, it follows that α := 2 + 3 is algebraic. Let’s find nonzero
f ∈ Q[ x] such that f (α√) = 0.
Firstly, α 2 = 2 + 2 6 + 3. So (α 2 − 5)2 = 24. So f = ( x2 − 5)2 − 24 =
x − 10x2 + 1 does it.
4

Proposition 205. Let f ( x) ∈ Z[ x] and write f ( x) = ∑nk=0 ak xk with ak ∈ Z


for all k. Let p, q ∈ Z and q > 0 and hcf( p, q) = 0 and put α = p/q. Suppose
f (α ) = 0. Then p | a0 and q | an .

Proof. We have
n
n n
0 = q f (α ) = q f ( p/q) = Σ ak pk qn − k .
k= 0

Let tk denote the kth term in the right-hand sum: tk = ak pk qn−k . For k > 0
it is clear that p | tk . It follows that p divides the remaining term t0 , that is,
p | a0 qn . But hcf( p, q) = 1 so p | a0 . Likewise q | an . 
√ √
Example 206. Let α = 2 + 3. We shall prove that α is irrational. Let
f = x4 − 10x2 + 1. Then f (α ) = 0 as we saw in example 204. Say α = p/q
with p, q ∈ Z coprime and q > 0. By proposition 205 it follows that p, q are
divisors of 1. So α ∈ {−1, 1}. This is a contradiction because α > 1. So α is
irrational.

8 Counting: to infinity and beyond?


8.1 Cardinals

Proposition 207: Cantor. There exists no surjection N → R.

Proof. For k ≥ 1 and α ∈ R let dk (α ) denote the kth digit after the decimal
dot of the decimal of α .
Let f : Z≥1 → R be any map. For k ≥ 1 let xk ∈ {0, . . . , 8} be any digit
different from dk ( f (k)) (we avoid 9). Let x be the (unique) real number such
that dk ( x) = xk for all k ≥ 1 and 0 ≤ x < 1.
Then x 6= f (k) for all k ≥ 1 because dk ( x) = xk 6= dk ( f (k)) by our choice
of xk . So x is not in the image of f . 

Corollary 208. There exists no bijection N → R. 

So there are different kinds of infinite.


For finite sets A we defined #A to be the number of elements of A. It is
a natural number. We know that for finite sets A, B there exists a bijection
A → B if and only if #A = #B.
For an infinite set A we no longer write #A = ∞. Instead we have the
following definition.
52 Chapter 8 December 24, 2018

Definition 209. Two sets A, B are said to be equipotent or have the same
cardinality if there exists a bijection A → B. We write #A = #B or A ∼ B if
and only if such a bijection exists.

Remark 210. The relation ∼ is an equivalence relation on the ‘set’ of sets


(exercise). We may define #A to be the ‘set’ of sets B such that A ∼ B. We
learned to call this a ∼-class. But you can ignore this because we don’t need
to know what #A is apart from what #A = #B means. Let C denote the ‘set’
of cardinalities or cardinals.

So we proved that N 6∼ R. Clearly, we are mainly interested in infinite


sets.

8.2 Countable sets

Definition 211. A set A is countable if there exists an injection A → N. A


set A is countably infinite if it is countable and infinite.

So every finite set is countable. Note also that a set A is infinite if and
only if there exists an injection N → A.

Exercise (8.1) Prove that a set A is countably infinite if and only if A ∼ N.

Example 212. The map N2 → N: (m, n) 7→ 2m 3n is injective. So N2 is


countable. By exercise 8.1 it follows that N2 ∼ N.

Example 213. Here’s a picture ‘defining’ a bijection N2 → N. Namely, the


dots form N2 , and there is a unique bijection f : N2 → N such that an arrow
from a to b means f (b) = f (a) + 1.
b

b b

b b b

b b b b

b b b b b

Exercise (8.2) Prove the following results which help construct countable
sets.
(a) Suppose there exists a surjection N → A. Then A is countable.
(b) Suppose A1 , A2 , · · · are countable. Then their union is countable. Hint:
Use that N2 ∼ N by example 212.
(c) Suppose A, B are countable. Then A × B is countable.

We don’t use countable as a synonym for countably infinite (it is not). It’s
just that most sets in our examples are clearly infinite.

Proposition 214. The set Q is countable.


MA132 Foundations / MA138 Sets and Numbers 53

Proof. We define f : Q → N as follows. Let x ∈ Q and write | x| = p/q with


p, q ∈ Z coprime and q > 0. If x = p/q we put f ( x) = 2 p 3q . If x = − p/q
and x 6= 0 we write f ( x) = 2 p 3q 5. Clearly, f is injective. 

Proposition 215. The set Q is countable.

Proof. Proposition 214 tells us that Q is countable. So Qn is countable for


n ≥ 0 by exercise 8.2(c) and an easy induction.
For n ≥ 1 let An be the set of monic polynomials in Q[ x] of degree n.
Then An is in bijection with Qn (extract the coefficients from a polynomial).
So An is countable. So An × Zn is countable by exercise 8.2(c).
Let Bn denote the set of complex numbers which are a root of some poly-
nomial in An .
Let f ∈ An and write R( f ) for the set of roots of f . Then R( f ) has at most
n elements, and is nonempty, so there exists a surjection gn, f : Zn → R( f ).
This gives us a surjection An × Zn → Bn taking ( f , k) to gn, f (k). So Bn is
countable by exercise 8.2(a).
But Q is the union of B1 , B2 , . . . and so is countable by exercise 8.2(b). 

Definition 216. A transcendental number is an element of C r Q.

Corollary 217. Real transcendental numbers exist.

Proof. Suppose not. Then R ⊂ Q. But Q is countable. So R is countable,


contradicting corollary 208. 

This argument by Cantor caused a shitstorm from people saying that this
is not what mathematics is supposed to be like.

8.3 The Schroeder-Bernstein theorem

Theorem 218: Schroeder-Bernstein. If there are injections A → B and B →


A then there exists a bijection A → B.

Proof. Let f : A → B and g: B → A be injections.


Given b0 ∈ B we trace its ‘ancestry’ as follows. Is there a1 ∈ A such
that f (a1 ) = b0 ? Suppose it does; it is unique. Is there b2 ∈ B such that
a1 = g(b2 )? Suppose it does; it is unique. And so on.
Let (respectively) BB , B A , B∞ , denote the set of elements of B whose line
of ancestry (respectively) originates in B, originates in A, goes back infinitely
far. Likewise for A A , A B , A∞ .
Then A = A A ⊔ A B ⊔ A∞ and B = B A ⊔ BB ⊔ B∞ (disjoint unions).
We have bijections f : A A → B A , g: BB → A B and f : A∞ → B∞ . Define
h: A → B by

h( x) = f ( x) if x ∈ A A
h( x) = g−1 ( x) if x ∈ A B
h( x) = f ( x) if x ∈ A∞ .
54 Chapter 8 December 24, 2018

Then h is bijective. 

Definition 219. Let A, B be sets. We write #A ≤ #B if there exists an in-


jection A → B. We write #A < #B if #A ≤ #B but there is no bijection
A → B.

Corollary 220. The relation ≤ = R on the ‘set’ C of cardinals is an ordering.


That is, it satisfies the following:
◦ Reflexive: xRx for all x ∈ C.
◦ Anti-symmetric: For all x, y ∈ C we have ( xRy and yRx) ⇒ x = y.
◦ Transitive: For all x, y, z ∈ C we have ( xRy and yRz) ⇒ xRz.

Proof. Anti-symmetry holds by the Schroeder-Bernstein theorem. The others


are obvious. 

Remark 221. This is outside our scope.


It can be shown that the ordering on C is total, that is, for any two sets
A, B there exists either an injection A → B or an injection B → A.
Moreover, there exists an injection A → B if and only if there exists a
surjection B → A.

8.4 Power sets

Definition 222. Let A be a set. Its power set P( A) is the set of subsets of A.
For n ≥ 1 we also define, recursively, Pn+1 ( A) = P( Pn ( A)).

Note that if #A = n < ∞ then #P( A) = 2n . The argument by which


we proved that N 6∼ R can be boiled down to a minimum which looks as
follows.

Proposition 223. Let A be a set. Then there is no surjection A → P( A).

Proof. Let f : A → P( A) be a map. Put B = { x ∈ A | x 6∈ f ( x)}. We claim


that B is not in the image of f . Suppose it is, say, B = f ( y). Then
y ∈ B ⇐⇒ y 6∈ f ( y) ⇐⇒ y 6∈ B.
This is a contradiction, proving that B is not in the image of f . So f is not
surjective. 

Lemma 224. Let A be a set. Then #A < #P( A).

Proof. There is an injection A → P( A) defined by x 7→ { x}. This shows


#A ≤ #P( A). By proposition 223 there is no surjection A → P( A). There-
fore #A 6= #P( A). The result follows. 

Proposition 225. There are infinitely many infinite cardinals.

Proof. Let A be any infinite set. By lemma 224


#A < #P( A) < #P2 ( A) < · · · .
MA132 Foundations / MA138 Sets and Numbers 55

These are distinct cardinals because ≤ is an ordering by corollary 220. 

Exercise (8.3) Prove P(N) ∼ R. Hint: Use the Schroeder-Bernstein theo-


rem.

8.5 The continuum hypothesis

The continuum hypothesis is the assertion that there exists no cardinal x


such that
#N < x < #R.
It was proved that the continuum hypothesis is neither true nor false under
the common axioms of mathematics.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy