MATH 135 Course Note
MATH 135 Course Note
MATH 135 Course Note
Version 0.2.6
c _ Steven Furino
August 29, 2012
Contents
I Introduction 11
1 In the beginning 12
1.1 What Makes a Mathematician a Mathematician? . . . . . . . . . . . . . . . 12
1.2 How The Course Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.3 Why do we reason formally? . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.4 Reading and Lecture Schedule . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.4.1 Lecture Schedule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.4.2 Reading Schedule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2 Our First Proof 18
2.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.2 The Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.3 Implications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.4 Our First Proof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3 Discovering Proofs 26
3.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.2 Discovering a Proof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.3 Reading A Proof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.4 The Division Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.5 Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
II Foundations 33
4 Truth Tables 34
4.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.2 Truth Tables as Denitions . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.3 Truth Tables to Evaluate Logical Expressions . . . . . . . . . . . . . . . . . 36
4.4 Contrapositive and Converse . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.5 More Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.6 Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5 Introduction to Sets 41
5.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.2 Describing a Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.3 Set Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
5.3.1 Venn Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.4 Comparing Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.4.1 Sets of Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.4.2 An Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2
Section 0.0 CONTENTS 3
5.5 Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6 More on Sets 50
6.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.2 Showing Two Sets Are Equal . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.3 More Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
III Proof Techniques 53
7 Quantiers 54
7.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
7.2 Quantiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
7.3 The Object Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
7.4 The Construct Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
7.5 The Select Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
7.6 Sets and Quantiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
7.7 A Non-Proof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
8 Nested Quantiers 65
8.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
8.2 Onto (Surjective) Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
8.2.1 Denition of Function . . . . . . . . . . . . . . . . . . . . . . . . . . 65
8.2.2 Denition of Onto (Surjective) . . . . . . . . . . . . . . . . . . . . . 66
8.2.3 Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
8.2.4 Discovering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
8.2.5 A Dicult Proof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
8.3 Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
8.3.1 Denition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
8.3.2 Reading A Limit Proof . . . . . . . . . . . . . . . . . . . . . . . . . 73
8.3.3 Discovering a Limit Proof . . . . . . . . . . . . . . . . . . . . . . . . 75
8.3.4 A Harder Proof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
8.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
9 Practice, Practice, Practice: Quantiers and Sets 80
9.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
9.2 Worked Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
10 Simple Induction 84
10.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
10.2 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
10.2.1 Summation Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
10.2.2 Product Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
10.2.3 Recurrence Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
10.3 Introduction to Induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
10.4 Principle of Mathematical Induction . . . . . . . . . . . . . . . . . . . . . . 87
10.4.1 Why Does Induction Work? . . . . . . . . . . . . . . . . . . . . . . . 88
10.4.2 Two Examples of Simple Induction . . . . . . . . . . . . . . . . . . . 88
10.4.3 A Dierent Starting Point . . . . . . . . . . . . . . . . . . . . . . . . 90
10.5 An Interesting Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
10.6 Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
4 Chapter 0 CONTENTS
11 Strong Induction 96
11.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
11.2 Strong Induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
11.3 Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
12 Binomial Theorem 102
12.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
12.2 Binomial Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
12.3 More Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
12.4 Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
13 Negation 107
13.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
13.2 Negating Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
13.3 Negating Statements with Quantiers . . . . . . . . . . . . . . . . . . . . . 109
13.3.1 Counterexamples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
13.4 Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
14 Contradiction 113
14.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
14.2 How To Use Contradiction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
14.2.1 When To Use Contradiction . . . . . . . . . . . . . . . . . . . . . . . 114
14.2.2 Reading a Proof by Contradiction . . . . . . . . . . . . . . . . . . . 114
14.2.3 Discovering and Writing a Proof by Contradiction . . . . . . . . . . 115
15 Contrapositive 118
15.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
15.2 The Contrapositive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
15.2.1 When To Use The Contrapositive . . . . . . . . . . . . . . . . . . . . 118
15.3 Reading a Proof That Uses the Contrapositive . . . . . . . . . . . . . . . . 118
15.3.1 Discovering and Writing a Proof Using The Contrapositive . . . . . 120
16 Uniqueness 122
16.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
16.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
16.3 Showing X = Y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
16.4 Finding a Contradiction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
16.5 The Division Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
17 Elimination 128
17.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
17.2 When to Use the Elimination Method . . . . . . . . . . . . . . . . . . . . . 128
17.3 How to Use the Elimination Method . . . . . . . . . . . . . . . . . . . . . . 128
17.4 Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
17.5 Writing and Discovering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
IV Securing Internet Commerce 132
18 The Greatest Common Divisor 133
18.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
18.2 Greatest Common Divisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Section 0.0 CONTENTS 5
18.3 Certicate of Correctess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
18.4 More Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
18.5 Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
19 The Extended Euclidean Algorithm 141
19.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
19.2 The Extended Euclidean Algorithm (EEA) . . . . . . . . . . . . . . . . . . 141
19.3 More Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
20 Properties Of GCDs 146
20.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
20.2 Some Useful Propositions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
20.3 Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
21 Linear Diophantine Equations:
One Solution 153
21.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
21.2 Linear Diophantine Equations . . . . . . . . . . . . . . . . . . . . . . . . . . 153
21.2.1 Finding One Solution to ax +by = c . . . . . . . . . . . . . . . . . . 154
22 Linear Diophantine Equations:
All Solutions 158
22.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
22.2 Finding All Solutions to ax +by = c . . . . . . . . . . . . . . . . . . . . . . 158
22.3 More Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
22.4 Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
23 Congruence 165
23.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
23.2 Congruences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
23.2.1 Denition of Congruences . . . . . . . . . . . . . . . . . . . . . . . . 165
23.3 Elementary Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
23.4 Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
24 Congruence and Remainders 171
24.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
24.2 Congruence and Remainders . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
24.3 More Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
24.4 Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
25 Modular Arithmetic 176
25.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
25.2 Modular Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
25.2.1 [0] Z
m
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
25.2.2 [1] Z
m
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
25.2.3 Identities and Inverses in Z
m
. . . . . . . . . . . . . . . . . . . . . . 179
25.2.4 Subtraction in Z
m
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
25.2.5 Division in Z
m
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
25.3 More Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
26 Fermats Little Theorem 181
26.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
6 Chapter 0 CONTENTS
26.2 Fermats Little Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
26.3 More Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
26.4 Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
27 Linear Congruences 187
27.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
27.2 The Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
27.3 Extending Equivalencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
27.4 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
27.5 Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
28 Chinese Remainder Theorem 193
28.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
28.2 An Old Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
28.3 Chinese Remainder Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . 194
28.4 More Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
28.5 Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
29 Practice, Practice, Practice: Congruences 199
29.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
29.2 Worked Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
29.3 Preparing for RSA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
30 The RSA Scheme 206
30.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
30.2 Private Key Cryptography . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
30.2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
30.2.2 Substitution Cipher . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
30.2.3 Looking for Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
30.2.4 Vigen`ere Ciphers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
30.3 Why Public Key Cryptography? . . . . . . . . . . . . . . . . . . . . . . . . 212
30.4 Implementing RSA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
30.4.1 Setting up RSA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
30.4.2 Sending a Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
30.4.3 Receiving a Message . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
30.4.4 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
30.5 Does M = R? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
30.6 How Secure Is RSA? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
V Bijections and Counting 218
31 Injections and Bijections 219
31.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
31.2 One-to-one (Injective) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
31.2.1 Denition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
31.2.2 Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
31.2.3 Discovering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
31.2.4 A Dicult Proof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
31.3 Bijections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
31.4 Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
Section 0.0 CONTENTS 7
32 Counting 225
32.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
32.2 African Shepherds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
32.3 What Does It Mean To Count? . . . . . . . . . . . . . . . . . . . . . . . . . 226
32.4 Showing That A Bijection Exists . . . . . . . . . . . . . . . . . . . . . . . . 226
32.5 Finite Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
33 Cardinality of Innite Sets 232
33.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
33.2 Innite Sets Are Weird . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
33.3 Innite Sets are Even Weirder Than You Thought . . . . . . . . . . . . . . 234
33.4 Not All Innite Sets Have The Same Cardinality . . . . . . . . . . . . . . . 235
34 Practice, Practice, Practice: Bijections and Cardinality 237
34.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
34.2 Worked Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
VI Complex Numbers and Eulers Formula 239
35 Complex Numbers 240
35.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
35.2 Dierent Equations Require Dierent Number Systems . . . . . . . . . . . . 240
35.3 Complex Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
35.4 More Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
36 Properties Of Complex Numbers 246
36.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
36.2 Conjugate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
36.3 Modulus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
36.4 More Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
36.5 Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
37 Graphical Representations of Complex Numbers 251
37.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
37.2 The Complex Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
37.2.1 Cartesian Coordinates (x, y) . . . . . . . . . . . . . . . . . . . . . . . 251
37.2.2 Modulus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
37.3 Polar Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
37.4 Converting Between Representations . . . . . . . . . . . . . . . . . . . . . . 253
38 De Moivres Theorem 256
38.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
38.2 De Moivres Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
38.3 Complex Exponentials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
38.4 More Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
38.5 Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
39 Roots of Complex Numbers 260
39.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
39.2 Complex n-th Roots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
39.3 Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
8 Chapter 0 CONTENTS
40 Practice, Practice, Practice:
Complex Numbers 264
40.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
40.2 Worked Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
VII Factoring Polynomials 266
41 An Introduction to Polynomials 267
41.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
41.2 Polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
41.3 Operations on Polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
42 Factoring Polynomials 272
42.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
42.2 Polynomial Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
43 Practice, Practice, Practice:
Polynomials 277
43.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
43.2 Worked Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
44 Practice, Practice, Practice: Course Review 280
44.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
44.2 Suggestions On How To Start A Proof . . . . . . . . . . . . . . . . . . . . . 281
44.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
VIII Finding the Shortest Path 284
45 The Shortest Path Problem 285
45.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
45.2 The Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
45.3 Abstraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
45.4 Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
45.5 Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
46 Paths, Walks, Cycles and Trees 289
46.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
46.2 The Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
46.3 Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
47 Trees 295
47.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
47.2 Properties of Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
48 Dijkstras Algorithm 299
48.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
48.2 Dijkstras Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
48.3 Certicate of Optimality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
Section 0.0 CONTENTS 9
49 Certicate of Optimality - Path 306
49.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
49.2 Certicate of Optimality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
49.3 Weighted Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
49.4 Certicate of Optimality - Tree . . . . . . . . . . . . . . . . . . . . . . . . . 312
IX An Introduction to Fermats Last Theorem 314
50 Introduction to Primes 315
50.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
50.2 Introduction to Primes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
50.3 Induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
50.4 Fundamental Theorem of Arithmetic . . . . . . . . . . . . . . . . . . . . . . 317
50.5 Finding a Prime Factor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
50.6 Working With Prime Factorizations . . . . . . . . . . . . . . . . . . . . . . 321
50.7 More Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
50.8 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
51 Introduction to Fermats Last Theorem 324
51.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
51.2 History of Fermats Last Theorem . . . . . . . . . . . . . . . . . . . . . . . 324
51.3 Pythagorean Triples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
52 Characterization of Pythagorean Triples 330
52.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
52.2 Pythagorean Triples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
53 Fermats Theorem for n = 4 333
53.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
53.2 n = 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
53.3 Reducing the Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
53.4 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
54 Problems Related to FLT 337
54.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
54.2 x
4
y
4
= z
2
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
54.3 Pythagorean Triangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
55 Practice, Practice, Practice:
Primes and Non-Linear Diophantine Equations 340
55.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
55.2 Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
56 Appendix 342
Preface
These notes are the script for the online lectures of MATH 135 at the University of Waterloo
in Fall 2012. The script has been supplemented by worked examples and exercises.
These notes are very much a work in progress. Please send any corrections or suggestions
to Steven Furino at scfurino@uwaterloo.ca
10
Part I
Introduction
11
Chapter 1
In the beginning
1.1 What Makes a Mathematician a Mathematician?
Welcome to MATH 135!
Let me begin with a question. What makes a mathematician a mathematician?
Many people would answer that someone who works with numbers is a mathematician.
But bookkeepers for small businesses work with numbers and we dont normally consider a
bookkeeper as a mathematician. Others might think of geometry and answer that someone
who works with shapes is a mathematician. But architects work with shapes and we dont
normally consider architects as mathematicians. Still others might answer that people who
use formulas are mathematicians. But engineers work with formulas and we dont normally
consider engineers as mathematicians. A more insightful answer would be that people who
nd patterns and provide descriptions and evidence for those patterns are mathematicians.
But scientists search for and document patterns and we dont normally consider scientists
as mathematicians.
The answer is proof - a rigorous, formal argument that establishes the truth of a statement.
This has been the dening characteristic of mathematics since ancient Greece.
This course is about reading, writing and discovering proofs. If you have never done this
before, do not worry. The course will provide you with techniques that will help, and we
will practice those techniques in the context of some very interesting algebra.
1.2 How The Course Works
He who seeks for methods without having a denite problem in mind seeks for
the most part in vain.
David Hilbert
Let me describe how the course works.
Throughout the course, we will work on four problems all of which illustrate the need for
proof. The rst problem resolves a very important practical commercial problem. The
second problem concerns an astonishing result about one the simplest things we do, count.
The third problem results in a new number system and yields a surprising and beautiful
12
Section 1.2 How The Course Works 13
formula. The fourth problem relies on a profound theorem proved by Carl Friedrich Gauss,
the greatest mathematician of the modern age. Here are the four problems.
How do we secure internet commerce? Have you ever bought a song or movie over
iTunes? Have you ever done your banking over the web? How do you make sure
that your credit card number and personal information are not intercepted by bad
guys? Number theory allows us to enable secure web transactions. And that theory
is backed by proof.
What does it mean to count? You probably learned to count before you went to school.
But how do you count to innity? And is there only one innity?
Why does e
i
+ 1 = 0 ? e is a very unusual number that arises in calculus. i is a very
unusual number because it has the property that i
2
= 1. is a very unusual
number even if it is common. It is the unique ratio of the circumference of a circle
to its diameter. Why should that ratio be unique? One is the basis of the natural
numbers, hence the integers, hence the rationals. Zero is a dicult number and was
only accepted into the mathematics of western Europe because of the inuence of
Hindu and Islamic scholars. Why should all of these numbers be connected in so
simple and elegant a form?
How do we factor polynomials? You have factored integers into a product of prime
numbers. There is also a need in mathematics to factor polynomials, expressions like
ax
4
+bx
3
+cx
2
+dx +e into the polynomial equivalent of prime numbers.
The course notes contain two other problems if you would like to see the power of proof
displayed in very dierent contexts.
How do we nd the shortest path from one point to another? How does a telecom-
munications company route your cell phone call? How does Google nd the quickest
route on Google maps? How does a courier company route your package? All of these
tasks are completed using a shortest path algorithm. And how do we know we have
found the shortest path? Proof.
How many positive integer solutions are there to x
n
+y
n
= z
n
where n is an inte-
ger greater than or equal to three? This is one of the most famous problems in the
history of mathematics and it took over 350 years to solve. It was rst conjectured
by the French mathematician Pierre de Fermat in 1637 and was only solved in 1995
by Andrew Wiles.
To work with these problems we will need to learn about congruences, modular arithmetic,
complex numbers and polynomials. And to work with these topics, we must learn some
foundational mathematics such as logical expressions and sets, and, most importantly, we
must learn how to recognize and use proof techniques.
14 Chapter 1 In the beginning
1.3 Why do we reason formally?
But why do we reason so formally at all? Many people believe that humans already know
enough mathematics so Why bother with proofs? There are quite a few reasons.
To prevent silliness. In solving quadratic equations with non-real roots, some of you will
have encountered the number i which has the special property that i
2
= 1. But
then,
1 = i
2
= i i =
1 =
1 1 =
1 = 1
Clearly, something is amiss.
To understand better. How would most of us answer the question Whats a real num-
ber? We would probably say that any number written as a decimal expansion is a
real number and any two dierent expansions represent dierent numbers. But then
what about this?
Let x = 0.9 = 0.999 . . . .
Multiplying by 10 and subtracting gives
10x = 9.9
x = 0.9
9x = 9
which implies x = 1, not x = 0.9.
Or suppose we wanted to evaluate the innite sum
1 1 + 1 1 + 1 1 + 1 1 +. . .
If we pair up the rst two terms we get zero and every successive pair of terms also
gives us 0 so the sum is zero.
..
1 1 +
..
1 1 +
..
1 1 +
..
1 1 +. . .
On the other hand, if we pair up the second and third term we get 0 and all successive
pairs of terms give 0 so the sum is 1.
1
..
1 + 1
..
1 + 1
..
1 + 1
..
1 + 1 +. . .
Or suppose we wanted to resolve Zenos paradox. Zeno was a famous ancient Greek
philosopher who posed the following problem. Suppose the Greek hero Achilles was
going to race against a tortoise and suppose, in recognition of the slowness of the
tortoise, that the tortoise gets a 100m head start. By the time Achilles has run half
the distance between he and the tortoise, the tortoise has moved ahead. And now
again, by the time Achilles has run half the remaining distance between he and the
tortoise, the tortoise has moved ahead. No matter how fast Achilles runs, the tortoise
will always be ahead! You might object that your eyes see Achilles pass the tortoise,
but what is logically wrong with Zenos argument?
Section 1.3 Why do we reason formally? 15
To make better commercial decisions. Building pipelines is expensive. And lots of
pipelines will be built in the next few decades. Pipelines will ship oil, natural gas,
water and sewage. Finding the shortest route given physical constraints (mountains,
rivers, lakes, cities), environmental constraints (protection of the water table, no access
through national or state parks), and supply chain constraints (access to concrete and
steel) is very important. How do pipeline builders prove that the route they have
chosen for the pipeline is the shortest possible route given the constraints?
To discover solutions. Formal reasoning provides a set of tools that allow us to think
rationally and carefully about problems in mathematics, computing, engineering, sci-
ence, economics and any discipline in which we create models.
Poor reasoning can be very expensive. Inaccurate application of nancial models led
to losses of hundreds of billions of dollars during the nancial crisis of 2008.
To experience joy. Mathematics can be beautiful, just as poetry can be beautiful. But
to hear the poetry of mathematics, one must rst understand the language.
16 Chapter 1 In the beginning
1.4 Reading and Lecture Schedule
1.4.1 Lecture Schedule
This is a proposed lecture schedule.
Lec. Ch. Topic
1 1 In The Beginning
2 2 Our First Proof
3 3 Discovering Proofs
4 7 Quantiers
5 8 Nested Quantiers
6 9 Practice, Practice, Practice: Quantiers and Sets
7 10 Simple Induction
8 11 Strong Induction
9 12 Binomial Theorem
10 18 Greatest Common Divisor
11 19 Extended Euclidean Algorithm
12 20 Properties of the GCD
13 21 Linear Diophantine Equations 1
14 22 Linear Diophantine Equations 2
15 23 Congruence
16 24 Congruence and Remainders
17 25 Modular Arithmetic
18 26 Fermats Little Theorem
19 27 Linear Congruences
20 28 Chinese Remainder Theorem
21 29 Practice, Practice, Practice: Congruences
22 30 RSA
23 31 Injections and Bijections
24 32 Counting
25 33 Cardinality of Innite Sets
26 34 Practice, Practice, Practice: Bijections and Cardinality
27 35 Introduction to Complex Numbers
28 36 Properties of Complex Numbers
29 37 Graphical Representations of Complex Numbers
30 38 DeMoivres Theorem
31 39 Roots of Complex Numbers
32 40 Practice, Practice, Practice: Complex Numbers
33 41 An Introduction to Polynomials
34 42 Factoring Polynomials
35 43 Practice, Practice, Practice: Polynomials
36 44 Practice, Practice, Practice: Course Review
Section 1.4 Reading and Lecture Schedule 17
1.4.2 Reading Schedule
Since one of the goals of this course is to help you become comfortable reading mathematics,
there are several short chapters for you to read. After you have completed the reading, an
online assignment will help you consolidate what you know.
Ch. Topic Before Lecture
4. Truth Tables 3. Discovering Proofs
5. Introduction to Sets 3. Discovering Proofs
13. Negation 6. PPP: Quantiers and Sets
14. Contradiction 10. Greatest Common Divisor
15. Contrapositive 10. Greatest Common Divisor
16. Uniqueness 11. Extended Euclidean Algorithm
17. Elimination 12. Properties of the GCD
30. Private Key Cryptography (30.2) 22. The RSA Scheme
Chapter 2
Our First Proof
2.1 Objectives
The technique objectives are:
1. Dene statement, hypothesis, conclusion and implication.
2. Learn how to structure the analysis of a proof.
3. Carry out the analysis of a proof.
The content objectives are:
1. Dene divisibility.
2. State and prove the Transitivity of Divisibility.
2.2 The Language
Mathematics is the language of mathematicians, and a proof is a method of com-
municating a mathematical truth to another person who speaks the language.
(Solow, How to Read and Do Proofs)
Mathematics is an unusual language. It is extraordinarily precise. When a proof is fully
and correctly presented, there is no ambiguity and no doubt about its correctness.
However, understanding a proof requires understanding the language. This course will help
you with the basic grammar of the language of mathematics and is applicable to all proofs.
Just as in learning any new language, you will need lots of practice to become uent.
18
Section 2.2 The Language 19
One of the goals of this course is to learn proof techniques. Our broad objectives for this
goal are simple.
1. Explain and categorize proof techniques that can be used in any proof. This course
will teach not only how a technique works, but when it is most likely to be used and
why it works.
2. Learn how to read a proof. This will require you to identify the techniques of the rst
objective.
3. Discover your own proofs. Knowledge of technique is essential but inadequate. Or,
as we would say in the language of mathematics, technique is necessary but not
sucient. Discovering your own proof requires not only technique but also under-
standing, creativity, intuition and experience. This course will help with the technique
and experience. Understanding, creativity, and intuition come with time. Talent helps
of course.
4. Write your own proofs. Having discovered a proof, you must distill your discovery
into mathematical prose that is targeted at a specic audience.
Hopefully, in the previous lecture, I convinced you of why we need to prove things. Now
what is it that mathematicians prove? Mathematicians prove statements.
Denition 2.2.1
Statement
A statement is a sentence which is either true or false.
Example 1 Here are some examples of statements.
1. 2 + 2 = 4. (A true statement.)
2. 2 + 2 = 5. (A false statement.)
3. x
2
1 = 0 has two distinct real roots. (A true statement.)
4. There exists an angle such that sin() > 1. (A false statement.)
Example 2 Now consider the following sentences.
1. x > 0.
2. ABC is congruent to PQR.
These are statements only if we have an appropriate value for x in the rst sentence and
appropriate instances of ABC and PQR in the second sentence. For example, if x is
the number 5, then the sentence 5 > 0 is a statement since the sentence is true. If x is
the number 5, then the sentence 5 > 0 is also a statement since the sentence is false.
The key point is that a statement is a sentence which must be true or false. If x is the
English word algebra, then the sentence algebra > 0 is not a statement since the sentence
is neither true nor false. Sentences like the two above are called open sentences.
20 Chapter 2 Our First Proof
Denition 2.2.2
Open Sentence
An open sentence is a sentence that
contains one or more variables, where
each variable has values that come from a designated set called the domain of the
variable, and
where the sentence is either true or false whenever values from the respective domains
of the variables are substituted for the variables.
For example, if the domain of x is the set of real numbers, then for any real number chosen
and substituted for x, the sentence x > 0 is a statement.
In this course, we will treat all open sentences as statements under the assumption that the
values of the variables always come from a suitable domain.
2.3 Implications
Denition 2.3.1
Implication
The most common type of statement we will prove is an implication. Implications have
the form
If A is true , then B is true
where A and B are themselves statements. An implication is more commonly read as
If A, then B
or
A implies B
and is written symbolically as
A B
Denition 2.3.2
Compound
Statement
An implication is a compound statement, that is, it is made up of more than one state-
ment.
In the statement A implies B, A is a statement which may be true or false. B is a
statement which may be true or false. A implies B is also a statement which may be true
or false.
Denition 2.3.3
Hypothesis,
Conclusion
The statement A is called the hypothesis. The statement B is called the conclusion.
Section 2.4 Our First Proof 21
REMARK
To prove the implication A implies B, you assume that A is true and you use this
assumption to show that B is true. Statement A is what you start with. Statement B is
where you must end up.
To use the implication A implies B, you must rst establish that A is true. After you
have established that A is true, then you can invoke B.
It is crucial that you are able to identify
1. the hypothesis
2. the conclusion
3. whether you are using or proving an implication
Here are some examples of implications.
Example 3 If x is a positive real number, then log
10
x > 0.
Hypothesis: x is a positive real number.
Conclusion: log
10
x > 0.
Example 4 Let f(x) = xsin(x). Then f(x) = x for some real number x with 0 x 2.
Hypothesis: f(x) = xsin(x).
Conclusion: f(x) = x for some real number x with 0 x 2.
Example 5 In plane geometry, ABC = XY Z whenever ABC is similar to XY Z.
Hypothesis: All gures are in the plane. ABC XY Z.
Conclusion: ABC = XY Z.
2.4 Our First Proof
Let us read our rst proof. We begin with a denition.
Denition 2.4.1
Divisibility
An integer m divides an integer n, and we write m [ n, if there exists an integer k so that
n = km.
22 Chapter 2 Our First Proof
Example 6
3 [ 6 since we can nd an integer k, 2 in this case, so that 6 = k 3.
5 6 since no integer k exists so that 6 = k 5.
For all integers a, a [ 0 since 0 = 0 a. This is true for a = 0 as well.
For all non-zero integers a, 0 a since there is no integer k so that k 0 = a.
Some comments about denitions are in order. If mathematics is thought of as a language,
then denitions are the vocabulary and our prior mathematical knowledge indicates our
experience and versatility with the language.
Mathematics and the English language both share the use of denitions as extremely prac-
tical abbreviations. Instead of saying a domesticated carnivorous mammal known scien-
tically as Canis familiaris we would say dog. Instead of writing down there exists an
integer k so that n = km, we write m [ n.
However, mathematics diers greatly from English in precision and emotional content.
Mathematical denitions do not allow ambiguity or sentiment.
Denition 2.4.2
Proposition
A proposition is a true statement that has been proved by a valid argument.
REMARK
You will encounter several variations on the word proposition. A theorem is a particularly
signicant proposition. A lemma is a subsidiary proposition, or more informally, a helper
proposition, that is used in the proof of a theorem. A corollary is a proposition that follows
almost immediately from a theorem.
There are particular statements that may look like propositions but are more foundational.
An axiom is a statement that is assumed to be true. No proof is given. From axioms we
derive propositions and theorems. Obviously, choosing axioms has to be done very carefully.
Consider the following proposition.
Proposition 1 (Transitivity of Divisibility (TD))
Let a, b and c be integers. If a [ b and b [ c, then a [ c.
When one rst encounters a proposition, it often helps to work through some examples to
understand the proof.
Section 2.4 Our First Proof 23
Example 7 Suppose a = 3, b = 6 and c = 42. Since 3 [ 6 (a [ b) and 6 [ 42 (b [ c), Transitivity of
Divisibility allows us to conclude that 3 [ 42 (a [ c).
Now you might immediately know that 3 [ 42. The strength of this proposition is that it
works for any integers a, b, c that satisfy the condition a [ b and b [ c, not just for the
particular integers of our example.
Now take a minute to read the following proof of Transitivity of Divisibility.
Proof: Since a [ b, there exists an integer r so that ra = b. Since b [ c, there exists an
integer s so that sb = c. Substituting ra for b in the previous equation, we get (sr)a = c.
Since sr is an integer, a [ c.
Though this is a simple proof, other proofs can be dicult to read because of the habits
of writing for professional audiences. Many proofs share the following properties which can
be frustrating for students.
1. Proofs are economical. That is, a proof includes what is needed to verify the truth of
a proposition but nothing more.
2. Proofs do not usually identify the hypothesis and the conclusion.
3. Proofs sometimes omit or combine steps.
4. Proofs do not always explicitly justify steps.
5. Proofs do not reect the process by which the proof was discovered.
The reader of the proof must be conscious of the hypothesis and conclusion, ll in the
omitted parts and justify each step.
REMARK
When you are reading a proof of an implication, do the following.
1. Explicitly identify the hypothesis and the conclusion. If the hypothesis contains no
statements write No explicit hypothesis. At the end of the proof, you should be
able to identify where each part of the hypothesis has been used.
2. Explicitly identify the core proof technique. When reading a proof, the reader usually
works forward from the hypothesis until the conclusion is reached. Specic techniques
will be covered later in the course.
3. Record any preliminary material needed, usually denitions or propositions that have
already been proved. Judgement is needed here about how much to include.
4. Justify each step with reference to the denitions, previously proved propositions or
techniques used.
5. Add missing steps where necessary and justify these steps with reference to the de-
nitions, previously proved propositions or techniques used.
24 Chapter 2 Our First Proof
Lets analyze the proof of the Transitivity of Divisibility in detail because it will give us
some sense of how to analyze proofs in general. First, observe that If a [ b and b [ c, then
a [ c. is an open sentence, and that the domains for the variables a, b and c are specied
in the rst sentence, Let a, b and c be integers.
Professional mathematicians do all of these things implicitly but for the rst part of this
course, we will do these things explicitly.
We will do a line by line analysis, so to make our work easier, we will write each sentence
on a separate line.
Proof: (For reference, each sentence of the proof is written on a separate line.)
1. Since a [ b, there exists an integer r so that ra = b.
2. Since b [ c, there exists an integer s so that sb = c.
3. Substituting ra for b in the previous equation, we get (sr)a = c.
4. Since sr is an integer, a [ c.
Lets analyze the proof. What we do now will seem like overkill but it serves two purposes.
It gives practice at justifying every line of a proof, and it gives us a structure that we
can use for other proofs. Lastly, recall that the author is proving an implication. The
author assumes that the hypothesis is true, and uses the hypothesis to demonstrate that
the conclusion is true. Here goes.
Analysis of Proof We begin by explicitly identifying the hypothesis and the conclusion.
Hypothesis: a, b and c are integers. a [ b and b [ c.
Conclusion: a [ c.
Core Proof Technique: Work forwards from the hypothesis.
Preliminary Material: The denition of divides. An integer m divides an integer
n, and we write m [ n, if there exists an integer k so that n = km.
Sentence 1 Since a [ b, there exists an integer r so that ra = b.
In this sentence, the author of the proof uses the hypothesis a [ b and the denition
of divides.
Sentence 2 Since b [ c, there exists an integer s so that sb = c.
In this sentence, the author uses the hypothesis b [ c and the denition of divides.
Sentence 3 Substituting ra for b in the previous equation, we get (sr)a = c.
Here, the author works forward using arithmetic. The actual work is:
sb = c and ra = b implies s(ra) = c which implies (sr)a = c.
Section 2.4 Our First Proof 25
Sentence 4 Since sr is an integer, a [ c.
Lastly, the author uses the denition of divides. In this case, the m, k and n of the
denition apply to the a, sr and c of the proof. It is important to note that sr is an
integer, otherwise the denition of divides does not apply.
At the end of each proof, you should be able to identify where each part of the hypothesis
was used. It is obvious where a [ b and b [ c were used. The hypothesis a, b and c are
integers was needed to allow the author to use the denition of divides.
This completes the analysis of our rst proof. Between the readings, lectures, quizzes,
assignments and tests, you will work your way through roughly one hundred proofs.
Chapter 3
Discovering Proofs
3.1 Objectives
The technique objectives are:
1. Discover a proof using the Direct Proof technique.
2. Write a proof.
3. Read a proof.
The content objectives are:
1. Prove the Divisibility of Integer Combinations.
2. Prove the Bounds By Divisibility.
3. State the Division Algorithm.
3.2 Discovering a Proof
Discovering a proof of a statement is generally hard. There is no recipe for this, but there
are some tips that may be useful, and as we go on through the course, you will learn specic
techniques. Consider the following proposition.
Proposition 1 (Divisibility of Integer Combinations (DIC))
If a, b and c are integers where a [ b and a [ c, and x and y are any integers, then a [ (bx+cy).
As with our rst proposition, lets begin with a numeric example.
26
Section 3.2 Discovering a Proof 27
Example 1 Suppose a = 3, b = 6 and c = 27. Then, for any integers x and y, 3 [ (6x +27y). That is, 3
divides any integer combination of 6 and 27. You might say, Thats obvious. Just take a
common factor of 3 from 6x + 27y. That is
6x + 27y = 3(2x + 9y)
That observation is very suggestive of the proof of the Divisibility of Integer Combinations.
The very rst thing to do when proving a statement is to explicitly identify the hypothesis
and the conclusion. Lets do that for the Divisibility of Integer Combinations.
Hypothesis: a, b, c Z, a [ b and a [ c. x, y Z
Conclusion: a [ (bx +cy)
Since we are proving a statement, not using a statement, we assume that the hypothesis
is true, and then demonstrate that the conclusion is true. This straightforward approach
is called Direct Proof. However, in actually discovering a proof we do not need to work
only forwards from hypothesis. We can work backwards from the conclusion and meet
somewhere in the middle. When writing the proof we must ensure that we begin with the
hypothesis and end with the conclusion.
Whether working forwards or backwards, I nd it best to proceed by asking questions.
When working backwards, I ask
What mathematical fact would allow me to deduce the conclusion?
For example, in the proposition under consideration I would ask
What mathematical fact would allow me to deduce that a [ (bx +cy)?
The answer tells me what to look for or gives me another statement I can work backwards
from. In this case the answer would be
If there exists an integer k so that bx +cy = ak, then a [ (bx +cy).
Note that the answer makes use of the denition of divides. Lets record this statement as
part of a proof in progress.
Proof in Progress
1. To be completed.
2. Since there exists an integer k so that bx +cy = ka, then a [ (bx +cy).
Now I could ask the question
How can I nd such a k?
28 Chapter 3 Discovering Proofs
The answer is not obvious so lets turn to working forwards from the hypothesis. In this
case my standard two questions are
Have I seen something like this before?
What mathematical fact can I deduce from what I already know?
I have seen a [ b in an hypothesis before. Twice actually, once in the proof of the Transitivity
of Divisibility and once in the prior example. Just as was done in the proof of the Transitivity
of Divisibility, I can use a [ b and the denition of divisibility to assert that
There exists an integer r such that b = ra.
and Ill add this to the proof in progress.
Proof in Progress
1. Since a [ b, there exists an integer r such that b = ra.
2. To be completed.
3. Since there exists an integer k so that bx +cy = ka, then a [ (bx +cy).
I also know that a [ c so I can use the denition of divisibility again to assert that
There exists an integer s such that c = sa.
and I will add this to the proof in progress as well.
Proof in Progress
1. Since a [ b, there exists an integer r such that b = ra.
2. Since a [ c, there exists an integer s such that c = sa.
3. To be completed.
4. Since there exists an integer k so that bx +cy = ka, then a [ (bx +cy).
Hmmm, what now? Lets look again at the last sentence. There is a bx + cy in the last
sentence and an algebraic expression for b and c in the rst two sentences. Substituting
gives
bx +cy = (ra)x + (sa)y
and factoring out the a gives
bx +cy = (ra)x + (sa)y = a(rx +sy)
Does this look familiar? We factored in our numeric example and we are factoring here.
If we let k = rx + sy then, because multiplying integers gives integers and adding integers
gives integers, k is an integer. Hence, there exists an integer k so that bx +cy = ak. That
is, a [ (bx +cy).
We are done. Almost. We have discovered a proof but this is rough work. We must now
write a formal proof. Just like any other writing, the amount of detail needed in expressing
your thoughts depends upon the audience. A proof of a statement targeted at an audience
of professional specialists in algebra will not look the same as a proof targeted at a high
school audience. When you approach a proof, you should rst make a judgement about the
audience. Write for your peers. That is, write your proof so that you could hand it to a
classmate and expect that they would understand the proof.
Section 3.3 Reading A Proof 29
Proof: Since a [ b, there exists an integer r such that b = ra. Since a [ c, there exists an
integer s such that c = sa. Let x and y be any integers. Now bx + cy = (ra)x + (sa)y =
a(rx + sy). Since rx + sy is an integer, it follows from the denition of divisibility that
a [ (bx +cy).
Note that this proof does not reect the discovery process, and it is a Direct Proof. It
begins with the hypothesis and ends with the conclusion.
Before we leave this proposition, lets consider the signicance of the hypothesis x and y
are integers. Suppose, as in our numeric example, a = 3, b = 6 and c = 27. If we choose
x = 3/2 and y = 1/4, ax + by = 45/4 which is not even an integer! This simple example
emphasizes the importance of the hypothesis.
Exercise 1 Prove the following statement. Let a, b, c and d be integers. If a [ c and b [ d, then ab [ cd.
3.3 Reading A Proof
Here is another proposition and proof.
Proposition 2 (Bounds By Divisibility (BBD))
Let a and b be integers. If a [ b and b ,= 0 then [a[ [b[.
Proof: Since a [ b, there exists an integer q so that b = qa. Since b ,= 0, q ,= 0. But if
q ,= 0, [q[ 1. Hence, [b[ = [qa[ = [q[[a[ [a[.
Lets analyze this proof. First, we will rewrite the proof line by line.
Proof: (For reference purposes, each sentence of the proof is written on a separate line.)
1. Since a [ b, there exists an integer q so that b = qa.
2. Since b ,= 0, q ,= 0.
3. But if q ,= 0, [q[ 1.
4. Hence, [b[ = [qa[ = [q[[a[ [a[.
Now the analysis.
30 Chapter 3 Discovering Proofs
Analysis of Proof As usual, we begin by explicitly identifying the hypothesis and the
conclusion.
Hypothesis: a and b are integers. a [ b and b ,= 0.
Conclusion: [a[ [b[.
Core Proof Technique: Direct Proof.
Preliminary Material: The denition of divides.
Now we justify every sentence in the proof.
Sentence 1 Since a [ b, there exists an integer q so that b = qa.
In this sentence, the author of the proof uses the hypothesis a [ b and the denition
of divides.
Sentence 2 Since b ,= 0, q ,= 0.
If q were zero, then b = qa would imply that b is zero. Since b is not zero, q cannot
be zero.
Sentence 3 But if q ,= 0, [q[ 1.
Since q is an integer from Sentence 1, and q is not zero from Sentence 2, q 1 or
q 1. In either case, [q[ 1.
Sentence 4 Hence, [b[ = [qa[ = [q[[a[ [a[.
Sentence 1 tells us that b = qa. Taking the absolute value of both sides gives [b[ = [qa[
and using the properties of absolute values we get [qa[ = [q[[a[. From Sentence 3,
[q[ 1 so [q[[a[ [a[.
3.4 The Division Algorithm
As you have known since grade school, not all integers are divided evenly by other integers.
There is usually a remainder. We record this as the Division Algorithm.
Proposition 3 (Division Algorithm (DA))
If a and b are integers, and b > 0, then there exist unique integers q and r such that
a = qb +r where 0 r < b.
We will not prove this statement now. You will see a proof of the uniqueness part later on.
Lets see some examples before a few remarks.
Section 3.5 Practice 31
Example 2 (Division Algorithm)
a = q b +r
20 = 2 7 + 6
21 = 3 7 + 0
20 = 3 7 + 1
REMARK
The integer q is called the quotient.
The integer r is called the remainder.
The integer r is always strictly less than b.
The integer r is always positive or zero.
Observe that b [ a if and only if the remainder is 0.
Though the proposition is commonly known as the Division Algorithm, it is not really
an algorithm since it doesnt provide a nite sequence of steps that will construct q
and r.
It turns out that the Division Algorithm is remarkably useful. To see how, we must rst
dene the greatest common divisor, which we do soon.
3.5 Practice
1. Prove the following statement. Let a, b, c Z. If ac [ bc and c ,= 0, then a [ b.
2. Prove the following statement. Let x be an integer. If 2 [ (x
2
1), then 4 [ (x
2
1).
3. Consider the following statement: If a [ 30 then a [ 60.
(a) The following proof of the statement is incorrect. Describe what is wrong with
the proof.
Proof: Let a be a divisor of 60. Since a can only contain the prime factors 2, 3,
and 5, and since all of these integers are factors of 30 as well, a [ 30.
(b) Prove the statement.
32 Chapter 3 Discovering Proofs
4. Consider the following statement:
Suppose a is an integer. If 32 ((a
2
+ 3)(a
2
+ 7)), then a is even.
In trying to prove or disprove this statement, each of parts (a), (b) and (c) contains
a aw. Determine the main aw in each argument.
(a) Suppose a is even. Then a
2
is even, so both a
2
+3 and a
2
+7 are odd. Since 32
is even, 32 ((a
2
+ 3)(a
2
+ 7)).
(b) Let a = 1. Then 32[((a
2
+3)(a
2
+7)), but a is not even. This is a counterexample
to the statement.
(c) Suppose 32 ((a
2
+3)(a
2
+7)). Since 2[32, 2 ((a
2
+3)(a
2
+7)). This means that
(a
2
+3)(a
2
+7) must be odd, so both a
2
+3 and a
2
+7 must be odd. Therefore,
a
2
is even, and hence a is even.
(d) Prove the statement.
Part II
Foundations
33
Chapter 4
Truth Tables
4.1 Objectives
The technique objectives are:
1. Dene not, and, or, implies and if and only if using truth tables.
2. Evaluate logical expressions using truth tables.
3. Use truth tables to establish the equivalence of logical expressions and particularly
the equivalence of the contrapositive and the non-equivalence of the converse.
4.2 Truth Tables as Denitions
Throughout this course we work with statements.
Denition 4.2.1
Statement
A statement is a sentence which is either true or false.
Denition 4.2.2
Compound,
Component
All of the statements we need to prove will be compound statements, that is, statements
composed of several individual statements called component statements.
For example, the compound statement
If a [ b and b [ c, then a [ c.
contains three component statements
a [ b,
b [ c, and
a [ c
Suppose we let X be the statement a [ b and Y be the statement b [ c and Z be the
statement a [ c. Then our original statement
34
Section 4.2 Truth Tables as Denitions 35
If a [ b and b [ c, then a [ c.
becomes
X and Y imply Z.
If we knew the truth values of X, Y and Z, then we would be able to determine the truth
value of the compound statement X and Y imply Z. And that is where truth tables come
in. Truth tables contain all possible values of the component statements and determine the
truth value of the compound statement.
Truth tables can be used to dene the truth value of a statement or evaluate the truth
value of a statement. For logical operations like not, and, or, implies and if and only if,
truth tables are used to dene the truth value of the compound statement.
Denition 4.2.3
NOT
The simplest denition is that of NOT A, written A.
A A
T F
F T
In prose, if the statement A is true, then the statement NOT A is false. If the statement
A is false, then the statement NOT A is true.
Two very important and common logical connectives are AND and OR. Note that these do
not always coincide with our use of the words and and or in the English language!
Denition 4.2.4
AND
The denition of A AND B, written A B, is
A B A B
T T T
T F F
F T F
F F F
Denition 4.2.5
OR
The denition of A OR B, written A B, is
A B A B
T T T
T F T
F T T
F F F
This is an opportune moment to highlight the dierence between mathematical language
and the English language. If you are visiting a friend and your friend oers you coee or
36 Chapter 4 Truth Tables
tea, you interpret that to mean that you may have coee or tea but not both. However,
the logical A B results in a true statement when A is true, B is true or both are true. In
mathematics, or is inclusive.
Denition 4.2.6
Implies
The denition of A implies B, written A B, often seems strange.
A B A B
T T T
T F F
F T T
F F T
The rst two rows in the table make sense. The last two make less sense. How can a false
hypothesis result in a true statement? The basic idea is that if one is allowed to assume an
hypothesis which is false, any conclusion can be derived.
We will shortly see that implies is closely related to if and only if.
Denition 4.2.7
If and Only If
The denition of A if and only if B, written A B or A i B, is
A B A B
T T T
T F F
F T F
F F T
4.3 Truth Tables to Evaluate Logical Expressions
We can construct truth tables for compound statements by evaluating parts of the compound
statement separately and then evaluating the larger statement. Consider the following truth
table which shows the truth values of (AB) for all possible combinations of truth values of
the component statements A and B. (Brackets serve the same purpose in logical expressions
as they do in arithmetic. They specify the order of operation. In logic the order is: brackets,
, , , , , with evaluation from left to right.)
Example 1 Construct a truth table for (A B).
A B A B (A B)
T T T F
T F T F
F T T F
F F F T
Section 4.3 Truth Tables to Evaluate Logical Expressions 37
In the rst row of the table A and B are true, so using the denition of or, the statement
A B is true. Since the negation of a true statement is false, (A B) is false, which
appears in the last column of the rst row. Take a minute to convince yourself that each of
the remaining rows is correct.
Here is another example.
Example 2 Construct a truth table for A (B C).
A B C B C A (B C)
T T T T T
T T F T T
T F T T T
T F F F F
F T T T T
F T F T T
F F T T T
F F F F T
Exercise 1
1. If A, B, C are statements, and A and B are true, and C is false, what is the truth
value of
(a) A (B C)?
(b) A (B C)?
(c) A (B C)?
(d) (A B) C?
2. Construct a truth table for (A B) C.
Denition 4.3.1
Logically
equivalent
Two compound statements are logically equivalent if they have the same truth values for
all combinations of their component statements. We write S
1
S
2
to mean S
1
is logically
equivalent to S
2
.
REMARK
Equivalent statements are enormously useful in proofs. Suppose you wish to prove S
1
but
are having diculty. If there is a simpler statement S
2
and S
1
S
2
, then you can prove S
2
instead. In proving S
2
, you will have proved S
1
as well.
38 Chapter 4 Truth Tables
Example 3 Construct a single truth table for (AB) and (A)(B). Are these statements logically
equivalent?
A B A B (A B) A B (A) (B)
T T T F F F F
T F T F F T F
F T T F T F F
F F F T T T T
Since the columns representing (A B) and (A) (B) are identical,
we can conclude that (A B) (A) (B).
The preceding example and your assignments demonstrate DeMorgans Laws.
Proposition 1 (De Morgans Laws (DML))
If A and B are statements, then
1. (A B) (A) (B)
2. (A B) (A) (B)
REMARK
The next example shows the equivalence of A B and (A B) (B A). This is
particularly important for proofs. Because A B is equivalent to (A B) (B A),
to prove a statement of the form A B, we could prove
1. A B and
2. B A.
Example 4 Show that A B is logically equivalent to (A B) (B A).
A B A B A B B A (A B) (B A)
T T T T T T
T F F F T F
F T F T F F
F F T T T T
Since the columns representing A B and (A B) (B A) are identical,
we can conclude that A B (A B) (B A).
Section 4.5 Contrapositive and Converse 39
4.4 Contrapositive and Converse
Two particular statements, the contrapositive and the converse, which are derived from
A B, occur frequently in mathematics.
Denition 4.4.1
Contrapositive
The statement B A is called the contrapositive of A B.
We can use truth tables to show that A B B A.
A B A B B A B A
T T T F F T
T F F T F F
F T T F T T
F F T T T T
Since the columns representing A B and B A are identical, we can conclude that
A B B A.
REMARK
The logical equivalence of a statement and its contrapositive is extremely useful. If proving
A B seems dicult, we could try to prove B A instead. It may be easier!
Denition 4.4.2
Contrapositive
The statement B A is called the converse of A B.
We can use truth tables to show that A B , B A.
A B A B B A
T T T T
T F F T
F T T F
F F T T
Since the columns representing A B and B A are not identical, we can conclude that
A B , B A.
REMARK
It is a common mistake for beginning mathematicians to assume that A B and B A
are the same. They are not! Consider the following statement.
If Lassie is a dog, then Lassie has four legs.
This is a true statement (assuming Lassie has had no amputations or birth defects). The
contrapositive of this statement is
If Lassie has four legs, then Lassie is a dog.
which is clearly false. Many animals other than dogs have four legs.
40 Chapter 4 Truth Tables
4.5 More Examples
1. Use a truth table to determine whether or not A (B C) is equivalent to
(A B) (A C).
A B C B C A (B C) A B A C (A B) (A C)
T T T T T T T T
T T F F T T T T
T F T F T T T T
T F F F T T T T
F T T T T T T T
F T F F F T F F
F F T F F F T F
F F F F F F F F
Since the columns associated with the statements A(BC) and (AB)(AC) are
identical, the two statements are equivalent. That is, A(BC) (AB) (AC).
4.6 Practice
1. Use truth tables to show that for statements A, B and C, the Associativity Laws
hold. That is
(a) A (B C) (A B) C
(b) A (B C) (A B) C
2. Use truth tables to show that for statements A, B and C, the Distributivity Laws
hold. That is
(a) A (B C) (A B) (A C)
(b) A (B C) (A B) (A C)
3. Give a logical statement that is equivalent to (A B). Provide evidence in the
form of a truth table.
4. Construct a truth table for A B C (A B) (A C).
Chapter 5
Introduction to Sets
5.1 Objectives
The technique objectives are:
1. Dene and gain experience with set, element, set-builder notation, dening property,
subset, superset, equality of sets, empty set, universal set, complement, cardinality,
union, intersection and dierence.
2. Be able to read and use Venn diagrams.
5.2 Describing a Set
Sets are foundational in mathematics and literally appear everywhere.
Denition 5.2.1
Set, Element
A set is a collection of objects. The objects that make up a set are called its elements (or
members).
Sets can contain any type of object. Since this is a math course, we frequently use sets of
numbers. But sets could contain letters, the letters of the alphabet for example, or books,
such as those in a library collection.
It is customary to use uppercase letters (A, B, C . . .) to represent sets and lowercase letters
(a, b, c, . . .) to represent elements. If a is an element of the set A, we write a A. If a is
not an element of the set A, we write a , A.
Small sets can be explicitly listed. For example, the set of even numbers less than 10 is
2, 4, 6, 8
Our next set requires prime numbers.
Denition 5.2.2
Prime
An integer p > 1 is called a prime if its only positive divisors are 1 and p; otherwise it is
called composite.
41
42 Chapter 5 Introduction to Sets
The set of prime numbers less than 10 is
2, 3, 5, 7
When explicitly listing sets, we use curly braces, , and separate elements with a comma.
Many sets are either too large to be listed (the set of all primes less than 10,000) or are
dened by a rule. In these cases, we employ set-builder notation which makes use of a
dening property of the set. For example, the set of all real numbers between 1 and 2
inclusive could be written as
x R [ 1 x 2
The part of the description following the bar ([) is the dening property of the set. Some
authors use a colon (:) instead of a bar and write
x R : 1 x 2
As when explicitly listing sets, we use curly braces, .
Some letters have become associated with specic sets.
N natural numbers, 1, 2, 3, . . .
Z integers
Q rational numbers,
p
q
[ p, q Z, q ,= 0
Q irrational numbers
R real numbers
C complex numbers x +yi [ x, y R
Computer scientists begin counting at 0 so the notation N used in a computer science
context likely means the set of integers 0, 1, 2, 3, . . .. Be sure to clarify which set is intended.
Example 1 (Set-Builder Notation)
1. The set of all even integers can be described as
n Z : 2 [ n
There is frequently more than one way of describing a set. Another way of describing
the set of even integers is
2k [ k Z
2. The set of all real solutions to x
2
+ 4x 2 = 0 can be described as
x R [ x
2
+ 4x 2 = 0
and, in general, the set of all real solutions to f(x) = 0 can be described as
x R [ f(x) = 0
3. The set of all positive divisors of 30 can be written as
n N : n [ 30
4. In calculus, we often use intervals of real numbers. The closed interval [a, b] is
dened as the set
x R [ a x b
Section 5.2 Describing a Set 43
Denition 5.2.3
Subset
A set A is called a subset of a set B, and is written A B, if every element of A belongs
to B. Symbolically, we write
A B means x A x B
or equivalently
A B means For all x A, x B
We sometimes say that A is contained in B.
Example 2
1, 2, 3 1, 2, 3, 4
Denition 5.2.4
Proper Subset
A set A is called a proper subset of a set B, and written A B, if every element of A
belongs to B and there exists an element in B which does not belong to A.
In the previous example, it is also the case that
Example 3
1, 2, 3 1, 2, 3, 4
Denition 5.2.5
Superset
A set A is called a superset of a set B, and written A B, if every element of B belongs
to A. A B is equivalent to B A.
Example 4
1, 2, 3, 4 1, 2, 3
Denition 5.2.6
Proper Subset
As before, a set A is called a proper superset of a set B, and written A B, if every
element of B belongs to A and there exists an element in A which does not belong to B.
Example 5
1, 2, 3, 4 1, 2, 3
Denition 5.2.7
Set Equality
Saying that two sets A and B are equal, and writing A = B, means that A and B have
exactly the same elements. The usual way of showing A = B is to show mutual inclusion,
that is, show A is contained in B and B is contained in A. Symbolically, we write
A = B means A B AND B A
44 Chapter 5 Introduction to Sets
Denition 5.2.8
Empty Set
There is a special set, called the empty set and denoted by , which contains no elements.
The empty set is a subset of every set.
Denition 5.2.9
Universal Set
When we discuss sets, we are often concerned with subsets of some implicit or specied set
U, called the universal set. In our work on divisibility and greatest common divisors, we
will be concerned with integers as the universal set, even when we dont explicitly say so.
Denition 5.2.10
Set Complement
Relative to a universal set U, the complement of a subset A of U, written A, is the set of
all elements in U but not in A. Symbolically, we write
A = x [ x U AND x , A = x [ (x U) (x , A)
Denition 5.2.11
Cardinality
Lastly, the cardinality of a set A, written [A[, is the number of elements in the set.
Example 6 For example, if A = 1, 2, 3, 4, then [A[ = 4. Heres a pair of mind-blowing questions.
What is the cardinality of N? How much larger is Q than N?
Example 7 Let S = x R [ x
2
= 2 and T = x Q [ x
2
= 2.
1. Describe the set S by listing its elements. What is the cardinality of S?
2. Describe the set T by listing its elements. What is the cardinality of T?
3. List all of the subsets of S.
Solution:
1. S =
2,
2. [S[ = 2.
2. T = . [T[ = 0.
3. ,
2,
2, S
Section 5.3 Set Operations 45
Example 8 Let the universal set for this question be U, the set of natural numbers less than twenty.
Let T be the set of integers divisible by three and F be the set of integers divisible by ve.
1. Describe T by explicitly listing the set and by using set-builder notation in at least
two ways.
2. Find a subset of T of cardinality three.
3. Find an element which belongs to both T and F.
4. Find an element which belongs to neither T nor F.
5. Explicitly list the set T.
Solution:
1. Explicitly listing the set gives T = 3, 6, 9, 12, 15, 18. Two set-builder descriptions of
the set are T = n N : 3 [ n, n < 20 and T = 3k [ k N, 3k < 20
2. 3, 6, 9. There are several choices possible.
3. 15. Notice that this is an element, not a set.
4. 1. There are several choices possible.
5. 1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19
5.3 Set Operations
Denition 5.3.1
Union
The union of two sets A and B, written AB, is the set of all elements belonging to either
set A or set B. Symbolically we write
A B = x [ x A OR x B = x [ (x A) (x B)
Note that when we say set A or set B we mean the mathematical use of or. That is, the
element can belong to A, B or both A and B.
Denition 5.3.2
Intersection
The intersection of two sets A and B, written A B, is the set of all elements belonging
to both set A and set B. Symbolically we write
A B = x [ x A AND x B = x [ (x A) (x B)
46 Chapter 5 Introduction to Sets
Denition 5.3.3
Dierence
The dierence of two sets A and B, written A B (or A B), is the set of all elements
belonging to A but not B. Symbolically we write
AB = x [ x A AND x , B = x [ (x A) (x , B)
If U is the universal set and A U then A = U A.
Example 9 Let the universal set for this question be U, the set of natural numbers less than or equal
to twelve. Let T be the set of integers divisible by three, F be the set of integers divisible
by ve and P the set of primes. Determine each of the following.
1. T F
2. T F
3. P
4. P (T F)
5. T F
6. (T F) P
Solution:
1. T F = 3, 5, 6, 9, 10, 12
2. T F =
3. P = 1, 4, 6, 8, 9, 10, 12
4. P (T F) = 3, 5
5. T F = 1, 2, 4, 5, 7, 8, 10, 11
6. (T F) P = 6, 9, 10, 12
Section 5.4 Comparing Sets 47
5.3.1 Venn Diagrams
Venn diagrams can serve as useful illustrations of set relationships. In Figure 5.3.1 below,
the universal set is U = a, b, c, d, e, w, the set A = a, b, c, d and the set B = d, e.
The element d lies in the intersection of sets A and B. Since d is the only such element,
A B = d. The element w does not lie in either set A or B.
A
B
a
b
c
d
e
w
Figure 5.3.1: Venn Diagram
5.4 Comparing Sets
5.4.1 Sets of Solutions
One common use of sets is to describe values which are solutions to an equation, but care
in expression is required here. The following two sentences mean dierent things.
1. Let a, b, c R, a ,= 0 and b
2
4ac 0. The solutions to the quadratic equation
ax
2
+bx +c = 0
are
x =
b
b
2
4ac
2a
2. Let a, b, c R, a ,= 0 and b
2
4ac 0. Then
x =
b
b
2
4ac
2a
are solutions to the quadratic equation
ax
2
+bx +c = 0
The rst sentence asserts that a complete description of all solutions is given. The second
sentence only asserts that x = (b
b
2
4ac)/2a are solutions, not that they are the
complete solution. In the language of sets, if S is the complete solution to ax
2
+bx+c = 0,
and T = (b
b
2
4ac)/2a, Sentence 1 asserts that S = T (which implies S T and
T S) but Sentence 2 only asserts that T S.
This point can be confusing. Statements about solutions are often implicitly divided into
two sets: the set S of all solutions and a set T of proposed solutions. One must be careful
48 Chapter 5 Introduction to Sets
to determine whether the statement is equivalent to S = T or T S. Phrases like the
solution or complete solution or all solutions indicate S = T. Phrases like a solution or are
solutions indicate T S.
Similar confusion arises when showing that sets have more than one representation. For
example, a circle centred at the origin O is often dened geometrically as the set of points
equidistant from O. Others dene a circle algebraically in the Cartesian plane as the set of
points satisfying x
2
+ y
2
= r
2
. To show that the two denitions describe the same object,
one must show that the two sets of points are equal.
5.4.2 An Example
Given a set S and a set T, there are two very frequent tasks one must perform: one must
show S T or S = T. In fact, the second task is usually just two instances of the rst
task: to show S = T one can show S T and T S.
So, the important message here is that mathematicians must become skilled at demonstrat-
ing that S T. The plan in all cases is the same: choose a generic element of S and show
that it belongs to T. Symbolically
S T means x S x T
or equivalently
S T means For all x S, x T
The element chosen must be completely generic and could, if forced, be instantiated as any
element of the set S. Showing that a specic element of S belongs to T is inadequate.
Example 10 Consider the statement:
Integer multiples of are roots of f(x) = (x
2
1) sin x.
1. Explicitly identify two sets used in this statement.
2. Are the two sets equal?
3. Is the statement true?
Solution:
1. Let S be the set of all roots of f(x) = (x
2
1) sin x. (We could write S more
symbolically as S = x R [ f(x) = 0.) Let T be the set of integer multiples of .
(We could also write T more symbolically as T = n [ n Z).
2. To show that S = T we must show T S and S T. Since sin(n) = 0 for all
integers n, we know that f(n) = 0. Now, the dening property of S is that a real
number x belongs to S if f(x) = 0. Since f(n) = 0, n S. This is equivalent to: if
n T then n S, or equivalently, T S. Now consider x = 1. The value x = 1 is
a solution to (x
2
1) sin x = 0 and so belongs to S, but it is not an integer multiple
of , so it does not belong to T. That is, S , T and so the two sets are not equal.
3. The statement is true. The statement only claims that T S, not S = T.
Section 5.5 Practice 49
5.5 Practice
1. Consider the following proposition.
If A and B are sets, then [A B[ = [A[ +[B[ [A B[.
Complete the following table and verify that the proposition holds for each of the
following pairs of sets.
(a) A = n Z : n [ 30 and B = n Z : n [ 42
(b) A = x R [ sin x = 0, 2 x 2 and
B = x R [ cos x = 0, 2 x 2
Chapter 6
More on Sets
6.1 Objectives
The technique objectives are:
1. To gain more experience working with sets.
6.2 Showing Two Sets Are Equal
Lets take a look at two proofs of the same statement about sets. The rst uses a chain of
if and only if statements, the second uses mutual inclusion.
Proposition 1 Let A, B and C be arbitrary sets.
A (B C) = (A B) (A C)
Proof: This proof uses a chain of if and only if statements to show that both A (B C)
and (A B) (A C) have exactly the same elements. Let x A (B C). Then
x A (B C)
(x A) (x (B C)) denition of union
(x A) ((x B) (x C)) denition of intersection
((x A) (x B)) ((x A) (x C)) Distributive Law of logic
(x A B) (x A C) denition of union
x ((A B) (A C)) denition of intersection
Proof: This proof uses mutual inclusion. That is, we will show
1. A (B C) (A B) (A C)
50
Section 6.3 More Examples 51
2. A (B C) (A B) (A C)
Equivalently, we must show
1. If x A (B C), then x (A B) (A C).
2. If x (A B) (A C), then x A (B C).
Let x A(BC). By the denition of union, x A or x (BC). If x A, then by the
denition of union, x A B and x A C, that is x (A B) (A C). If x B C,
then by the denition of intersection, x B and x C. But then by the denition of union,
x A B and x A C. Hence, by the denition of intersection, x (A B) (A C).
In both cases, x (A B) (A C) as required.
Let x (A B) (A C). By the denition of intersection, x A B and x A C. If
x A, then by the denition of union, x A (B C). If x , A, then by the denition of
union and the fact that x A B, x B. Similarly, x C. But then, by the denition
of intersection, x B C. By the denition of union, x A (B C). In both cases,
x A (B C).
The rst of these two proofs also uses mutual inclusion. Do you see how?
REMARK
Which technique is better for proving the equality of two sets: a chain of if and only if
statements or mutual inclusion? Though some of the choice is personal style, the choice is
primarily determined by the reversibility of each step in the proof. A chain of if and only
if statements only works if each step in the chain is reversible. Thats pretty unusual. Most
of the time when you are proving two sets are equal, you will need to use mutual inclusion.
6.3 More Examples
1. (a) Give a specic example to show that the statement U (S T) = (U S) T
is false.
(b) Prove the following statement. Let S, T, U be sets. Then
U (S T) = (U S) (U T)
Solution:
(a) Let U = , S = 1 and T = 2. Then U (S T) = and (U S) T = 2.
In this case U (S T) ,= (U S) T
(b) Proof: To show U (S T) = (U S) (U T) we must show
i. U (S T) (U S) (U T), and
ii. U (S T) (U S) (U T).
This is equivalent to showing
52 Chapter 6 More on Sets
i. If x U (S T), then x (U S) (U T), and
ii. If x (U S) (U T), then x U (S T).
In the rst case, let x U (S T). By the denition of set intersection, x U
AND x S T. If x S, then x U S and so x (U S) (U T). If x T,
then x U T and so x (U S) (U T). In either case, x (U S) (U T)
as needed.
In the second case, let x (U S) (U T). By the denition of set union
x U S OR x U T. If x U S, then by the denition of set intersection
x U AND x S. But then x U and x S T so x U (S T). If
x U T, then by the denition of set intersection x U AND x T. So again,
x U and x S T so x U (S T). In either case, x x U (S T).
Part III
Proof Techniques
53
Chapter 7
Quantiers
7.1 Objectives
The technique objectives are:
1. Learn the basic structure of quantiers.
2. Learn how to use the Object, Construct and Select Methods.
7.2 Quantiers
Not all mathematical statements are obviously in the form If A, then B. You will en-
counter statements of the form there is, there are, there exists, it has or for all, for each, for
every, for any. The rst four are all examples of the existential quantier there is and
the nal four are all examples of the universal quantier for all. The word existence is
used to make it clear that we are looking for or looking at a particular mathematical object.
The word universal is used to make it clear that we are looking for or looking at a set of
objects all of which share some desired behaviour.
REMARK
All statements which use quantiers are similar to one of the following two statements,
though some elements of the sentence may be implicit or appear in a dierent order.
There exists an x in the set S such that P(x) is true.
For every x in the set S, P(x) is true.
where P(x) is an open sentence that uses the variable x.
Some mathematicians prefer a more symbolic approach. The symbol stands for the
English expression there exists. The symbol stands for the English expression for all.
Symbolically, the two quantied sentences above are written as:
x S, P(x)
x S, P(x)
54
Section 7.2 Quantiers 55
REMARK
All statements which use quantiers share a basic structure.
1. a quantier which will be either an existential or universal quantier,
2. a variable which can be any mathematical object,
3. a set which is the domain of the variable, often implicit, and
4. an open sentence which involves the variable,
It is crucial that you be able to identify the four parts in the structure of quantied state-
ments.
Here are some examples. Lets begin with something we have already seen.
Example 1
1. There exists an integer k so that n = km
Quantier:
Variable: k
Domain: Z
Open sentence: n = km
Our next example could come from any of several branches of mathematics.
2. There exists a real number x such that f(x) = 0.
Quantier:
Variable: x
Domain: R
Open sentence: f(x) = 0
This is a good point to illustrate the inuence of the domain. Suppose in this example
we are interested in the specic function f(x) = x
2
2. Then the statement
There exists a real number x such that x
2
2 = 0.
is true since we can nd an x,
2, so that x
2
2 = 0.
But if we change the domain to integers, the statement
There exists an integer x such that x
2
2 = 0.
is false because neither of the two real roots,
2 or
(c) = 0.
The conclusion of this implication uses an existential quantier. The hypothesis and
the conclusion are:
Hypothesis: f is continuous on [a, b] and dierentiable on (a, b) and f(a) = f(b).
Conclusion: There exists a real number c (a, b) such that f
(c) = 0.
For the conclusion, the parts of the quantied statement are given below.
Quantier:
Variable: c
Domain: (a, b) R
Open sentence: f
(c) = 0
It takes practice to become uent in reading and writing statements that use quantiers.
Section 7.3 The Object Method 57
7.3 The Object Method
REMARK
We use the Object Method when an existential quantier occurs in the hypothesis. Suppose
that we must prove A implies B and A uses an existential quantier. That is, A looks
like
There exists an x in the set S such that P(x) is true.
We proceed exactly as the English language interpretation would suggest - we assume that
the object x exists. We should:
1. Identify the four parts of the quantied statement.
2. Assume that a mathematical object x exists within the set S so that the statement
P(x) is true.
3. Make use of this information to generate another statement.
For example, lets look at the proof of the Transitivity of Divisibility again.
Proposition 1 (Transitivity of Divisibility (TD))
Let a, b and c be integers. If a [ b and b [ c, then a [ c.
Proof: Since a [ b, there exists an integer r so that ra = b. Since b [ c, there exists an
integer s so that sb = c. Substituting ra for b in the previous equation, we get (sr)a = c.
Since sr is an integer, a [ c.
You might ask Where is the existential quantier?. It isnt obvious yet. But recall the
denition of divisibility.
An integer m divides an integer n, and we write m [ n, if there exists an integer
k so that n = km.
The sentence there exists an integer k so that n = km uses the existential quantier. It
is very common in mathematics that sentences contain implicit quantiers and you should
be alert for them. Returning to divisibility, we have already identied the four parts of the
quantied sentence.
Quantier:
Variable: k
Domain: Z
Open sentence: n = km
58 Chapter 7 Quantiers
How would the Object Method work? Consider the statement a [ b. It uses an implicit
existential quantier. Since a [ b occurs in the hypothesis, we assume the existence of an
integer, say r, so that ra = b. And if you return to examine our proof of Transitivity of
Divisibility, this is precisely what appears in the rst sentence of the proof. Similarly, the
Object Method can be used with b [ c to assert that there exists an integer s so that sb = c.
Together, the rst two sentences of the proof allow us to derive the third sentence.
7.4 The Construct Method
REMARK
We use the Construct Method when an existential quantier occurs in the conclusion.
Suppose that we must prove A implies B and B uses an existential quantier. That is,
B looks like
There exists an x in the set S such that P(x) is true.
We proceed exactly as the English language interpretation would suggest - we show that
the object x exists, that x is in the set S, and that P(x) is true. We should:
1. Identify the four parts of the quantied statement.
2. Construct a mathematical object x.
3. Show that x S.
4. Show that P(x) is true.
For example, let us discover a proof of the following proposition.
Proposition 2 If n is of the form 4 + 1 for some positive integer , then 8 [ (n
2
1).
As usual, let us begin by explicitly identifying the hypothesis, the conclusion and the core
proof technique.
Hypothesis: n is of the form 4 + 1 for some integer .
Conclusion: 8 [ (n
2
1).
Core Proof Technique: Since the denition of divisibility contains an existential quan-
tier, and 8 [ (n
2
1) occurs in the conclusion, we will use the Construct Method.
What, precisely should we construct? Again, thinking of the denition of divisibility and
the requirement of the Construct Method, we should construct a k and then show that k is
an integer and that 8k = n
2
1. We can record this as a proof in progress.
Section 7.4 The Construct Method 59
Proof in Progress
1. Construct k. Following the plan, we must construct a mathematical object x.
2. Show that k is an integer. We must show that x S.
3. Show that 8k = n
2
1. We must show that the statement P(x) is true.
Where is this k going to come from? Lets start with the hypothesis, n is of the form 4 +1
for some integer . Substituting n = 4 + 1 into n
2
1 gives
n
2
1 = (4 + 1)
2
1 = 16
2
+ 8 + 1 1 = 16
2
+ 8 = 8(2
2
+)
Updating our proof in progress gives the following.
Proof in Progress
1. Let n = 4 + 1.
2. Substituting n = 4 + 1 into n
2
1 gives
n
2
1 = (4 + 1)
2
1 = 16
2
+ 8 + 1 1 = 16
2
+ 8 = 8(2
2
+)
3. Construct k.
4. Show that k is an integer.
5. Show that 8k = n
2
1.
It seems that a suitable choice for k would be 2
2
+. Since is an integer and the product
of integers is an integer and the sum of integers is an integer, k is an integer. It is also clear
from the equation above that 8k = n
2
1.
A proof might look like the following.
Proof: Substituting n = 4 + 1 into n
2
1 gives
n
2
1 = (4 + 1)
2
1 = 16
2
+ 8 + 1 1 = 16
2
+ 8 = 8(2
2
+)
Since 2
2
+ is an integer, 8 [ (n
2
1).
Note that the proof does not explicitly name the Construct Method.
Our next proposition may seem unusual because it does not have an explicit hypothesis.
Proposition 3 There is a real number [0, 2] such that sin = cos .
60 Chapter 7 Quantiers
Even before we see a proof we should be able to guess at the structure of the proof. As usual,
we begin with the hypothesis, conclusion, core proof technique and preliminary material.
Hypothesis: None.
Conclusion: There is a real number [0, 2] such that sin = cos .
Core Proof Technique: Since there is an existential quantier in the conclusion, we use
the Construct Method.
Preliminary Material: Elementary trigonometry
Since we are working with a quantier, lets be very clear about the four parts.
Quantier:
Variable:
Domain: [0, 2]
Open sentence: sin = cos
Following from the remarks at the beginning of this section, the proof will probably look
like
Proof in Progress
1. Consider = . . . ... This is the constructed object.
2. Since . . . [0, 2] This is where we show that the constructed object is in the domain.
3. Now we show that sin = cos This is where we show that the constructed object
satises the open sentence.
Here is a proof. Take a minute to read it and see how closely it matches the expected
structure. Also observe that no indication is given of how was constructed.
Proof: Consider =
4
. Clearly, [0, 2]. Since
sin = sin
4
=
1
2
and cos = cos
4
=
1
2
sin = cos as required.
Section 7.5 The Select Method 61
7.5 The Select Method
REMARK
We use the Select Method whenever a universal quantier occurs. Suppose a statement
looks like
For every x in the set S, P(x) is true.
Observe that this statement is equivalent to
If x is in the set S, then P(x) is true.
We proceed exactly as the English language interpretation would suggest - we show that
whenever an object x in the set S exists, P(x) is true. We should:
1. Identify the four parts of the quantied statement.
2. Select a representative mathematical object x S. This cannot be a specic object.
It has to be a placeholder so that our argument would work for any specic member
of S. Note that if the the set S is empty, we proceed no further. The statement is
vacuously true.
3. Show that P(x) is true.
For example, let us discover a proof of the following proposition.
Proposition 4 For every odd integer n, 4 [ (n
2
+ 4n + 3).
Lets begin by identifying the four parts of the quantied statement.
Quantier:
Variable: n
Domain: odd integers
Open sentence: 4 [ (n
2
+ 4n + 3)
Now we select a representative mathematical object from the set. Lets call the odd integer
that we selected n
0
. We could certainly call it n. I am using n
0
to emphasize that we have
selected a representative element. Now we must show that 4 [ (n
2
0
+4n
0
+3). This much is
already very representative of a typical proof using the Select Method.
Proof in Progress
1. Let n
0
be an odd integer. (Select a representative mathematical object x S.)
2. Show that 4 [ (n
2
0
+ 4n
0
+ 3). (Show that P(x) is true.)
62 Chapter 7 Quantiers
Since n
0
is odd, we can write it as n
0
= 2m + 1 for some integer m. Substituting into
n
2
0
+ 4n
0
+ 3 gives
n
2
0
+ 4n
0
+ 3 = 4m
2
+ 4m+ 1 + 8m+ 4 + 3 = 4m
2
+ 12m+ 8 = 4(m
2
+ 3m+ 2)
which implies 4 [ (n
2
0
+ 4n
0
+ 3).
A proof might look like the following.
Proof: Let n
0
be an odd integer. We can write n
0
as 2m+1 for some integer m. Substituting
n
0
= 2m+ 1 into n
2
0
+ 4n
0
+ 3 gives
n
2
0
+ 4n
0
+ 3 = 4m
2
+ 4m+ 1 + 8m+ 4 + 3 = 4m
2
+ 12m+ 8 = 4(m
2
+ 3m+ 2)
Since m
2
+ 3m+ 2 is an integer, 4 [ (n
2
0
+ 4n
0
+ 3).
The same proof would work if we converted the universal statement into an If ... then
form. The equivalent statement would be
Proposition 5 If n is an odd integer, then 4 [ (n
2
+ 4n + 3).
7.6 Sets and Quantiers
It is important to emphasize the connection between sets and quantiers. The basic struc-
tures of all quantied statements use sets.
There exists an x in the set S such that P(x) is true.
For every x in the set S, P(x) is true.
To correctly prove or use quantied statements, you must rst correctly identify the set
being used.
Also, quantiers frequently appear in the dening property of a set. For example, the set
of even integers
n Z : 2 [ n
uses an implicit existential quantier in the denition of divides.
To show that S T, we use the universally quantied statement
x S, x T
Sets and quantiers are very closely linked.
Section 7.7 A Non-Proof 63
7.7 A Non-Proof
Making mistakes is easy. Lets take a look at a proof which is not a proof. Lets nd out
why it fails.
Proposition 6 If r is a positive real number with r ,= 1, then there is an integer n such that 2
1
n
< r.
Proof: (For reference purposes, each sentence of the proof is written on a separate line.)
1. Let n be any integer with n >
1
log
2
(r)
.
2. It then follows that
1
n
< log
2
(r).
3. Hence 2
1
n
< 2
log
2
(r)
= r.
Analysis of Proof Lets begin by identifying the hypothesis and the conclusion. An in-
terpretation of sentences 1 through 3 will follow.
Hypothesis: r is a positive real number. r ,= 1.
Conclusion: There is an integer n such that 2
1
n
< r.
Sentence 1 Let n be any integer with n > 1/ log
2
(r).
Since an existential quantier occurs in the conclusion, the author uses the Construct
Method. The four parts of the quantier are:
Quantier:
Variable: n
Domain: Z
Open sentence: 2
1
n
< r
In the rst sentence of the proof, the author constructs an integer n. Later in the
proof, the author intends to show that n satises the open sentence of the quantier.
Since r is a real number (not equal to 1), 1/ log
2
(r) evaluates to a real number and
we can certainly nd an integer greater than any given real number.
Sentence 2 It then follows that
1
n
< log
2
(r).
Here the author takes the reciprocal of n > 1/ log
2
(r).
Sentence 3 Hence 2
1
n
< 2
log
2
(r)
= r.
Use the left and right sides of
1
n
< log
2
(r) as exponents of 2 and recall that the
function 2
x
always increases as x increases.
Even the analysis looks good. What went wrong? Lets look again at Sentence 2. Here we
used the statement
64 Chapter 7 Quantiers
Statement 7 If a, b R, neither equal to 0, and a < b, then 1/b < 1/a.
A proof seems pretty straightforward divide both sides of a < b by ab. Except that
the statement is false. Consider the case a = 2 and b = 4. 2 < 4 but
1
4
1
2
. Our
proposition really should be
Statement 8 If a, b R, and 0 < a < b, then 1/b < 1/a.
Now we can nd the problem in our proof. Choose r so that 0 < r < 1, say r = 1/2. That
will make log
2
(r) negative and hence 1/ log
2
(r) negative. Choose n = 1. Now Sentence 1 is
satised but Sentence 2 fails.
Can you think of any way to correct the proposition or the proof?
Chapter 8
Nested Quantiers
8.1 Objectives
The technique objectives are:
1. Recognize nested quantiers.
2. Learn how to parse nested quantiers.
3. Learn which techniques to apply to a sentence containing nested quantiers.
The content objectives are:
1. Dene function, domain and codomain.
2. Dene onto (or surjective).
3. Use nested quantiers to prove whether or not a function is onto.
4. Use nested quantiers to establish a limit.
8.2 Onto (Surjective) Functions
8.2.1 Denition of Function
One of the most fundamental notions of modern mathematics is that of a function.
Denition 8.2.1
Function, Domain,
Codomain, Value
Let S and T be two sets. A function f from S to T, denoted by f : S T, is a rule that
assigns to each element s S a unique element f(s) T. The set S is called the domain
of the function and the set T is called the codomain. The element f(s) is called the value
of the function f at s.
65
66 Chapter 8 Nested Quantiers
Denition 8.2.2
Image
The set of values of the function is called the image of f and is denoted by f(S). The set
f(S) is often a proper subset of the codomain, not the entire codomain.
f(S) = f(s) [ s S T
Some authors use range instead of image, but since other authors use range to mean
codomain, we will avoid the word range entirely.
Example 1 The familiar function sin x is often dened with domain R, codomain R and image [1, 1].
The oor function, denoted by x|, maps a real number x to the largest integer less than
or equal to x. For example,
1. 3.14| = 3.
2. 3.99| = 3.
3. 3.14| = 4. Since the oor of x is the largest integer less than or equal to x, 3
cannot be the oor of 3.14 since 3 > 3.14.
The oor function has domain R, codomain Z and image Z.
8.2.2 Denition of Onto (Surjective)
Denition 8.2.3
Onto, Surjective
Let S and T be two sets. A function f : S T is onto (or surjective) if and only if for
every y T there exists an x S so that f(x) = y.
More prosaically, every element of T is a value of some element of S.
In Calculus, S and T are often equal to R or are subsets of R.
Though you may not fully understand the denition, the important observation for us is that
the denition contains two quantiers. Lets carefully parse the denition beginning with
the universal quantier For every. Recall that we must identify the quantier, variable,
domain and open sentence.
Quantier:
Variable: y
Domain: T
Open sentence: there exists an x S so that f(x) = y
The open sentence itself contains a quantier! So we can again identify the four parts of
this quantier.
Quantier:
Variable: x
Domain: S
Open sentence: f(x) = y
Section 8.2 Onto (Surjective) Functions 67
REMARK
Because the existential quantier is nested within the universal quantier, this denition
is an example of nested quantiers. There are really two basic principles for working
with nested quantiers.
1. Process quantiers from left to right. (This captures the nested structure.)
2. Use Object, Construct and Select methods as you proceed from left to right.
Moving from left to right is important. The order of quantiers matters.
For example, consider the following statement about the integers.
x y, y > x
Translated into prose, this statement can be read as Given any integer x, there exists a
larger integer y. This is a true statement. Now lets make a small modication. We will
just change the order of the quantiers. Our new statement is
y x, y > x
A translation for this statement would be There exists an integer y which is larger than
all integers. A very dierent, and false, statement.
Lets return to the denition of onto. We should be able to determine the structure of any
proof that a function is onto. Lets keep the denition in mind.
Let S and T be two sets. A function f : S T is onto (or surjective) if and
only if for every y T there exists an x S so that f(x) = y.
The order of quantiers is
For all there exists
so we would expect the proof to be structured
Select Method Construct Method
A proof in progress that captures the structure of an onto proof is given below.
68 Chapter 8 Nested Quantiers
Proof in Progress
1. Let y T. This comes from the Select Method.
2. Consider the object x. This comes from the Construct Method.
3. First, we show that x S. We show that the constructed object is within the domain.
4. Now we show that f(x) = y. We show that the open sentence is satised.
8.2.3 Reading
Lets work through an example. Notice how closely the proof follows our proof in progress.
Proposition 1 Let m ,= 0 and b be xed real numbers. The function f : R R dened by f(x) = mx +b
is onto.
Proof: (For reference, each sentence of the proof is written on a separate line.)
1. Let y R.
2. Consider x = (y b)/m.
3. Since y R, x R.
4. But then f(x) = f((y b)/m) = m((y b)/m) +b = y as needed.
Lets perform an analysis of this proof.
Analysis of Proof The denition of onto uses a nested quantier.
Hypothesis: m ,= 0 and b are xed real numbers. f(x) = mx +b.
Conclusion: f(x) is onto.
Core Proof Technique: Nested quantiers.
Preliminary Material: Let us remind ourselves of the denition of the dening
property of onto as it applies in this situation.
For every y R there exists x R so that f(x) = y.
Sentence 1 Let y R.
The rst quantier in the denition of onto is a universal quantier so the author uses
the Select Method. That is, the author chooses an element (y) in the domain (R).
The author must now show that the open sentence is satised (there exists an x R
so that f(x) = y).
Section 8.2 Onto (Surjective) Functions 69
Sentence 2 Consider x = (y b)/m.
The second quantier in the denition is a nested existential quantier so the author
uses the Construct Method. The constructed object in this example is not surprising
we can simply solve for x in y = mx + b. In general, though, it can be dicult to
construct a suitable object. Note also that the choice of x depends on y so it is not
surprising that x is a function of y.
Sentence 3 Since y R, x R.
Because this step is usually straightforward, it is often omitted. It is included here to
emphasize that the constructed object lies in the appropriate domain.
Sentence 4 But then f(x) = f((y b)/m) = m((y b)/m) +b = y as needed.
Here the author conrms that the open sentence is satised.
8.2.4 Discovering
Having read a proof, lets discover one.
Proposition 2 The function f : [1, 2] [4, 7] dened by f(x) = x
2
+ 3 is onto.
We can begin with the basic proof structure that we discussed earlier.
Proof in Progress
1. Let y [4, 7].
2. Consider x = . . .. We must construct x.
3. Show that x [1, 2]. To be completed.
4. Now we show that f(x) = y. To be completed.
What is our candidate value for x? Since x must satisfy
y = x
2
+ 3
we can solve for x to get
x =
_
y 3
Since we want x [1, 2], we will choose the positive square root. Lets update the proof in
progress.
Proof in Progress
1. Let y [4, 7].
2. Consider x =
y 3.
3. Show that x [1, 2]. To be completed.
4. Now we show that f(x) = y. To be completed.
70 Chapter 8 Nested Quantiers
It is not immediately obvious that x [1, 2]. Some arithmetic manipulation with inequalities
helps us here. Since y [4, 7], we know that
4 y 7
Subtracting three gives
1 y 3 4
Now taking the positive square root gives
1
_
y 3 2
and since x =
y 3 we have
1 x 2
which is exactly what we need. We can update our proof in progress.
Proof in Progress
1. Let y [4, 7].
2. Consider x =
y 3.
3. Now
4 y 7 1 y 3 4 1
_
y 3 2 1 x 2
4. Now we show that f(x) = y. To be completed.
Substitution will give us the last step. Here is a complete proof. Note that techniques are
not named and the steps in the arithmetic are not explicitly justied. These are left to the
reader.
Proof: Let y [4, 7]. Consider x =
y 3. Now
4 y 7 1 y 3 4 1
_
y 3 2 1 x 2
Since
f(x) = x
2
+ 3 = (
_
y 3)
2
+ 3 = y
f is onto.
The choice of the domain and codomain for the function is important. Consider the state-
ment
Statement 3 The function f : R R dened by f(x) = x
2
+ 3 is onto.
This is very similar to the proposition we just proved, and you might think that the same
proof would work. But it doesnt. Consider the choice y = 0 R. What value of x maps to
0? Since f(x) = x
2
+ 3 3 for all real numbers x, there is no choice of x so that f(x) = 0,
and Statement 3 is false.
Section 8.2 Onto (Surjective) Functions 71
8.2.5 A Dicult Proof
Mathematics makes great use of the composition of functions. The next proposition, whose
proof may be intimidating the rst time you see it, states that the composition of onto
functions is also onto.
Proposition 4 Let f : T U and g : S T be onto functions. Then f g is an onto function.
Analysis of Proof The denition of onto uses nested quantiers.
Hypothesis: f : T U and g : S T are both onto functions.
Conclusion: f g is onto.
Core Proof Technique: Nested quantiers.
Preliminary Material: Let us recast the denition of onto for f g. To do this we
need to be aware of the fact that f : T U and g : S T and f g : S U.
So the statement we need to prove is:
For every y U there exists x S so that f(g(x)) = y.
There are three instances of onto in the proposition. Two occur in the hypothesis and are
associated with the functions f and g. The third occurs in the conclusion and is associated
with the function f g. That is the one that interests us right now. The denition of onto
begins with a universal qualier. So we will use the Select Method applied to f g. Using
our proof template we have the following.
Proof in Progress
1. Let y U.
2. Consider the object x. We must construct the object x.
3. First, we show that x S. To be completed.
4. Now we show that f(g(x)) = y. To be completed.
Constructing x seems dicult. We do not know what the sets S, T and U are and we have
no idea what the functions f and g look like. But we have not made use of our hypotheses
at all so lets see if they can give us any ideas.
Since f : T U is onto, we know that for any u U, there exists a t T so that f(t) = u.
Since g : S T is onto, we know that for any t T, there exists an s S so that g(s) = t.
How does y t in? Observe that y U. But f : T U and is onto, so there exists a
t
T so that f(t
) = y. Since t
S so that
g(s
) = t
.
But what have we constructed? If we let x = s
T so that f(t
) = y.
3. Since t
S so that g(s
) = t
.
4. Hence, there exists s
S so that f(g(s
)) = f(t
) = y.
5. Hence, there exists x S so that f(g(x)) = y.
Notice that our last two lines are essentially duplicates. When doing rough work, this
is common. However, when writing up a proof, such duplications should be removed,
consistent notation should be enforced and omitted steps should be included. In this case,
the proof is almost done for us.
Proof: Let y in U. Since f : T U is onto, there exists a t
T so that f(t
) = y. Since
t
S so that g(s
) = t
S so that f(g(s
)) = f(t
) = y.
8.3 Limits
8.3.1 Denition
Almost everyone who takes a calculus course encounters the notion of a limit. When we
write
lim
xa
f(x) = L
we informally mean that we can make the values of f(x) arbitrarily close to L by taking
x suciently close to, but not equal to a. But formally we need to be more explicit about
what arbitrarily and suciently mean. That leads to the infamous denition of
a limit.
Denition 8.3.1
Limit
The limit of f(x), as x approaches a, equals L means that for every real number > 0
there exists a real number > 0 such that
0 < [x a[ < [f(x) L[ <
Lets carefully parse the denition beginning with the universal quantier For every.
Quantier:
Variable:
Domain: real numbers > 0
Open sentence: there exists a real number > 0 such that
0 < [x a[ < [f(x) L[ <
The open sentence itself contains a quantier, so we must again identify the four parts of
the quantier.
Section 8.3 Limits 73
Quantier:
Variable:
Domain: real numbers > 0
Open sentence: 0 < [x a[ < [f(x) L[ <
It is vitally important to observe that the open sentence is an implication. Because the
existential quantier is nested within the universal quantier, this denition is another
example of nested quantiers.
We should take a minute here to think about x. The denition of limit began with the
expression The limit of f(x), as x approaches a so x is a real number. The implication
in the denition could be more explicitly phrased as
If x R and 0 < [x a[ < , then [f(x) L[ <
Keeping in mind our earlier remarks about implications with variables in the hypothesis
being equivalent to quantiers, we could replace the implication by the quantied statement
x x R : 0 < [x a[ < , [f(x) L[ <
which would be a third level of nesting! Well stay with the implication form because its
simpler.
8.3.2 Reading A Limit Proof
Before we begin our example, we should be able to determine the structure of any limit
proof. The order of quantiers is
For all there exists
so we would expect the proof to be structured
Select Method Construct Method
The choice of will depend on the choice of and so will be a function of . The Construct
Method identies a mathematical object, shows that the object is within the appropriate
domain, and that the object satises the corresponding open sentence. The open sentence in
this case is an implication with hypothesis 0 < [xa[ < () and conclusion [f(x) L[ < .
We assume that the hypothesis is true and show that the conclusion is true. So a limit
proof will look like the following.
Proof in Progress
1. Let > 0 be a real number. This comes from the Select Method.
2. Consider the real number () = . . .. This comes from the Construct Method. Most
texts will use simply . Here we use () to emphasize that is a function of .
3. First, we show that () > 0. This shows is within the domain.
4. Now let 0 < [xa[ < (). This is the hypothesis of the open sentence in the denition
of limit.
5. We show that [f(x) L[ < . This is the conclusion of the open sentence.
The diculty lies in nding a suitable choice of (). Lets analyze a proof where someone
else has made the choice of () for us.
74 Chapter 8 Nested Quantiers
Proposition 5 Let m ,= 0 be a real number.
lim
xa
mx +b = ma +b
Proof: (For reference purposes, each sentence of the proof is written on a separate line.)
1. Let > 0 be a real number.
2. Consider the real number () =
[m[
.
3. Since > 0 and [m[ > 0, () =
[m[
> 0.
4. Now
0 < [x a[ < () 0 < [x a[ <
[m[
[m[[x a[ <
[m(x a)[ <
[m(x a) + (b b)[ <
[(mx +b) (ma +b)[ <
[f(x) L[ <
as required.
Analysis of Proof As usual, we begin with the hypothesis and the conclusion.
Hypothesis: m ,= 0 is a real number.
Conclusion: lim
xa
mx +b = ma +b.
Core Proof Technique: Nested quantiers.
Preliminary Material: Denition of a limit. Notice how closely this proof follows
the proof in progress.
Sentence 1 Let > 0 be a real number.
The denition of limit begins with a universal quantier so the rst proof technique
is the Select Method, just as in the proof in progress.
Sentence 2 Consider the real number () =
[m[
.
The next quantier is an existential quantier in the conclusion and so we use the
Construct Method. This again follows the pattern of the proof structure. The con-
structed object is the real number () =
[m[
. The author gives no indication why
that particular value was chosen or how it was derived.
Section 8.3 Limits 75
Sentence 3 Since > 0 and [m[ > 0, () =
[m[
> 0.
After an object is constructed, the Construct Method requires that the object be in
the domain and that it satisfy the open sentence. Sentence 3 of the proof shows that
is in the domain, the set of real numbers greater than zero.
Sentence 4 Now . . .
Sentence 4 demonstrates that satises the open sentence. The hypothesis of the
open sentence is 0 < [x a[ < () and the conclusion is [f(x) L[ < . The chain
of reasoning begins with the hypothesis, and after arithmetic manipulation, arrives at
the conclusion.
Exercise 1 Justify each line of arithmetic in Sentence 4.
8.3.3 Discovering a Limit Proof
We will prove
Proposition 6 If f(x) = x
2
, then
lim
x0
f(x) = 0
We begin by explicitly identifying our hypothesis and conclusion.
Hypothesis: f(x) = x
2
Conclusion: lim
x0
f(x) = 0
This is a standard limit proof so we use our proof in progress to provide a structure.
Proof in Progress
1. Let > 0 be a real number.
2. Consider the real number () = . . ..
3. First, we show that () > 0.
4. Now let 0 < [x[ < (). (This is just 0 < [x a[ < () with a = 0.)
5. We show that [x
2
[ < . (This is just [f(x) L[ < with f(x) = x
2
and L = 0.)
The problem is: How do we construct a suitable ? Because is not numerically specied,
our construction for will be a function of . Now is the time to go to scrap paper. Since
we need
[x
2
[ <
we begin there and work backwards to get to 0 < [x[ < (). Since [x
2
[ = x
2
, we have
x
2
<
76 Chapter 8 Nested Quantiers
Take the positive square root of both sides to get
x <
> 0. Now
0 < [x[ <
0 < [x[
2
< [x[
2
< [x
2
[ <
as needed.
This proof was relatively easy, in part because a was 0. Lets consider a slightly more
complicated setting.
Proposition 7 If f(x) = x
2
, then
lim
x3
f(x) = 9
Our standard limit proof will look like the following.
Proof in Progress
1. Let > 0 be a real number.
2. Consider the real number () = . . ..
3. First, we show that () > 0.
4. Now let 0 < [x 3[ < (). (This is just 0 < [x a[ < () with a = 3.)
5. We show that [x
2
9[ < . (This is just [f(x) L[ < with f(x) = x
2
and L = 9.)
Section 8.3 Limits 77
Lets try what we did before and see how far we get. Since we need
[x
2
9[ <
we begin there and work backwards to get to 0 < [x 3[ < (). In the previous case, we
took the square root, but the square root of [x
2
9[ will be hard to work with. Lets try
another way.
[x
2
9[ < [(x 3)(x + 3)[ < (factor)
[x 3[[x + 3[ < ([ab[ = [a[[b[)
We have the [x 3[ we need. What do we do with the [x + 3[? We could divide by the
[x + 3[ to get
[x 3[ <
[x + 3[
and let () =
[x + 3[
. But is a function of , not and x. Somehow we need to make a
choice of that does not involve x. Lets be a little more careful about the range of values
x can take.
The notion of limit applies only when x is close to a, say [x a[ < 1. In our particular case
this means [x 3[ < 1. This implies
[x 3[ < 1 1 < x 3 < 1 5 < x + 3 < 7
Lets look again at
[x 3[[x + 3[ <
We know that x+3 < 7 so [x3[[x+3[ < 7[x3[. If we were to choose so that x3 <
7
then
[x 3[[x + 3[ <
7
7 =
which is exactly what we need.
But now we have two restrictions, [x 3[ < 1 and [x 3[ <
7
so it makes sense to choose
the smallest of the two as our .
() = min
_
1,
7
_
This complicates our proof somewhat because we have two cases to check in the fth step
of the proof. Here is a complete proof.
Proof: Let > 0 be a real number. Consider the real number () = min
_
1,
7
_
. Since
> 0, () > 0. Observe that
[x 3[ < 1 1 < x 3 < 1 5 < x + 3 < 7
Suppose () = 1. Then
0 < [x a[ < () [x 3[ < 1 (hypothesis in denition of limit)
[x 3[[x + 3[ < [x + 3[ (multiply by [x + 3[)
[(x 3)(x + 3)[ < [x + 3[ ([a[[b[ = [ab[)
[x
2
9[ < 7 (x + 3 < 7 from observation above)
[x
2
9[ < (1
7
7 )
78 Chapter 8 Nested Quantiers
as needed.
Now suppose that () =
7
then
0 < [x a[ < () [x 3[ <
7
(hypothesis in denition of limit)
[x 3[[x + 3[ <
7
[x + 3[ (multiply by [x + 3[)
[(x 3)(x + 3)[ <
7
7 (x + 3 < 7 from observation above)
[x
2
9[ <
as needed.
8.3.4 A Harder Proof
We will prove
Proposition 8 If f(x) = e
1/x
2
, then
lim
x0
f(x) = 0.
You might object that the function is not even dened at 0, which is true. But the denition
of lim
xa
f(x) does not require f to be dened at a. As usual, we begin by explicitly
identifying our hypothesis and conclusion.
Hypothesis: f(x) = e
1/x
2
Conclusion: lim
x0
f(x) = 0
This is a standard limit proof so we use our existing structure.
Proof in Progress
1. Let > 0 be a real number.
2. Consider the real number ().
3. First, we show that () > 0.
4. Now let 0 < [x[ < (). (This is just 0 < [x a[ < () with a = 0.)
5. We show that [e
1/x
2
[ < . (This is just [f(x)L[ < with f(x) = e
1/x
2
and L = 0.)
The problem is: How do we construct a suitable ? Because is not numerically specied,
our construction for will be a function of . Now is the time to go to scrap paper. Since
we need
[e
1/x
2
[ <
we begin there and work backwards to get to 0 < [x[ < (). e
1/x
2
> 0 for all x so we do
not need the absolute value signs.
1
e
1/x
2
<
Section 8.4 Summary 79
Now divide by (we are using the hypothesis that ,= 0) and multiply by e
1/x
2
(we are
using the fact that e
1/x
2
> 0) to get the following.
1
< e
1/x
2
Taking the natural log gives
ln
_
1
_
<
1
x
2
This is hopeful. We can invert the fractions to get
x
2
<
1
ln(1/)
and since x
2
> 0 we now have
0 < x
2
<
1
ln(1/)
Taking square roots gives
0 < [x[ <
1
ln(1/)
And this is precisely the form we want. Our constructed delta is
=
1
ln(1/)
This looks great. Unfortunately, we have made a dangerous assumption, that is ln(1/) > 0.
This is only true when < 1. However, it is mathematical practice to consider as small,
much smaller than one. We will adopt standard practice and ignore the case 1 though
details could be given for it as well.
We have already worked out the math so now we are in a position to write out the proof.
Take a minute to read the proof.
Proof: Let > 0. Since is small, we assume < 1. Consider =
_
1
ln(1/)
. Since < 1,
1/ > 1 which implies ln(1/) > 0 and so > 0. Now
0 < [x[ <
1
ln(1/)
0 < x
2
<
1
ln(1/)
ln
_
1
_
<
1
x
2
1
< e
1/x
2
[e
1/x
2
[ <
as required.
8.4 Summary
To prove a statement containing nested quantiers, follow these steps.
1. For each quantier encountered from left to right, identify the quantier, variable,
domain and open sentence.
2. Apply the appropriate Construct or Select Methods based on the order of the quan-
tiers as they appear from left to right.
Chapter 9
Practice, Practice, Practice:
Quantiers and Sets
9.1 Objectives
This class provides an opportunity to practice working with quantiers and sets.
9.2 Worked Examples
Example 1 For each of the following denitions, identify each quantier, its parts and the proof tech-
niques that you would use to prove that a specic object satises the denition.
1. Saying that the function f of one real variable is bounded above means that there
is a real number y such that for every real number x, f(x) y.
Solution: We begin with the rst quantier
Quantier:
Variable: y
Domain: R
Open sentence: for every real number x, f(x) y
which contains a nested quantier
Quantier:
Variable: x
Domain: R
Open sentence: f(x) y
A proof should use the Construct Method (for y) followed by
the Select Method (with x).
80
Section 9.2 Worked Examples 81
2. Saying that the function f of one real variable is continuous at the point x means
that for every real number > 0 there is a real number > 0 such that, for all real
numbers y with [x y[ < , [f(x) f(y)[ < .
Solution: There are three quantiers in this denition. The rst is
Quantier:
Variable:
Domain: R [ > 0
Open sentence: there is a real number > 0 such that,
for all real numbers y with [x y[ < , [f(x) f(y)[ <
which contains a nested quantier
Quantier:
Variable:
Domain: R [ > 0
Open sentence: for all real numbers y with [x y[ < , [f(x) f(y)[ <
which, in turn, contains the nested quantier
Quantier:
Variable: y
Domain: y R : [x y[ <
Open sentence: [f(x) f(y)[ <
A proof should use the Select Method (with ), followed by the Construct Method
(for ) followed by the Select Method (for y).
Example 2 For each of the following statements, identify each quantier (including implicit quantiers),
its parts and your approach to a proof of the statement.
1. There exists an x [0, 2] so that, for all a R, a sin x = 0
Solution: This statement uses nested quantiers. The rst quantier is an existential
quantier
Quantier:
Variable: x
Domain: [0, 2] R
Open sentence: for all a R, a sin x = 0
and the second quantier is a universal quantier.
Quantier:
Variable: a
Domain: R
Open sentence: a sin x = 0
Corresponding to the existential quantier and the nested universal quantier, we
could use the Construct Method followed by the Select Method. The proof might
begin Consider x = . . . Let a R. We will show that x [0, 2] and that a sin x = 0
82 Chapter 9 Practice, Practice, Practice: Quantiers and Sets
2. For every integer a, 2 [ a(a + 1).
Solution: There are two quantiers in this statement, one explicit (for every integer
a) and one implicit (divides).
The parts of the explicit quantier are:
Quantier:
Variable: a
Domain: Z
Open sentence: 2 [ a(a + 1)
The parts of the implicit quantier are:
Quantier:
Variable: k
Domain: Z
Open sentence: 2k = a(a + 1)
Corresponding to the universal quantier and the implicitly nested existential quan-
tier, we could use the Select Method followed by the Construct Method. The proof
might begin Let a Z. We nd an integer k so that 2k = a(a + 1).
3. If n is an integer, then 8 [ (5
2n
+ 7).
Solution: There is an implicit quantier (divides) in the conclusion, so we would use
the Construct Method. The parts of the quantier are:
Quantier:
Variable: k
Domain: Z
Open sentence: 8k = 5
2n
+ 7
The proof could begin Let n Z. We nd an integer k so that 8k = 5
2n
+ 7.
Note that the statement could be rephrased as For all integers n, 8 [ (5
2n
+ 7)
which we could also treat as nested quantiers.
Example 3 A sequence is a set of numbers written in a denite order.
x
1
, x
2
, x
3
, . . . , x
n
, . . .
Alternative notation is x
i
or x
i
n=1
.
A sequence x
i
converges to L if, for every > 0 there is a corresponding integer N so
that n > N implies [x
n
L[ < .
Consider the sequence x
i
dened by x
i
=
1
i
.
1. What are the rst ve terms in the sequence?
Solution:
1,
1
2
,
1
3
,
1
4
,
1
5
Section 9.2 Worked Examples 83
2. Prove that the sequence converges to 0.
Solution: Using the structure of the nested quantiers in the denition of converges,
the proof will look like
Proof in Progress
(a) Let > 0. Use the Select Method corresponding to the universal quantier.
(b) Consider N = . . .. Use the Construct Method corresponding to the existential
quantier.
(c) Since . . . , N Z. The Construct Method requires that we show that the con-
structed object is in the required domain.
(d) Let n > N. The open sentence of the existential quantier contains the implica-
tion If n > N, then [x
n
L[ < . This sentence corresponds to the hypothesis
of this implication. The remainder of the proof demonstrates the conclusion.
(e) Hence, [x
n
L[ < . To be completed.
Since x
n
=
1
n
and L is zero, [x
n
L[ < becomes
1
n
< which implies
1
< n. For
our N we can choose any integer which is greater than
1
. Since N >
1
,
>
1
N
. Now let n > N. Then
[x
n
L[ =
1
n
0
=
1
n
<
1
N
<
as required.
Chapter 10
Simple Induction
10.1 Objectives
The technique objectives are:
1. Learn how to use sum and product notation, and recognize recurrence relations.
2. Learn how to use Simple Induction.
10.2 Notation
A number of examples we will discuss use sum, product and recursive notation that you
may not be familiar with.
10.2.1 Summation Notation
The sum of the rst ten perfect squares could be written as
1
2
+ 2
2
+ 3
2
+ + 10
2
In mathematics, a more compact and more helpful notation is used.
10
i=1
i
2
Denition 10.2.1
Summation
Notation
The notation
n
i=m
x
i
is called summation notation and it represents the sum
x
m
+x
m+1
+x
m+2
+ +x
n
The summation symbol,
, is the upper case Greek letter sigma. The letter i is the index
of summation; the letter m is the lower bound of summation, and the letter n is the
upper bound of summation. The expression i = m under the summation symbol means
that the index i begins with an initial value of m and increments by 1 and stops when i = n.
The index of summation is a dummy variable and any letter could be used in its place.
84
Section 10.2 Notation 85
Example 1
7
i=3
i
2
= 3
2
+ 4
2
+ 5
2
+ 6
2
+ 7
2
3
k=0
sin(k) = sin(0) + sin() + sin(2) + sin(3)
n
i=1
1
i
2
= 1 +
1
4
+
1
9
+ +
1
n
2
This notation is often generalized to an arbitrary logical condition, and the sum runs over
all values satisfying the condition.
Example 2 For example, the expression
xS
f(x)
is the sum of f(x) over all elements x in the set S. The expression
d|n,d>0
d
is the sum of all positive divisors of n.
There are a number of rules that help us manipulate sums.
Proposition 1 (Properties of Summation)
1. Multiplying by a constant
n
i=m
cx
i
= c
n
i=m
x
i
where c is a constant
2. Adding two sums
n
i=m
x
i
+
n
i=m
y
i
=
n
i=m
(x
i
+y
i
)
3. Subtracting two sums
n
i=m
x
i
n
i=m
y
i
=
n
i=m
(x
i
y
i
)
4. Changing the bounds of the index of summation
n
i=m
x
i
=
n+k
i=m+k
x
ik
The rst three properties require indices with the same upper and lower bounds. The last
property allows us to change the bounds of the index of summation, which is often useful
when combining summation expressions.
86 Chapter 10 Simple Induction
10.2.2 Product Notation
Just as summation notation using
i=m
x
i
is called product notation and it represents the product
x
m
x
m+1
x
m+2
x
n
The product symbol,
, is the upper case Greek letter pi. The index i and the upper and
lower bounds m and n behave just as they do for sums.
Example 3
n
i=2
_
1
1
i
2
_
=
_
1
1
4
__
1
1
9
__
1
1
16
_
_
1
1
n
2
_
10.2.3 Recurrence Relations
You are accustomed to seeing mathematical expressions in one of two ways: iterative and
closed form. For example, the sum of the rst n integers can be expressed iteratively as
1 + 2 + 3 + +n
or in closed form as
n(n + 1)
2
There is a third way.
Denition 10.2.3
Recurrence Relation
A recurrence relation is an equation that denes a sequence of numbers and which is
generated by one or more initial terms, and expressions involving prior terms.
You are probably familiar with the Fibonacci sequence which is a recurrence relation.
Example 4 (Fibonacci Sequence)
The initial two terms are dened as f
1
= 1 and f
2
= 1. All subsequent terms are dened by
the recurrence relation f
n
= f
n1
+ f
n2
. The rst eight terms of the Fibonacci sequence
are 1, 1, 2, 3, 5, 8, 13, 21.
Section 10.4 Introduction to Induction 87
Example 5 (Sum of First n Integers)
We can dene the sum of the rst n terms recursively as
f(1) = 1 and
f(n) = f(n 1) +n for n > 1
10.3 Introduction to Induction
Induction is a common and powerful technique and should be a consideration whenever you
encounter a statement of the form
For every integer n 1, P(n) is true.
where P(n) is a statement that depends on n.
Here are two examples of propositions in this form.
Proposition 2 For every integer n 1
n
i=1
i
2
=
n(n + 1)(2n + 1)
6
.
Often the clause For every integer n 1 is implied and does not actually appear in the
proposition, as in the following version of the same theorem.
Proposition 3 The sum of the rst n perfect squares is
n(n + 1)(2n + 1)
6
.
The second example uses sets, not equations.
Proposition 4 Every set of size n has exactly 2
n
subsets.
10.4 Principle of Mathematical Induction
Denition 10.4.1
Axiom
An axiom of a mathematical system is a statement that is assumed to be true. No proof
is given. From axioms we derive propositions and theorems.
Sometimes axioms are described as self-evident, though many are not. Axioms are dening
properties of mathematical systems. The Principle of Mathematical Induction is one such
axiom.
88 Chapter 10 Simple Induction
Axiom 1 Principle of Mathematical Induction (POMI)
Let P(n) be a statement that depends on n N.
If
1. P(1) is true, and
2. P(k) is true implies P(k + 1) is true for all k N
then P(n) is true for all n N.
We use the Principle of Mathematical Induction to prove statements of the form
For every integer n 1, P(n) is true.
The structure of a proof by induction models the Principle of Mathematical Induction. The
three parts of the structure are as follows.
Base Case Verify that P(1) is true. This is usually easy. You will often see the statement
It is easy to see that the statement is true for n = 1. It is best to write this step
out completely.
Inductive Hypothesis Assume that P(k) is true for some integer k 1. It is best to
write out the statement P(k).
Inductive Conclusion Using the assumption that P(k) is true, show that P(k + 1) is
true. Again, it is best to write out the statement P(k + 1) before trying to prove it.
10.4.1 Why Does Induction Work?
The basic idea is simple. We show that P(1) is true. We then use P(1) to show that P(2)
is true. And then we use P(2) to show that P(3) is true and continue indenitely. That is
P(1) P(2) P(3) . . . P(k) P(k + 1) . . .
10.4.2 Two Examples of Simple Induction
Our rst example is very typical and uses an equation containing the integer n.
Proposition 5 For every integer n N,
n
i=1
i
2
=
n(n + 1)(2n + 1)
6
.
Proof: We begin by formally writing out our inductive statement
P(n) :
n
i=1
i
2
=
n(n + 1)(2n + 1)
6
.
Section 10.4 Principle of Mathematical Induction 89
Base Case We verify that P(1) is true where P(1) is the statement
P(1) :
1
i=1
i
2
=
1(1 + 1)(2 1 + 1)
6
.
As in most base cases involving equations, we can evaluate the expressions on the
left hand side and right hand side of the equals sign. The left hand side expression
evaluates to
1
i=1
i
2
= 1
2
= 1
and the right hand side expression evaluates to
1(1 + 1)(2 1 + 1)
6
= 1.
Since both sides equal each other, P(1) is true.
Inductive Hypothesis We assume that the statement P(k) is true for some integer k 1.
P(k) :
k
i=1
i
2
=
k(k + 1)(2k + 1)
6
.
Inductive Conclusion Now we show that the statement P(k + 1) is true.
P(k + 1) :
k+1
i=1
i
2
=
(k + 1)((k + 1) + 1)(2(k + 1) + 1)
6
.
This is the dicult part. When working with equations, you can often start with the
more complicated expression and decompose it into an instance of P(k) with some
leftovers. Thats what we will do here.
k+1
i=1
i
2
=
_
k
i=1
i
2
_
+
_
(k + 1)
2
_
(partition into P(k) and other)
=
_
k(k + 1)(2k + 1)
6
_
+
_
(k + 1)
2
_
(use the inductive hypothesis)
=
k(k + 1)(2k + 1) + 6(k + 1)
2
6
(algebraic manipulation)
=
(k + 1)
_
2k
2
+ 7k + 6
_
6
(factor out k + 1, expand the rest)
=
(k + 1)(k + 2)(2k + 3)
6
(factor)
=
(k + 1)((k + 1) + 1)(2(k + 1) + 1)
6
The result is true for n = k+1, and so holds for all n by the Principle of Mathematical
Induction.
Our next example does not have any equations.
90 Chapter 10 Simple Induction
Proposition 6 Let S
n
= 1, 2, 3, . . . , n. Then S
n
has 2
n
subsets.
Lets be very clear about what our statement P(n) is.
P(n): S
n
has 2
n
subsets.
Now we can begin the proof.
Proof: Base Case We verify that P(1) is true where P(1) is the statement
P(1): S
1
has 2 subsets.
We can enumerate all of the sets of S
1
easily. They are and 1, exactly two as
required.
Inductive Hypothesis We assume that the statement P(k) is true for some integer k 1.
P(k): S
k
has 2
k
subsets.
Inductive Conclusion Now show that the statement P(k + 1) is true.
P(k + 1): S
k+1
has 2
k+1
subsets.
The subsets of S
k+1
can be partitioned into two sets. The set A in which no subset
contains the element k+1, and the complement of A, A, in which every subset contains
the element k+1. Now A is just the subsets of S
k
and so, by the inductive hypothesis,
has 2
k
subsets of S
k
. A is composed of the subsets of S
k
to which the element k + 1
is added. So, again by our inductive hypothesis, there are 2
k
subsets of A. Since
A and A are disjoint and together contain all of the subsets of S
k+1
, there must be
2
k
+ 2
k
= 2
k+1
subsets of S
k+1
.
The result is true for n = k+1, and so holds for all n by the Principle of Mathematical
Induction.
10.4.3 A Dierent Starting Point
Some true statements cannot start with for all integers n, n 1. For example, 2
n
> n
2
is false for n = 2, 3, and 4 but true for n 5. But the basic idea holds. If we can show
that a statement is true for some base case n = b, and then show that
P(b) P(b + 1) P(b + 2) . . . P(k) P(k + 1) . . .
this is also induction. Perhaps this is not surprising because we can always recast a state-
ment For every integer n b, P(n) as an equivalent statement For every integer m 1,
P(m). For example,
For every integer n 5, 2
n
> n
2
.
is equivalent to
Section 10.4 Principle of Mathematical Induction 91
For every integer m 1, 2
m+4
> (m+ 4)
2
.
In this case, we have just replaced n by m+ 4.
The basic structure of induction is the same. To prove the statement
For every integer n b, P(n) is true.
the only changes we need to make are that our base case is P(b) rather than P(1), and that
in our inductive hypothesis we assume P(k) is true for k b rather than k 1.
Here is an example.
Proposition 7 For every integer n 3, n
2
> 2n + 1.
As usual, lets be very clear about what our statement P(n) is.
P(n): n
2
> 2n + 1.
Now we can begin the proof.
Proof: Base Case We verify that P(3) is true where P(3) is the statement
P(3): 3
2
> 2(3) + 1
This is just arithmetic.
3
2
= 9 > 7 = 2(3) + 1
Inductive Hypothesis We assume that the statement P(k) is true for some integer k 3.
P(k): k
2
> 2k + 1
Inductive Conclusion Now show that the statement P(k + 1) is true.
P(k + 1): k + 1
2
> 2(k + 1) + 1
k + 1
2
= k
2
+ 2k + 1 > (2k + 1) + (2k + 1) = 4k + 2 > 2k + 3 = 2(k + 1) + 1
The rst inequality follows from the inductive hypothesis and the second inequality uses
the fact that k > 0.
Since the result is true for n = k+1, and so holds for all n by the Principle of Mathematical
Induction.
Here is another, similar example.
Proposition 8 For every integer n 5, 2
n
> n
2
.
The statement P(n) is:
P(n): 2
n
> n
2
.
92 Chapter 10 Simple Induction
Proof: Base Case We verify that P(5) is true where P(5) is the statement
P(5): 2
5
> 5
2
This is just arithmetic.
2
5
= 32 > 25 = 5
2
Inductive Hypothesis We assume that the statement P(k) is true for some integer k 5.
P(k): 2
k
> k
2
Inductive Conclusion Now show that the statement P(k + 1) is true.
P(k + 1): 2
k+1
> (k + 1)
2
We will use the fact that for k 5, k
2
> 2k + 1 which follows from the previous
proposition.
2
k+1
= 2 2
k
> 2 k
2
= k
2
+k
2
> k
2
+ 2k + 1 = (k + 1)
2
The result is true for n = k + 1, and so holds for all n by the Principle of Mathematical
Induction.
10.5 An Interesting Example
A triomino is a tile of the form
Proposition 9 A 2
n
2
n
grid of squares with one square removed can be covered by triominoes.
As usual, we begin by explicitly stating P(n).
P(n): A 2
n
2
n
grid of squares with one square removed can be covered by
triominoes.
We will use Simple Induction.
Proof: Base Case We verify that P(1) is true.
P(1): A 2 2 grid of squares with one square removed can be covered by
triominoes.
A 2 2 grid with one square removed looks like or or or .
Each of these can be covered by one triomino.
Inductive Hypothesis We assume that the statement P(k) is true k 1.
P(k): A 2
k
2
k
grid of squares with one square removed can be covered by
triominoes.
Section 10.6 An Interesting Example 93
Note that our inductive hypothesis covers every possible position for the empty square
within the grid.
Inductive Conclusion We now show that the statement P(k + 1) is true.
P(k + 1): A 2
k+1
2
k+1
grid of squares with one square removed can be
covered by triominoes.
Consider a 2
k+1
2
k+1
grid with any square removed.
Split the 2
k+1
2
k+1
grid in half vertically and horizontally.
The missing square occurs in one of the four 2
k
2
k
subgrids formed. Well start by
placing one tile around the centre of the grid, not covering any of the 2
k
2
k
subgrids
where the square is missing:
We can now view the grid as being made up of four 2
k
2
k
subgrids, each with one
square missing. The Inductive Hypothesis tells us that each of these can be covered
by triominoes. Together with one more triomino in the centre, the whole 2
k+1
2
k+1
grid can be covered. The result is true for n = k + 1, and so holds for all n by the
Principle of Mathematical Induction.
94 Chapter 10 Simple Induction
10.6 Practice
1. Each of the following proofs by induction incorrectly prove a statement that is
actually false. State what is wrong with each proof.
(a) For all n N, n > n + 1.
Proof: Let P(n) be the statement: n > n + 1.
Assume that P(k) is true for some integer k 1. That is, k > k + 1 for some
integer k 1. We must show that P(k + 1) is true, that is, k + 1 > k + 2. But
this follows immediately by adding one to both sides of k > k + 1. Since the
result is true for n = k + 1, it holds for all n by the Principle of Mathematical
Induction.
2. Prove the following statements by induction.
(a) For all n N,
n
i=1
(2i 1) = n
2
(b) For all n N,
n
i=1
i =
n(n + 1)
2
(c) For all n N,
n
i=1
i
2
=
n(n + 1)(2n + 1)
6
(d) For all n N,
n
i=1
i
3
=
n
2
(n + 1)
2
4
(e) For all n Z, n 0
n
i=0
2
i
= 2
n+1
1
(f) For all r R, r ,= 1 and n N,
n
i=1
r
i
=
1 r
n+1
1 r
(g) For all n N,
n
i=1
i
(i + 1)!
= 1
1
(n + 1)!
(h) For all r R, r ,= 1 and n N,
n
i=1
r
i
=
1 r
n+1
1 r
Section 10.6 Practice 95
(i) For all r R, r ,= 1 and n N,
n
i=1
i
2
i
= 2
n + 2
2
n
3. Prove the following statements by induction.
(a) For all n N, 4 [ (5
n
1).
(b) For all n N, 3
n
> n
2
.
(c) For all n N where n 4, n! > 2
n
.
(d) For all n N where n 4, n! > n
2
.
4. Consider the product
n
i=2
_
1
1
i
2
_
(a) What is the value of this product for n = 2, 3, 4.
(b) Conjecture a value for the product as a function of n.
(c) Use induction to prove your conjecture.
5. Let y = ln x.
(a) Determine
dy
dx
,
d
2
y
dx
2
,
d
3
y
dx
3
,
d
4
y
dx
4
.
(b) Conjecture an expression for
d
n
y
dx
n
.
(c) Use induction to prove your conjecture.
6. An integer n is perfect if the sum of all of its positive divisors (including 1 and itself)
is 2n.
(a) Is 6 a perfect number? Give reasons for your answer.
(b) Is 7 a perfect number? Give reasons for your answer.
(c) Prove the following statement:
If k is a positive integer and 2
k
1 is prime, then 2
k1
(2
k
1) is perfect.
Chapter 11
Strong Induction
11.1 Objectives
The technique objectives are:
1. Learn when to use Strong Induction.
2. Learn how to use Strong Induction.
11.2 Strong Induction
Sometimes Simple Induction doesnt work where it looks like it should. We then need to
change our approach a bit. The following example is similar to examples that weve done
earlier. Lets try to make Simple Induction work and see where things go wrong.
Proposition 1 Let the sequence x
n
be dened by x
1
= 0, x
2
= 30 and x
m
= x
m1
+ 6x
m2
for m 3.
Then
x
n
= 2 3
n
+ 3 (2)
n
for n 1.
The proposition is saying that the recursive denition of x
n
implies the closed form of x
n
.
This seems like a classic case for induction since the conclusion clearly depends on the
integer n. Lets begin with our statement P(n).
P(n): x
n
= 2 3
n
+ 3 (2)
n
.
Now we can begin the proof.
Proof: Base Case We verify that P(1) is true where P(1) is the statement
P(1): x
1
= 2 3
1
+ 3 (2)
1
.
From the denition of the sequence x
1
= 0. The right side of the statement P(1)
evaluates to 0 so P(1) is true.
96
Section 11.2 Strong Induction 97
Inductive Hypothesis We assume that the statement P(k) is true for k 1.
P(k): x
k
= 2 3
k
+ 3 (2)
k
.
Inductive Conclusion Now show that the statement P(k + 1) is true.
P(k + 1): x
k+1
= 2 3
k+1
+ 3 (2)
k+1
.
x
k+1
= x
k
+ 6x
k1
(by the denition of the sequence)
= 2 3
k
+ 3 (2)
k
+ 6x
k1
(by the Inductive Hypothesis)
Now two problems are exposed. The more obvious problem is what do we do with x
k1
?
The more subtle problem is whether we can even validly write the rst line. When k+1 = 2
we get
x
2
= x
1
+ 6x
0
and x
0
is not even dened.
The basic principle that earlier instances imply later instances is sound. We need to
strengthen our notion of induction in two ways. First, we need to allow for more than
one base case so that we avoid the problem of undened terms. Second, we need to allow
access to any of the statements P(1), P(2), P(3), ... , P(k) when showing that P(k +1) is
true. This may seem like too strong an assumption but is, in fact, quite acceptable. This
practice is based on the Principle of Strong Induction.
Axiom 2 Principle of Strong Induction (POSI)
Let P(n) be a statement that depends on n N.
If
1. P(1), P(2), . . . , P(b) are true for some positive integer b, and
2. P(1), P(2), . . . , P(k) are all true implies P(k + 1) is true for all k N,
then P(n) is true for all n N.
Just as before, there are three parts in a proof by strong induction.
Base Cases Verify that P(1), P(2), . . . , P(b) are all true. This is usually easy.
Inductive Hypothesis Assume that P(1), P(2), . . . , P(k) are true for some k b. This is
sometimes written as Assume that P(i) is true for i = 1, 2, 3, . . . , k, k b or Assume
that P(i) is true for 1 i k, k b.
Inductive Conclusion Using the assumption that P(1), P(2), . . . , P(k) are true,
show that P(k + 1) is true.
98 Chapter 11 Strong Induction
As a rule of thumb, use Strong Induction when the general case depends on more than one
previous case. Though we could use Strong Induction all the time, Simple Induction is often
easier.
Lets return to our previous proposition.
Proposition 2 Let the sequence x
n
be dened by x
1
= 0, x
2
= 30 and x
m
= x
m1
+ 6x
m2
for m 3.
Then
x
n
= 2 3
n
+ 3 (2)
n
for n 1.
We will use Strong Induction. Recall our statement P(n).
P(n): x
n
= 2 3
n
+ 3 (2)
n
.
Now we can begin the proof.
Proof: Base Case We verify that P(1) and P(2) are true.
P(1): x
1
= 2 3
1
+ 3 (2)
1
.
From the denition of the sequence x
1
= 0. The right side of the statement P(1)
evaluates to 0 so P(1) is true.
P(2): x
2
= 2 3
2
+ 3 (2)
2
.
From the denition of the sequence x
2
= 30. The right side of the statement P(2)
evaluates to 30 so P(2) is true.
Inductive Hypothesis We assume that the statement P(i) is true for 1 i k, k 2.
P(i): x
i
= 2 3
i
+ 3 (2)
i
.
Inductive Conclusion Now we show that the statement P(k + 1) is true.
P(k + 1): x
k+1
= 2 3
k+1
+ 3 (2)
k+1
.
x
k+1
= x
k
+ 6x
k1
(by the denition of the sequence)
= 2 3
k
+ 3 (2)
k
+ 6(2 3
k1
+ 3 (2)
k1
) (by the Inductive Hypothesis)
= 3
k1
[2 3 + 6 2] + (2)
k1
[3 (2) + 6 3] (expand and factor)
= 18 3
k1
+ 12 (2)
k1
= 2 3
2
3
k1
+ 3 (2)
2
(2)
k1
= 2 3
k+1
+ 3 (2)
k+1
The result is true for n = k + 1, and so holds for all n by the Principle of Strong
Induction.
Section 11.3 Strong Induction 99
Proposition 3 Every integer n 9 can be written in the form 3x + 4y for positive integers x and y.
Before we attempt a proof lets check small values.
x y 3x + 4y
3 0 9
2 1 10
1 2 11
4 0 12
3 1 13
2 2 14
There seems to be a pattern. After every group of three integers n, we can generate the
next group of three integers by adding one to the preceding values of x. Since this is a case
where previous values allow us to generate later values, induction may work.
Our rst task is to come up with a suitable statement P(n).
P(n): There exist positive integers x and y so that 3x + 4y = n.
Now we can begin the proof.
Proof: Base Case We verify that P(9), P(10) and P(11) are true. We repeat the table
above for the required values of 9, 10 and 11. Note that x and y are positive integers.
x y 3x + 4y
3 0 9
2 1 10
1 2 11
Inductive Hypothesis We assume that the statement P(i) is true for 1 i k, k 9.
P(i): There exist positive integers x and y so that 3x + 4y = i.
Inductive Conclusion Now we show that the statement P(k + 1) is true.
P(k + 1): There exist positive integers x and y so that 3x + 4y = k + 1.
Consider the integer (k + 1) 3 = k 2. Since k 2 < k we can use the Inductive
Hypothesis to assert the existence of positive integers x
0
and y
0
such that
3x
0
+ 4y
0
= k 2. Now consider the positive integers x
1
= x
0
+ 1 and y
1
= y
0
.
3x
1
+ 4y
1
= 3(x
0
+ 1) + 4y
0
= 3x
0
+ 4y
0
+ 3 = (k 2) + 3 = k + 1
The result is true for n = k + 1, and so holds for all n by the Principle of Strong
Induction.
100 Chapter 11 Strong Induction
11.3 Practice
1. Each of the following proofs by induction incorrectly prove a statement that is
actually false. State what is wrong with each proof.
(a) For all n N, 1
n1
= 2
n1
.
Proof: Let P(n) be the statement: 1
n1
= 2
n1
.
When n = 1 we have 1
0
= 1 = 2
0
so P(1) is true. Assume that P(i) is true for
1 i k. That is, 1
i1
= 2
i1
for for 1 i k. We must show that P(k +1) is
true, that is, 1
(k+1)1
= 2
(k+1)1
or 1
k
= 2
k
. By our inductive hypothesis, P(2)
is true so 1
1
= 2
1
. Also by our inductive hypothesis, P(k) is true so 1
k1
= 2
k1
.
Multiplying these two equations together gives 1
k
= 2
k
. Since the result is true
for n = k + 1, and so holds for all n by the Principle of Strong Induction.
(b) A sequence x
n
is dened by x
1
= 3, x
2
= 20 and x
i
= 5x
i1
for i 3. Then,
for all n N, x
n
= 3 5
n1
.
Proof: Let P(n) be the statement: x
n
= 3 5
n1
.
When n = 1 we have 3 5
0
= 3 = x
1
so P(1) is true. Assume that P(k) is true
for some integer k 1. That is, x
k
= 3 5
k1
for some integer k 1. We must
show that P(k + 1) is true, that is, x
k+1
= 3 5
k
. Now
x
k+1
= 5x
k
= 5(3 5
k1
) = 3 5
k
as required. Since the result is true for n = k + 1, and so holds for all n by the
Principle of Mathematical Induction.
2. Prove the following statements by induction.
(a) A sequence x
n
is dened recursively by x
1
= 8, x
2
= 32 and x
i
= 2x
i1
+3x
i2
for i 3. For all n N, x
n
= 2 (1)
n
+ 10 3
n1
.
(b) A sequence t
n
is dened recursively by t
n
= 2t
n1
+ n for all integers n > 1.
The rst term is t
1
= 2. For all n N, t
n
= 5 2
n1
2 n for all integers
n 1.
(c) A sequence x
n
is dened by x
1
= 11, x
2
= 23 and x
n
= x
n1
+ 12x
n2
for all
n 3. Prove that x
n
= 2 4
n
(3)
n
.
3. You know that the sum of the interior angles of a triangle is 180
.
(a) Use this fact about triangles to determine the sum of the interior angles of a
convex quadrilateral. (A polygon is convex if every line segment joining non-
adjacent vertices lies wholly inside the polygon.)
(b) Use (a) and the fact about triangles to determine the sum of the interior angles
of a convex pentagon.
(c) Conjecture a value for the sum of the interior angles of a convex polygon with n
sides.
(d) Use induction to prove your conjecture.
4. The Fibonacci sequence is dened as the sequence f
n
where f
1
= 1, f
2
= i and
f
i
= f
i1
+f
i2
for i 3. Use induction to prove the following statements.
Section 11.3 Practice 101
(a) For all n N,
f
n+1
<
_
7
4
_
n
(b) For n 2,
f
1
+f
2
+ +f
n1
= f
n+1
1
(c) Let a =
1 +
5
2
and b =
1
5
2
. For all n N,
f
n
=
a
n
b
n
5
Chapter 12
Binomial Theorem
12.1 Objectives
The technique objectives are:
1. Dene binomial coecient.
2. Read a proof of the Binomial Theorem.
3. Practice using the Binomial Theorem.
12.2 Binomial Theorem
Denition 12.2.1
Binomial
A binomial is the sum of two quantities, a +b for example.
You have probably encountered the following powers of a binomial.
(a +b)
2
= a
2
+ 2ab +b
2
(a +b)
3
= a
3
+ 3a
2
b + 3ab
2
+b
3
The obvious question is: what is the expansion of (a +b)
n
for a positive integer n?
The expansion of (a +b)
n
uses binomial coecients.
Denition 12.2.2
Binomial Coecient
If 0 b a, then the binomial coecient
_
a
b
_
is dened by
_
a
b
_
=
a!
b!(a b)!
where 0! is dened to be 1 so that
_
a
a
_
= 1.
102
Section 12.2 Binomial Theorem 103
Example 1
_
6
2
_
=
6!
2!4! = 15
_
10
1
_
=
10!
1!9! = 10
_
a
0
_
=
a!
0!a! = 1
The following proposition states an extremely useful property of binomial coecients.
Proposition 1 (Sum of Binomials)
If 1 r n, then
_
n + 1
r
_
=
_
n
r 1
_
+
_
n
r
_
Proof:
_
n
r 1
_
+
_
n
r
_
=
n!
(r 1)!(n r + 1)!
+
n!
r!(n r)!
=
n!
(r 1)!(n r + 1)!
r
r
+
n!
r!(n r)!
n r + 1
n r + 1
=
r(n!) + (n r + 1)(n!)
r!(n r + 1)!
=
(n + 1)(n!)
r!(n r + 1)!
(factor n! out in the numerator)
=
(n + 1)!
r!(n r + 1)!
=
_
n + 1
r
_
Now we are ready to state and prove the Binomial Theorem.
Proposition 2 (Binomial Theorem)
Let x and y be any numbers. Then, for all n N,
(x +y)
n
=
n
r=0
_
n
r
_
x
nr
y
r
104 Chapter 12 Binomial Theorem
Example 2
(x +y)
3
=
3
r=0
_
3
r
_
x
3r
y
r
=
_
3
0
_
x
30
y
0
+
_
3
1
_
x
31
y
1
+
_
3
2
_
x
32
y
2
+
_
3
3
_
x
33
y
3
= x
3
+ 3x
2
y + 3xy
2
+y
3
Example 3
(2x 3)
3
=
3
r=0
_
3
r
_
(2x)
3r
(3)
r
= 8x
3
36x
2
+ 54x 27
Proof: Let P(n) be the statement:
(x +y)
n
=
n
r=0
_
n
r
_
x
nr
y
r
.
Base Case We verify that P(1) is true where P(1) is the statement
P(n) : (x +y)
1
=
1
r=0
_
1
r
_
x
1r
y
r
.
Since
1
r=0
_
1
r
_
x
1r
y
r
=
_
1
0
_
x
10
y
0
+
_
1
1
_
x
11
y
1
= x +y = (x +y)
1
the base case P(1) holds.
Inductive Hypothesis We assume that the statement P(k) is true for k 1.
P(k) : (x +y)
k
=
k
r=0
_
k
r
_
x
kr
y
r
.
Inductive Conclusion We now show that the statement P(k + 1) is true.
P(k + 1) : (x +y)
k+1
=
k+1
r=0
_
k + 1
r
_
x
k+1r
y
r
.
Section 12.2 Binomial Theorem 105
(x +y)
k+1
= (x +y)(x +y)
k
(break the problem into two parts)
=x(x +y)
k
+y(x +y)
k
(expand)
(now invoke the Inductive Hypothesis)
=x
_
k
r=0
_
k
r
_
x
kr
y
r
_
+y
_
k
r=0
_
k
r
_
x
kr
y
r
_
(multiply the x and y through using Properties of Summation (a))
=
_
k
r=0
_
k
r
_
x
k+1r
y
r
_
+
_
k
r=0
_
k
r
_
x
kr
y
r+1
_
(separate the rst term from the left sum and the last term of the right sum)
=
_
k
0
_
x
k+1
+
k
r=1
_
k
r
_
x
k+1r
y
r
+
k1
r=0
_
k
r
_
x
kr
y
r+1
+
_
k
k
_
y
k+1
(change the bounds of summation using Properties of Summation (d))
=
_
k
0
_
x
k+1
+
k
r=1
_
k
r
_
x
k+1r
y
r
+
k
r=1
_
k
r 1
_
x
kr+1
y
r
+
_
k
k
_
y
k+1
(simplify rst and last terms, add sums using Properties of Summation (b))
=x
k+1
+
k
r=1
__
k
r
_
+
_
k
r 1
__
x
k+1r
y
r
+y
k+1
(use the Sum of Binomials)
=x
k+1
+
k
r=1
_
k + 1
r
_
x
k+1r
y
r
+y
k+1
(rewrite the rst and last terms)
=
_
k + 1
0
_
x
k+1
+
k
r=1
_
k + 1
r
_
x
k+1r
y
r
+
_
k + 1
k + 1
_
y
k+1
(nally, combine into a single sum)
=
k+1
r=0
_
k + 1
r
_
x
k+1r
y
r
The result is true for n = k+1, and so holds for all n by the Principle of Mathematical
Induction.
106 Chapter 12 Binomial Theorem
12.3 More Examples
1. Expand
_
2x +
3
y
_
4
Solution:
_
2x +
3
y
_
4
=
4
r=0
_
4
r
_
(2x)
4r
_
3
y
_
r
=
_
4
0
_
(2x)
4
+
_
4
1
_
(2x)
3
_
3
y
_
1
+
_
4
2
_
(2x)
2
_
3
y
_
2
+
_
4
3
_
(2x)
1
_
3
y
_
3
+
_
4
4
__
3
y
_
4
= 16x
4
+
96x
3
y
+
216x
2
y
2
+
216x
y
3
+
81
y
4
2. What is the coecient of the term containing x
3
in the expansion of
_
x
2
+
4
x
_
12
Solution:
_
x
2
+
4
x
_
12
The i-th term in the expansion is
_
12
i
_
_
x
2
_
12i
_
4
x
_
i
=
_
12
i
_
4
i
x
243i
The term containing x
3
corresponds to the term generated when i = 7. The coecient is
_
12
7
_
4
7
12.4 Practice
1. Prove the following statements related to the Binomial Theorem.
(a)
_
n
k
_
=
_
n
n k
_
(b) Using induction, prove that
_
n
r
_
is an integer for 0 r n
Chapter 13
Negation
13.1 Objectives
The technique objectives are:
1. To learn how to negate statements.
2. To learn when to use counter-examples.
3. To practice nding counter-examples.
13.2 Negating Statements
You will frequently encounter the negation of a statement A.
Denition 13.2.1
Negation
The negation of the statement A is the statement NOT A. Because statements cannot be
both true and false, exactly only one of A and NOT A can be true.
In some instances, nding the negation of a statement is easy. For example,
Example 1 (Negating a Statement)
A: f(x) has a real root.
NOT A: f(x) does not have a real root.
When A is already negated, a truth table tells us what to do.
A A (A)
T F T
F T F
Thus, (A) = A. Two negatives are a positive, or equivalently, one NOT cancels another
NOT. For example,
107
108 Chapter 13 Negation
Example 2 (A Double Negative)
A: 7 is not a divisor of 28.
NOT A: 7 is a divisor of 28.
You have already seen DeMorgans Laws when we worked with truth tables. DeMorgans
Laws tell us how to negate statements containing AND and OR.
Proposition 1 (De Morgans Laws (DML))
If A and B are statements, then
1. (A B) (A) (B)
2. (A B) (A) (B)
REMARK
From DeMorgans Laws, there is a specic rule applied when negating a statement contain-
ing the word AND.
A: B AND C
NOT A: (NOT B) OR (NOT C)
Note that the connecting word has changed from AND to OR and that each term in the
expression has been negated. The brackets are not needed because NOT precedes OR in
logical evaluation, but the brackets are useful to emphasize the change. Here is a specic
example.
Example 3 (Negating statements containing AND)
A: a [ b and a [ c.
NOT A: a b or a c.
REMARK
Similar to the conjunctive AND, DeMorgans Laws provide a specic rule when negating a
statement containing the word OR.
A: B OR C
NOT A: (NOT B) AND (NOT C)
Section 13.3 Negating Statements with Quantiers 109
Note that the connecting word has changed from OR to AND and, again, each term in the
expression has been negated. As before, the brackets are not needed because NOT precedes
AND in logical evaluation, but the brackets are useful to emphasize the change. Here is an
example.
Example 4 (Negating statements containing OR)
A: a [ b or a [ c.
NOT A: a b and a c.
13.3 Negating Statements with Quantiers
Negating statements that contains quantiers is more complicated. We rst observe that:
The negation of a universal statement results in an existential statement.
The negation of an existential statement results in a universal statement.
REMARK
A statement with an existential quantier looks like
There exists an x in the set S such that P(x) is true.
Its negation is
For every x in the set S, P(x) is false.
A statement with a universal quantier looks like
For every x in the set S, P(x) is true.
Its negation is
There exists an x in the set S such that P(x) is false.
110 Chapter 13 Negation
REMARK
To negate a statement using nested quantiers, do the following.
Step 1 Put the word NOT in front of the entire statement.
Step 2 Move the NOT from left to right replacing quantiers by their opposites and in
each case place the NOT just before the open sentence. Repeat until there are no
quantiers to the right of NOT.
Step 3 When all of the quantiers are to the left of NOT, incorporate the NOT into the
open sentence.
Lets do some examples.
Example 5
1. For every x S, f(x) = 0.
(a) NOT [For every x S, f(x) = 0.]
(b) There exists x S such that NOT [f(x) = 0].
(c) There exists x S such that f(x) ,= 0.
2. There exists x S such that f(x) = 0.
(a) NOT [There exists x S such that f(x) = 0.]
(b) For every x S, NOT [f(x) = 0].
(c) For every x S, f(x) ,= 0.
3. For every x S and for every f F, f(x) = 0.
(a) NOT [For every x S and for every f F, f(x) = 0.]
(b) There exists x S such that NOT [for every f F, f(x) = 0].
There exists x S and there exists f F such that NOT [f(x) = 0].
(c) There exists x S and there exists f F such that f(x) ,= 0.
4. There exists x S such that, for every f F, f(x) = 0.
(a) NOT [There exists x S such that for every f F, f(x) = 0.]
(b) For every x S, NOT [for every f F, f(x) = 0].
For every x S there exists a f F, NOT [f(x) = 0].
(c) For every x S there exists a f F, f(x) ,= 0.
13.3.1 Counterexamples
So far in the course, we have worked on proving that statements are true. How do we prove
that a statement is false? In principle, this is relatively easy. To show that the statement
A is false, we only need to prove that the statement NOT A is true.
Section 13.4 Negating Statements with Quantiers 111
Suppose A is the statement:
A: For every x [, ], sin(x) = 0.
This statement is very similar to our rst example. NOT A is the statement
NOT A: There exists x [, ] such that sin(x) ,= 0.
In this case, NOT A is easy to prove using our construction method. If I consider x = 0, I
know that 0 [, ] and sin(x) = 1 ,= 0. The number 0 is a counterexample.
Denition 13.3.1
Counterexample
In general, if we wish to prove that a universal statement A is false, we show that its
negation, which is an existential statement, is true. The particular object which we use to
show that the existential statement is true is called a counterexample of statement A.
The same idea arises when we want to show that a statement of the form A implies B
is false. It is enough to show a particular instance where A is true and B is false, or
equivalently NOT B is true. For example, consider the following statement.
Statement 2 S: If a, b and c are integers, and a [ (bc), then a [ b and a [ c.
The hypothesis is
A: a, b and c are integers, and a [ (bc)
and the conclusion is
B: a [ b and a [ c.
To show that S is false, we must nd a specic instance where A is true and B is false. To
show that B is false we must show that NOT B is true.
NOT B: a b or a c.
Choosing a = 3, b = 6 and c = 7 we have an instance where the hypothesis A is true (since
3 [ 42) and the conclusion B is false, equivalently, NOT B is true. The values a = 3, b = 6
and c = 7 are a counterexample for S.
112 Chapter 13 Negation
13.4 Practice
1. Consider the following statement. For all a, b, c Z, there exists an integer solution
to ax
2
+by
2
= c whenever gcd(a, b) [ c.
(a) Write down the hypothesis of the statement.
(b) Write down the conclusion of the statement.
(c) Prove or disprove the statement.
2. Let f be a function that maps from S to T.
(a) Dene the expression f maps S onto T.
(b) Negate the denition of onto.
(c) With reference to the denition of onto or its negation, determine whether or
not f(x) = e
x
where f : R R is onto.
3. For each of the following statements, either prove the statement or disprove it using
a counterexample.
(a) Let a, b, c, d Z. If d [ ac and d [ bc, then d [ c.
(b) For any integer a, gcd(11a + 5, 2a + 1) = 1.
(c) If r is irrational, then 1/r is irrational.
Chapter 14
Contradiction
14.1 Objectives
The technique objectives are:
1. Learn how to read and discover proofs by contradiction.
The content objectives are:
1. Read a proof of Prime Factorization.
2. Discover a proof of Innitely Many Primes.
14.2 How To Use Contradiction
We have mostly used the Direct Method to discover proofs, often in conjunction with one
of the methods associated with quantiers. There are times when this is dicult. A proof
by contradiction provides a new method.
Suppose that we wish to prove that the statement A implies B is true. We assume that A
is true. We must show that B is true. What would happen if B were true, but we assumed
it was false and continued our reasoning based on the assumption that B was false? Since a
mathematical statement cannot be both true and false, it seems likely we would eventually
encounter a mathematically non-sensical statement. Then we would ask ourselves How
did we arrive at this nonsense? and the answer would have to be that our assumption that
B was false was wrong and B is, in fact, true.
113
114 Chapter 14 Contradiction
REMARK
A proof by contradiction of the statement A implies B structures proofs in exactly this
way. Proceed as follows.
1. Assume that A is true.
2. Assume that B is false, or equivalently, assume that NOT B is true.
3. Reason forward from A and NOT B to reach a contradiction.
Unfortunately, it is not always clear what contradiction to nd, or how to nd it. What is
more clear is when to use contradiction.
14.2.1 When To Use Contradiction
The general rule of thumb is to use contradiction when the statement NOT B gives you
useful information. There are typically two instances when this is useful. The rst instance
is when the statement B is one of only two alternatives. For example, if the conclusion B
is the statement f(x) = 0 then the only two possibilities are f(x) = 0 and f(x) ,= 0. NOT
B is the statement f(x) ,= 0 which could be useful to you. The second instance is when B
contains a negation. As we saw earlier, NOT B eliminates the negation.
14.2.2 Reading a Proof by Contradiction
Suppose we want to prove the following proposition.
Proposition 1 (Prime Factorization (PF))
If n is an integer greater than 1, then n can be expressed as a product of primes.
Example 1 The integers 2, 3, 5 and 7 are primes and each is a product unto itself, that is, it is a product
consisting of one factor. The integers 4 = 2 2, 6 = 2 3 and 8 = 2 2 2 have been
factored as products of primes.
Proof: (For reference, each sentence of the proof is written on a separate line.)
1. Let N be the smallest integer, greater than 1, that cannot be written as a product of
primes.
2. N is not itself a prime, so we can write N = rs where 1 < r s < N.
3. Since r and s are less than N, they can be written as a product of primes.
4. But then it follows that N = rs can be written as a product of primes, a contradiction.
Section 14.2 How To Use Contradiction 115
Analysis of Proof An interpretation of sentences 1 through 4 follows.
Sentence 1 Let N be the smallest integer, greater than 1, that cannot be written as a
product of primes.
The rst sentence of a proof by contradiction usually gives the specic form of NOT
B that the author is going to work with. In this case, the author identies that this is
a proof by contradiction by assuming the existence of an object which contradicts the
conclusion, an integer N which cannot be written as a product of primes. Moreover,
of all such candidates for N the author chooses the smallest one. Though it may not
be obvious when rst encountering the proof why the author would stipulate such a
condition, it always has to do with something needed later in the argument.
Once you know that this is a proof by contradiction, look ahead to nd the contra-
diction. In this case, the contradiction appears in Sentence 4.
Sentence 2 N is not itself a prime, so we can write N = rs where 1 < r s < N.
If N were prime, then N by itself is a product of primes (with just one factor). But
the author has assumed that N is not a product of primes, hence N is composite and
can be written as the product of two non-trivial factors r and s.
Sentence 3 Since r and s are less than N, they can be written as a product of primes.
This sentence makes it clear why N needs to be the smallest integer that cannot be
written as a product of primes. In order to generate the contradiction, r and s must
be written as products of primes. If it were the case that N was not the smallest such
integer, it might be the case that neither r nor s could be written as a product of
primes.
Sentence 4 But then it follows that N = rs can be written as a product of primes, a
contradiction.
Since both r and s can be written as a product of primes, the product rs = N can
certainly be written as a product of primes. But this contradicts the assumption in
Sentence 1 that N cannot be written as a product of primes.
Since our reasoning is correct, it must be the case that our assumption that there is an
integer which cannot be written as a product of primes is incorrect. That is, every integer
can be written as a product of primes.
14.2.3 Discovering and Writing a Proof by Contradiction
Discovering a proof by contradiction can be dicult and often requires several attempts at
nding the path to a contradiction. Lets see how we might discover a proof to a famous
theorem recorded by Euclid.
Proposition 2 (Innitely Many Primes (INF P))
The number of primes is innite.
We should always be clear about our hypothesis and conclusion. There is no explicit hy-
pothesis in this case and the conclusion is the statement
116 Chapter 14 Contradiction
Conclusion: The number of primes is innite.
This statement contains a negation, innite is an abbreviation of not nite, and so is a
candidate for a proof by contradiction. Our rst statement in a proof by contradiction is a
negation of the conclusion so we have
Proof in Progress
1. Assume that the number of primes is nite. (This is NOT B.)
2. To be completed.
Now comes the tough part. What do we do from here? How do we generate a contradiction?
Well, if the number of primes is nite, could we somehow use that assumption to nd a
new prime not in our nite list of primes? Our candidate should not have any of the
nite primes as a factor. At this point, it sounds like we need to list our primes.
Proof in Progress
1. Assume that the number of primes is nite. (This is NOT B.)
2. Label the nite number of primes p
1
, p
2
, p
3
, . . . , p
n
.
3. To be completed.
Now we have a way to express a candidate for a new prime.
Proof in Progress
1. Assume that the number of primes is nite. (This is NOT B.)
2. Label the nite number of primes p
1
, p
2
, p
3
, . . . , p
n
.
3. Consider the integer N = p
1
p
2
p
3
p
n
+ 1.
4. To be completed.
Clearly N is larger than any of the p
i
so, by the rst sentence, N cannot be in the list of
primes. Thus
Proof in Progress
1. Assume that the number of primes is nite. (This is NOT B.)
2. Label the nite number of primes p
1
, p
2
, p
3
, . . . , p
n
.
3. Consider the integer N = p
1
p
2
p
3
p
n
+ 1.
4. Since N > p
i
for all i, N is not a prime.
5. To be completed.
Section 14.2 How To Use Contradiction 117
And this is where we can nd our contradiction. N has no non-trivial factors since dividing
N by any of the p
i
leaves a remainder of 1. But that means N cannot be written as a
product of primes, which contradicts the previous proposition. The contradiction in this
proof arises from a result which is inconsistent with something else we have proved.
Proof in Progress
1. Assume that the number of primes is nite. (This is NOT B.)
2. Label the nite number of primes p
1
, p
2
, p
3
, . . . , p
n
.
3. Consider the integer N = p
1
p
2
p
3
p
n
+ 1.
4. Since N > p
i
for all i, N is not a prime.
5. Since N = p
i
q + 1 for each of the primes p
i
, no p
i
is a factor of N. Hence N cannot
be written as a product of primes, which contradicts our previous proposition.
Putting all of the statements together gives the following proof.
Proof: Assume that there are only a nite number of primes, say p
1
, p
2
, p
3
, . . . , p
n
. Consider
the integer N = p
1
p
2
p
3
p
n
+1. Since N > p
i
for all i, N is not a prime. But N = p
i
q +1
for each of the primes p
i
, so no p
i
is a factor of N. Hence N cannot be written as a product
of primes, which contradicts our previous proposition.
Chapter 15
Contrapositive
15.1 Objectives
The technique objectives are:
1. Dene the contrapositive.
2. Read a proof using the contrapositive.
3. Discover and write a proof using the contrapositive.
15.2 The Contrapositive
Recall the denition of contrapositive from the chapter on truth tables.
Denition 15.2.1
Contrapositive
The statement B A is called the contrapositive of A B.
The logical equivalence between a statement and its contrapositive gives us another proof
technique. Instead of proving A implies B we prove NOT B implies NOT A using
any of the existing techniques.
15.2.1 When To Use The Contrapositive
This is very similar to contradiction. Use the contrapositive when the statement NOT A
or the statement NOT B gives you useful information. This is most likely to occur when
A or B contains a negation or is one of two possible choices. When both A and B contain
negations, it is highly likely that using the contrapositive will be productive.
15.3 Reading a Proof That Uses the Contrapositive
Consider the following proposition.
118
Section 15.3 Reading a Proof That Uses the Contrapositive 119
Proposition 1 Suppose a is an integer. If 32 ((a
2
+ 3)(a
2
+ 7)) then a is even.
Proof: (For reference, each sentence of the proof is written on a separate line.)
1. We will prove the contrapositive.
2. If a is odd we can write a as 2k + 1 for some integer k.
3. Substitution gives
(a
2
+ 3)(a
2
+ 7) = ((2k + 1)
2
+ 3)((2k + 1)
2
+ 7)
= (4k
2
+ 4k + 1 + 3)(4k
2
+ 4k + 1 + 7)
= (4k
2
+ 4k + 4)(4k
2
+ 4k + 8)
= 4(k
2
+k + 1) 4(k
2
+k + 2)
= 16(k
2
+k + 1)(k
2
+k + 2)
4. Since one of k
2
+k +1 or k
2
+k +2 must be even, and the last line above shows that
a factor of 16 already exists disjoint from (k
2
+ k + 1)(k
2
+ k + 2), (a
2
+ 3)(a
2
+ 7)
must contain a factor of 32. That is 32 [ ((a
2
+ 3)(a
2
+ 7)).
Analysis of Proof Since the hypothesis of the proposition contains a negation, and the
conclusion is one of two possible choices, it makes sense to consider the contrapositive.
Sentence 1 We will prove the contrapositive.
Not all authors will be so obliging as to state the proof technique up front. The
provided proof would also be correct if this sentence was omitted. Correct, but less
easy to understand.
As usual, we begin by identifying the hypothesis and the conclusion.
Hypothesis: A: 32 ((a
2
+ 3)(a
2
+ 7)).
Conclusion: B: a is even.
For the contrapositive
Hypothesis: NOT B: a is odd.
Conclusion: NOT A: 32 [ ((a
2
+ 3)(a
2
+ 7))
How would we know that the author was using the contrapositive if this sentence were
omitted? The clause If a is odd is NOT B so the author is using one of only two
proof techniques that begin this way, contradiction or contrapositive. Looking ahead
to the last line, we see that the author concludes with NOT A, so this is a proof of
the contrapositive. Had the author concluded with a contradiction, we would know
that this is a proof by contradiction.
120 Chapter 15 Contrapositive
Sentence 2 If a is odd we can write a as 2k + 1 for some integer k.
This is the statement NOT B. Knowing from Sentence 1 that the author is using the
contrapositive we would expect to see statements moving forward from the hypothesis
of the contrapositive (a is odd) or backwards from the conclusion of the contrapositive
(32 [ ((a
2
+ 3)(a
2
+ 7))).
Sentence 3 Substitution gives (a
2
+ 3)(a
2
+ 7) = . . . = 16(k
2
+k + 1)(k
2
+k + 2).
This is just arithmetic.
Sentence 4 Since one of k
2
+k+1 or k
2
+k+2 must be even, and the last line above shows
that a factor of 16 already exists disjoint from (k
2
+k +1)(k
2
+k +2), (a
2
+3)(a
2
+7)
must contain a factor of 32. That is 32 [ ((a
2
+ 3)(a
2
+ 7)).
These sentences establish the conclusion of the contrapositive. Since the contrapositive
is true, the original statement is true.
15.3.1 Discovering and Writing a Proof Using The Contrapositive
The important observation here is that once you decide to use the contrapositive, all of your
existing skills apply. The diculty is in deciding whether or not to use the contrapositive.
For our example, we will begin with a denition.
Denition 15.3.1
Bounded
A set S of real numbers is bounded if there is a real number M > 0 such that, for all
elements x S, [x[ < M.
Proposition 2 Suppose that S and T are sets of real numbers with S T. If S is not bounded, then T is
not bounded.
We should always be clear about our hypothesis and conclusion.
Hypothesis: A: S is not bounded.
Conclusion: B: T is not bounded.
Since both the hypothesis and conclusion are negated, it makes sense to try to prove the
contrapositive If T is bounded, then S is bounded. This gives us two statements in our
proof.
Proof in Progress
1. Suppose that T is bounded. (This is just NOT B.)
2. To be completed.
3. Hence, S is bounded. (This is just NOT A.)
Working backwards from the conclusion we can ask How do we show that S is bounded?
Using the denition of bounded, we can write
Section 15.3 Reading a Proof That Uses the Contrapositive 121
Proof in Progress
1. Suppose that T is bounded. (This is just NOT B.)
2. To be completed.
3. For every x S, we have [x[ < M
.
4. Hence, S is bounded. (This is just NOT A.)
Now the question becomes Where can we nd such an M
.
3. To be completed.
4. For every x S, we have [x[ < M
.
5. Hence, S is bounded. (This is just NOT A.)
Next, we need to connect the two sets and show that the M
.
Putting all of the statements together gives the following proof.
Proof: We will prove the contrapositive. Suppose that T is bounded. Hence, there exists
a real number M
. Let x S. Since S T, x T
and so [x[ < M
(x) = f(x).
And earlier in this course you saw the Division Algorithm.
Proposition 1 (Division Algorithm (DA))
If a and b are integers, and b > 0, then there exist unique integers q and r such that
a = qb +r where 0 r < b.
122
Section 16.3 Showing X = Y 123
To prove a statement of the form
If . . ., then there is a unique object x in the set S such that P(x) is true.
there are basically two approaches.
1. Demonstrate that there is at least one object in the set S that satises P. Assume
that there are two objects X and Y in the set S such that P(X) and P(Y ) are true.
Show that X = Y .
2. Demonstrate that there is at least one object in the set S that satises P. Assume
that there are two distinct objects X and Y in the set S such that P(X) and P(Y )
are true. Derive a contradiction.
You can use whichever is easier in the circumstance.
16.3 Showing X = Y
The method is as follows.
1. Demonstrate that there is at least one object in the set S that satises P.
2. Assume that there are two objects X and Y in the set S such that P(X) and P(Y )
are true.
3. Show that X = Y .
For example, let us prove the following statement.
Proposition 2 If a and b are integers with a ,= 0 and a [ b, then there is a unique integer k so that b = ka.
As usual, we begin by explicitly identifying the hypothesis and conclusion.
Hypothesis: a and b are integers with a ,= 0 and a [ b.
Conclusion: There is a unique integer k so that b = ka.
The appearance of unique in the conclusion tells us to use one of the two approaches
described in the previous section. In this case, we will assume the existence of two integers
k
1
and k
2
and show that k
1
= k
2
. But rst, we need to show that at least one integer k
exists, and this follows immediately from the denition of divisibility.
Proof in Progress
1. Since a [ b, at least one integer k exists so that b = ka.
124 Chapter 16 Uniqueness
2. Let k
1
and k
2
be integers such that b = k
1
a and b = k
2
a. (Note how closely this
follows the standard pattern. k
1
corresponds to X. k
2
corresponds to Y . Both come
from the set of integers and if P(x) is the statement b = xa, then P(X) and P(Y )
are assumed to be true.)
3. To be completed.
4. Hence, k
1
= k
2
.
The obvious thing to do is equate the two equations to get
k
1
a = k
2
a
Since a is not zero we can divide both sides by a to get
k
1
= k
2
A proof might look like the following.
Proof: Since a [ b, by the denition of divisibility there exists an integer k so that b = ka.
Now let k
1
and k
2
be integers such that b = k
1
a and b = k
2
a. But then k
1
a = k
2
a and
dividing by a gives k
1
= k
2
.
16.4 Finding a Contradiction
The method is as follows.
1. Demonstrate that there is at least one object in the set S that satises P.
2. Assume that there are two distinct objects X and Y in the set S such that P(X)
and P(Y ) are true.
3. Derive a contradiction.
For example, let us prove the following statement.
Proposition 3 Suppose a solution to the simultaneous linear equations y = m
1
x + b
1
and y = m
2
x + b
2
exists. If m
1
,= m
2
, then there is a unique solution to the simultaneous linear equations
y = m
1
x +b
1
and y = m
2
x +b
2
.
As usual, we begin by explicitly identifying the hypothesis and conclusion.
Hypothesis: A solution to the simultaneous linear equations y = m
1
x+b
1
and y = m
2
x+b
2
exists. m
1
,= m
2
.
Conclusion: There is a unique solution to the simultaneous linear equations y = m
1
x+b
1
and y = m
2
x +b
2
.
Section 16.5 The Division Algorithm 125
The appearance of unique in the conclusion tells us to use one of the two approaches
described in the previous section. In this case, we will assume the existence of two distinct
points of intersection and derive a conclusion.
Proof in Progress
1. Suppose that y = m
1
x +b
1
and y = m
2
x +b
2
intersect in the distinct points (x
1
, y
1
)
and (x
2
, y
2
). (The existence of at least one solution is guaranteed by the hypothesis.
Note again how closely this follows the standard pattern. (x
1
, y
1
) corresponds to X.
(x
2
, y
2
) corresponds to Y . Both come from the set of ordered pairs and both satisfy
the statement are a solution to the simultaneous linear equations y = m
1
x +b
1
and
y = m
2
x +b
2
.)
2. To be completed, hence a contradiction.
But now if we substitute (x
1
, y
1
) and (x
2
, y
2
) into y = m
1
x +b
1
we get
y
1
= m
1
x
1
+b
1
(16.1)
y
2
= m
1
x
2
+b
1
(16.2)
which implies that
y
1
y
2
= m
1
(x
1
x
2
)
Similarly, substituting (x
1
, y
1
) and (x
2
, y
2
) into y = m
2
x +b
2
gives
y
1
y
2
= m
2
(x
1
x
2
)
Equating the two expressions for y
1
y
2
gives
(m
1
m
2
)(x
1
x
2
) = 0
Since m
1
,= m
2
, m
1
m
2
,= 0 and we can divide by (m
1
m
2
). This gives x
1
x
2
= 0.
That is, x
1
= x
2
. But then,
y
1
y
2
= m
1
(x
1
x
2
) and x
1
x
2
= 0
imply
y
1
y
2
= 0
That is, y
1
= y
2
. But then the points (x
1
, y
1
) and (x
2
, y
2
) are not distinct, a contradiction.
Exercise 1 Write a proof for the preceding proposition.
16.5 The Division Algorithm
Suppose that in a proof of the Division Algorithm it has already been established that
integers q and r exist and only uniqueness remains. A proposed proof of uniqueness follows.
Proposition 4 (Division Algorithm)
If a and b are integers and b > 0, then there exist unique integers q and r such that
a = qb +r where 0 r < b
126 Chapter 16 Uniqueness
Proof: (For reference, each sentence of the proof is written on a separate line.)
1. Suppose that a = q
1
b + r
1
with 0 r
1
< b. Also, suppose that a = q
2
b + r
2
with
0 r
2
< b and r
1
,= r
2
.
2. Without loss of generality, we can assume r
1
< r
2
.
3. Then 0 < r
2
r
1
< b and
4. (q
1
q
2
)b = r
2
r
1
.
5. Hence b [ (r
2
r
1
).
6. By Bounds By Divisibility, b r
2
r
1
which contradicts the fact that r
2
r
1
< b.
7. Therefore, the assumption that r
1
,= r
2
is false and in fact r
1
= r
2
.
8. But then (q
1
q
2
)b = r
2
r
1
implies q
1
= q
2
.
Lets make sure that we understand every line of the proof.
Sentence 1 Suppose that a = q
1
b + r
1
with 0 r
1
< b. Also, suppose that a = q
2
b + r
2
with 0 r
2
< b and r
1
,= r
2
.
Since a statement about uniqueness appears in the conclusion, we would expect one
of the two uniqueness methods to be used. In fact, both are used. The assertion of
uniqueness applies to both q and r. Since the author writes r
1
,= r
2
, that is, there are
distinct values of r
1
and r
2
, we should look for a contradiction regarding r. But the
author does not assume distinct values of q and so we would expect that the author
will show q
1
= q
2
.
Sentence 2 Without loss of generality, we can assume r
1
< r
2
.
Without loss of generality is an expression that means the upcoming argument
would hold identically if we made any other choice, so we will simply assume one of
the possibilities.
Sentence 3 Then 0 < r
2
r
1
< b and
This is a particularly important line. It comes, in part, from r
1
< r
2
by subtracting r
1
from both sides (this gives 0 < r
2
r
1
) and by remembering that the largest possible
value of r
2
is b 1 and the smallest possible value of r
1
is 0, so the largest possible
dierence is b 1, thus r
2
r
1
< b
Sentence 4 (q
1
q
2
)b = r
2
r
1
.
This follows from equating a = q
1
b +r
1
and a = q
2
b +r
2
.
Sentence 5 Hence b [ (r
2
r
1
).
This follows from the denition of divisibility.
Sentence 6 By BBD, b r
2
r
1
which contradicts the fact that r
2
r
1
< b.
Note the importance of the strict inequality in the relation
b r
2
r
1
< b
Section 16.5 The Division Algorithm 127
Sentence 7 Therefore, the assumption that r
1
,= r
2
is false and in fact r
1
= r
2
.
The contradiction we were looking for. The Division Algorithm states that both q
and r are unique. So far, only the uniqueness of r has been established.
Sentence 7 But then (q
1
q
2
)b = r
2
r
1
implies q
1
= q
2
.
And this is where the uniqueness of q is established. Originally, the author assumed
the existence of q
1
and q
2
and now has shown that they are, in fact, the same.
Chapter 17
Elimination
17.1 Objectives
The technique objectives are:
1. Learn when to use the Elimination Method.
2. Learn how to use the Elimination Method
17.2 When to Use the Elimination Method
We use the Elimination Method whenever we encounter a statement of the form
If A, then B or C.
or symbolically,
A B C
17.3 How to Use the Elimination Method
We begin this section with a very important exercise.
Exercise 1 Prove that
A B C (A B) (A C) A B C
Lets interpret what these logical equivalences are telling us. The rst equivalence says that
to prove A B C it is enough to prove A B or A C. We do not need to prove
both. And what if we cannot prove A B? The second equivalence tells us that we can
use A and B to show that C is true.
And this makes sense. If we want to prove A B C and we can show that A B, then
we are done. But if A B is false, then B must be false so we must show that C is true
when A is true and B is false.
128
Section 17.4 Reading 129
REMARK
Thus, to prove
If A, then B or C.
we can prove the logically equivalent statement
If A and B, then C.
The Elimination Method gets its name by eliminating one of the cases to consider.
17.4 Reading
Consider the following proposition, proof and analysis.
Proposition 1 If x
2
7x + 12 0, then x 3 or x 4.
Proof: (For reference, each sentence of the proof is written on a separate line.)
1. Suppose that x
2
7x + 12 0 and x > 3.
2. Factoring gives (x 3)(x 4) 0.
3. Since x > 3, x 3 > 0.
4. Dividing the inequality in Sentence 2 by x 3 gives x 4 0, or
5. x 4 as desired.
Analysis of Proof Since the word or appears in the conclusion, it would make sense for
the author to use the Elimination Method. The statements corresponding to A, B
and C are:
A: x
2
7x + 12 > 0
B: x 3
C: x 4
The Elimination Method assumes A and B and uses these assumptions to prove C.
Sentence 1 Suppose that x
2
7x + 12 0 and x > 3.
This is exactly A and B so the author is indicating that the Elimination Method
will be used.
130 Chapter 17 Elimination
Sentence 2 Factoring gives (x 3)(x 4) 0
The author uses A and factors. This new expression indicates where the 3 and 4 in
the conclusion come from.
Sentence 3 Since x > 3, x 3 > 0.
This is arithmetic with B.
Sentence 4 Dividing the inequality in Sentence 2 by x 3 gives x 4 0
Division by x3 is only possible if x3 ,= 0 which is guaranteed by Step 3. Moreover,
x 3 is positive so division does not change the inequality sign in the relation.
Sentence 5 x 4 as desired.
The author makes one small step from x 4 0 to get C.
17.5 Writing and Discovering
Lets discover a proof of the following statement.
Proposition 2 Let U be a universal set containing sets S and T. Then
S T S T
This may be mystifying. The word or does not appear. But lets rephrase the statement as
If x S T, then x S T
or
If x S T, then x S or x T
Now the use of the word or is apparent. As usual, we begin by identifying the hypothesis,
conclusion, core proof technique and preliminary material.
Hypothesis: x S T
Conclusion: x S or x T
Core Proof Technique: Since or occurs in the conclusion, we will use the Elimination
Method.
Preliminary Material: Properties of sets.
Since we will use the Elimination Method, we will negate the rst part of the conclusion
and establish the second part of the conclusion.
Section 17.5 Writing and Discovering 131
Proof in Progress
1. Suppose x S T and x , S.
2. To be completed.
3. Hence, x T.
We can make some progress just by using set denitions. If x S T, then x , S T.
One might be tempted to say that this implies x , S and x , T but that would be wrong.
(Can you nd a counter-example?)
Now lets make use of the statement x , S. Since x , S, x S. Lets record what we have
done.
Proof in Progress
1. Suppose x S T and x , S.
2. Since x S T, x , S T.
3. Since x , S, x S.
4. To be completed.
5. Hence, x T.
In order for x T we must have x , T. What would happen if x T? Since x S from
Sentence 3 that would imply that x S T, contradicting Sentence 2. So x cannot be in
T, which is exactly what we need.
Here is a complete proof. Notice that the author assumes that the reader can make the
transition from
S T S T
to
If x S T, then x S or x T
without remark.
Proof: Suppose x S T and x , S. Since x S T, x , S T. Since x , S, x S.
Now x , T for otherwise if x T, then x S T, a contradiction. Since x , T, x T as
required.
Part IV
Securing Internet Commerce
132
Chapter 18
The Greatest Common Divisor
18.1 Objectives
The content objectives are:
1. To discover a proof of the proposition GCD With Remainders.
2. Do an example of the Euclidean Algorithm.
3. Prove the GCD Characterization Theorem.
18.2 Greatest Common Divisor
Denition 18.2.1
Greatest Common
Divisor
Let a and b be integers, not both zero. An integer d > 0 is the greatest common divisor
of a and b, written gcd(a, b), if and only if
1. d [ a and d [ b (this captures the common part of the denition), and
2. if c [ a and c [ b then c d (this captures the greatest part of the denition).
Example 1
gcd(24, 30) = 6
gcd(17, 25) = 1
gcd(12, 0) = 12
gcd(12, 12) = 12
gcd(0, 0) =??
133
134 Chapter 18 The Greatest Common Divisor
Denition 18.2.2
gcd(0, 0)
For a ,= 0, the denition implies that gcd(a, 0) = [a[ and gcd(a, a) = [a[. We dene gcd(0, 0)
as 0. This may sound counterintuitive, since all integers are divisors of 0, but it is consistent
with gcd(a, 0) = [a[ and gcd(a, a) = [a[.
Lets prove a seemingly unusual proposition about gcds.
Proposition 1 (GCD With Remainders (GCD WR))
If a and b are integers not both zero, and q and r are integers such that a = qb + r, then
gcd(a, b) = gcd(b, r).
Before we begin the proof, lets take a look at a numeric example.
Example 2 Suppose a = 72 and b = 30. Now 72 = 230+12 so the proposition GCD With Remainders
asserts that gcd(72, 30) = gcd(30, 12). And this is true. The gcd(72, 30) and gcd(30, 12) is
6.
How would we discover a proof for GCD With Remainders? Lets try the usual approach:
identify the hypothesis and conclusion, and begin asking questions.
Hypothesis: a, b, q and r are integers such that a = qb +r.
Conclusion: gcd(a, b) = gcd(b, r)
My rst question typically starts with the conclusion and works backward. What is a
suitable rst question? How about How do we show that two integers are equal? There
are lots of possible answers: show that their dierence is zero, their ratio is one, each is
less than or equal the other. However, here we are working with gcds rather than generic
integers so perhaps a better question would be How do we show that a number is a gcd?
The broad answer is relatively easy. Use the denition of gcd. After all, right now it is
the only thing we have! A specic answer is less easy. Do we want to focus on gcd(a, b) or
gcd(b, r)? Here is an easy way to do both. Let d = gcd(a, b). Then show that d = gcd(b, r).
That gets us two statements in our proof.
Proof in Progress
1. Let d = gcd(a, b).
2. To be completed.
3. Hence d = gcd(b, r).
But how do we show that d = gcd(b, r)? Use the denition. Our proof can expand to
Proof in Progress
1. Let d = gcd(a, b).
Section 18.2 Greatest Common Divisor 135
2. We will show
(a) d [ b and d [ r, and
(b) if c [ b and c [ r then c d.
3. To be completed.
4. Hence d = gcd(b, r).
For the rst part of the denition, we ask How do we show that one number divides another
number? Interestingly enough, there are two dierent answers - one for b and one for r,
though that is not obvious. For b there is already a connection between d and b in the rst
sentence. Since d = gcd(a, b), we know from the denition of gcd that d [ b.
What about r? Using the denition of divisibility seems problematic. What propositions
could we use? Transitivity of Divisibility doesnt seem to apply. How about using the
Divisibility of Integer Combinations? Recall
Proposition 2 (Divisibility of Integer Combinations)
Let a, b and c be integers. If a [ b and a [ c, then a [ (bx +cy) for any x, y Z.
Observe that r = a qb. Since d [ a and d [ b, d divides any integer combination of a and
b by the Divisibility of Integer Combinations. That is, d [ (a(1) + b(q)) so d [ r. Lets
extend our proof in progress.
Proof in Progress
1. Let d = gcd(a, b).
2. We will show
(a) d [ b and d [ r, and
(b) if c [ b and c [ r then c d.
3. Since d = gcd(a, b), we know from the denition of gcd that d [ b.
4. Observe that r = a qb. Since d [ a and d [ b, d [ (a(1) +b(q)) by the Divisibility of
Integer Combinations, so d [ r.
5. To be completed.
6. Hence d = gcd(b, r).
That leaves us with the greatest part of greatest common divisor. This second part of the
denition is itself an implication, so we assume that c [ b and c [ r and we must show c d.
How do we show one number is less than or equal to another number? There doesnt seem
to be anything obvious but ask Have I seen this anywhere before?. Yes, we have. In the
second part of the denition of gcd. But then you might ask Isnt that assuming what we
have to prove? Lets be precise about what we are saying. We can use d for one inequality.
Since d = gcd(a, b), for any c where c [ a and c [ b, c d.
What we need to show is: if c [ b and c [ r then c d.
136 Chapter 18 The Greatest Common Divisor
These two statements are close, but not the same. Make sure that you see the dierence.
In one, we are using the fact that d = gcd(a, b). In the other, we are showing that any
common factor of b and r is less than or equal to d.
If we assume that c [ b and c [ r, then c [ (b(q) + r(1)) by the Divisibility of Integer
Combinations (again). Since a = qb + r, c [ a. And now, since d = gcd(a, b) and c [ a and
c [ b, c d as needed. Lets add that to our proof in progress.
Proof in Progress
1. Let d = gcd(a, b).
2. We will show
(a) d [ b and d [ r, and
(b) if c [ b and c [ r then c d.
3. Since d = gcd(a, b), we know from the denition of gcd that d [ b.
4. Observe that r = a qb. Since d [ a and d [ b, d [ (a(1) +b(q)) by the Divisibility of
Integer Combinations, so d [ r.
5. Let c [ b and c [ r. Then c [ (b(q) +r(1)) by the Divisibility of Integer Combinations.
Since a = qb +r, c [ a. And now, since d = gcd(a, b) and c [ a and c [ b, c d by the
second part of the denition of gcd.
6. Hence d = gcd(b, r).
Having discovered a proof, we should now write the proof. Whenever you write, you should
have an audience in mind. You actually have two audiences to keep in mind: your peers with
whom you collaborate, and the markers. You do not need to specify each proof technique,
since your peers and markers know all of them. It does help to provide an overall plan if
you can. Also, proofs tend to work much more forwards than backwards because that helps
to emphasize the notion of starting with hypotheses and ending with the conclusion. Here
is one possible proof.
Proof: Let d = gcd(a, b). We will use the denition of gcd to show that d = gcd(b, r).
Since d = gcd(a, b), d [ b. Observe that r = a qb. Since d [ a and d [ b, d [ (a qb) by the
Divisibility of Integer Combinations. Hence d [ r, and d is a common divisor of b and r.
Let c be a divisor of b and r. Since c [ b and c [ r, c [ (qb +r) by the Divisibility of Integer
Combinations. Now a = qb+r, so c [ a. Because d = gcd(a, b) and c [ a and c [ b, c d.
REMARK
1. If a = b = 0 this proposition is also true since the only possible choices for b and r are
b = r = 0.
2. In general, there are many ways to work forwards and backwards.
3. The proof may records steps in a dierent order than their appearance in the discovery
process.
Section 18.3 Certicate of Correctess 137
4. Proofs are short and usually omit the discovery process.
5. Be sure that you can identify where each of the hypotheses was used in the proof.
18.3 Certicate of Correctess
Suppose we wanted to compute gcd(1386, 322). We could factor both numbers, nd their
common factors and select the greatest. In general, this is very slow.
Repeated use of GCD With Remainders allows us to eciently compute gcds. For example,
lets compute gcd(1386, 322).
Example 3
Since 1386 = 4 322 + 98, gcd(1386, 322) = gcd(322, 98).
Since 322 = 3 98 + 28, gcd(322, 98) = gcd(98, 28).
Since 98 = 3 28 + 14, gcd(98, 28) = gcd(28, 14).
Since 28 = 2 14 + 0, gcd(28, 14) = gcd(14, 0).
Since gcd(14, 0) = 14, the chain of equalities from the column on the right gives us
gcd(1386, 322) = gcd(322, 98) = gcd(98, 28) = gcd(28, 14) = gcd(14, 0) = 14.
This process is known as the Euclidean Algorithm.
Exercise 1 Randomly pick two positive integers and compute their gcd using the Euclidean Algorithm.
How do you know that you have the correct answer? Keep your work. Youll need it soon.
Because mistakes happen when performing arithmetic by hand, and mistakes happen when
programming computers, it would be very useful if there were a way to certify that an
answer is correct. Think of a certicate of correctness this way. You are a manager. You
ask one of your sta to solve a problem. The sta member comes back with the proposed
solution and a certicate of correctness that can be used to verify that the proposed solution
is, in fact, correct. The certicate has two parts: a theorem which you have already proved
and which relates to the problem in general, and data which relates to this specic problem.
For example, heres a proposition that allows us to produce a certicate for gcd(a, b).
Proposition 3 (GCD Characterization Theorem (GCD CT))
If d is a positive common divisor of the integers a and b, and there exist integers x and y
so that ax +by = d, then d = gcd(a, b).
Our certicate would consist of this theorem along with integers x and y. If our proposed
solution was d and d [ a, d [ b and ax +by = d, then we could conclude without doubt that
d = gcd(a, b).
138 Chapter 18 The Greatest Common Divisor
In Example 3 above, the proposed gcd of 1386 and 322 is 14. Our certicate of correctness
consists of the GCD Characterization Theorem and the integers d = 14, x = 10 and y = 43.
Note that 14 [ 1386 and 14 [ 322 and 1386 10 + 322 (43) = 14, so we can conclude
that 14 = gcd(1386, 322).
Here is a proof of the GCD Characterization Theorem.
Proof: (For reference, each sentence of the proof is written on a separate line.)
1. We will show that d satises the denition of gcd(a, b).
2. From the hypotheses, d [ a and d [ b.
3. Now let c [ a and c [ b.
4. By the Divisibility of Integer Combinations, c [ (ax +by) so c [ d.
5. By the Bounds by Divisibility, c d, and so d = gcd(a, b).
Lets do an analysis of the proof.
Analysis of Proof As usual, we will begin by explicitly identifying the hypothesis and
the conclusion.
Hypothesis: d is a positive common divisor of the integers a and b. There exist
integers x and y so that ax +by = d.
Conclusion: d = gcd(a, b)
Core Proof Technique: Work forwards recognizing an existential quantier in the
hypothesis.
Preliminary Material: Denition of gcd. An integer d > 0 is the gcd(a, b) if and
only if
1. d [ a and d [ b, and
2. if c [ a and c [ b then c d.
Sentence 1 We will show that d satises the denition of gcd(a, b).
The author states the plan - always a good idea. The author is actually answering
the question How do I show that one number is the gcd of two other numbers?
Sentence 2 From the hypotheses, d [ a and d [ b.
The author is working forwards from the hypothesis. This handles the rst part of
the denition of gcd.
Sentence 3 Now let c [ a and c [ b.
The second part of the denition of gcd is an implication with hypothesis c [ a and
c [ b. The author must show c d.
Section 18.4 More Examples 139
Sentence 4 By the Divisibility of Integer Combinations, c [ (ax +by) so c [ d.
This is where the author uses an existential quantier in the hypothesis. The author
assumes the existence of two integers x and y such that ax+by = d. The author does
not state this explicitly.
Having made this assumption, the author can use Sentence 3 to satisfy the hypotheses
of Divisibility of Integer Combinations and so invoke the conclusion, that is,
c [ (ax +by).
Sentence 5 By the Bounds By Divisibility, c d, and so d = gcd(a, b).
Bounds by Divisibility concludes with a statement involving absolute values. Where
did the absolute vales signs go? From Sentence 4 we know that c [ d and from the
hypothesis we know that d ,= 0 so Bounds by Divisibility implies that [c[ [d[. From
the hypothesis we know more than d ,= 0. We know that d is positive, so [c[ d.
Regardless of the sign of c, if [c[ d, it must be the case that c d. Having
determined that c d, both parts of the denition of gcd are satised and so the
author can conclude that d = gcd(a, b).
Now the obvious questions is: How do we nd x and y?
18.4 More Examples
1. Use the denition of gcd to prove the following statement. (Hint: Use the proof of
the GCD With Remainders proposition as a model.)
Let x, y Z and let d = gcd(x, y). Then d = gcd(x, 3x +y).
Proof: We will show that d satises the denition of gcd for the pair x and 3x + y.
Specically, we must show that
(a) d [ x and d [ (3x +y), and
(b) if c [ x and c [ (3x +y) then c d.
Since d = gcd(x, y), d [ x. Also, since d [ x and d [ y, d divides any integer combination
of x and y, hence d [ (3x +y).
Now suppose that c [ x and c [ (3x + y). Then c divides the integer combination
x(3) + (3x +y)(1)), that is, c [ y. But since c [ x and c [ y and d = gcd(x, y), c d.
All of the conditions of the denition of the gcd are satised so d = gcd(x, 3x+y).
140 Chapter 18 The Greatest Common Divisor
18.5 Practice
1. Consider the following statement: For all a Z, gcd(9a + 4, 2a + 1) = 1.
(a) Which proposition belongs in the following proof of this statement?
Proof: Let a Z. By ,
gcd(9a + 4, 2a + 1) = gcd(2a + 1, a) = gcd(a, 1)
Since gcd(a, 1) = 1, gcd(9a + 4, 2a + 1) = 1.
(b) If gcd(x, y) = d, express gcd(18x + 3y, 3x) in terms of d. Justify your answer.
2. Let a and b be non-zero integers. Prove each of the following statements.
(a) If a [ b, then ac [ bc.
(b) If c > 0, then gcd(ac, bc) = c gcd(a, b). (Suggestion: Let d = gcd(a, b). Show
cd = gcd(ac, bc).)
(c) If gcd(a, b) = 1, then gcd(2a +b, a + 2b) is 1 or 3.
3. Prove or disprove the following statements. Let a, b, c be xed integers.
(a) If there exists an integer solution to ax
2
+by
2
= c, then gcd(a, b) [ c.
(b) If gcd(a, b) [ c, then there exists an integer solution to ax
2
+by
2
= c.
4. Two integers a and b are coprime if gcd(a, b) = 1. Consider the following proposition
and proof: If a and b are consecutive integers, then a and b are co-prime.
Proof: (For reference purposes, each sentence of the proof is written on a separate
line.)
(i) Suppose b > a.
(ii) We can write b as a + 1.
(iii) Since 1(a + 1) 1(a) = 1, we know by the that
gcd(a, b) = gcd(a, a + 1) = 1 as required.
(iv) The argument is similar if a > b.
(a) State the hypothesis of Proposition 1.
(b) State the conclusion of Proposition 1.
(c) What proposition or theorem should appear in line (iii) of the proof? State the
proposition or theorem precisely.
(d) Recall that propositions or theorems can only be invoked if their hypotheses are
satised. Show that all of the hypotheses of the proposition or theorem you
quoted in (c) are satised.
Chapter 19
The Extended Euclidean
Algorithm
19.1 Objectives
The content objectives are:
1. Compute gcds and certicates using the Extended Euclidean Algorithm.
19.2 The Extended Euclidean Algorithm (EEA)
Given two positive integers, a and b, the EEA is an ecient way to compute not only
d = gcd(a, b) but the data x and y for the certicate. Well begin with an example and
then formally state the algorithm.
First though, we need to know what the oor of a number is.
Denition 19.2.1
oor
The oor of x, written x|, is the largest integer less than or equal to x.
Example 1
1. 9.713| = 9.
2. 9.025| = 9.
3. 9| = 9.
4. 9.713| = 10. Since the oor of x is the largest integer less than or equal to x, 9
cannot be the oor of 9.713 since 9 > 9.713.
5.
_
7
2
_
= 3.
141
142 Chapter 19 The Extended Euclidean Algorithm
Lets compute gcd(1386, 322) using the EEA. We begin by creating four columns labelled
x, y, r (for remainder) and q (for quotient). We will construct a sequence of rows that will
tell us the gcd and provide a certicate. For the i-th row we will label the column entries
x
i
, y
i
, r
i
and q
i
. There is something very important to observe about the table. If we are
computing gcd(a, b), in each row of the table
ax
i
+by
i
= r
i
Where have you seen an expression like that before?
Assuming a > b, the rst two rows are always
x y r q
1 0 a 0
0 1 b 0
so in our specic problem the rst two rows are
x y r q
1 0 1386 0
0 1 322 0
We construct each of the remaining rows by using the two preceding rows. To generate the
third row we must rst compute a quotient q
3
using the formula
q
i
_
r
i2
r
i1
_
Here we get
q
3
=
_
r
1
r
2
_
=
_
1386
322
_
= 4
To construct the next row we use the formula
Row
i
Row
i2
q
i
Row
i1
When i = 3 we get
Row
3
Row
1
q
3
Row
2
With q
3
= 4 we get
Row
3
Row
1
4 Row
2
Writing this in the table gives
x y r q
Row
1
1 0 1386 0
4 Row
2
0 1 322 0
= Row
3
1 4 98 4
In a similar fashion we get the fourth row. To generate the fourth row we must rst compute
a quotient q
4
using the formula
q
i
_
r
i2
r
i1
_
Here we get
q
4
=
_
r
2
r
3
_
=
_
322
98
_
= 3
Section 19.2 The Extended Euclidean Algorithm (EEA) 143
To construct the next row we use the formula
Row
i
Row
i2
q
i
Row
i1
When i = 4 we get
Row
4
Row
2
q
4
Row
3
With q
4
= 3 we get
Row
4
Row
2
3 Row
3
and so
x y r q
1 0 1386 0
Row
2
0 1 322 0
3 Row
3
1 4 98 4
= Row
4
3 13 28 3
The completely worked out example follows.
x y r q
1 0 1386 0
0 1 322 0
1 4 98 4
3 13 28 3
10 43 14 3
23 99 0 2
We stop when the remainder is 0. The second last row provides the desired d, x and
y. The gcd d is the entry in the r column, x is the entry in the x column and y is the
entry in the y column. Hence, d = 14 (as before), and we can check the conditions of the
GCD Characterization Theorem to certify correctness. Since 14 [ 1386 and 14 [ 322 and
1386 10 + 322 (43) = 14, we can conclude that 14 = gcd(1386, 322).
If a or b is negative, apply the EEA to gcd([a[, [b[) and then change the signs of x and y
after the EEA is complete. If a < b, simply swap their places in the algorithm. This works
because gcd(a, b) = gcd(b, a).
144 Chapter 19 The Extended Euclidean Algorithm
Here is a formal statement of the algorithm.
Algorithm 1 Extended Euclidean Algorithm
Require: a > b > 0 are integers.
Ensure: The following conditions hold at the end of the algorithm.
r
n+1
= 0.
r
n
= gcd(a, b).
r
i2
= q
i
r
i1
+r
i
where 0 r
i
< r
i1
.
In every row, ax
i
+by
i
= r
i
.
x = x
n
, y = y
n
is a solution to ax +by = gcd(a, b).
Initialize
Construct a table with four columns so that
The columns are labelled x, y, r and q.
The rst row in the table is (1, 0, a, 0).
The second row in the table is (0, 1, b, 0).
To produce the remaining rows (i 3)
repeat
q
i
_
r
i2
r
i1
_
Row
i
Row
i2
q
i
Row
i1
until r
i
= 0
We treat the EEA as a proposition where the preconditions of the algorithm are the hy-
potheses and the postconditions of the algorithm are the conclusions. Lets record the
algorithm in the form of a theorem.
Proposition 1 (Extended Euclidean Algorithm (EEA))
If a and b are positive integers, then d = gcd(a, b) can be computed and there exist integers
x and y so that ax +by = d.
Exercise 1 Earlier you computed the gcd of two numbers. Repeat that exercise using the EEA and
verify that you can produce a certicate of correctness for your proposed gcd.
19.3 More Examples
1. Let d = gcd(231, 660).
(a) Use the Extended Euclidean Algorithm to compute d and provide a certicate
that d is correct.
(b) Using part (a) , nd d
1
= gcd(231, 660) and provide a certicate that d
1
is
correct.
(c) Using part (a) of this question, nd d
2
= gcd(231, 660) and provide a certi-
cate that d
2
is correct.
Solution:
Section 19.3 More Examples 145
(a)
x y r q
1 0 660 0
0 1 231 0
1 2 198 2
1 3 33 1
7 20 0 6
By the EEA, d = 33. Our certicate consists of the GCD Characterization
Theorem together with d = 33 (d is positive and divides both 660 and 231), and
the integers 1 and 3 (since 660(1) + 231(3) = 33).
(b) Since gcd(231, 660) = gcd(231, 660), d
1
= 33. Our certicate consists of the
GCD Characterization Theorem together with d
1
= 33 (d
1
is positive and divides
both 660 and 231), and the integers 1 and 3 (since 660(1) + 231(3) = 33).
(c) Since gcd(231, 660) = gcd(231, 660), d
2
= 33. Our certicate consists of the
GCD Characterization Theorem together with d
2
= 33 (d
2
is positive and divides
both 660 and 231), and the integers 1 and 3 (since 660(1)231(3) = 33).
2. What is the complete solution to the linear Diophantine equation 1950x770y = 30?
We begin with the EEA applied to 1950 and 770. We will adjust the signs later.
x y r q
1 0 1950 0
0 1 770 0
1 2 410 2
1 3 360 1
2 5 50 1
15 38 10 7
77 195 0 5
Now we see that
1950(15) 770(38) = 10
Multiplying by 3 gives one particular solution, x
0
= 45, y
0
= 114 to
1950x 770y = 30. The complete solution is
x = 45 77n
y = 114 195n
for n Z.
Check: 1950x770y = 1950(4577n)770(114195n) = 1950(45)1950(77n)+
770(114) + 770(195n) = 1950(45) + 770(114) = 87750 + 87780 = 30.
Chapter 20
Properties Of GCDs
20.1 Objectives
The technique objectives are:
1. To practice working with existential quantiers.
The content objectives are:
1. Dene coprime.
2. Discover a proof of Coprimeness and Divisibility.
3. Discover a proof of GCD Of One
4. Exercise: Discover a proof of Division by the GCD.
5. Exercise: Discover a proof of Primes and Divisibility.
20.2 Some Useful Propositions
We begin with a proposition on coprimeness and divisibility.
Denition 20.2.1
Coprime
Two integers a and b are coprime if gcd(a, b) = 1.
Proposition 1 (Coprimeness and Divisibility (CAD))
If a, b and c are integers and c [ ab and gcd(a, c) = 1, then c [ b.
This proposition has two implicit existential quantiers, one in the hypothesis and one in
the conclusion. You might object and ask Where? They are hidden - in the denition of
divides. Recall the denition. An integer m divides an integer n if there exists an integer k
so that n = km.
We treat an existential quantier in the hypothesis dierently from an existential quantier
in the conclusion. Recall the following remarks from the chapter on quantiers.
146
Section 20.2 Some Useful Propositions 147
REMARK
When proving that A implies B and A uses an existential quantier, use the
Object Method.
1. Identify the four parts of the quantied statement there exists an x in the set S such
that P(x) is true.
2. Assume that a mathematical object x exists within the domain S so that the statement
P(x) is true.
3. Make use of this information to generate another statement.
When proving that A implies B and B uses an existential quantier, use the
Construct Method.
1. Identify the four parts of the quantied statement. there exists an x in the set S
such that P(x) is true.
2. Construct a mathematical object x.
3. Show that x S.
4. Show that P(x) is true.
With all of this in mind, how do we go about discovering a proof for Coprimeness and
Divisibility? As usual, we will begin by explicitly identifying the hypothesis, the conclusion,
the core proof technique and any preliminary material we think we might need.
Hypothesis: a, b and c are integers and c [ ab and gcd(a, c) = 1.
Conclusion: c [ b.
Core Proof Technique: We use the Object Method because of the existential quantier
in the hypothesis, and the Construct Method because of the existential quantier in
the conclusion.
Preliminary Material: Denition of divides and gcd.
Lets work backwards from the conclusion by asking the question How do we show that
one integer divides another? We can answer with the denition of divisibility. We must
construct an integer k so that b = ck. We will record this as follows.
Proof in Progress
1. To be completed.
2. Since b = kc, c [ b.
148 Chapter 20 Properties Of GCDs
The problem is that it is not at all clear what k should be. Lets work forwards from the
hypothesis.
Somehow we need an equation with a b alone on one side of the equality sign. We cant
start there but we can get an equation with a b. Since gcd(a, c) = 1, the EEA guarantees
that we can nd integers x and y so that ax +cy = 1. We could multiply this equation by
b. Lets record these forward statements.
Proof in Progress
1. Since gcd(a, c) = 1, the EEA guarantees that we can nd integers x and y so that
ax +cy = 1 (1).
2. Multiplying (1) by b gives abx +cby = b (2).
3. To be completed.
4. Since b = kc, c [ b.
If we could factor the left hand side of (2), wed be able to get a c and other stu that we
could treat as our k. But the rst term has no c. Or maybe it does. Since c [ ab there
exists an integer h so that ch = ab. Substituting ch for ab in (2) gives chx + cby = b (3).
We record this as
Proof in Progress
1. Since gcd(a, c) = 1, the EEA guarantees that we can nd integers x and y so that
ax +cy = 1 (1).
2. Multiplying (1) by b gives abx +cby = b (2).
3. Since c [ ab there exists an integer h so that ch = ab. Substituting ch for ab in (2)
gives chx +cby = b (3).
4. To be completed.
5. Since b = kc, c [ b.
Now factor.
Proof in Progress
1. Since gcd(a, c) = 1, the EEA guarantees that we can nd integers x and y so that
ax +cy = 1 (1).
2. Multiplying (1) by b gives abx +cby = b (2).
3. Since c [ ab there exists an integer h so that ch = ab. Substituting ch for ab in (2)
gives chx +cby = b (3).
4. This gives c(hx +by) = b.
5. But then if we let k = hx +by we have an integer k so that ck = b.
6. Since b = kc, c [ b.
Section 20.2 Some Useful Propositions 149
Here is a proof.
Proof: By the Extended Euclidean Algorithm and the hypothesis gcd(a, c) = 1, there exist
integers x and y so that ax + cy = 1. Multiplying by b gives abx + cby = b. Since c [ ab
there exists an integer h so that ch = ab. Substituting ch for ab gives chx+cby = b. Lastly,
factoring produces (hx +by)c = b. Since hx +by is an integer, c [ b.
As a corollary of Coprimeness and Divisibility we have the following proposition.
Corollary 2 (Primes and Divisibility (PAD))
If p is a prime and p [ ab, then p [ a or p [ b.
Exercise 1 Prove Primes and Divisibility. Because of the or in the conclusion, you will need to use
the Elimination Method.
Let us consider more properties of the greatest common divisor.
Proposition 3 (GCD Of One (GCD OO))
Let a and b be integers. Then gcd(a, b) = 1 if and only if there are integers x and y with
ax +by = 1.
This proposition has similar elements to the one we just proved, so it wont be a surprise if
we use similar reasoning.
REMARK
The important dierence is that this statement is an if and only if statement. To prove
A if and only if B we must prove two statements:
1. If A, then B.
2. If B, then A.
Symbolically, we write A if and only if B as A B. We established the equivalence
of A B and (A B) (B A) in the chapter Truth Tables.
We can restate the proposition as
Proposition 4 (GCD Of One (GCD OO))
Let a and b be integers.
1. If gcd(a, b) = 1, then there are integers x and y with ax +by = 1.
2. If there are integers x and y with ax +by = 1, then gcd(a, b) = 1.
150 Chapter 20 Properties Of GCDs
In statement (1), there is an existential quantier in the conclusion, so we would expect to
use the Construction Method. The problem is Where do we get x and y? In the previous
proof, we used the EEA and it makes sense to use it here as well. By the EEA and the
hypothesis gcd(a, b) = 1, there exist integers x and y so that ax +by = 1.
In statement (2), an existential quantier occurs in the hypothesis so we use the Object
Method and assume the existence of integers x and y so that ax + by = 1. Also, 1 [ a and
1 [ b. These are exactly the hypotheses of the GCD Characterization Theorem, so we can
conclude that gcd(a, b) = 1.
Here is a proof of the GCD Of One proposition.
Proof: Since gcd(a, b) = 1, the EEA assures the existence of integers x and y so that
ax +by = 1. Statement 1 is proved.
Now, 1 [ a and 1 [ b. Also, by the hypothesis of Statement 2, there exist integers x and y so
that ax+by = 1. These are exactly the hypotheses of the GCD Characterization Theorem,
so we can conclude that gcd(a, b) = 1 and Statement 2 is proved.
REMARK
This proof illustrates the connection between the GCD Characterization Theorem and the
Extended Euclidean Algorithm. Both assume integers a and b. The GCD Characterization
Theorem starts with an integer d where d [ a, d [ b and integers x and y so that ax+by = d
and concludes that d = gcd(a, b). The Extended Euclidean Algorithm computes a d so that
d = gcd(a, b), hence it produces a d so that d [ a and d [ b, and also computes integers x
and y so that ax +by = d.
So, if we encounter a gcd in the conclusion, we can try the GCD Characterization Theorem.
If we encounter a gcd in the hypothesis, we can try the Extended Euclidean Algorithm.
Here is another property of gcds.
Proposition 5 (Division by the GCD (DB GCD))
Let a and b be integers. If gcd(a, b) = d ,= 0, then gcd
_
a
d
,
b
d
_
= 1.
As we often do, lets get a sense of the proposition by using numeric examples.
Example 1 First, observe that gcd
_
a
d
,
b
d
_
is meaningful. Since d [ a and d [ b, both
a
d
and
b
d
are
integers.
Now gcd(18, 24) = 6. By the proposition Division by the GCD,
gcd
_
18
6
,
24
6
_
= 1
which is exactly what we would expect from gcd(3, 4).
Section 20.3 Practice 151
Now take minute to read the proof.
Proof: We will use the GCD Characterization Theorem. Since gcd(a, b) = d, the EEA
assures the existence of integers x and y so that ax +by = d. Dividing by d gives
a
d
x +
b
d
y = 1
Since 1 divides both
a
d
and
b
d
, the GCD Characterization Theorem implies that
gcd
_
a
d
,
b
d
_
= 1.
20.3 Practice
1. Consider the following statement and proof.
Let a, b, c Z. If gcd(a, b) = 1 and c [ (a +b), then gcd(a, c) = 1.
Proof: (For reference purposes, each sentence of the proof is written on a separate
line.)
(i) Since gcd(a, b) = 1, by there exist integers x and y such that
ax +by = 1.
(ii) Since c [ (a +b), by there exists an integer k such that a +b = ck.
(iii) Substituting a = ck b into the rst equation, we get
1 = (ck b)x +by = b(x +y) +c(kx).
(iv) Since 1 is a common divisor of b and c and x+y and kx are integers, gcd(b, c) = 1
by .
(a) What proposition or denition should be cited in line (i) of the proof?
(b) What proposition or denition should be cited in line (ii) of the proof?
(c) What proposition or denition should be cited in line (iv) of the proof?
2. Consider the following proposition and proof.
Let a, b, c Z. If gcd(a, b) = 1 and c [ a, then gcd(b, c) = 1.
Proof: Since gcd(a, b) = 1, we know that there exist integers x and y so that
ax + by = 1 (1). Since c [ a, there exists an integer k so that a = ck. Substituting
this expression for a into Equation (1) gives c(kx) +b(y) = 1. Since kx is an integer,
gcd(b, c) = 1.
Justify each line of the proof by writing down each denition or proposition used.
Write down the entire denition or proposition, not just the name. For propositions,
show that the assumptions of the proposition are satised. If only arithmetic is used,
write down By arithmetic.
152 Chapter 20 Properties Of GCDs
3. Let a, b Z. For each of the following statements, either prove the statement or
disprove it using a counterexample.
(a) If p is a prime, and p [ ab, then p [ a or p [ b.
(b) If 2a
2
= b
2
where a, b Z, then 2 is a common divisor of a and b.
(c) For any integer a, gcd(11a + 5, 2a + 1) = 1.
4. Prove the following statement. If gcd(a, b) = 1, then gcd(a, bc) = gcd(a, c). (Hint:
Let d = gcd(a, c) and let e = gcd(a, bc).)
Chapter 21
Linear Diophantine Equations:
One Solution
21.1 Objectives
The technique objectives are:
1. To practice working with existential quantiers.
The content objectives are:
1. Dene Diophantine equations.
2. Prove the Linear Diophantine Equation Theorem (Part 1)
21.2 Linear Diophantine Equations
In high school, you looked at linear equations that involved real numbers. We will look at
linear equations involving only integers.
Denition 21.2.1
Diophantine
Equations
Equations with integer co-ecients for which integer solutions are sought, are called
Diophantine equations after the Greek mathematician, Diophantus of Alexandria, who
studied such equations. Diophantine equations are called linear if each term in the equation
is a constant or a constant times a single variable of degree 1.
The simplest linear Diophantine equation is
ax = b
To emphasize, a and b are given integers in Z and we want an x Z that solves ax = b.
From the denition of divisibility, we know that this equation has an integer solution x if
and only if a [ b, and if a [ b, then x =
b
a
.
What about linear Diophantine equations with two variables?
ax +by = c
153
154
Chapter 21 Linear Diophantine Equations:
One Solution
21.2.1 Finding One Solution to ax + by = c
Theorem 1 (Linear Diophantine Equation Theorem, Part 1 (LDET 1))
Let gcd(a, b) = d. The linear Diophantine equation
ax +by = c
has a solution if and only if d [ c.
Before we study a proof of this theorem, lets see how it works in practice.
Example 1 Which of the following linear Diophantine equations has a solution?
1. 33x + 18y = 10
2. 33x + 18y = 15
Solution:
1. Since gcd(33, 18) = 3, and 3 does not divide 10, the rst equation has no integer
solutions.
2. Since gcd(33, 18) = 3, and 3 does divide 15, the second equation does have an integer
solution.
But how do we nd a solution? Here are two simple steps that will allow us to nd a
solution.
1. Use the Extended Euclidean Algorithm to nd d = gcd(a, b) and x
1
and y
1
where
ax
1
+by
1
= d. (21.1)
2. Multiply Equation 21.1 by k =
c
d
to get akx
1
+bky
1
= kd = c. A solution is x = kx
1
and y = ky
1
.
Applying these two steps to Part 2 of the example, the Extended Euclidean Algorithm gives
x y r q
1 0 33 0
0 1 18 0
1 1 15 1
1 2 3 1
6 11 0 5
hence
33 1 + 18 2 = 3
Section 21.2 Linear Diophantine Equations 155
Multiplying by k =
c
d
=
15
3
= 5 gives
33 5 + 18 10 = 15
so one particular solution is x = 5 and y = 10.
But are there more solutions? Thats where Part 2 of the Linear Diophantine Equation
Theorem comes in and we will cover it later.
Proof: (For reference, each sentence of the proof is written on a separate line.)
1. First, suppose that the linear Diophantine equation ax+by = c has an integer solution
x = x
0
, y = y
0
. That is, ax
0
+by
0
= c.
2. Since d = gcd(a, b), d [ a and d [ b.
3. But then, by the Divisibility of Integer Combinations, d [ (ax
0
+by
0
). That is d [ c.
4. Conversely, suppose that d [ c.
5. Then there exists an integer k such that c = kd.
6. Now, by the Extended Euclidean Algorithm, there exist integers x
1
and y
1
so that
ax
1
+by
1
= d.
7. Multiplying this equation by k =
c
d
gives
akx
1
+bky
1
= kd = c
which, in turn, implies that x = kx
1
and y = ky
1
is a solution to ax +by = c.
Lets perform an analysis of this proof.
Analysis of Proof This is an if and only if statement so we must prove two statements.
1. If the linear Diophantine equation ax +by = c has a solution, then d [ c.
2. If d [ c, then the linear Diophantine equation ax +by = c has a solution.
Core Proof Technique: Both statements contain an existential quantier in the
hypothesis, so each will start with the Object Method. Though both statements
also contain an existential quantier in the conclusion, only one uses the Con-
struct Method. The other uses a proposition we have already proved.
Sentence 1 First, suppose that the linear Diophantine equation ax+by = c has an integer
solution x = x
0
, y = y
0
. That is, ax
0
+by
0
= c.
The author does not explicitly rephrase the if and only if as two statements. Rather,
Sentence 1 indicates which of the two implicit statements will be proved by stating the
hypothesis of Statement 1. Moreover, the rst statement uses an existential quantier
in the hypothesis. The hypothesis of the rst statement could be restated as
156
Chapter 21 Linear Diophantine Equations:
One Solution
there exists an integer solution x
0
, y
0
to the linear Diophantine equation
ax +by = c
The four parts are
Quantier:
Variable: x
0
, y
0
Domain: Z
Open sentence: ax +by = c.
Since the existential quantier occurs in the hypothesis, the author uses the Object
Method. The author assumes the existence of the corresponding objects (x
0
, y
0
) in a
suitable domain (Z) and assumes that these objects satisfy the related open sentence
(ax +by = c).
Sentence 2 Since d = gcd(a, b), d [ a and d [ b.
This follows from the denition of gcd.
Sentence 3 But then, by the Divisibility of Integer Combinations, d [ (ax
0
+by
0
). That is
d [ c.
Since the hypotheses of DIC (a, b and d are integers, and d [ a and d [ b) are satised,
the author can invoke the conclusion of DIC (d [ (ax
0
+by
0
)). And from Sentence 1,
ax
0
+by
0
= c so d [ c.
Sentence 4 Conversely, suppose that d [ c.
The conversely indicates that the author is about to prove Statement 2. Recall that
an if and only if always consists of a statement and its converse. The hypothesis
of the converse is d [ c. The denition of divides contains an existential quantier
and so, in Sentence 5, the authors uses the Object Method. The conclusion of State-
ment 2 contains an existential quantier (there exists an integer solution to the linear
Diophantine equation), so the author uses the Construct Method to build a suitable
solution. Here are the parts of the existential quantier in the conclusion.
Quantier:
Variable: x, y
Domain: Z
Open sentence: ax +by = c.
Sentence 5 Then there exists an integer k such that c = kd.
This is the Object Method and follows from the denition of divisibility.
Sentence 6 Now, by the Extended Euclidean Algorithm, there exist integers x
1
and y
1
so
that
ax
1
+by
1
= d.
The author is making use of a previously proved proposition.
Sentence 7 Multiplying this equation by k =
c
d
gives
akx
1
+bky
1
= kd = c
which, in turn, implies that x = kx
1
and y = ky
1
is a solution to ax +by = c.
Section 21.2 Linear Diophantine Equations 157
This is where the solution is constructed, x = kx
1
and y = ky
1
, and where the
open sentence is veried. The author does not explicitly check that kx
1
and kx
2
are
integers, though we must when we analyse the proof.
Chapter 22
Linear Diophantine Equations:
All Solutions
22.1 Objectives
The technique objectives are:
1. To practice working with universal quantiers.
2. To practice working with subsets.
The content objectives are:
1. Discover a proof to the Linear Diophantine Equation Theorem (Part 2).
2. Examples of the Linear Diophantine Equation Theorem.
22.2 Finding All Solutions to ax + by = c
LDET 1 tells us when solutions exist and how to construct a solution. It does not nd all
of the solutions. That happens next.
Theorem 1 (Linear Diophantine Equation Theorem, Part 2, (LDET 2))
Let gcd(a, b) = d ,= 0. If x = x
0
and y = y
0
is one particular integer solution to the linear
Diophantine equation ax +by = c, then the complete integer solution is
x = x
0
+
b
d
n, y = y
0
a
d
n, n Z.
Before we discover a proof, lets make sure we understand the statement.
158
Section 22.2 Finding All Solutions to ax +by = c 159
Example 1 Find all solutions to 33x + 18y = 15.
Solution: Since gcd(33, 18) = 3, and 3 does divide 15, this equation does have integer
solutions by the Linear Diophantine Equation Theorem, Part 1. If we can nd one solution,
we can use the Linear Diophantine Equation Theorem, Part 2 to nd all solutions. Since
we earlier found the solution x = 5 and y = 10 the complete solution is
(x, y) [ x = 5 + 6n, y = 10 11n, n Z
You we can check that these are solutions by substitution.
Check:
33x + 18y = 33(5 + 6n) + 18(10 11n) = 165 + 198n + 180 198n = 15
This check does not verify that we have found all solutions. It veries that all of the pairs
of integers we have found are solutions.
The expression complete integer solution in the statement of LDET 2 hides the use of
sets. Lets be explicit about what those sets are and what we need to do with them. There
are, in fact, two sets in the conclusion, the set of solutions, and the set of x and y pairs.
We dene them formally as follows.
Complete solution Let S = (x, y) [ x, y Z, ax +by = c
Proposed solution Let T = (x, y) [ x = x
0
+
b
d
n, y = y
0
a
d
n, n Z
The conclusion of LDET 2 is S = T.
How do we show that two sets are equal? Two sets S and T are equal if and only if S T
and T S. That is, at the risk of being repetitive, to establish that S = T we must show
two things.
1. S T and
2. T S
Normally one of the two is easy and the other is harder.
Suppose we want to show S T. How do universal quantiers gure in? Showing that
S T is equivalent to the following statement.
S T if and only if, for every member s S, s T.
If you prefer symbolic notation you could write s S, s T or s S s T.
What are the components of the universal quantier?
Quantier:
Variable: s
Domain: S
Open sentence: s T
160
Chapter 22 Linear Diophantine Equations:
All Solutions
The Select Method works perfectly in these situations.
As frequently as sets are used, they are usually implicit and our rst task is to discern what
sets exist and how they are used. Lets return to the proof of LDET 2 where our sets are:
Complete solution Let S = (x, y) [ x, y Z, ax +by = c
Proposed solution Let T = (x, y) [ x = x
0
+
b
d
n, y = y
0
a
d
n, n Z
Let us discover a proof. We must keep in mind that we have two things to prove
1. S T and
2. T S
In this case, item 2 is easier so we will do it rst. How do we show that T S? We
must show that for all x T, x S. We certainly dont want to individually check every
element of T so we choose a representative element of T, one that could be replaced by any
element of T and the subsequent argument would hold. This is just the Select Method and
it provides our rst statement.
Let n
0
Z. Then (x
0
+
b
d
n
0
, y
0
a
d
n
0
) T.
To show that this element is in S we must show that the element satises the dening
property of S, that is, the element is a solution.
ax +by = a
_
x
0
+
b
d
n
0
_
+b
_
y
0
a
d
n
0
_
= ax
0
+by
0
+
ab
d
n
0
ab
d
n
0
= ax
0
+by
0
= c (by hypothesis, x = x
0
and y = y
0
is an integer solution)
And now we can conclude
(x
0
+
b
d
n
0
, y
0
a
d
n
0
) S
To show that S T we will need to recall the proposition Division by the GCD.
Proposition 2 (Division by the GCD)
Let a and b be integers. If gcd(a, b) = d ,= 0, then gcd
_
a
d
,
b
d
_
= 1
Lets begin our analysis of S T. How do we show that S T? We choose a representative
element in S and show that it is in T, that is, that it satises the dening property of T.
Specically, we must show that an arbitrary solution (x, y) has the form (x
0
+
b
d
n, y
0
a
d
n).
Section 22.2 Finding All Solutions to ax +by = c 161
Let (x, y) be an arbitrary solution. Then (x, y) S and we must show (x, y) T. Let
(x
0
, y
0
) be a particular solution to the linear Diophantine equation ax + by = c. The
existence of (x
0
, y
0
) is assured by the hypothesis. Lets do the obvious thing and substitute
both solutions into the equation.
ax + by = c
ax
0
+ by
0
= c
Eliminating c and factoring gives
a(x x
0
) = b(y y
0
)
We know that d = gcd(a, b) is a common factor of a and b so
a
d
and
b
d
are both integers.
Dividing the previous equation by d gives
a
d
(x x
0
) =
b
d
(y y
0
) (22.1)
Using Division by the GCD, gcd
_
a
d
,
b
d
_
= 1. Since
b
d
divides
a
d
(x x
0
) we know from
Coprimeness and Divisibility that
b
d
(x x
0
)
By the denition of divisibility, there exists an n Z so that
x x
0
= n
b
d
x = x
0
+
b
d
n
Substituting n
b
d
for x x
0
in Equation (22.1) yields
y = y
0
a
d
n
So every solution is of the form
(x, y) = (x
0
+
b
d
n, y
0
a
d
n)
and so
(x, y) T
A very condensed proof of Linear Diophantine Equation Theorem, Part 2 might look like
the following. Notice the lack of mention of sets.
162
Chapter 22 Linear Diophantine Equations:
All Solutions
Theorem 3 (Linear Diophantine Equation Theorem, Part 2, (LDET 2))
Let gcd(a, b) = d ,= 0. If x = x
0
and y = y
0
is one particular integer solution to the linear
Diophantine equation ax +by = c, then the complete integer solution is
x = x
0
+
b
d
n, y = y
0
a
d
n, n Z.
Proof: Substitution shows that integers of the form x = x
0
+n
b
d
, y = y
0
a
d
n, n Z are
solutions.
Now, let (x, y) be an arbitrary solution and let (x
0
, y
0
) be a particular solution to the linear
Diophantine equation ax +by = c. Then
ax + by = c
ax
0
+ by
0
= c
Eliminating c and factoring gives a(x x
0
) = b(y y
0
) (1). Dividing by d and using
Division by the GCD and Coprimeness and Divisibility we have
b
d
(x x
0
). Hence, there
exists an n Z so that x = x
0
+
b
d
n (2). Substituting (2) in (1) gives y = y
0
a
d
n as
needed.
Exercise 1 Find all solutions to
1. 35x + 21y = 28
2. 35x 21y = 28
22.3 More Examples
1. Prove the following statement. If k and are coprime positive integers, then the
linear Diophantine equation kx y = c has innitely many solutions in the positive
integers.
Proof: Since k and are coprime, gcd(k, ) = 1. By the EEA there exist integers x
0
,
y
0
such that
kx
0
+y
0
= 1
Equivalently
kx
0
(y
0
) = 1
Multiplying by c gives
k(cx
0
) (cy
0
) = c
Section 22.4 Practice 163
so x = cx
0
and y = cy
0
is one particular solution to kx y = c. By LDET 2, the
complete solution to kx y = c is
x = cx
0
n
y = cy
0
kn
where n Z.
Since k and are positive, if we choose n < 0 then nk and n are positive. Since
we want
x = cx
0
n > 0 and y = cy
0
kn > 0
we must have
n <
cx
0
and n <
cy
0
k
Thus
x = cx
0
n
y = cy
0
kn
for n < min
_
cx
0
,
cy
0
k
_
gives innitely many positive integer solutions to
kx y = c.
22.4 Practice
1. Solve the following problems.
(a) Find the complete solution to 7x + 11y = 3.
(b) Find the complete solution to 35x 42y = 14.
(c) Find the complete solution to 28x + 60y = 10.
(d) For what value of c does 8x+5y = c have exactly one solution where both x and
y are strictly positive?
2. Let a, b, c Z. Consider the following statement:
For every integer x
0
, there exists an integer y
0
such that ax
0
+by
0
= c.
(a) Determine conditions on a, b, c such that the statement is true if and only if these
conditions hold. State and prove this if and only if statement.
(b) Using part (a), write down one set of values for a, b, c for which the statement is
false.
(c) Write down the negation of the statement without using any form of the word
not (the symbol ,= is acceptable).
(d) Prove that the negated statement of part (c) is true for the set of values you have
chosen in part (b).
3. Let a, b, c, n Z. Consider the following two linear Diophantine equations:
ax +by = c (22.2)
ax +by = nc (22.3)
Let S and T be the set of all integer solutions to equations (22.2) and (22.3) respec-
tively. The following set S
= (nx
0
, ny
0
) [ (x
0
, y
0
) S.
164
Chapter 22 Linear Diophantine Equations:
All Solutions
(a) Prove that S
, b, b
Z. If a a
(mod m) and b b
+b
(mod m)
2. a b a
(mod m)
3. ab a
(mod m)
168 Chapter 23 Congruence
This proposition allows us to perform substitutions of congruent values. We will discover a
proof of the third part and leave the rst two parts as exercises.
As usual we begin by identifying the hypothesis and the conclusion.
Hypothesis: a a
(mod m) and b b
(mod m)
Conclusion: ab a
(mod m)
Lets consider the question How do we show that two numbers are congruent to one
another? The obvious abstract answer is Use the denition of congruent. We may want
to keep in mind, however, that there are several equivalent forms.
a b (mod m)
m [ (a b)
k Z a b = km
k Z a = km+b
It is not at all clear which is best or whether, in fact, several could work. Since the
conclusion of part three involves the arithmetic operation of multiplication, and we dont
have multiplication properties for equivalence or divisibility, it makes sense to consider
either the third or fourth of the equivalent forms. There isnt much to separate them. Ill
choose the last form and see how it works. So, the answer to How do we show that two
numbers are congruent to one another? in the notation of this proof is We must nd an
integer k so that ab = km+a
, ab a
(mod m).
The problem is how to nd k. There is no obvious way backwards here so lets start working
forward. The two hypotheses a a
(mod m) and b b
(1).
2. Since b b
(2).
3. To be completed.
4. Since there exists k so that ab = km+a
, ab a
(mod m).
Section 23.3 Elementary Properties 169
But now there seems to be a rather direct way to produce an ab and an a
which we want
for the conclusion. Just multiply equations (1) and (2) together. Doing that produces
ab = m
2
jh +mjb
+a
mh +a
= (mjh +jb
+a
h)m+a
If we let k = mjh + jb
+ a
(1).
2. Since b b
(2).
3. Multiplying (1) by (2) gives ab = m
2
jh+mjb
+a
mh+a
= (mjh+jb
+a
h)m+a
.
4. Since there exists k so that ab = km+a
, ab a
(mod m).
Lastly, we write a proof. Note that the reader of the proof is expected to be familiar with
the equivalent forms.
Proof: Since a a
(1). Since
b b
+a
mh +a
= (mjh +jb
+a
h)m+a
.
Since mjh +jb
+a
h is an integer, ab a
(mod m).
Exercise 1 Prove the remainder of the Properties of Congruence proposition.
There are four arithmetic operations with integers, but analogues to only three have been
given. It turns out that division is problematic. A statement of the form
ab ab
(mod m) b b
(mod m)
seems natural enough, simply divide by a. This works with the integer equation ab = ab
.
But consider the case where m = 12, a = 6, b = 3 and b
d|n
d
That is, n maps to the sum of the divisors of n.
(c) Let f : Z
7
Z
7
be dened by f(x) = [3]x.
2. Prove the following statement: If f and g are bijections, then f g is a bijection.
Chapter 32
Counting
32.1 Objectives
The content objectives are:
1. Dene what it means for two sets to have the same cardinality.
2. State and prove the Cardinality of Disjoint Sets.
3. State and prove the Cardinality of Intersecting Sets.
32.2 African Shepherds
Many, many years ago, I lived high up in the mountains of southern Africa. Herd boys
would be sent with their ocks of sheep and goats to the high pastures to allow the animals
to graze. The herd boys were uneducated, and very few knew how to count. So, how did
they know if they had the right number of animals at any given time? An animal might
get lost at night, be out of sight among the ridges during the day, or be taken by jackals.
Before the herd boys were sent out from their family compounds they would be given a
very small bag that contained pebbles, one pebble for each animal. So, to count the
animals, they would simply match up a pebble against each animal they could see. If there
were more pebbles than animals, an animal was missing. If there were more animals than
pebbles, another animal had joined their ock, presumably from a nearby herd. If there
was exactly one pebble for each animal, the herd boy had the correct number of animals.
The herd boys counted by forming a bijection between the set of pebbles in their bag
and the set of animals in their ock. When we count by saying 1, 2, 3, . . . we are creating
a bijection between a subset of the integers and the set of objects we are counting. Now,
how do we formalize this idea?
225
226 Chapter 32 Counting
32.3 What Does It Mean To Count?
Recall that we used the notation [S[ to mean the cardinality, or number of elements, in the
set S. Now it is time to be clear about what that really means.
Denition 32.3.1
Cardinality
If there exists a bijection between the sets S and T, we say that the sets have the same
cardinality and we write [S[ = [T[.
Let N
n
denote the set of all natural numbers less than or equal to n.
N
0
=
N
1
= 1
N
2
= 1, 2
N
3
= 1, 2, 3
N
n
= 1, 2, 3, . . . , n
Denition 32.3.2
Number of
Elements, Finite,
Innite
If there exists a bijection between a set S and N
n
, we say that the number of elements
in S is n, and we write [S[ = n. Moreover, we also say that S is a nite set. If no bijection
exists between a set S and N
n
, we say that S is an innite set.
This formal denition corresponds exactly to what herd boys do with pebbles, what children
do when counting on ngers, and what we do when counting with the words one, two,
three. This denition extends the bijection notion to innite sets as well, but that extension
brings some weirdness which we will see next lecture.
32.4 Showing That A Bijection Exists
To show that [S[ = [T[ using a bijection is equivalent to proving a proposition of the
following form.
Proposition 1 Let S = . . . Let T = . . . Then there exists a bijection f : S T. Hence, [S[ = [T[.
The presence of an existential quantier in the conclusion suggests we use the Construct
Method. Lets begin by identifying the parts of the quantied sentence.
Quantier:
Variable: f
Domain: all functions from S to T
Open sentence: f : S T is a bijection.
Section 32.5 Finite Sets 227
To show that the open sentence is true, we must show that f is a bijection, that is, we must
show that f is surjective and injective. So any proof that [S[ = [T[ which uses bijections
will have the following structure.
Proof in Progress
1. Consider the rule f : S T dened by f(s) = to be completed.
2. We show that f is a function. This shows f is in the domain.
3. We show that f is surjective. To be completed.
4. We show that f is injective. To be completed.
5. Hence, f : S T is a bijection and [S[ = [T[.
Since we already know how to handle Sentences 2 4, we can produce a more complete
structure.
Proof in Progress
1. Consider the rule f : S T dened by f(s) = to be completed.
2. We show that f is a function. Since a function is dened by unique values for elements
in the domain, we use either of the uniqueness methods. For example: Let s S and
let t
1
= f(s) and t
2
= f(s) where t
1
,= t
2
. Derive a contradiction.
3. We show that f is surjective. Let t T. Consider s = to be completed. We show that
s S to be completed. Now we show that f(s) = t to be completed.
4. We show that f is injective. Let s
1
, s
2
S and suppose that f(s
1
) = f(s
2
). Now we
show that s
1
= s
2
to be completed.
5. Hence, f : S T is a bijection and [S[ = [T[.
The structure contains three parts which are, in themselves, proofs: a proof that f is a
function, a proof that f is surjective, and a proof that f is injective.
We should emphasize that bijections are not the only way to show that two sets have the
same cardinality. We can use bijections to establish propositions which are simpler to work
with, and then use the propositions.
32.5 Finite Sets
We begin by proving two fundamental theorems about counting and sets for which you
probably already have an intuitive understanding but may never have proved.
Denition 32.5.1
Disjoint
Sets S and T are disjoint if S T = .
228 Chapter 32 Counting
Proposition 2 (Cardinality of Disjoint Sets (CDS))
If S and T are disjoint nite sets, then
[S T[ = [S[ +[T[
A simple example can be taken from any room in any building. If S is a set of m chairs in
the room, and T is a set of n tables in the room, then the number of tables and chairs is
m+n.
Before we read a proof of the Cardinality of Disjoint Sets, it is important to keep two things
in mind. First, we are proving a statement about set cardinality, not a statement about
set equality. Second, to establish basic properties of set cardinality we must work with
bijections.
The intuitive idea underlying the proof is very simple. Count the rst m elements in S, and
then continue counting the next n elements in T. As you will see, a formal proof is more
complicated. Note how closely the proof follows the structure described in the previous
section.
Proof: (For reference, each sentence of the proof is written on a separate line.)
1. Since S is a nite set, there exists a bijection f : S N
m
for some non-negative
integer m, and [S[ = m.
2. Since T is a nite set, there exists a bijection g : T N
n
for some non-negative
integer n, and [T[ = n.
3. Construct a rule h : S T N
m+n
as follows.
h(x) =
_
f(x) if x S
g(x) +m if x T
4. To show that h is a function, suppose there exist x S T and y
1
, y
2
N
m+n
such
that h(x) = y
1
and h(x) = y
2
and y
1
,= y
2
. Because the sets S and T are disjoint, x
can only be in one of S or T. If x S, then y
1
= h(x) = f(x) and y
2
= h(x) = f(x).
Since f is a function, f(x) is unique. But then y
1
= f(x) = y
2
, a contradiction. If
x T, then y
1
= h(x) = g(x) + m and y
2
= h(x) = g(x) + m. Since g is a function,
g(x) is unique. But then y
1
= g(x) +m = y
2
, a contradiction.
5. To show that h is surjective, let y N
m+n
. If y m, then because f is surjective,
there exists an element x S so that f(x) = y, hence h(x) = y. If m+1 y m+n,
then because g is surjective, there exists an element x T so that g(x) = y m and
so h(x) = (y m) +m = y.
6. To show that h is injective, let x
1
, x
2
S T and suppose that h(x
1
) = h(x
2
). If
h(x) m then h(x) = f(x) so if h(x
1
) m we have
h(x
1
) = h(x
2
) f(x
1
) = f(x
2
)
But since f is a bijection f(x
1
) = f(x
2
) implies x
1
= x
2
as needed.
Section 32.5 Finite Sets 229
If h(x) > m then h(x) = g(x) so if h(x
1
) > m we have
h(x
1
) = h(x
2
) g(x
1
) +m = g(x
2
) +m g(x
1
) = g(x
2
)
But since g is a bijection g(x
1
) = g(x
2
) implies x
1
= x
2
as needed.
Since h is a function which is both injective and surjective, h is bijective.
7. Thus
[S T[ = [N
m+n
[ = m+n = [N
m
[ +[N
n
[ = [S[ +[T[
Lets spend some time analyzing the proof.
Analysis of Proof As usual, we begin with the hypothesis and the conclusion.
Hypothesis: S and T are disjoint nite sets
Conclusion: [S T[ = [S[ +[T[
Sentence 1 Since S is a nite set, there exists a bijection f : S N
m
for some non-
negative integer m, and [S[ = m.
This makes use of the hypothesis and the denition of N
m
. The second sentence is
similar.
Sentence 2 Since T is a nite set, there exists a bijection g : T N
n
for some non-
negative integer n, and [T[ = n.
Sentence 3 Before looking at Sentence 3, we are going to skip ahead to the last sentence.
Fortunately, when reading a proof we are free to do that. This last sentence drives
what we need to do. Sentence 3 constructs a rule h : S T N
m+n
. How are we
going to use h?
[S T[ = [N
m+n
[ because of the bijection h
= m+n from the cardinality of the nite set N
m+n
= [N
m
[ +[N
n
[ from the cardinality of the nite sets N
m
and N
n
= [S[ +[T[ because of the bijections f and g
The rst equality sign relies on the bijection h. All of the remaining equality signs
can be justied from the denition of N
a, b N, gcd(a, b) = 1
_
Then [Q
>0
[ = [N[.
To prove this we will make use of the following proposition, which is not dicult to prove,
but requires some facts not yet covered in the course.
Proposition 4 ( Even-Odd Factorization of Natural Numbers (EOFNN) )
Any natural number n can be written uniquely as n = 2
i
q where i is a non-negative integer
and q is an odd natural number.
Example 1 Here are some examples of the Even-Odd Factorization of Natural Numbers.
60 = 2
2
15
64 = 2
6
1
65 = 2
0
65
Here is a proof that [Q
>0
[ = [N[. Notice how closely it follows the proof structure that we
have been using.
Proof: (For reference, each sentence of the proof is written on a separate line.)
1. Consider the rule f : Q
>0
N dened by f(a/b) = 2
a1
(2b 1).
2. We show that f is a function. Let a/b Q
>0
and let t
1
= f(a/b) and t
2
= f(a/b)
where t
1
,= t
2
. Since gcd(a, b) = 1, a/b is the unique representative of fractions equal
to a/b. Hence, t
1
= f(a/b) = 2
a1
(2b 1) = t
2
, contradicting the assumption that
t
1
,= t
2
.
Section 33.4 Not All Innite Sets Have The Same Cardinality 235
3. We show that f is surjective. Let t N. By the Even-Odd Factorization of Natural
Numbers, t = 2
i
q where i is a non-negative integer and q is an odd natural number.
Since q is odd, there exists a natural number b such that q = 2b 1. If t is odd then
t = 2
0
(2b 1) and f(1/b) = t. If t is even then there exists a natural number a so
that t = 2
a1
(2b 1) and f(a/b) = t.
4. We show that f is injective. Let a/b, c/d Q
>0
and suppose that f(a/b) = f(c/d).
But then
2
a1
(2b 1) = 2
c1
(2d 1) (2
a1
= 2
c1
) and (2b 1 = 2d 1)
(a = c) and (b = d)
a
b
=
c
d
as required.
5. Hence, f : Q
>0
N is a bijection and [Q
>0
[ = [N[.
You might well ask, do all innite sets have the same size? The surprising answer is no.
33.4 Not All Innite Sets Have The Same Cardinality
Recall that (0, 1) denotes the open interval of real numbers between 0 and 1. That is
(0, 1) = x R [ 0 < x < 1
Proposition 5 ([N[ , = [(0, 1)[)
The set of natural numbers and the open interval (0, 1) of real numbers do not have the
same cardinality. That is, [N[ , = [(0, 1)[
Proof: By way of contradiction, assume that [N[ = [(0, 1)[. But then some bijection
f : N [(0, 1)[ must exist. Write each element of [(0, 1)[ as an innite decimal and list all
of the real numbers in (0, 1) as follows.
f(1) = 0.a
11
a
12
a
13
a
14
. . .
f(2) = 0.a
21
a
22
a
23
a
24
. . .
f(3) = 0.a
31
a
32
a
33
a
34
. . .
.
.
.
f(n) = 0.a
n1
a
n2
a
n3
a
n4
. . .
.
.
.
Construct the real number c = 0.c
1
c
2
c
3
c
4
. . . as follows. For c
i
, choose any digit from
1, 2, 3, . . . , 8 with the property that c
i
,= a
ii
. The number c does not end in an innite
sequence of 0s or 9s so has only one decimal representation (a subtlety that requires its
own explanation in another course). The real number c appears nowhere in the list since it
diers from f(i) in position i for every i.
But then f is not surjective, hence not bijective which contradicts our assumption.
236 Chapter 33 Cardinality of Innite Sets
This chapter raises a whole set of questions about innite sets.
How many innities are there?
Can we say that the cardinality of one innite set is less than or greater than another
innite set?
Can there be innite sets whose cardinality lies between that of other innite sets of
distinct cardinalities?
How does one construct new innite sets?
These are very interesting questions with even more interesting answers. Unfortunately, the
questions and answers will have to be left to another course.
Chapter 34
Practice, Practice, Practice:
Bijections and Cardinality
34.1 Objectives
This class provides an opportunity to practice working with bijections and cardinality.
34.2 Worked Examples
Example 1 For each of the following functions, determine if the function is a surjection, injection, or
bijection.
1. f : R R dened by f(x) = e
x
.
Solution: This function is not surjective. Consider the real number 1. Since
f(x) > 0 for all x R, there is no real number x
0
so that f(x
0
) = 1. To show
that this function is injective, let x
1
, x
2
R and suppose that e
x
1
= e
x
2
. Taking the
natural log of both sides gives ln(e
x
1
) = ln(e
x
2
) which implies that x
1
= x
2
. Since f
is not surjective, it is not bijective.
2. f : R (0, +) dened by f(x) = e
x
.
Solution: To show that this function is surjective, let y (0, +). Consider
x
0
= ln y. Now x
0
R and f(x
0
) = e
x
0
= e
ln y
= y. To show that this function is
injective, let x
1
, x
2
R and suppose that e
x
1
= e
x
2
. Taking the natural log of both
sides gives ln(e
x
1
) = ln(e
x
2
) which implies that x
1
= x
2
. Since f is both surjective
and injective, f is bijective.
3. Let p be a prime and let f : Z
p
Z
p
be dened by f(x) = [3]x.
Solution: Since p is a prime, [3] has an inverse by the corollary Existence of Inverses
in Z
p
. To show that this function is surjective, let y Z
p
. Consider x
0
= [3]
1
y.
Now x
0
Z
p
and f(x
0
) = [3]([3]
1
y) = ([3][3]
1
)y = y. To show that this function
is injective, let x
1
, x
2
Z
p
and suppose that [3]x
1
= [3]x
2
. Multiplying both sides
by [3]
1
gives [3]
1
([3]x
1
) = [3]
1
([3]x
2
) which implies that x
1
= x
2
. Since f is both
surjective and injective, f is bijective.
237
238 Chapter 34 Practice, Practice, Practice: Bijections and Cardinality
4. f : Z Z
7
dened by f(x) = [x].
Solution: Recall that Z
7
= [0], [1], [2], [3], [4], [5], [6]. Since f(i) = [i] for
i = 0, 1, 2, 3, 4, 5, 6, f is surjective. This function is not injective since 0 and 7 both
map to [0]. Since f is not injective, it is not bijective.
5. f : N N where d(n) is the number of natural number divisors of n.
Solution: To show that this function is surjective, let y N. Since the natural
number 2
y1
has the y divisors 2
0
, 2
1
, 2
2
, . . . , 2
y1
, f(2
y1
) = y so f is surjective.
This function is not injective since d(2) = d(3) = 2. Since f is not injective, it is not
bijective.
Example 2 Let S denote the set of all nite subsets of the natural numbers. Let D(n) denote the set of
all natural number divisors of n. Thus, D(12) = 1, 2, 3, 4, 6, 12. Is the function f : N S
dened by D(n) a surjection?
Solution: D is not a surjection. Consider any set without the element 1, T = 2, 3 for
example. Suppose there exists an integer n so that D(n) = T. Since 1 [ n, 1 must be in T,
but it is not. Hence, no natural number can map to T.
Example 3 Prove the following proposition.
Proposition 1 Let S, T, U be sets. If [S[ = [T[ and [T[ = [U[, then [S[ = [U[.
Proof: Since [S[ = [T[, there exists a bijection f : S T. Since [T[ = [U[, there exists a
bijection g : T U. By Proposition 5 in Section 31.2.4, g f : S U is a bijection from
S to U so [S[ = [U[.
Part VI
Complex Numbers and Eulers
Formula
239
Chapter 35
Complex Numbers
35.1 Objectives
The content objectives are :
1. N Z Q R C
2. Dene: complex number, C, real part, imaginary part
3. Operations: complex addition, complex multiplication, equality of complex numbers
4. State and prove properties of complex numbers.
35.2 Dierent Equations Require Dierent Number Systems
When humans rst counted, we tallied. We literally made notches on sticks, stones and
bones. Thus the natural numbers, N, were born. But it wouldnt be long before the
necessity of fractions became obvious. One animal to be shared by four people (we will
assume uniformly) meant that we had to develop the notion of 1/4. Though it would not
have been expressed this way, the equation
4x = 1
does not have a solution in N and so we would have had to extend our notion of numbers
to include fractions, the rationals.
Q =
_
a
b
a, b Z, b ,= 0
_
This is an overstatement historically, because recognition of zero and negative numbers
which are permitted in Q were very slow to come. But even these new numbers would not
help solve equations of the form
x
2
= 2
which would arise naturally from isosceles right angled triangles. For this, the notion
of number had to be extended to include irrational numbers, which combined with the
rationals, give us the real numbers.
240
Section 35.3 Complex Numbers 241
Eventually, via Hindu and Islamic scholars, western mathematics began to recognize and
accept both zero and negative numbers. Otherwise, equations like
3x = 5x
or
2x + 4 = 0
have no solution. Thus, mathematicians recognized that
N Z Q R
but even R was inadequate because equations of the form
x
2
+ 1 = 0
had no real solutions.
And so, our number system was extended again.
35.3 Complex Numbers
Denition 35.3.1
Complex Number
A complex number z in standard formis an expression of the form x+yi where x, y R.
The set of all complex numbers is denoted by
C = x +yi [ x, y R
Example 1 Some examples are 3 +4i, 0 +5i (usually written 5i), 7 0i (usually written 7) and 0 +0i
(usually written 0).
Denition 35.3.2
Real Part,
Imaginary Part
For a complex number z = x +yi, the real number x is called the real part and is written
1(z) and the real number y is called the imaginary part and is written (z).
So 1(3 +4i) = 3 and (3 +4i) = 4. If z is a complex number where (z) = 0, we will treat
z as a real number and we will not write the term containing i. For example, z = 3 + 0i
will be treated as a real number and will be written z = 3. Thus
R C
and so
N Z Q R C
One has to wonder how much further the number system needs to be extended!
Denition 35.3.3
Equality
The complex numbers z = x +yi and w = u +vi are equal if and only if x = u and y = v.
242 Chapter 35 Complex Numbers
Denition 35.3.4
Addition
Addition is dened as
(a +bi) + (c +di) = (a +c) + (b +d)i
Example 2
(1 + 7i) + (2 3i) = (1 + 2) + (7 3)i = 3 + 4i
Denition 35.3.5
Multiplication
Multiplication is dened as
(a +bi) (c +di) = (ac bd) + (ad +cb)i
Example 3 Lets begin with what is really the dening property of C.
i i = (0 + 1i) (0 + 1i) = (0 0 1 1) + (0 1 + 0 1)i = 1
This property that i
2
= 1 is what gives complex numbers their strangeness and their
strength. In the next example, note that the denition of multiplication coincides exactly
with the usual binomial multiplication where i
2
is replaced by 1.
(1 + 7i) (2 3i) = (1 2 7 (3)) + (1 (3) + 7 2)i = 23 + 11i
The multiplication symbol is usually omitted and we write zw or (a +bi)(c +di).
Exercise 1 Let u = 3 +i and v = 2 7i. Compute
1. u +v
2. u v
3. uv
4. u
2
v
5. u
3
6.
v
u
(write the solution in the form x +yi where x, y R)
Solution:
1. u +v = (3 +i) + (2 7i) = 5 6i
2. u v = (3 +i) (2 7i) = 1 + 8i
3. uv = (3 +i)(2 7i) = (6 (7)) + (21 + 2)i = 13 19i
4. u
2
v = (3 +i)
2
(2 7i) = (3 +i)((3 +i)(2 7i)) = (3 +i)(13 19i) = 58 44i
Section 35.3 Complex Numbers 243
5. u
3
= (3 +i)
3
= (3 +i)
2
(3 +i) = (8 + 6i)(3 +i) = 18 + 26i
6.
v
u
=
2 7i
3 +i
=
2 7i
3 +i
3 i
3 i
=
1 23i
10
=
1
10
+
23
10
i
Exercise 2 Compute
1. i
4k
for any non-negative integer k
2. i
4k+1
for any non-negative integer k
3. i
4k+2
for any non-negative integer k
4. i
4k+3
for any non-negative integer k
Solution:
1. i
4k
= 1 for any non-negative integer k
2. i
4k+1
= i for any non-negative integer k
3. i
4k+2
= 1 for any non-negative integer k
4. i
4k+3
= i for any non-negative integer k
The usual properties of associativity, commutativity, identities, inverses and distributivity
that we associate with rational and real numbers also apply to complex numbers.
Proposition 1 Let u, v, z C. Then
1. Associativity of addition: (u +v) +z = u + (v +z)
2. Commutativity of addition: u +v = v +u
3. Additive identity: 0 = 0 + 0i has the property that z + 0 = z
4. Additive inverses: If z = x +yi then there exists an additive inverse of z, written z
with the property that z+(z) = 0. The additive inverse of z = x+yi is z = xyi.
5. Associativity of multiplication: (u v) z = u (v z)
6. Commutativity of multiplication: u v = v u
7. Multiplicative identity: 1 = 1 + 0i has the property that z 1 = z whenever z ,= 0.
8. Multiplicative inverses: If z = x + yi ,= 0 then there exists a multiplicative inverse
of z, written z
1
, with the property that z z
1
= 1. The multiplicative inverse of
z = x +yi is z
1
=
xyi
x
2
+y
2
.
9. Distributivity: z (u +v) = z u +z v
244 Chapter 35 Complex Numbers
We will only prove the eighth property.
Proof: We only need to demonstrate that
x yi
x
2
+y
2
is well-dened and that
x +yi
x yi
x
2
+y
2
= 1
Since z ,= 0, x
2
+ y
2
,= 0 and so
x yi
x
2
+y
2
is well-dened. Now we simply use complex
arithmetic.
x +yi
x yi
x
2
+y
2
=
x
2
+xy xy y
2
i
2
x
2
+y
2
=
x
2
+y
2
x
2
+y
2
= 1
Section 35.4 More Examples 245
35.4 More Examples
1. Let z = 3+4i, u = 12i and w = 3i. Express each of the following in standard form.
(a) z + 3u wi
(b) z/u
Solution:
(a) z + 3u wi = (3 + 4i) + (3 6i) + (3) = 9 2i
(b)
z
u
=
3 + 4i
1 2i
=
3 + 4i
1 2i
1 + 2i
1 + 2i
=
5 + 10i
5
= 1 + 2i
Chapter 36
Properties Of Complex Numbers
36.1 Objectives
The content objectives are:
1. Dene conjugate and modulus
2. State and prove several properties of complex numbers.
36.2 Conjugate
Denition 36.2.1
Conjugate
The complex conjugate of z = x +yi is the complex number
z = x yi
The conjugate of z = 2 + 3i is z = 2 3i.
Proposition 1 (Properties of Conjugates (PCJ))
If z and w are complex numbers, then
1. z +w = z +w
2. zw = z w
3. z = z
4. z +z = 21(z)
5. z z = 2i(z)
We will prove the rst of these properties and leave the remainder as exercises.
246
Section 36.2 Conjugate 247
Proof: Let z = x +yi and w = u +vi. Then
z +w = (x +yi) + (u +vi) (substitution)
= (x +u) + (y +v)i (defn of addition)
= (x +u) (y +v)i (defn of conjugate)
= (x yi) + (u vi) (Properties of Addn and Mult)
= z +w (defn of conjugate)
Exercise 1 Prove each of the remaining parts of the Properties of Conjugates proposition.
Example 1 Prove: Let z C. The complex number z is a real number if and only if z = z.
Solution: Let z = x +yi.
z is real (z) = 0 (from the previous lecture)
y = 0
x + 0i = x 0i
z = z
Exercise 2 Prove: Let z C and z ,= 0. The complex number z is purely imaginary (1(z) = 0) if and
only if z = z.
Exercise 3 Let w and z be complex numbers in standard form. Prove that
_
1
w
_
=
1
w
and hence
_
z
w
_
=
z
w
248 Chapter 36 Properties Of Complex Numbers
Example 2 For z ,= i dene
w =
z +i
z i
Prove that w is a real number if and only if z is zero or purely imaginary.
Solution:
w is real w = w
z +i
z i
=
_
z +i
z i
_
z +i
z i
=
z i
z +i
zz 1 + (z +z)i = zz 1 (z +z)i
2i(z +z) = 0
z +z = 0
21(z) = 0
1(z) = 0
z is zero or purely imaginary
36.3 Modulus
Denition 36.3.1
Modulus
The modulus of the complex number z = x +yi is the non-negative real number
[z[ = [x +yi[ =
_
x
2
+y
2
Example 3 The modulus of z = 2 5i is [z[ =
_
(2
2
) + (5)
2
=
29.
Given two real numbers, say x
1
and x
2
, we can write either x
1
x
2
or x
2
x
1
. However,
given two complex numbers, z
1
and z
2
, we cannot meaningfully write z
1
z
2
or z
2
z
1
.
But since the modulus of a complex number is a real number, we can meaningfully write
[z
1
[ [z
2
[. The modulus gives us a means to compare the magnitude of two complex
numbers, but not compare the numbers themselves.
If (z) = 0, then the modulus corresponds to the absolute values of real numbers.
Section 36.4 More Examples 249
Proposition 2 (Properties of Modulus (PM))
If z and w are complex numbers, then
1. [z[ = 0 if and only if z = 0
2. [z[ = [z[
3. zz = [z[
2
4. [zw[ = [z[[w[
5. [z +w[ [z[ +[w[. This is the triangle inequality.
Exercise 4 Prove each of the parts of the Properties of Modulus proposition.
36.4 More Examples
1. Find all z C which satisfy z = z
2
.
Solution: Let z = x + yi with x, y R. Then z = z
2
gives x yi = (x + yi)
2
or
x yi = (x
2
y
2
) + 2xyi. Equating real and imaginary parts we have
x = x
2
y
2
y = 2xy
From the second equation we get
2xy +y = 0 y(2x + 1) = 0 y = 0 or x =
1
2
If y = 0 then the rst equation gives
x = x
2
x
2
x = 0 x(x 1) = 0 x = 0 or x = 1
If x =
1
2
then the rst equation gives
1
2
=
1
4
y
2
y
2
=
3
4
y =
3
2
Thus, the solutions are
0, 1,
1
2
+
3
2
i,
1
2
3
2
i
250 Chapter 36 Properties Of Complex Numbers
36.5 Practice
1. Let z be a complex number. Prove that [z[
n
= [z
n
[ for any positive integer n.
2. Find all z C which satisfy
(a) z
2
+ 2z + 1 = 0
(b) z
2
+ 2z + 1 = 0
(c) z
2
=
1 +i
1 i
.
3. Let a, b, c C. Prove: If [a[ = [b[ = [c[ = 1, then a +b +c =
1
a
+
1
b
+
1
c
.
4. Let z C, z ,= i. Prove that
z
1 +z
2
is real if and only if z is real or [z[ = 1.
Chapter 37
Graphical Representations of
Complex Numbers
37.1 Objectives
The content objectives are:
1. Dene complex plane, polar coordinates, polar form.
2. Convert between Cartesian and polar form.
3. Multiplication in polar form.
37.2 The Complex Plane
37.2.1 Cartesian Coordinates (x, y)
Denition 37.2.1
Complex Plane
The notation z = x + yi suggests a non-algebraic representation. Each complex number
z = x + yi can be thought of as a point (x, y) in a plane with orthogonal axes. Label one
axis the real axis and the other axis the imaginary axis. The complex number z = x+yi
then corresponds to the point (x, y) in the plane. This interpretation of the plane is called
the complex plane or the Argand plane.
251
252 Chapter 37 Graphical Representations of Complex Numbers
Figure 37.2.1: The Complex Plane
Exercise 1 Plot the following points in the complex plane.
1. 4 +i
2. 2 + 3i
3. 2 i
37.2.2 Modulus
Recall that the modulus of the complex number z = x+yi is the non-negative real number
[z[ = [x +yi[ =
_
x
2
+y
2
There are a couple of geometric points to note about the modulus of z = x + yi. The
Pythagorean Theorem is enough to prove that [z[ is the distance from the origin to z in
the complex plane, and that the distance between z and w = u + vi is just [z w[ =
_
(x u)
2
+ (y v)
2
.
Exercise 2 Sketch all of the points in the complex plane with modulus 1.
37.3 Polar Representation
There is another way to represent points in a plane which is very useful when working with
complex numbers. Instead of beginning with the origin and two orthogonal axes, we begin
with the origin O and a polar axis which is a ray leaving from the origin. The point P(r, )
is plotted so that the distance OP is r, and the counter clockwise angle of rotation from
the polar axis, measured in radians, is .
Note that this allows for multiple representations since (r, ) identies the same point as
(r, + 2k) for any integer k.
The obvious problem is how to go from one to the other.
Section 37.4 Converting Between Representations 253
Figure 37.3.1: Polar Representation
37.4 Converting Between Representations
Simple trigonometry allows us to convert between polar and Cartesian coordinates.
Figure 37.4.1: Connecting Polar and Cartesian Representations
Given the polar coordinates (r, ), the corresponding Cartesian coordinates (x, y) are
x = r cos
y = r sin
Given the Cartesian coordinates (x, y), the corresponding polar coordinates are determined
by
r =
_
x
2
+y
2
cos =
x
r
sin =
y
r
254 Chapter 37 Graphical Representations of Complex Numbers
Example 1 Here are points in standard form, Cartesian coordinates and polar coordinates.
Standard Form Cartesian Coordinates Polar Coordinates
1 +i (1, 1) (
2, 3/4)
1
3i (1,
3) (2, 4/3)
1 (1, 0) (1, 0)
Exercise 3 For each of the following polar coordinates, plot the point and convert to Cartesian coordi-
nates.
1. (1, 0)
2. (2, /2)
3. (3, )
4. (2, 7/2)
5. (4, /4)
6. (4, 4/3)
Exercise 4 For each of the following Cartesian coordinates, plot the point and convert to polar coordi-
nates.
1. (1, 0)
2. (0, 1)
3. (1, 0)
4. (0, 1)
5. (1, 1)
6. (1, 1)
7. (2, 2
3)
From our earlier description of conversions, we can write the complex number
z = x +yi
as
z = r cos +ri sin = r(cos +i sin )
Section 37.4 Converting Between Representations 255
Denition 37.4.1
Polar Form
The polar form of a complex number z is
z = r(cos +i sin )
where r is the modulus of z and the angle is called an argument of z.
Example 2 The following are representations of complex numbers in both standard and polar form.
1. 1 = cos 0 +i sin 0
2. 1 +i =
2
_
cos
3
4
+i sin
3
4
_
3. 1
3i = 2
_
cos
4
3
+i sin
4
3
_
One of the advantages of polar representation is that multiplication becomes very straight-
forward.
Proposition 1 (Polar Multiplication of Complex Numbers (PMCN))
If z
1
= r
1
(cos
1
+ i sin
1
) and z
2
= r
2
(cos
2
+ i sin
2
) are two complex numbers in polar
form, then
z
1
z
2
= r
1
r
2
(cos(
1
+
2
) +i sin(
1
+
2
))
Example 3
2
_
cos
3
4
+i sin
3
4
_
2
_
cos
4
3
+i sin
4
3
_
= 2
2
_
cos
_
3
4
+
4
3
_
+i sin
_
3
4
+
4
3
__
= 2
2
_
cos
_
25
12
_
+i sin
_
25
12
__
= 2
2
_
cos
_
12
_
+i sin
_
12
__
Proof:
z
1
z
2
= r
1
(cos
1
+i sin
1
) r
2
(cos
2
+i sin
2
)
= r
1
r
2
((cos
1
cos
2
sin
1
sin
2
) +i(cos
1
sin
2
+ sin
1
cos
2
))
= r
1
r
2
(cos(
1
+
2
) +i sin(
1
+
2
))
Chapter 38
De Moivres Theorem
38.1 Objectives
The content objectives are:
1. State and prove De Moivres Theorem and do examples.
2. Derive Eulers Formula.
38.2 De Moivres Theorem
De Moivres Theorem dramatically simplies exponentiation of complex numbers.
Theorem 1 (De Moivres Theorem (DMT))
If R and n Z, then
(cos +i sin )
n
= cos n +i sin n
Example 1 Consider the complex number
z = 1/
2 +i/
2
which, in polar form is
z = cos /4 +i sin /4
By De Moivres Theorem,
z
10
= (cos /4 +i sin /4)
10
= cos 10/4 +i sin 10/4 = cos /2 +i sin /2 = i.
256
Section 38.2 De Moivres Theorem 257
Proof: We will prove DeMoivres Theorem using three cases.
1. n = 0
2. n > 0
3. n < 0
For the case n = 0, DeMoivres Theorem reduces to (cos + i sin )
0
= cos 0 + i sin 0. By
convention z
0
= 1 so the left hand side of the equation is 1. Since cos 0 = 1 and sin 0 = 0,
the right hand side also evaluates to 1.
For the case n > 0 we will use induction.
P(n): (cos +i sin )
n
= cos n +i sin n.
Base Case We verify that P(1) is true where P(1) is the statement
P(1): (cos +i sin )
1
= cos 1 +i sin 1.
This is trivially true.
Inductive Hypothesis We assume that the statement P(k) is true for some k 1.
P(k): (cos +i sin )
k
= cos k +i sin k.
Inductive Conclusion Now show that the statement P(k + 1) is true.
P(k + 1): (cos +i sin )
k+1
= cos(k + 1) +i sin(k + 1)
(cos +i sin )
k+1
= (cos +i sin )
k
(cos +i sin ) (by separating out one factor)
= (cos k +i sin k)(cos +i sin ) (by the Inductive Hypothesis)
= cos(k + 1) +i sin(k + 1) (Polar Multiplication)
Since P(k+1) is true, P(n) is true for all natural numbers n by the Principle of Mathematical
Induction.
Lastly, for the case n < 0 we will use complex arithmetic. Since n < 0, n = m for some
m N.
(cos +i sin )
n
= (cos +i sin )
m
=
1
(cos +i sin )
m
=
1
(cos m +i sin m)
= cos m i sin m
= cos(m) +i(sin(m))
= cos n +i sin n
258 Chapter 38 De Moivres Theorem
Corollary 2 If z = r(cos +i sin ) and n is an integer,
z
n
= r
n
(cos n +i sin n)
38.3 Complex Exponentials
If you were asked to nd a real-valued function y with the property that
dy
dx
= ky and y = 1 when x = 0
for some constant k, you would choose
y = e
kx
And if you were asked to nd the derivative of f() = cos +i sin where i was treated as
any other constant you would almost certainly write
df()
d
= sin +i cos
but then
df()
d
= sin +i cos = i(cos +i sin ) = if()
and so
df()
d
= if() and f() = 1 when = 0
Denition 38.3.1
Complex
Exponential
By analogy, we dene the complex exponential function by
e
i
= cos +i sin
As an exercise, prove the following.
Proposition 3 (Properties of Complex Exponentials (PCE))
e
i
e
i
= e
i(+)
_
e
i
_
n
= e
in
n Z
The polar form of a complex number z can now be written as
z = re
i
where r = [z[ and is an argument of z.
Section 38.5 More Examples 259
Out of this arises one of the most stunning formulas in mathematics. Setting r = 1 and
= we get
e
i
= cos +i sin = 1 + 0i = 1
That is
e
i
+ 1 = 0
Who would have believed that e, i, , 1 and 0 would have such a wonderful connection!
38.4 More Examples
1. This question asks you to compute (
3 + i)
4
in two ways. Write your answer in
standard form.
(a) Use the Binomial Theorem.
(b) Use De Moivres Theorem.
Solution:
(a) Using the Binomial Theorem we have
(
3 +y)
4
=
4
r=0
_
4
r
_
(
3)
4r
i
r
=
_
4
0
_
(
3)
40
i
0
+
_
4
1
_
(
3)
41
i
1
+
_
4
2
_
(
3)
42
i
2
+
_
4
3
_
(
3)
43
i
3
+
_
4
4
_
(
3)
44
i
4
= 9 + 4 3
3i 6 3 4i
3 + 1
= 8 + 8
3i
(b) Using De Moivres Theorem we have First, write
3
2
+ 1
2
= 2. An argument is
6
. Thus,
3 + i = 2(cos
6
+ i sin
6
). By De
Moivres Theorem
_
2
_
cos
6
+i sin
6
__
4
= 2
4
_
cos
4
6
+i sin
4
6
_
= 16
_
cos
2
3
+i sin
2
3
_
= 16
_
1
2
+
3i
2
_
= 8 + 8
3i
38.5 Practice
1. Compute (
3 3i)
4
twice: once using the Binomial Theorem and once using De
Moivres Theorem. Write your answer in standard form.
Chapter 39
Roots of Complex Numbers
39.1 Objectives
The content objectives are:
1. State and prove the Complex n-th Roots Theorem and do examples.
39.2 Complex n-th Roots
Denition 39.2.1
Complex Roots
If a is a complex number, then the complex numbers that solve
z
n
= a
are called the complex n-th roots. De Moivres Theorem gives us a straightforward way
to nd complex n-th roots of a.
Theorem 1 (Complex n-th Roots Theorem (CNRT))
If r(cos + i sin ) is the polar form of a complex number a, then the solutions to z
n
= a
are
n
r
_
cos
_
+ 2k
n
_
+i sin
_
+ 2k
n
__
for k = 0, 1, 2, . . . , n 1
The modulus
n
r is the unique non-negative n-th root of r. This theorem asserts that any
complex number, including the reals, has exactly n dierent complex n-th roots.
260
Section 39.2 Complex n-th Roots 261
Example 1 Find all the complex fourth roots of 16.
Solution: We will use the Complex n-th Roots Theorem. First, we write 16 in polar
form as
16 = 16(cos +i sin )
Using the Complex n-th Roots Theorem the solutions are
4
16
_
cos
_
+ 2k
4
_
+i sin
_
+ 2k
4
__
for k = 0, 1, 2, 3
= 2
_
cos
_
4
+
k
2
_
+i sin
_
4
+
k
2
__
for k = 0, 1, 2, 3
The four distinct roots are given below
When k = 0, z
0
= 2
_
cos
_
4
_
+i sin
_
4
__
= 2
_
1
2
+
i
2
_
=
2 +i
2
When k = 1, z
1
= 2
_
cos
_
3
4
_
+i sin
_
3
4
__
= 2
_
1
2
+
i
2
_
=
2 +i
2
When k = 2, z
2
= 2
_
cos
_
5
4
_
+i sin
_
5
4
__
= 2
_
1
2
+
i
2
_
=
2 i
2
When k = 3, z
3
= 2
_
cos
_
7
4
_
+i sin
_
7
4
__
= 2
_
1
2
+
i
2
_
=
2 i
2
Graphing these solutions is illuminating.
Figure 39.2.1: The Fourth Roots of -16
Note that the solutions are uniformly distributed around a circle whose radius is
4
16.
262 Chapter 39 Roots of Complex Numbers
Proof: As usual, when showing that a complete solution exists we work with two sets: the
set S of solutions and the set T of specic representation of the solution. We then show
that S = T by mutual inclusion. Our two sets are
S = z C [ z
n
= a
and
T =
_
n
r
_
cos
_
+ 2k
n
_
+i sin
_
+ 2k
n
__
k = 0, 1, 2, . . . , n 1
_
where a = r(cos +i sin ).
We begin by showing that T S. Let t =
n
r cos
_
+ 2k
n
_
be an element of T. Now
t
n
=
_
n
r
_
n
cos
_
+ 2k
n
_
n
= r(cos( + 2k) +i sin( + 2k)) De Moivres Theorem
= r(cos +i sin ) trigonometry
= a
Hence, t is a solution of z
n
= a, that is, t S.
Now we show that S T. Let w = s(cos +i sin ) be an n-th root of a.
Since a = r(cos +i sin ) we have
w
n
= a
(s(cos +i sin ))
n
= r(cos +i sin )
s
n
(cos n +i sin n) = r(cos +i sin ) De Moivres Theorem
Now two complex numbers in polar form are equal if and only if their moduli are equal and
their arguments dier by an integer multiple of 2. So
s
n
= r s =
n
r
and
n = 2k =
+ 2k
n
where k Z. Hence, the n-th roots of a are of the form
n
r
_
cos
_
+ 2k
n
_
+i sin
_
+ 2k
n
__
for k Z
But this is k Z, not k = 0, 1, 2, . . . , n 1. Since w is an n-th root of a, there exists an
integer k
0
so that
w =
n
r
_
cos
_
+ 2k
0
n
_
+i sin
_
+ 2k
0
n
__
If we can show that
w =
n
r
_
cos
_
+ 2k
1
n
_
+i sin
_
+ 2k
1
n
__
Section 39.3 Practice 263
if and only if k
0
k
1
(mod n) whenever r ,= 0, then w T. Now
k
0
k
1
(mod n)
k
0
k
1
= n for some Z
2k
0
2k
1
= 2n for some Z
2k
0
n
2k
1
n
= 2 for some Z
+ 2k
0
n
+ 2k
1
n
= 2 for some Z
Exercise 1 An n-th root of unity is a complex number that solves z
n
= 1. Find all of the sixth roots
of unity. Express them in standard form and graph them in the complex plane.
Exercise 2 Find the square roots of 2i. Express them in standard form and graph them in the complex
plane.
39.3 Practice
1. Find all of the cube roots of unity. Write them in standard form and plot the solutions
in the complex plane.
2. A complex number z is called a primitive n-th root of unity if z
n
= 1 and z
k
,= 1 for
all 1 k n 1.
(a) For each n = 1, 2, 3, 6, list all the primitive n-th roots of unity. (You may express
your answers in standard, polar form or exponential form.)
(b) Let z be a primitive n-th root of unity. Prove the following statements.
i. For any k Z, z
k
= 1 if and only if n [ k.
ii. For any m Z, if gcd(m, n) = 1, then z
m
is a primitive n-th root of unity.
3. Give the coordinates of a
(a) square
(b) regular pentagon
(c) regular hexagon in the complex plane.
Chapter 40
Practice, Practice, Practice:
Complex Numbers
40.1 Objectives
This class provides an opportunity to practice working with quantiers and sets.
40.2 Worked Examples
Example 1 Calculate (1 +
3i)
17
.
Solution: The size of the exponent makes the use of the Binomial Theorem impractical so
we use De Moivres Theorem. The polar form of 1 +
3i is
z = 2(cos 5/3 +i sin 3/3)
By De Moivres Theorem,
(1 +
3i)
17
= 2
17
(cos 5/3 +i sin 5/3)
17
= 2
17
(cos 85/3 +i sin 85/3)
= 2
17
(cos /3 +i sin /3)
= 2
17
(1 +
3i)
264
Section 40.2 Worked Examples 265
Example 2 Find all the cube roots of i.
Solution: We will use the Complex n-th Roots Theorem. First, we write i in polar form
as
i = cos /2 +i sin /2
Using the Complex n-th Roots Theorem the solutions are
cos
_
2
+ 2k
3
_
+i sin
_
2
+ 2k
3
_
for k = 0, 1, 2
=cos
_
+ 4k
6
_
+i sin
_
+ 4k
6
_
for k = 0, 1, 2
The three distinct roots are given below.
When k = 0, z
0
= cos
_
6
_
+i sin
_
6
_
=
3
2
+
i
2
When k = 1, z
1
= cos
_
5
6
_
+i sin
_
5
6
_
=
3
2
+
i
2
When k = 2, z
2
= cos
_
3
2
_
+i sin
_
3
2
_
= i
Example 3 Find all z C which satisfy z
2
+ 2z + 1 = 0.
Solution: Let z = x +yi where x, y R. Then
z
2
+ 2z + 1 = 0 (x
2
y
2
+ 2xyi) + 2(x yi) + 1 = 0
or
(x
2
y
2
+ 2x + 1) + (2xy 2y)i = 0
Equating real and imaginary parts we have
x
2
y
2
+ 2x + 1 = 0
2xy 2y = 0
From the second equation we get
2xy 2y = 0 2y(x 1) = 0 y = 0 or x = 1
If y = 0 then the rst equation gives
x
2
+ 2x + 1 = 0 x = 1
If x = 1 then the rst equation gives
1 y
2
+ 2 + 1 = 0 y
2
= 4 y = 2
Thus, the solutions are
1, 1 + 2i, 1 2i
Part VII
Factoring Polynomials
266
Chapter 41
An Introduction to Polynomials
41.1 Objectives
The content objectives are:
1. Dene polynomial, coecient, F[x], degree, zero polynomial, linear polynomial, quadratic
polynomial, cubic polynomial, equal, sum, dierence, product, quotient, remainder, di-
vides and factor.
2. Dene operations on polynomials.
3. State the Division Algorithm for Polynomials.
4. Do examples.
41.2 Polynomials
Our number systems were developed in response to the need to nd solutions to real poly-
nomials. We are now able to solve all equations of the form
a
2
x
2
+a
1
x +a
0
= 0
or
x
n
a
0
= 0
whether the coecients are real or complex. In fact, a great deal more is known.
Let F be a eld. Roughly speaking, a eld is a set of numbers that allows addition, subtrac-
tion, multiplication and division. The rational numbers Q, the real numbers R, the complex
numbers C and the integers modulo a prime p, Z
p
, are all elds. The integers are not a eld
because we cannot divide 2 by 4 and get an integer. Since division is just multiplication by
an inverse, Z
6
is not a eld since [3] has no inverse.
267
268 Chapter 41 An Introduction to Polynomials
Denition 41.2.1
Polynomial
A polynomial in x over the eld F is an expression of the form
a
n
x
n
+a
n1
x
n1
+ +a
1
x +a
0
where all of the a
i
belong to F.
The a
i
are called coecients. We use F[x] to denote the set of polynomials in x with
coecients from F.
Example 1
1. x
2
+ 7x 1 R[x]
2. x
3
7ix + (5 2i) C[x]
3. [3]x
5
+ [2]x
3
+ [6] Z
7
[x]
Denition 41.2.2
Degree et al
If a
n
,= 0 in the polynomial
a
n
x
n
+a
n1
x
n1
+ +a
1
x +a
0
then the polynomial is said to have degree n. The zero polynomial has all of its coecients
zero and its degree is not dened. Polynomials of degree 1 are called linear polynomials,
of degree 2, quadratic polynomials, and of degree 3 cubic polynomials.
41.3 Operations on Polynomials
We very frequently use f(x) to denote an element of F[x] and write
f(x) = a
n
x
n
+a
n1
x
n1
+ +a
1
x +a
0
=
n
i=0
a
i
x
i
Let f(x), g(x) F[x] where
f(x) = a
n
x
n
+a
n1
x
n1
+ +a
1
x +a
0
=
n
i=0
a
i
x
i
g(x) = b
n
x
n
+b
n1
x
n1
+ +b
1
x +b
0
=
n
i=0
b
i
x
i
Denition 41.3.1
Equal
The polynomials f(x) and g(x) are equal if and only if a
i
= b
i
for all i.
Polynomials can be added, subtracted and multiplied as algebraic expressions exactly as
you have done in high school.
Section 41.3 Operations on Polynomials 269
Denition 41.3.2
Sum
The sum of the polynomials f(x) and g(x) is dened as
f(x) +g(x) =
max(n,m)
i=0
(a
i
+b
i
)x
i
where deg(f(x)) = n, deg(g(x)) = m, and any missing terms have coecient zero.
Example 2
1. In R[x], if f(x) = x
2
+ 7x 1 and g(x) = 3x
4
x
3
+ 4x
2
x + 5 then
f(x) +g(x) = 3x
4
x
3
+ 5x
2
+ 6x + 4.
2. In C[x], if f(x) = x
3
7ix + (5 2i) and g(x) = (4 + 3i)x + (7 + 7i) then
f(x) +g(x) = x
3
+ (4 4i)x + (12 + 5i).
3. In Z
7
[x], if f(x) = [3]x
5
+ [2]x
3
+ [6] and g(x) = [2]x
4
+ [5]x
3
+ [2]x
2
+ [4] then
f(x) +g(x) = [3]x
5
+ [2]x
4
+ [2]x
2
+ [3].
Denition 41.3.3
Dierence
The dierence of the polynomials f(x) and g(x) is dened as
f(x) g(x) =
max(n,m)
i=0
(a
i
b
i
)x
i
where deg(f(x)) = n, deg(g(x)) = m, and any missing terms have coecient zero.
Exercise 1 Find the dierence of each of the pairs of polynomials given in Example 2.
The denition of the product of two polynomials looks more complicated than it is.
Denition 41.3.4
Product
The product of the polynomials f(x) and g(x) is dened as
f(x) g(x) =
m+n
i=0
c
i
x
i
where
c
i
= a
0
b
i
+a
1
b
i1
+ +a
i1
b
1
+a
i
b
0
=
i
j=0
a
j
b
ij
Though the denition of multiplication looks complicated, it is just collecting all of the
terms x
i
that we would get through long multiplication.
270 Chapter 41 An Introduction to Polynomials
Example 3 (Polynomial Multiplication)
In R[x], let f(x) = x
2
+7x 1 and g(x) = 3x +2. We will compute the product f(x) g(x)
using long multiplication and see how it captures the denition of multiplication just given.
x
2
+ 7x 1
3x + 2
2x
2
+ 14x 2
3x
3
+ 21x
2
3x
3x
3
+ 23x
2
+ 11x 2
The x
2
column simply displays the combinations of terms from f(x) and g(x) whose product
gives x
2
, that is x
2
2, 7x3x and 01, which is exactly what the denition would give.
Exercise 2 Find f(x)g(x) for the two polynomials given.
1. Let f(x) and g(x) be the real polynomials f(x) = 2x
4
+6x
3
x+4 and g(x) = x
2
+3.
2. Let f(z) and g(z) be the complex polynomials f(z) = iz
2
+ (3 i)z + 2i and
g(z) = iz + (2 2i).
Now we run into the same issue we had with the integers, division. Though it makes sense
to say that x3 divides x
2
9 since x
2
9 = (x3)(x+3), what do we do when there is a
remainder? Just as we had a division algorithm for integers, we have a division algorithm
for polynomials.
Proposition 1 (Division Algorithm for Polynomials (DAP))
If f(x) and g(x) are polynomials in F[x] and g(x) is not the zero polynomial, then there
exist unique polynomials q(x) and r(x) in F[x] such that
f(x) = q(x)g(x) +r(x) where deg r(x) < deg g(x) or r(x) = 0
Denition 41.3.5
Quotient,
Remainder
The polynomial q(x) is called the quotient polynomial. The polynomial r(x) is called the
remainder polynomial. If r(x) = 0, we say that g(x) divides f(x) or f(x) is a factor
of g(x) and we write g(x) [ f(x).
How do we nd the quotient and remainder polynomials? Long division.
Section 41.3 Operations on Polynomials 271
Example 4 (Long Division of Polynomials over R)
What are the quotient and remainder polynomials when f(x) = 3x
4
+ x
3
4x
2
x + 5 is
divided by g(x) = x
2
+ 1 in R[x]?
Before we begin, we would expect from the Division Algorithm for Polynomials a remainder
polynomial of degree at most one.
3x
2
+ x 7
x
2
+ 1 3x
4
+ x
3
4x
2
x + 5
3x
4
+ 3x
2
x
3
7x
2
x
x
3
+ x
7x
2
2x + 5
7x
2
7
2x + 12
Thus, the quotient polynomial is q(x) = 3x
2
+ x 7 and the remainder polynomial is
r(x) = 2x + 12 and f(x) = q(x)g(x) +r(x).
Example 5 (Long Division of Polynomials over C)
What are the quotient and remainder polynomials when
f(z) = iz
3
+ (2 + 4i)z
2
+ (3 i)z + (40 4i) is divided by g(z) = iz + (2 2i) in C[x]?
From the Division Algorithm for Polynomials, we would expect a constant remainder.
z
2
+ 6z + (11 + 9i)
iz + (2 2i) iz
3
+ (2 + 4i)z
2
+ (3 i)z + (40 4i)
iz
3
+ (2 2i)z
2
6iz
2
+ (3 i)z
6iz
2
+ (12 12i)z
(9 + 11i)z + (40 4i)
(9 + 11i)z + (40 4i)
0
Thus, the quotient polynomial is q(z) = z
2
+6z+(11+9i) and the remainder is 0. Therefore,
g(z) divides f(z).
Exercise 3 For each f(x) and g(x), nd the quotient and remainder polynomials.
1. Let f(x) and g(x) be the real polynomials f(x) = 2x
4
+6x
3
x+4 and g(x) = x
2
+3.
2. Let f(z) and g(z) be the complex polynomials
f(z) = iz
3
+z
2
(1 +i)z + 10 and g(z) = z + 2i.
Chapter 42
Factoring Polynomials
42.1 Objectives
The content objectives are:
1. Dene polynomial equation, solution and root.
2. State the Fundamental Theorem of Algebra.
3. State and prove the Rational Roots Theorem.
4. State and prove the Remainder Theorem and its corollaries.
5. State and prove the Conjugate Roots Theorem.
6. State and prove two propositions about factoring real polynomials.
42.2 Polynomial Equations
Denition 42.2.1
Polynomial Equation
A polynomial equation is an equation of the form
a
n
x
n
+a
n1
x
n1
+ +a
1
x +a
0
= 0
which will often be written as f(x) = 0. An element c F is called a root or zero of the
polynomial f(x) if f(c) = 0. That is, c is a solution of the polynomial equation f(x) = 0.
The history of mathematics is replete with exciting and sometimes bizarre stories of math-
ematicians as they looked, in vain, for an algorithm that would nd a root of an arbitrary
polynomial. We can now prove that no such algorithm exists. It is known though, that a
root exists for every complex polynomial. This was proved in 1799 by the brilliant mathe-
matician Karl Friedrich Gauss.
Theorem 1 (Fundamental Theorem of Algebra (FTA))
For all complex polynomials f(z) with deg(f(z)) 1, there exists a z
0
C so that f(z
0
) = 0.
272
Section 42.2 Polynomial Equations 273
Ironically, we can prove a root exists, we just cant construct one in general. The proof
of this fact and the Fundamental Theorem of Algebra are both demanding and are left for
later courses.
We can use the Division Algorithm for Polynomials to help nd roots though. Recall
Proposition 2 (Division Algorithm for Polynomials (DAP))
If f(x) and g(x) are polynomials in F[x] and g(x) is not the zero polynomial, then there
exist unique polynomials q(x) and r(x) in F[x] such that
f(x) = q(x)g(x) +r(x) where deg r(x) < deg g(x) or r(x) = 0
We can use the Division Algorithm for Polynomials to prove a very useful theorem.
Proposition 3 (Remainder Theorem (RT))
The remainder when the polynomial f(x) is divided by (x c) is f(c).
Example 1 Find the remainder when f(z) = 3z
12
8iz
5
+ (4 +i)z
2
+z + 2 3i is divided by z +i.
Solution: One could do the painful thing and carry out long division. Another possibility
is to use the Remainder Theorem and compute f(i).
f(i) = 3(i)
12
8i(i)
5
+ (4 +i)(i)
2
+ (i) + 2 3i
= 3 8i(i) + (4 +i)(1) i + 2 3i
= 3 8 4 i i + 2 3i
= 7 5i
The remainder is 7 5i.
Proof: By the Division Algorithm for Polynomials, there exist unique polynomials q(x)
and r(x) such that
f(x) = q(x)(x c) +r(x) where deg r(x) < 1 or r(x) = 0
Therefore, the remainder r(x) is a constant (which could be zero) which we will write as
r
0
. Hence
f(x) = q(x)(x c) +r
0
Substituting x = c into this equation gives f(c) = r
0
.
Corollary 4 (Factor Theorem 1 (FT 1))
The linear polynomial (x c) is a factor of the polynomial f(x) if and only if f(c) = 0.
Equivalently,
274 Chapter 42 Factoring Polynomials
Corollary 5 (Factor Theorem 2 (FT 2))
The linear polynomial (x c) is a factor of the polynomial f(x) if and only if c is a root of
the polynomial f(x).
Induction, together with the Fundamental Theorem of Algebra and the Factor Theorems,
allow us to prove the following very useful corollary.
Proposition 6 (Complex Polynomials of Degree n Have n Roots (CPN))
If f(z) is a complex polynomial of degree n 1, then f(z) has n roots and can be written
as the product of n linear factors. The n roots and factors may not be distinct.
Exercise 1 Prove the proposition Complex Polynomials of Degree n Have n Roots.
How do we go about actually factoring polynomials? In general, this is hard to do. There
are no formulas for roots if the polynomial has degree ve or more. But if the polynomial
has integer coecients, we have a good starting point.
Theorem 7 (Rational Roots Theorem (RRT))
Let f(x) = a
n
x
n
+a
n1
x
n1
+ +a
2
x
2
+a
1
x+a
0
be a polynomial with integer coecients.
If
p
q
is a rational root with gcd(p, q) = 1, then p [ a
0
and q [ a
n
.
In order to nd a rational root of f(x), we only need to examine a nite set of rational
numbers, those whose numerator divides the constant term and those whose denominator
divides the leading coecient. Note that the theorem only suggests those rational numbers
that might be roots. It does not guarantee that any of these numbers are roots.
Example 2 If possible, nd a rational root of f(x) = 2x
4
+x
3
+ 6x + 3.
Solution: We will use the Rational Roots Theorem. The divisors of 2 are 1 and 2. The
divisors of 3 are 1 and 3. Hence, the candidates for rational roots are
1,
1
2
, 3,
3
2
Now test each of these candidates.
x 1 1
1
2
1
2
3 3
3
2
3
2
f(x) 12 2
25
4
0 210 120
51
2
3
4
Thus, the only rational root is
1
2
.
Section 42.2 Polynomial Equations 275
Proof: If
p
q
is a root of f(x) then
a
n
_
p
q
_
n
+a
n1
_
p
q
_
n1
+ +a
2
_
p
q
_
2
+a
1
_
p
q
_
+a
0
= 0
Multiplying by q
n
gives
a
n
p
n
+a
n1
p
n1
q + +a
2
p
2
q
n2
+a
1
pq
n1
+a
0
q
n
= 0
and
a
n
p
n
= q
_
a
n1
p
n1
+ +a
2
p
2
q
n3
+a
1
pq
n2
+a
0
q
n1
_
Since all of the symbols in this equation are integers, both the right hand side and left hand
side are integers. Since q divides the the right hand side, q divides the left hand side, that
is
q [ a
n
p
n
Since gcd(p, q) = 1 we can repeatedly use the proposition on Coprimeness and Divisibility
to show that q [ a
n
. In a similar way, we can show that p [ a
0
.
Exercise 2 Is x+1 a factor of x
10
+1, of x
9
+1? When does x+1 divide (or not divide) x
2n
+1 for n a
positive integer? When does x +1 divide (or not divide) x
2n+1
+1 for n a positive integer?
Exercise 3 Prove that if p is a prime, then
n
2i, 5
Solution: Since we are looking for a polynomial in R[x], we can use the Conjugate
Roots Theorem for complex roots. Hence, 3+
2i. The product of the corresponding factors will produce a real quadratic.
Hence,
f(x) = (x (3 +
2i))(x (3
2i))(x 5)
= (x
2
6x + 11)(x 5)
= x
3
11x
2
+ 41x 55
2. C[x]: 3 +
2i, 5
Solution: Since both 3 +
2i))(x 5) = x
2
+ (8 +
2i)x + (15 + 5
2i)
3. R[x]: 1
5, 2i, 0
Solution: Since we are looking for a polynomial in R[x], we can use the Conjugate
Roots Theorem for complex roots. The only root not in R is 2i so we need to pair this
277
278
Chapter 43 Practice, Practice, Practice:
Polynomials
root with its conjugate 2i. The product of the corresponding factors will produce a
real quadratic. Hence,
f(x) = (x (1
5))(x
2
+ 4)x
= (x (1
5))(x
3
+ 4x)
= x
4
+ (1 +
5)x
3
+ 4x
2
+ 4(1 +
5)x
4. Z
7
[x]: [2], [1]
Solution: Both [2], [1] correspond to linear factors so
f(x) = (x [2])(x [1]) = x
2
[3]x + [2] = x
2
+ [4]x + [2]
Example 2 For each of the following polynomials f(x) F[x], factor f(x) into factors with degree
as small as possible over F[x]. Cite appropriate propositions to justify each step of your
reasoning.
1. f(x) = x
2
x 6 Q[x]
Solution: The quadratic formula gives the roots 3 and 2. These are values in Q so
there are linear factors x 3 and x + 2 by Factor Theorem 2. Hence,
f(x) = (x 3)(x + 2)
2. f(x) = x
2
x + 6 Q[x]
Solution: The quadratic formula gives only complex roots in this instance. Since
complex numbers do not belong to Q there are no linear factors in Q[x], hence
f(x) = x
2
x + 6 cannot be factored any further in Q[x].
3. f(x) = x
2
3ix 2 C[x]
Solution: Applying the quadratic formula gives two roots, i and 2i, hence
f(x) = x
2
3ix 2 = (x i)(x 2i)
4. f(x) = 2x
3
3x
2
+ 2x + 2 R[x]
Solution: Since all of the coecients are integers, we can use the Rational Roots
Theorem. The divisors of a
0
are 1, 2 and the divisors of a
n
are 1, 2 so the
only candidates for rational roots are
1, 2,
1
2
Now test each of these candidates.
x 1 1 2 2
1
2
1
2
f(x) 3 5 10 30 5/2 0
Section 43.2 Worked Examples 279
Long division produces
f(x) = (2x + 1)(x
2
2x + 2)
The quadratic formula gives two complex roots for x
2
2x + 2 so the quadratic does
not factor any further.
5. f(x) = z
4
+ 27z C[x]
Solution: Since f(z) is a complex polynomial of degree four, it will have four linear
factors. Now f(z) = z(z
3
+ 27). Factoring z
3
+ 27 can be done with the aid of the
Complex n-th Roots Theorem applied to z
3
= 27. First, we write 27 in polar form
as
27 = 27(cos +i sin )
Using the Complex n-th Roots Theorem the solutions are
3
27
_
cos
_
+ 2k
3
_
+i sin
_
+ 2k
3
__
for k = 0, 1, 2
= 3
_
cos
_
3
+
2k
3
_
+i sin
_
3
+
2k
3
__
for k = 0, 1, 2
The three distinct roots are given below
When k = 0, z
0
= 3
_
cos
_
3
_
+i sin
_
3
__
= 3
_
1
2
+
3
2
i
_
=
3
2
+
3
3
2
i
When k = 1, z
1
= 3 (cos +i sin ) = 3
When k = 2, z
2
= 3
_
cos
_
5
3
_
+i sin
_
5
3
__
= 3
_
1
2
+
3
2
i
_
=
3
2
3
3
2
i
Thus,
f(x) = x(x + 3)
_
x
_
3
2
+
3
3
2
i
___
x
_
3
2
3
3
2
i
__
Chapter 44
Practice, Practice, Practice:
Course Review
44.1 Objectives
This chapter provides some suggestions on starting a proof and provides an opportunity to
practice using problems from throughout the course.
In all cases, justify your work by citing appropriate denitions and propositions.
This chapter continues on the next page. At this point of the development of the notes the
provided questions do not yet cover the whole course.
280
Section 44.3 Suggestions On How To Start A Proof 281
44.2 Suggestions On How To Start A Proof
1. Explicitly identify the hypothesis and the conclusion. If necessary, rewrite the state-
ment so it is in the form
If A, then B.
2. Choose a basic approach.
If B is of the form P(n) for a natural number n, consider induction.
If B contains a negation or is one of only two alternatives, consider proving the
contrapositive or proceeding by contradiction. To use the contrapositive, prove
the logically equivalent statement
If B, then A.
To use contradiction, prove the statement
If A B, then a contradiction exists.
If B contains the connective or, consider using elimination. To use proof by
elimination with the statement
If A, then C D.
prove the logically equivalent statement
If A C, then D.
The most common proof technique is Direct Proof. Assume that the hypothesis
is true. Show that the conclusion is true.
3. Unless you are using induction or Direct Proof, the statement you are trying to prove
will have been re-stated. Make sure that you identify the new hypothesis and the new
conclusion.
4. Structure your proof around quantiers and sets. Remember that quantiers may
be implicit, that there may be quantiers in the hypothesis and conclusion, and that
quantiers may be nested, so several of the techniques below may appear in the same
proof. In all cases, identify the domain of the quantied variables.
If an existential quantier occurs in the hypothesis, use the Object Method.
If an existential quantier occurs in the conclusion, use the Construct Method.
If a universal quantier occurs, use the Select Method.
To show that S T, use the Select Method. Select a representative element
s S and show that s T.
To show two sets are equal, use mutual inclusion. That is, to show S = T,
show S T and T S.
5. Once you have chosen an approach and a basic structure for the proof, ask the fol-
lowing questions.
Have I seen this before? If so, try to use a similar approach.
What mathematical fact would allow me to deduce the conclusion? Working
backwards from the conclusion narrows the set of possibilities to examine.
What mathematical fact can I deduce from what I already know? Working
forwards from the hypothesis allows you to generate a range of possible paths
towards the conclusion.
282 Chapter 44 Practice, Practice, Practice: Course Review
44.3 Exercises
1. For each of the following statements S,
(i) State the hypothesis.
(ii) State the conclusion.
(iii) State the contrapositive.
(iv) State the converse.
(v) Prove or disprove the statement.
(vi) Prove or disprove the converse.
(a) Let x be a real number. S: If x is positive, then x
2
x.
(b) Let x and y be positive real numbers. S: If x
2
y
2
, then x y.
(c) S: If a [ bc and a b, then a [ c.
(d) S: If 6ab 5a +ab
3
is even, then a is even or b is odd.
(e) S: If p is a prime, then
p is irrational.
(f) S: If a n, then a does not divide n! + 1.
(g) Let a, b Z. S: If a [ b, then a
2
[ b
2
.
(h) Let x, y, z N. S: If gcd(x, y) = 1, then gcd(x, y, z) = 1.
(i) Let f(x) R[x] and c C. S: If f(c) = 0, then f(c) = 0.
2. For each of the following statements S,
(i) Identify each of the explicit quantiers in S together with the associated variable,
domain and open sentence.
(ii) For each explicit quantier, identify which proof technique (Object, Select, Choose)
would be associated with the quantier.
(iii) Negate S. Recall that the negation of A B is A B.
(iv) Only one of S or S can be true. Identify which of S or S is true and give a
proof.
(v) Where possible, give a counter-example to the statement which is false.
(a) S: For all a Z, a > 0, gcd(a + 1, a
2
) = 1.
(b) S: For all n 1 (mod 4), n
2
+ 2n + 13 0 (mod 16).
(c) S: For all z C, z ,= 0, there exists a z
so that zz
= 1.
(d) S: There exists a positive integer n so that for all positive integers m, n/m > 1.
(e) S: If a [ b and a [ c, then for every x, y Z, a [ (bx +cy).
(f) Let a, b, c be xed integers. S: If there exist integers x and y so that a [ (bx+cy),
then a [ b and a [ c.
(g) Let a, b, c be xed integers. S: If there exist integers x and y so that a [ (bx+cy),
then a [ b or a [ c.
(h) Let a, b, c be xed integers. S: If for every choice of integers x and y, a [ (bx+cy),
then a [ b and a [ c.
Section 44.3 Exercises 283
(i) S: For every integer n and every integer k, 0 k n,
_
n
k
_
=
_
n + 1
k + 1
_
(j) S: For every odd integer n and every integer k, 0 k n, there exists an integer
h ,= k so that
_
n
k
_
=
_
n
h
_
3. Prove or disprove each of the following statements.
(a) If n 1 (mod 6), then n
2
+ 2
n
is composite.
(b) If n is an integer and n 3, n
3
1 is composite.
(c) Let w C and w ,= 1. If w is an n-th root of unity, then
1 +w +w
2
+. . . +w
n1
= 0
(d) If integers a and b are coprime, then the integers ab and a +b are coprime.
Part VIII
Finding the Shortest Path
284
Chapter 45
The Shortest Path Problem
45.1 Objectives
The technique objectives are:
1. Abstract from a map to a graph.
2. Formulate an algorithm.
3. Extend plausible uses.
45.2 The Problem
Suppose you are living in downtown Toronto (the pink dot on the map on the next page) on
a co-op work term and you want to escape the intense July heat by going to Sibbald Point
Provincial Park (the blue dot on the map) to swim in Lake Simcoe. See Figure 45.2.1.
You could take Highway 404 past the 401, past the 407 up to the end of Highway 404, and
then take a minor road to Highway 48 and go north from there. But perhaps it would be
better to take Lakeshore Drive to Highway 48 and go straight north.
Your task is to nd an algorithm, a strategy, to nd the shortest route between downtown
Toronto and Sibbald Point Provincial Park.
285
286 Chapter 45 The Shortest Path Problem
Figure 45.2.1: Sibbald Point Provincial Park
Section 45.3 Abstraction 287
45.3 Abstraction
Lets focus on whats important in the problem. Looking at the map there is, for our
purpose, lots of information that is not important: colours, parking locations, where the
Green Belt is, towns not along the way. What is really important are locations where we
might change directions, routes between those locations, and distances. Well highlight
important locations on the map as grey dots and connections between locations as solid
teal lines. See Figure 45.3.1.
Figure 45.3.1: Locations and Connections
288 Chapter 45 The Shortest Path Problem
But since we dont need the rest of the detail, lets omit it and include only locations,
connections and distances. See Figure 45.3.2.
120
30
60
45
20
25
20
10
10
10
10
5
60
15
Figure 45.3.2: The Essentials
45.4 Algorithm
Draw a random map and attempt to discover an algorithm that will nd the shortest route
from one location to another. Compare your algorithm to those created by others. Which
algorithms work? Which algorithms are ecient?
45.5 Extensions
This problem is set as minimal distances between two points. But perhaps instead of
distance we could use time or cost. And instead of a person travelling we could have
couriers delivering packages, or electrical signals carrying phone calls. In fact, there are
surprising uses as well including managing cutting stock in steel mills and nding optimal
schedules for construction projects.
Chapter 46
Paths, Walks, Cycles and Trees
46.1 Objectives
The technique objectives are:
1. Practice with proofs by contradiction.
2. Practice with proofs of uniqueness.
The content objectives are:
1. Dene graph, walk, path, cycle, and tree.
2. Construct diagrams corresponding to graphs.
3. Observe: Any walk can be decomposed into at most one path and a collection of cycles.
4. Prove: There is a unique path between every pair of vertices in a tree.
46.2 The Basics
Denition 46.2.1
Graph
A graph G is a pair (V, E) where V is a nite, nonempty set, and E is a set of unordered
pairs of elements of V . The elements of V are called vertices and the elements of E called
edges.
It is often very useful to represent a graph as a drawing where vertices correspond to points
and edges correspond to lines between vertices. Graphs may be represented by more than
one diagram as illustrated in Example 1.
289
290 Chapter 46 Paths, Walks, Cycles and Trees
Example 1 Let G = (V, E) where
V = 1, 2, 3, 4, 5, 6, 7
and
E = 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2 .
1
6 3
2
5 4
7
1 6 3 2 5 4
7
Figure 46.2.1: Two representations of the same graph
Denition 46.2.2
Adjacent, Incident
If edge e = u, v, then we say that u and v are adjacent vertices, and that edge e is
incident with vertices u and v. We can also say that the edge e joins u and v. Vertices
adjacent to a vertex u are called neighbours of u.
A graph is completely specied by the pairs of vertices that are adjacent, and the only
function of a line in the diagram is to indicate that two vertices are adjacent.
Denition 46.2.3
Walk
A walk W is a non-empty sequence of edges
W = v
0
, v
1
, v
1
, v
2
, v
2
, v
3
, . . . , v
n1
, v
n
.
Since v
i1
and v
i
uniquely determine an edge e of a walk, we will usually just list the
vertices. Thus
W = v
0
, v
1
, v
2
, v
3
, . . . , v
n1
, v
n
.
Denition 46.2.4
Path
If v
0
= s and v
n
= t in the walk W, we call W an st-walk. If no vertex in the walk is
repeated, that is, if v
0
, v
1
, v
2
, . . . , v
n
are all distinct, then W is called a path.
Denition 46.2.5
Cycle
If v
0
= v
n
and v
0
, v
1
, v
2
, . . . , v
n1
are all distinct, then W is called a cycle.
Section 46.2 The Basics 291
1
6 3
2
5 4
7
Figure 46.2.2: The bold lines indicate the walk W = 1, 6, 7, 3, 4, 7, 3, 2.
1
6 3
2
5 4
7
Figure 46.2.3: The bold lines indicate the path P = 1, 6, 7, 3, 2
1
6 3
2
5 4
7
Figure 46.2.4: The bold lines indicate the cycle C = 7, 3, 4, 7
Note that the walk W = 1, 6, 7, 3, 4, 7, 3, 2 can be decomposed into the path P = 1, 6, 7, 3, 2
and the cycle C = 7, 3, 4, 7. In fact, we can always perform this kind of decomposition for
walks but before we state the appropriate theorem, we need to dene a few more terms.
Denition 46.2.6
Collection,
Decomposed
By a collection we mean a family of objects where repetition is allowed. Let W be an
st-walk. If s = t, we say that W can be decomposed into a collection ( of cycles if, for
every edge e the number of times e occurs in W is the same as the number of times e occurs
in cycles of (. If s ,= t, we say that W can be decomposed into an st-path P and a
collection ( of cycles if, for every edge e the number of times e occurs in W is the same as
292 Chapter 46 Paths, Walks, Cycles and Trees
the number of times e occurs in P and the cycles of (.
We will state, but not prove, the following proposition.
Proposition 1 (Walk Decomposition (WD))
Let W be an st-walk.
1. If s = t, then W can be decomposed into a non-empty collection of cycles.
2. If s ,= t and a vertex is not repeated in W, then W is a path.
3. If s ,= t and a vertex is repeated in W, then W can be decomposed into a path and a
non-empty collection of cycles.
You may wonder what the dierence is between the denition of decomposition and the
proposition Walk Decomposition. The denition allows for the possibility that some walks
cannot be decomposed. The proposition states that all walks can be decomposed.
Denition 46.2.7
Connected
To say that a graph G is connected means that there is a path between any two vertices of
G. We will assume for this course that all of our graphs are connected, though in general,
that is not a safe assumption.
46.3 Trees
A tree is a very special and incredibly useful kind of graph.
Denition 46.3.1
Tree
A tree is a connected graph with no cycles.
1
6 3
2
5 4
7
Figure 46.3.1: A tree
We will prove several propositions about trees starting with this one.
Section 46.3 Trees 293
Proposition 2 (Unique Paths in Trees (UPT))
There is a unique path between every pair of vertices in a tree.
We normally begin our proofs by explicitly identifying the hypothesis and the conclusion.
Unique Paths in Trees is not in If A, then B. form, so lets rst restate it. Recall that
the hypothesis is what we get to start with, and the conclusion is what we must show. We
start with a tree. Call it T. We must show that there is a unique path between every pair
of vertices in T. Hence, we could restate Unique Paths in Trees as
Proposition 3 (Unique Paths in Trees (UPT))
If T is a tree, then there is a unique path between every pair of vertices in T.
Working forwards and backwards to prove this proposition will be problematic. So, its time
for a dierent technique, proof by contradiction. Normally, when we wish to prove that the
statement A implies B is true, we assume that A is true and show that B is true. What
would happen if B were true, but we assumed it was false and continued our reasoning
based on the assumption that B was false? Since a mathematical statement cannot be both
true and false, it seems likely we would eventually encounter a mathematically non-sensical
statement. Then we would ask ourselves How did we arrive at this nonsense? and the
answer would have to be that our assumption that B was false was wrong and B is, in fact,
true.
Proofs by contradiction have the following structure.
1. Assume that A is true.
2. Assume that B is false, or equivalently, assume that NOT B is true.
3. Reason forward from A and NOT B to reach a contradiction.
We will prove Unique Paths in Trees by contradiction.
Proof: (For reference, each sentence of the proof is written on a separate line.)
1. Suppose that u and v are any two distinct vertices of T.
2. Since T is connected, there is at least one path connecting u to v.
3. Now suppose that there are two distinct uv-paths, P
1
= u, x
1
, x
2
, . . . , x
n1
, v and
P
2
= u, y
1
, y
2
, . . . , y
m1
, v.
4. We can construct a walk W beginning with u and ending at u that consists of walk-
ing from u to v in P
1
, then from v to u backwards in P
2
. More specically,
W = u, x
1
, x
2
, . . . , x
n
, y
m1
, y
m2
, y
m3
, . . . , y
1
, u.
5. By Part (1) of Proposition 1, W can be decomposed into a non-empty collection of
cycles.
294 Chapter 46 Paths, Walks, Cycles and Trees
6. But then the tree T contains cycles, contradicting the denition of a tree.
Analysis of Proof We will begin by explicitly identifying the hypothesis and the conclu-
sion.
Hypothesis: T is a tree.
Conclusion: There is a unique path between every pair of vertices in T.
Core Proof Technique: Contradiction.
Preliminary Material: Denition of tree.
Sentence 1 Suppose that u and v are any two distinct vertices of T.
The conclusion contains a universal quantier, every. Lets rst identify the compo-
nents of the universal quantier.
Quantier:
Variable: vertices u and v
Domain: vertices of the tree T
Open sentence: There is a unique path between u and v.
Since we are using a universal quantier in the conclusion of the proposition, the
author uses the Select Method.
Sentence 2 Since T is connected, there is at least one path connecting u to v.
Before the author can show that there is a unique path, the author must rst show
that a path exists.
Sentence 3 Now suppose that there are two distinct uv-paths, P
1
= u, x
1
, x
2
, . . . , x
n1
, v
and P
2
= u, y
1
, y
2
, . . . , y
m1
, v.
The author is negating the conclusion and so is going to use one of two techniques,
Contradiction or Contrapositive. Since the author hasnt indicated which, it is useful
to look ahead in the proof to nd out. The last sentence of the proof makes it clear
that the author is using Contradiction.
Sentence 4 We can construct a walk W beginning with u and ending at u that consists of
walking from u to v in P
1
, then from v to u backwards in P
2
. More specically,
W = u, x
1
, x
2
, . . . , x
n
, y
m1
, y
m2
, y
m3
, . . . , y
1
, u.
Sentence 5 By Part (1) of Proposition 1, W can be decomposed into a non-empty collec-
tion of cycles.
The dicult part in proofs by contradiction is nding a contradiction. In Sentence
4 the author constructs a walk and in Sentence 5 the author shows that the walk
contains cycles. But cycles dont exist in trees and so
Sentence 6 But then the tree T contains cycles, contradicting the denition of a tree.
This is also an example of working with uniqueness.
Chapter 47
Trees
47.1 Objectives
The technique objectives are:
1. Practice with Induction.
The content objectives are:
1. Dene degree.
2. Prove Two Vertices of Degree One.
3. Prove Number of Vertices in a Tree.
47.2 Properties of Trees
Denition 47.2.1
Degree
Let G be a graph. The number of edges incident with a vertex v is called the degree of v
and is denoted by deg(v). In Figure 47.2.1, vertex a has degree 3 and vertex b has degree 2.
Proposition 1 (Two Vertices of Degree One (TVDO))
If T is a tree with at least two vertices, then T has at least two vertices of degree one.
Proof: (For reference, each sentence of the proof is written on a separate line.)
1. Find a longest path P = w
0
w
1
w
2
. . . w
n
in T, say between nodes u = w
0
and v = w
n
.
2. Since any edge in the tree constitutes a path, P must contain at least one edge so
u ,= v.
3. Thus, the vertex w
n1
in the path is adjacent to v but distinct from v.
295
296 Chapter 47 Trees
s
s
a
b
c
d
e
f
g
h
i
Figure 47.2.1: Graph corresponding to Toronto - Sibbald Point map
4. If deg(v) > 1, there must be another vertex, w, distinct from w
n1
and adjacent to v.
5. If w is in P, then a cycle would exist but trees do not have cycles. Hence, w is not in
P.
6. If w is not in P, then we could add edge v, w to P to get a path longer than P,
contradicting the assumption that P is a longest path in T.
7. Hence, deg(v) = 1.
8. Similarly, deg(u) = 1 and so two vertices of degree one exist in T.
Analysis of Proof We will begin by explicitly identifying the hypothesis and the conclu-
sion.
Hypothesis: T is a tree with at least two vertices.
Conclusion: T has at least two vertices of degree one.
Core Proof Technique: Construction and Contradiction (three times!).
Preliminary Material: Denition of tree and of degree.
Section 47.2 Properties of Trees 297
Sentence 1 Find a longest path P = w
0
w
1
w
2
. . . w
n
in T, say between nodes u = w
0
and
v = w
n
.
The conclusion contains an existential quantier, has. Lets rst identify the compo-
nents of the existential quantier.
Quantier:
Variable: Two vertices (unnamed)
Domain: Vertices of the tree T
Open sentence: Both vertices have degree 1.
Since the proposition contains an existential quantier in the conclusion, the author
uses the Construct Method. This sentence serves two purposes. First, it implicitly
identies the two objects that will be constructed, u and v. And second, it sets up
the contradictions that will be needed later.
Sentence 2 Since any edge in the tree constitutes a path, P must contain at least one edge
so u ,= v.
Given that the author intends to show that u and v are distinct vertices of degree one,
the author must rst establish that u ,= v. Also, the following argument will require
that the path contain an edge.
Sentence 3 Thus, the vertex w
n1
in the path is adjacent to v but distinct from v.
The author is setting up the contradiction, though it is not at all clear from here how
that contradiction will be displayed.
Sentence 4 If deg(v) > 1, there must be another vertex, w, distinct from w
n1
and adja-
cent to to v.
From the analysis of the rst sentence, the author intends to show that v has degree
one. That means this sentence indicates the author is going to proceed by contradic-
tion.
Sentence 5 If w is in P, then a cycle would exist but trees do not have cycles. Hence, w
is not in P.
This is a miniature proof by contradiction of the statement If deg(v) > 1 and w
is adjacent to v, then w is not in P. Sentence 5 begins with the negation of the
conclusion and nds a contradiction quickly. If w is in P, then the walk constructed
by taking the subpath from w to v in P and adding the edge v, w yields a cycle,
but trees do not contain cycles by denition.
Sentence 6 If w is not in P, then we could add edge v, w to P to get a path longer than
P, contradicting the assumption that P is a longest path in T.
This is another miniature proof by contradiction, this time of the statement If
deg(v) > 1 and w is adjacent to v, then w is in P.
Sentence 7 Hence, deg(v) = 1.
Assuming that deg(v) > 1 leads to an adjacent vertex w being both in P and not in
P, a contradiction. Since the authors reasoning is correct, it must be the case that
the assumption deg(v) > 1 is false. Since T is connected, deg(v) > 0 so deg(v) = 1.
298 Chapter 47 Trees
Sentence 8 Similarly, deg(u) = 1 and so two vertices of degree one exist in T.
Similarly is a useful but dangerous word in proofs. If the conditions really are similar,
then using similarly spares tedious eort in checking the details. However, if the
conditions are not similar, the use of similarly could be masking a fatal error.
In this case, the argument is identical when w
1
replaces w
n1
.
Proposition 2 (Number of Vertices in a Tree (NVT))
Let T = (V, E) be a tree. Then [V [ = [E[ + 1.
Since V is an integer, we could consider all trees with one vertex, two vertices, three vertices
and so on, this seems like a perfect case for induction. Lets be very clear about what our
statement P(n) is.
P(n): Let T = (V, E) be a tree with n vertices. Then n = [E[ + 1.
Now we can begin the proof.
Proof: Base Case We verify that P(1) is true where P(1) is the statement
P(1): Let T = (V, E) be a tree with one vertex. Then 1 = [E[ + 1.
This is equivalent to stating that [E[ = 0. Since a tree with one vertex has no edges,
the base case is true.
Inductive Hypothesis We assume that the statement P(k) is true for k 1.
P(k): Let T = (V, E) be a tree with k vertices. Then k = [E[ + 1.
Inductive Conclusion Now show that the statement P(k + 1) is true.
P(k+1): Let T = (V, E) be a tree with k+1 vertices. Then k+1 = [E[ +1.
By Two Vertices of Degree One, we know that there is at least one vertex of degree
one in T. Lets call such a vertex v. Since deg(v) = 1, v is adjacent to only one vertex,
say u. Deleting the vertex v and the edge u, v creates a new tree T
where T
has
k vertices and [E[ 1 edges. By our Inductive Hypothesis therefore,
k = ([E[ 1) + 1 k = [E[.
But T has one more vertex and more edge than T
so
k + 1 = [E[ + 1
as required.
The result is true for n = k+1, and so holds for all n by the Principle of Mathematical
Induction.
Chapter 48
Dijkstras Algorithm
48.1 Objectives
The content objectives are:
1. Be able to execute Dijkstras Algorithm.
48.2 Dijkstras Algorithm
Lets look at a formal expression for solving the shortest path problem.
Algorithm 2 Dikstras Algorithm
Require: G = (V, E); w : E R; w(u, v) 0, u, v E; and a designated node s.
Ensure: T
= (V
, E
s
E
(V
, E
)
repeat
for every edge u, v E where u V
and v , V
do
if d(v) < d(u) +w(u, v) then
d(v) d(u) +w(u, v)
end if
end for
Choose a y , V
y
E
x, y
T
(V
, E
)
until V = V
299
300 Chapter 48 Dijkstras Algorithm
We can think of the Require statement as the pre-conditions to the algorithm, or the
hypothesis to a proposition. In this case, we require a graph with non-negative weights on
the edges, and a starting vertex s. We can think of the Ensure statement as the post-
conditions to the algorithm or the conclusion of a proposition. In this case, the algorithm
should terminate with a tree of shortest paths rooted at s, and the distances of a shortest
path from s to each node.
Though our original problem talked about distances, the values we assign to the edges of
the graph could also be time or capacity or costs. The convention is to call these values
weights, which is why the function from the edges to the real numbers is named w.
Lets watch the algorithm in operation. Our example appears in Figure 48.2.1.
s
b
a
d
c c
3
1
4 1
3
9 2
Figure 48.2.1: Graph G with weights
The initialization steps of the algorithm set the distance to s at 0, and the provisional
distances to all other vertices at innity. By abuse of notation, we will treat innity as a
real number. We will record distances as numeric labels in blue near the vertices. The set
V
as bold circles
and the edges in E
= (V
, E
)
is a tree of shortest paths to the vertices in V
. If
using the edge creates a shorter path to a vertex not in V
1
9
3
Figure 48.2.3: First update of d
Continuing with the update, choose the vertex not in V
and s, b to E
. This update is
shown in Figure 48.2.4. The nodes in V
as
bold lines. Note that T
= (V
, E
.
s
b
a
d
c c
3
1
4 1
3
9 2
0
3
9 1
Figure 48.2.4: End of rst iteration
We repeat this until V = V
. Since V = s, a, b, c, d and V
= s, b, V ,= V
and so we
continue. Again, the algorithm examines each edge with one vertex in V
and s, a to E
= (V
, E
.
We repeat this until V = V
. Since V = s, a, b, c, d and V
= s, a, b, V ,= V
and so we
302 Chapter 48 Dijkstras Algorithm
s
b
a
d
c c
3
1
4 1
3
9 2
0 3
9 4 1
5
Figure 48.2.5: Second update of d
s
b
a
d
c c
3
1
4 1
3
9 2
0 3
1 4
5
Figure 48.2.6: End of second iteration
continue. Again, the algorithm examines each edge with one vertex in V
and b, c to E
= (V
, E
.
s
b
a
d
c
3
1
4 1
3
9 2
0 3
1 4
5
Figure 48.2.8: End of third iteration
We repeat this until V = V
. Since V = s, a, b, c, d and V
= s, a, b, c, V ,= V
and so
we continue. Again, the algorithm examines each edge with one vertex in V
= (V
, E
)
is a tree of shortest paths to the vertices in V
.
Now, nally V = V
= (V
, E
is not a tree, and the end product will not be a tree because the
algorithm only adds edges. The algorithm never deletes edges.
The algorithm will have [V [1 iterations because we add a vertex to V
[ = [E
[ + 1.
The proposition Number Of Vertices In A Tree is suggestive but not conclusive. It says
that for a tree T = (V, E), [V [ = [E[ + 1. It does not say that [V [ = [E[ + 1 implies that
the graph (V, E) is a tree.
Lets consider the construction of T
. Hence, no cycles
exist in T
. As for connectedness, this makes sense since, at each iteration an edge is added
to an already connected graph constructed in the previous iteration.
More problematic is guaranteeing that T
from s encounters u
before it encounters v. Then d(u) = d(v) + w(u, v). That is not a surprise. That is how
the algorithm adds edges to E
i=0
w(v
i
, v
i+1
)
We have been using this denition implicitly. The distance of a trip from downtown Toronto
to Sibbald Point Provincial Park is the sum of the distances of each part of the trip.
Dijkstras algorithm also uses this denition implicitly.
Proposition 1 (A Path Shorter Than A Walk (PSTW))
Let G = (V, E) be a connected graph with non-negative real weights. Let W be an st-walk
with s ,= t. Then there exists an st-path with w(P) w(W).
Proof: (For reference, each sentence of the proof is written on a separate line.)
1. Part 3 of Walk Decomposition states that W can be decomposed into an st-path P
and a collection of cycles C
1
, C
2
, . . . , C
r
.
2. Now
w(W) = w(P) +
r
i=1
w(C
i
).
3. Since w(C
i
) 0 for all i = 1, 2, 3, . . . , r, w(P) w(W).
Analysis of Proof As usual, we will begin by explicitly identifying the hypothesis and
the conclusion.
Hypothesis: G = (V, E) is a connected graph with non-negative real weights. W is
an st-walk with s ,= t.
Conclusion: There exists an st-path with w(P) w(W).
Core Proof Technique: Construct Method.
Preliminary Material: Denitions related to weighted graphs.
Sentence 1 Part 3 of Proposition 1 states that W can be decomposed into an st-path P
and a collection of cycles C
1
, C
2
, . . . , C
r
.
The conclusion contains an existential quantier so the author uses the Construct
Method. Lets rst identify the components of the existential quantier.
308 Chapter 49 Certicate of Optimality - Path
Quantier:
Variable: A path P
Domain: All paths in G = (V, E)
Open sentence: w(P) w(W)
The author must construct an st-path P and does so using Part 3 of Proposition Walk
Decomposition. The author will now show that w(P) w(W).
Sentence 2 Now
w(W) = w(P) +
r
i=1
w(C
i
).
This is the numeric implication of Walk Decmposition.
Sentence 3 Since w(C
i
) 0 for all i = 1, 2, 3, . . . , r, w(P) w(W).
This is arithmetic.
The proof is very simple and relies very heavily on the fact that w(C
i
) 0 for all i =
1, 2, 3, . . . , r. What if the hypothesis non-negative real weights were simply non-negative
real weights?
Exercise 1 Show the necessity of non-negative in the hypothesis of a Path Shorter Than A Walk.
That is, nd a counter-example to the statement:
Let G = (V, E) be a connected graph with non-negative real weights. Let W be an st-walk
with s ,= t. Then there exists an st-path with w(P) w(W).
You might argue that this is irrelevant because you never encounter negative distances.
This may be true of distances, but this is not true of costs. Subsidies and rebates do, in
fact, create negative cost edges in models.
Denition 49.3.2
Potentials, Equality
Edges
Let G = (V, E) be a connected graph with non-negative weights w : E R and d : V R.
The components of d are called distance potentials. We say that distance potentials are
feasible when
d(u) +w(u, v) d(v) for all uv E.
Edges for which d(u) +w(u, v) = d(v) are called equality edges.
Section 49.3 Weighted Graphs 309
Proposition 2 (Feasible Potentials (FP))
Let G = (V, E) be a connected graph with non-negative weights w : E R, d : V R
be feasible distance potentials and W an st-walk. Then w(W) d(t) d(s). Moreover,
w(W) = d(t) d(s) if and only if every arc of W is an equality edge.
Proof: (For reference, each sentence of the proof is written on a separate line.)
1. Suppose W = v
0
v
1
v
2
. . . v
k
where s = v
0
and t = v
k
.
2. The feasible distance potentials satisfy
d(v
0
) +w(v
0
, v
1
) d(v
1
)
d(v
1
) +w(v
1
, v
2
) d(v
2
)
d(v
2
) +w(v
2
, v
3
) d(v
3
)
.
.
.
d(v
k1
) +w(v
k1
, v
k
) d(v
K
)
3. Adding these inequalities together gives
d(v
0
) +d(v
1
) +d(v
2
) +. . . +d(v
k1
) +w(v
0
, v
1
) +w(v
1
, v
2
) +. . . +w(v
k1
, v
k
)
d(v
1
) +d(v
2
) +d(v
3
) +. . . +d(v
k
).
4. This simplies to
d(v
0
) +w(W) d(v
k
)
or
w(W) d(t) d(s).
5. Moreover, w(W) d(t)d(s) if and only if every inequality above holds with equality,
that is, every edge in W is an equality edge.
This is a straightforward proof so no analysis is provided.
Theorem 3 (Certicate of Optimality for a Path (OPT P))
Let G = (V, E) be a connected graph with non-negative weights w : E R and let s
be a designated vertex and let P be an st-path. If there exist feasible distance potentials
d : V R such that every edge of P is an equality edge, then P is a shortest st-path.
Before we examine the proof, lets see how the theorem works as part of the certicate. Re-
call the tree and function d that resulted from our example of running Dijkstras algorithm.
310 Chapter 49 Certicate of Optimality - Path
s
b
a
d
c
3
1
4 1
3
9 2
0 3
1 4
5
Figure 49.3.1: Tree and d
The dark edges indicate the tree and the blue labels adjacent to the vertices give d. Observe
the sd-path P = sbd. All of the hypotheses of Certicate of Optimality for a Path are
satised. G is a connected graph with non-negative weights. A vertex s has been designated.
P = sbd is an sd-path. By examining each edge of G we can conrm that d are feasible
distance potentials. By examining each edge of P we can conrm that every edge of P is an
equality edge. Hence, by the Certicate of Optimality for a Path, P is a shortest sd-path.
Now to the proof.
Proof: (For reference, each sentence of the proof is written on a separate line.)
1. By the rst part of the conclusion of Feasible Potentials, every st-walk has weight at
least w(t) w(s).
2. By the second part of the conclusion of Feasible Potentials, w(P) = w(t) w(s).
3. Since the weight of every walk W is bounded below by w(t) w(s), and P is a path
that achieves that bound, P must be a shortest st-path.
Analysis of Proof We will begin by explicitly identifying the hypothesis and the conclu-
sion.
Hypothesis: G = (V, E) is a connected graph with non-negative weights
w : E R. s is a designated vertex and P is an st-path. There exist feasible
distance potentials d : V R such that every edge of P is an equality edge.
Conclusion: P is a shortest st-path.
Core Proof Technique: Direct Proof. Existential quantiers occur in the hypoth-
esis so the Object Method is used.
Preliminary Material: Accumulated knowledge about weighted graphs.
Section 49.3 Weighted Graphs 311
Sentence 1 By the rst part of the conclusion of Feasible Potentials, every st-walk has
weight at least w(t) w(s).
Since is is a form of the existential quantier, the hypothesis P is an st-path allows
the author to assume the existence of P. What the author must show is not that
P exists, or that P is an st-path, but rather that P is a shortest st-path. The rst
sentence of the proof places an upper bound on w(P).
Sentence 2 By the second part of the conclusion of Feasible Potentials, w(P) = w(t)w(s).
The hypotheses of the current theorem include There exist feasible distance potentials
d : V R such that every edge of P is an equality edge. The existential quantier in
this hypothesis allows the author to assume the existence of feasible distance potentials
and equality edges. These are needed to invoke Feasible Potentials.
Sentence 3 Since the weight of every walk W is bounded below by w(t) w(s), and P is
a path that achieves that bound, P must be a shortest st-path.
Since no walk, and hence no path, can be shorter than w(t) w(s), and w(P) =
w(t) w(s), P must be a shortest st-path.
Proposition 4 (Shortest Paths Give Feasible Potentials (SPGFP))
Let G = (V, E) be a connected graph with non-negative weights w : E R and a designated
node s. If d : V R is dened as the length of a shortest path from s to v for all vertices
in V , then d are feasible distance potentials.
Proof: (For reference purposes, each sentence of the proof is written on a separate line.)
1. By contradiction, suppose that d are not feasible distance potentials. Then there
exists u, v E such that d(u) +w(u, v) < d(v).
2. Let P be a shortest su-path. By the denition of d, w(P) = d(u).
3. Consider the walk W constructed by appending the edge u, v to the path P.
4. By a Path Shorter Than A Walk, there exists an sv-path P
with w(P
) w(W).
5. But w(W) = w(P) +w(u, v) = d(u) +w(u, v) < d(v).
6. But then w(P
=
_
vV
P(v).
5. The edges of E
5 [ a, b Z. In S, the number 4 = 4 + 0
5 can be factored
in two dierent ways, 4 = 2 2 and 4 = (
5 +1)(
5 1). Moreover, 2,
5 +1 and
5 1
are all prime numbers in S!
Since multiplication in the integers is commutative, the prime factorizations can be written
in any order. For example 12 = 2 2 3 = 2 3 2 = 3 2 2. However, up to the
order of the factors, the factorization of integers is unique. This property is so basic it is
referred to as the Fundamental Theorem of Arithmetic. It is also referred to as the Unique
Factorization Theorem.
318 Chapter 50 Introduction to Primes
Theorem 6 (Fundamental Theorem of Arithmetic or
Unique Factorization Theorem (UFT))
If n > 1 is an integer, then n can be written as a product of prime factors and, apart from
the order of factors, this factorization is unique.
Observe that the conclusion contains two parts:
1. n can be written as a product of prime factors (which we proved earlier), and
2. apart from the order of factors, this factorization is unique.
Proof: (For reference, each sentence of the proof is written on a separate line.)
1. That n can be written as a product of prime factors follows from the proposition
Prime Factorization.
2. Now suppose that n is factored into primes in two ways,
n = p
1
p
2
. . . p
k
= q
1
q
2
. . . q
(50.1)
where all of the ps and qs are primes.
3. Since p
1
[ n, p
1
[ q
1
q
2
. . . q
.
4. By repeatedly applying the proposition Primes and Divisibility, p
1
must divide one of
the qs. If necessary, rearrange the qs so that p
1
[ q
1
.
5. Since q
1
is prime, and p
1
> 1, it must be the case that p
1
= q
1
.
6. Dividing Equation 50.1 by p
1
= q
1
gives
p
2
p
3
. . . p
k
= q
2
q
3
. . . q
(50.2)
7. By continuing in this way, we see that each p must be paired o with one of the qs
until there are no factors on either side.
8. Hence k = and, apart from the order of the factors, the two expressions for n are
the same.
Lets perform an analysis of the proof. As usual, we begin with the hypothesis and the
conclusion.
Hypothesis: n is an integer, n > 1
Conclusion: There are two parts.
1. n can be written as a product of prime factors, and
2. apart from the order of factors, this factorization is unique.
Section 50.5 Finding a Prime Factor 319
Core Proof Technique: Uniqueness
Preliminary Material: Primes and Divisibility
Sentence 1 That n can be written as a product of prime factors follows from the proposition
Prime Factorization.
The rst of the two parts of the conclusion is just the conclusion of a previous propo-
sition.
Sentence 2 Now suppose that n is factored into primes in two ways,
n = p
1
p
2
. . . p
k
= q
1
q
2
. . . q
.
Sentences 3 5 Since p
1
[ n, p
1
[ q
1
q
2
. . . q
By continuing in this way, we see that each p must be paired o with one of the qs
until there are no factors on either side.
This continues the authors plan of showing that the two representations of n are
equal by showing that they have identical factors.
Sentence 8 Hence k = and, apart from the order of the factors, the two expressions for
n are the same.
This is a typical conclusion to the Uniqueness Method. The two representations of
the same object are identical.
50.5 Finding a Prime Factor
The previous proposition does not provide an algorithm for nding the prime factors of a
positive integer n. The next proposition shows that we do not have to check all of the prime
factors less than n, only those less than or equal to the square root of n.
Proposition 7 (Finding a Prime Factor (FPF))
An integer n > 1 is either prime or contains a prime factor less than or equal to
n.
Lets begin by identifying the hypothesis and the conclusion.
320 Chapter 50 Introduction to Primes
Hypothesis: n is an integer and n > 1.
Conclusion: n is either prime or contains a prime factor less than or equal to
n.
Before we see a proof, lets do an example.
Example 2 Is 73 a prime number?
Solution: Using Finding a Prime Factor , we can check for divisibility by primes less than
or equal to
73. Now
1
1
p
2
2
p
k
k
is the prime factorization of a into powers of distinct primes p
1
, p
2
, . . . , p
k
, then the positive
divisors of a are integers of the form
d = p
d
1
1
p
d
2
2
p
d
k
k
where 0 d
i
i
for i = 1, 2, . . . , k
Example 3 (Using Divisors From Prime Factorization)
What are the prime factors of 72?
We will use Divisors From Prime Factorization. Since
72 = 2
3
3
2
the positive divisors of a are integers of the form
d = 2
d
1
3
d
2
where 0 d
1
3 and 0 d
1
2
The possibilities are
2
0
3
0
= 1 2
1
3
0
= 2 2
2
3
0
= 4 2
3
3
0
= 8
2
0
3
1
= 3 2
1
3
1
= 6 2
2
3
1
= 12 2
3
3
1
= 24
2
0
3
2
= 9 2
1
3
2
= 18 2
2
3
2
= 36 2
3
3
2
= 72
Exercise 1 Using Divisors From Prime Factorization, list all of the positive factors of 45.
322 Chapter 50 Introduction to Primes
Exercise 2 How many positive divisors are there to the integer a whose prime factorization is
a = p
1
1
p
2
2
p
k
k
Proposition 9 (GCD From Prime Factorization (GCD PF))
If
a = p
1
1
p
2
2
p
k
k
and
b = p
1
1
p
2
2
p
are the prime factorizations of a and b, where some of the exponents may be zero, then
gcd(a, b) = p
d
1
1
p
d
2
2
p
d
k
k
where d
i
= min
i
,
i
for i = 1, 2, . . . , k
Example 4 (Using GCD From Prime Factorization)
What is gcd(24750, 434511)?
Since
24750 = 2
1
3
2
5
3
11
1
= 2
1
3
2
5
3
7
0
11
1
19
0
and
434511 = 3
3
7
1
11
2
19
1
= 2
0
3
3
5
0
7
1
11
2
19
1
,
gcd(24750, 434511) = 2
min{1,0}
3
min{2,3}
5
min{3,0}
7
min{0,1}
11
min{1,2}
19
min{0,1}
= 2
0
3
2
5
0
7
1
11
2
19
0
= 7623
Though this method works well enough on small examples, it is much slower than the
Extended Euclidean Algorithm for computing gcds.
Exercise 3 Use GCD PF to compute gcd(3
3
5
1
7
4
13
1
, 5
2
7
7
13
1
23
2
).
Exercise 4 Use the denition of gcd to prove GCD From Prime Factorization.
50.7 More Examples
1. This question deals with prime factorizations.
(a) Write out the prime factorizations of 12936 and 16380.
Section 50.8 Problems 323
(b) Using part (a), determine gcd(12936, 16380).
(c) Use the Extended Euclidean Algorithm or the Euclidean Algorithm to verify that
your answer in (b) is correct.
Solution:
(a)
12936 = 2
3
3
1
7
2
11
1
16380 = 2
2
5
1
3
2
7
1
13
1
(b) gcd(12936, 16380) = 2
2
3
1
7
1
= 84
(c)
x y r q
1 0 16380 0
0 1 12936 0
1 1 3444 1
3 4 2604 3
4 5 840 1
15 19 84 3
154 195 0 10
Indeed, 84 = gcd(12936, 16380).
50.8 Problems
1. Prove that if p <= n, then p does not divide n! + 1.
2. Let n >= 0. What is the power of 2 in the prime factorization of (2
n
)! ? Prove that
you have the correct value.
3. Note that k divides n! +k for each k <= n. Use this fact to show that, for all positive
integers m, there exist consecutive primes which are at least m apart.
Chapter 51
Introduction to Fermats Last
Theorem
51.1 Objectives
The content objectives are:
1. Provide an historical introduction.
2. Dene gcd(x, y, z), trivial solutions, Pythagorean triple and primitive Pythagorean
triple.
3. State Extending Coprimeness.
4. Read a proof of Multiples of Pythagorean Triples.
5. Discover a proof of Relative Primeness of Pythagorean Triples.
6. Read a proof of Parity of Primitive Pythagorean Triples.
7. State Decomposition of n-th Powers.
51.2 History of Fermats Last Theorem
Pierre de Fermat (1601 (?) 1635) was a brilliant French mathematician. It was his habit
to make notes in the margins of his books and one such note is famous. Fermat possessed
a copy of Bachets translation of Diophantus Arithmetica. Problem II.8 of the Arithmetica
reads
Partition a given square into two squares.
Diophantus did not require the squares to be integers so we might write Problem II.8 as
For what positive rational numbers x, y and z is the equation
x
2
+y
2
= z
2
satised?
324
Section 51.2 History of Fermats Last Theorem 325
Adjacent to Problem II.8, and in the margin of his copy of Arithmetica, Fermat wrote
(translated)
It is impossible to separate a cube into two cubes, or a fourth power into two
fourth powers, or in general, any power higher than the second, into two like
powers. I have discovered a truly marvellous proof of this, which this margin is
too narrow to contain.
Fermat was asserting
Theorem 1 (Fermats Last Theorem)
If n 3, then
x
n
+y
n
= z
n
has no solutions when x, y and z are positive integers.
No proof was ever published by Fermat, or found among his notes after his death. It seems
very unlikely that he did have a proof and it was not until Andrew Wiles publications in
1994 that the Theorem, conjecture really, was proved. Fermat did prove the case n = 4, as
we shall do.
First though, we will clarify our language. Clearly there are solutions to x
n
+y
n
= z
n
. One
solution is x = y = z = 0, another solution is x = 0, y = z.
Denition 51.2.1
Trivial
We will say that any solution to x
n
+y
n
= z
n
for which at least one of x, y or z is zero, is
trivial.
So we restate Fermats Last Theorem as
Theorem 2 (Fermats Last Theorem)
If n 3, then
x
n
+y
n
= z
n
has no non-trivial integer solutions.
Our starting point will be a much more familiar problem.
x
2
+y
2
= z
2
(51.1)
You will recognize this as the equation of the Pythagorean Theorem. Our task is to identify
all positive integer solutions to Equation 51.1.
326 Chapter 51 Introduction to Fermats Last Theorem
51.3 Pythagorean Triples
We begin with some denitions.
Denition 51.3.1
Pythagorean Triple
A Pythagorean triple is an ordered triple of non-zero integers (x, y, z) such that
x
2
+y
2
= z
2
.
Equivalently, a Pythagorean triple is a non-trivial solution to x
2
+y
2
= z
2
.
Now we expand our denition of gcd.
Denition 51.3.2
Greatest Common
Divisor
Let a, b and c be integers, not all zero. An integer d > 0 is the greatest common divisor
of a, b and c, written gcd(a, b, c), if and only if
1. d [ a, d [ b and d [ c (this captures the common part of the denition), and
2. if e [ a and e [ b and e [ c then e d (this captures the greatest part of the denition).
We leave the proof of the following very useful lemma as an exercise.
Lemma 3 (Extending Coprimeness (EC))
If x, y and z are integers, not all zero, and gcd(x, y) = 1, then gcd(x, y, z) = 1.
Denition 51.3.3
Primitive Triple
A Pythagorean triple (x, y, z) is said to be primitive if gcd(x, y, z) = 1.
Example 1 Both (6, 8, 10) and (3, 4, 5) are Pythagorean triples. However
(6, 8, 10) is not a primitive Pythagorean triple since gcd(6, 8, 10) = 2 ,= 1.
(3, 4, 5) is a primitive Pythagorean triple since gcd(6, 8, 10) = 1.
Proposition 4 (Multiples of Pythagorean Triples (MPT))
Let d = gcd(x, y, z). The triple (x, y, z) is a Pythagorean triple if and only if (x
1
, y
1
, z
1
) is
a Pythagorean triple where x
1
=
x
d
, y
1
=
y
d
and z
1
=
z
d
.
Example 2 (6, 8, 10) is a Pythagorean triple since 6
2
+8
2
= 10
2
. Since gcd(6, 8, 10) = 2, by the Multiples
of Pythagorean Triples, (3, 4, 5) is a Pythagorean triple.
Also, if (3, 4, 5) is a Pythagorean triple, then (3d, 4d, 5d) is a Pythagorean triple.
Section 51.3 Pythagorean Triples 327
This is a simple if and only if proof that can be proved using a chain of if and only if
statements.
Proof:
(x, y, z) is a Pythagorean triple
x
2
+y
2
= z
2
(defn of Pythagorean triple)
x
2
d
2
+
y
2
d
2
=
z
2
d
2
(divide by d
2
)
x
2
1
+y
2
1
= z
2
1
(substitution)
(x
1
, y
1
, z
1
) is a Pythagorean triple (defn of Pythagorean triple)
Take ten minutes to prove the following proposition and then compare your proof with the
proof that follows.
Proposition 5 (Relative Primeness of Pythagorean Triples (RPPT))
If (x, y, z) is a primitive Pythagorean triple, then gcd(x, y) = gcd(x, z) = gcd(y, z) = 1.
Proof: We will show that gcd(x, y) = 1. The other pairs are similar. Suppose to the
contrary that gcd(x, y) = d > 1. Then there exists a prime p so that p [ d. Since p [ x and
p [ y, p [ (x
2
+ y
2
) by the Divisibility of Integer Combinations. Since x
2
+ y
2
= z
2
, p [ z
2
and so p [ z by Primes and Divisibility. But then gcd(x, y, z) p > 1 which contradicts the
hypothesis that (x, y, z) is a primitive Pythagorean triple.
The next proposition identies a very simple but useful attribute of primitive Pythagorean
triples.
Proposition 6 (Parity of Primitive Pythagorean Triples (PPPT))
If (x, y, z) is a primitive Pythagorean triple, then one of the integers x or y is even and the
other is odd.
First, notice that this implies that z is odd. (Why?) Second, lets check this against our
experience.
Example 3 (Parity of Primitive Pythagorean Triples)
1. In the primitive Pythagorean triple (3, 4, 5), 3 is odd and 4 is even.
2. The Pythagorean triple (6, 8, 10) has no odd elements, but the proposition does not
apply to the Pythagorean triple (6, 8, 10) since it is not primitive.
3. In the primitive Pythagorean triple (8, 15, 17), 8 is even and 15 is odd.
Lets walk through a proof of this proposition.
328 Chapter 51 Introduction to Fermats Last Theorem
Proof: (For reference, each sentence of the proof is written on a separate line.)
1. We will proceed by contradiction using two cases: x and y are both even, and x and
y are both odd.
2. Consider the rst case. Suppose that x and y are both even.
3. But then gcd(x, y) = 2 ,= 1 which contradicts the Relative Primeness of Pythagorean
Triples.
4. Consider the second case. Suppose that x and y are both odd.
5. This implies that x
2
1 (mod 4) and y
2
1 (mod 4) which in turn implies
z
2
= x
2
+y
2
2 (mod 4)
6. But this is impossible since the square of any integer can only be congruent to 0 or 1
modulo 4.
7. Since the two integers cannot both be even or odd, exactly one must be even and one
must be odd.
As usual, we will begin our analysis by identifying the hypothesis, conclusion, core proof
techniques and preliminary material.
Hypothesis: x, y and z are a primitive Pythagorean triple.
Conclusion: One of the integers x or y is even and the other is odd.
Core Proof Technique: There are only three possible cases: x and y are both even, x and
y are both odd or x and y have opposite parity. The rst two cases will be eliminated
leaving the third as the only possible outcome. Each of the rst two cases is dealt with
using contradiction. The use of contradiction several times within a proof is common.
Preliminary Material: primitive Pythagorean triple, congruences
Lets examine each collection of sentences.
Sentence 1. We will proceed by contradiction eliminating two cases: x and y are both even,
and x and y are both odd.
The author indicates the plan of the proof, always a good idea. There are only three
possible cases: x and y are both even, x and y are both odd or x and y have opposite
parity. The author will disprove the rst two cases using contradiction, hence by
elimination leaving only opposite parity.
Sentence 2. Consider the rst case. Suppose that x and y are both even.
This sentence begins the rst of the two embedded proofs by contradiction.
Section 51.3 Pythagorean Triples 329
Sentence 3. But then gcd(x, y) = 2 ,= 1 which contradicts the Relative Primeness of
Pythagorean Triples.
To invoke the Relative Primeness of Pythagorean Triples we should make sure that
the hypothesis of RPPT is satised. All that is required is that x, y and z are a
primitive Pythagorean triple, which is assured from the hypothesis of the proposition
we are proving.
Sentence 4. Consider the second case. Suppose that x and y are both odd.
This sentence begins the second of the two embedded proofs by contradiction.
Sentence 5. This implies that x
2
1 (mod 4) and y
2
1 (mod 4) which in turn implies
z
2
= x
2
+y
2
2 (mod 4)
Sentence 6. But this is impossible since the square of any integer can only be congruent
to 0 or 1 modulo 4.
This part of proof is quite dierent from the earlier part. Since any odd integer a can
be written in the form 2t + 1, a
2
has the form 4t
2
+ 4t + 1 which is congruent to
1 (mod 4). Thus z
2
= x
2
+y
2
1+1 2 (mod 4). But how could this be? If z were
odd, z
2
1 (mod 4), and if z were even, z
2
0 (mod 4).
Sentence 7. Since the two integers cannot both be even or odd, exactly one must be even
and one must be odd.
Since the cases of x and y both even or x and y both odd have been eliminated, all
that remains is that x and y have opposite parity.
REMARK
If (x, y, z) is a Pythagorean triple, we will assume as a convention that x is even and y is
odd.
We conclude with a small proposition that is very useful. The proof appears in the Ap-
pendix.
Proposition 7 (Decomposition of n-th Powers (DNP))
If a, b, c N and ab = c
n
and gcd(a, b) = 1, then there exist integers a
1
and b
1
so that
a = a
n
1
and b = b
n
1
.
Example 4 Consider 592, 704 which is just 84
3
. With n = 3, c = 84, a = 64 and b = 9261, the
hypotheses of the proposition are satised. Hence, there exist integers a
1
and b
1
so that
a = 64 = a
n
1
and b = 9261 = b
n
1
. So a
1
= 4 and b
1
= 21, and 4
3
21
3
= 84
3
.
Notice that our choice of a and b satised gcd(a, b) = 1. With a = 8 = 2
3
and b = 74088 =
42
3
, even though ab = c
n
is still true, the proposition does not apply since gcd(a, b) ,= 1
Chapter 52
Characterization of Pythagorean
Triples
52.1 Objectives
The content objectives are:
1. State and prove the Characterization of Pythagorean Triples theorem.
2. Illustrate the theorem.
52.2 Pythagorean Triples
We are now able to characterize all non-trivial, primitive Pythagorean triples. The proof
in this section follows that done by David Burton in Elementary Number Theory, Seventh
Edition.
Theorem 1 (Characterization of Pythagorean Triples (CPT))
The complete set of non-trivial, primitive solutions to
x
2
+y
2
= z
2
is given by
x = 2st
y = s
2
t
2
z = s
2
+t
2
for integers s > t > 0 such that gcd(s, t) = 1 and s , t (mod 2).
Lets understand what the theorem is saying. Every choice of s and t satisfying integers
s > t > 0 such that gcd(s, t) = 1 and s , t (mod 2) does produce a non-trivial, primitive
Pythagorean triple and these are the only non-trivial, primitive Pythagorean triples.
330
Section 52.2 Pythagorean Triples 331
The table below lists some primitive Pythagorean triples arising from small values of s and
t.
s t x y z
2st s
2
t
2
s
2
+t
2
2 1 4 3 5
3 2 12 5 13
4 1 8 15 17
4 3 24 7 25
5 2 20 21 29
5 4 40 9 41
Before we read the proof, lets do some analysis. The expression complete set obviously
indicates that we are working with sets. So, the rst step is to identify which sets are used
and what their relationship is.
One set is the collection of primitive Pythagorean triples and can be dened by
S = (x, y, z) [ x, y, z N, x
2
+y
2
= z
2
, gcd(x, y, z) = 1, 2 [ x
Note that the use of N is equivalent to non-trivial, that gcd(x, y, z) = 1 is equivalent to
primitive and 2 [ x follows our convention that in a primitive Pythagorean triple, x is even
and y and z are odd. The other set is the collection of triples determined by formula and
can be dened by
T = (x, y, z) [x, y, z N, s, t N,
x = 2st, y = s
2
t
2
, z = s
2
+t
2
,
s > t, gcd(s, t) = 1, s , t (mod 2)
The Characterization of Pythagorean Triples theorem asserts that S = T. We would expect
the proof to show that S = T by showing that S T and T S, though this is done
implicitly.
As we work through the proof be sure to identify
1. where S and T appear in the proof,
2. where each of the elements that dene set membership are satised,
3. where each of the elements that dene set membership are used.
332 Chapter 52 Characterization of Pythagorean Triples
Proof: Let (x, y, z) be a primitive Pythagorean triple. Since x is even and y and z are odd,
z y and z +y are even. Suppose z y = 2u and z +y = 2v. Then
u =
z y
2
and v =
z +y
2
and
v u = y and v +u = z
and the equation x
2
+y
2
= z
2
may be rewritten as
x
2
= z
2
y
2
= (z y)(z +y)
Dividing the preceding equation by 4 gives
_
x
2
_
2
=
_
z y
2
__
z +y
2
_
= uv
We claim that gcd(u, v) = 1. Suppose this were not so and gcd(u, v) = d > 1. Then
d [ (v u) and d [ (v +u). But v u = y and v +u = z so d [ y and d [ z which contradicts
the fact that y and z are relatively prime. Now we can use our proposition on Decomposing
n-th Powers to conclude that u and v are perfect squares. Hence, for some natural numbers
s and t
u = t
2
v = s
2
Using these values of u and v produces
z = v +u = s
2
+t
2
y = v u = s
2
t
2
x
2
= (z y)(z +y) = 4s
2
t
2
x = 2st
We can safely assume s > t, otherwise we simply switch values. We claim that gcd(s, t) = 1.
If d > 1 were a common factor of s and t, d would be a common factor of y and z
contradicting the fact that gcd(y, z) = 1. Finally, if s and t are both even or both odd, then
y and z are even, a contradiction. Hence, exactly one of s and t is odd, the other is even.
Symbolically, s , t (mod 2).
Conversely, let the natural numbers s and t satisfy s > t, gcd(s, t) = 1, s , t (mod 2).
Using the provided formulas for x, y and z we have
x
2
+y
2
= (2st)
2
+ (s
2
t
2
)
2
= (s
2
+t
2
)
2
= z
2
so x, y and z are a Pythagorean triple.
To see that the triple is non-trivial, we must show that x, y and z are all positive. Since
s, t > 0, x = 2st > 0 and z = s
2
+t
2
> 0. Since s > t, y = s
2
t
2
> 0.
To see that the triple is primitive, assume that gcd(x, y, z) = d > 1 and let p be any prime
divisor of d. Since one of s and t is odd and the other is even, z is odd. Since p [ z, p ,= 2.
From p [ y and p [ z, we know that p [ (z + y) and since z + y = 2s
2
, p [ 2s
2
. Hence, p [ s.
Similarly, p [ t. But then p is a common factor of s and t contradicting gcd(s, t) = 1. Since
no such p can exist, gcd(x, y, z) = 1 and x, y and z are a primitive triple.
Chapter 53
Fermats Theorem for n = 4
53.1 Objectives
The content objectives are
1. State and prove: The Diophantine equation x
4
+y
4
= z
2
has no non-trivial solution.
2. State and prove: The Diophantine equation x
4
+y
4
= z
4
has no non-trivial solution.
3. Show a reduction of FLT to If p is an odd prime, then the Diophantine equation
x
p
+y
p
= z
p
has no non-trivial solution.
53.2 n = 4
Having completely resolved the case of Pythagorean triples, we can now turn our attention
to the one instance of FLT proved by Fermat. Actually, we will prove a slightly stronger
result and the case n = 4 will follow as a corollary. The approach in this section mostly
follows Elementary Number Theory, Seventh Edition by David Burton.
Theorem 1 (FLT, Strong Version of n = 4)
The Diophantine equation x
4
+y
4
= z
2
has no non-trivial solution.
333
334 Chapter 53 Fermats Theorem for n = 4
The proof is demanding but it has a straightforward structure.
1. This is a proof by contradiction. It assumes the existence of a minimal solution x
0
,
y
0
, z
0
to x
4
+y
4
= z
2
.
2. Using x
0
, y
0
, z
0
the author constructs a non-trivial primitive Pythagorean triple.
3. Using the Characterization of Pythagorean Triples the author nds various algebraic
expressions involving s and t.
4. The author uses these algebraic expressions to construct another non-trivial primitive
Pythagorean triple.
5. Lastly, the author uses this triple to construct a solution x
1
, y
1
, z
1
to x
4
+ y
4
= z
2
which is smaller than x
0
, y
0
, z
0
, hence a contradiction.
Proof: By way of contradiction, suppose there exists a positive integer solution to x
4
+y
4
=
z
2
. Of all such solutions, choose any one in which z is smallest. Call this solution x
0
,
y
0
, z
0
. We may also assume that gcd(x
0
, y
0
) = 1. (Why?) This in turn implies that
gcd(x
0
, y
0
, z
0
) = 1. (Why?)
Since x
0
, y
0
, z
0
is a solution we know
x
4
0
+y
4
0
= z
2
0
which we can rewrite as
_
x
2
0
_
2
+
_
y
2
0
_
2
= z
2
0
But that means that x
2
0
, y
2
0
and z
0
are non-trivial primitive solutions of a
2
+b
2
= c
2
so we
can make use of the Characterization of Pythagorean Triples. In particular, we know that
one of x
2
0
and y
2
0
is even. We can assume that x
2
0
is even, hence x
0
is even, and that there
exist integers s and t so that s > t > 0 and gcd(s, t) = 1 and s , t (mod 2) satisfying
x
2
0
= 2st
y
2
0
= s
2
t
2
z
0
= s
2
+t
2
Since s , t (mod 2), exactly one of s and t are even. Suppose s is even and t is odd. Now
consider the equation y
2
0
= s
2
t
2
modulo 4. Because y
2
0
is odd,
y
2
0
= s
2
t
2
1 0 1 (mod 4) 1 3 (mod 4)
which is impossible. Therefore s is odd and t is even so we write t = 2r. Then
x
2
0
= 2st x
2
0
= 4sr
_
x
0
2
_
2
= sr
Now gcd(s, t) = 1 implies that gcd(s, r) = 1 (why?) and so we can use the proposition
on Decomposing n-th Powers. Since (x
0
/2)
2
is a perfect square, s and r must be perfect
squares and we can write s = z
2
1
and r = w
2
1
for positive integers z
1
and w
1
.
Rewrite y
2
0
= s
2
t
2
as
t
2
+y
2
0
= s
2
Section 53.3 Reducing the Problem 335
Because gcd(s, t) = 1 implies gcd(s, t, y
0
) = 1, the triple t, y
0
, s is a primitive Pythagorean
triple and we can use the Characterization of Pythagorean Triples again. With t even, the
Characterization of Pythagorean Triples assures us of the existence of integers u and v so
that u > v > 0 and gcd(u, v) = 1 and u , v (mod 2) satisfying
t = 2uv
y
0
= u
2
v
2
s = u
2
+v
2
Now, observe that
uv =
t
2
= r = w
2
1
and so by the proposition on Decomposing n-th Powers, u and v are perfect squares. Suppose
u = x
2
1
and v = y
2
1
where x
1
and y
1
are positive integers. But then
s = u
2
+v
2
z
2
1
=
_
x
2
1
_
2
+
_
y
2
1
_
2
and so
z
2
1
= x
4
1
+y
4
1
That is, x
1
, y
1
, z
1
is a solution to x
4
+y
4
= z
2
. Since z
1
and t are positive
0 < z
1
z
2
1
= s s
2
< s
2
+t
2
= z
0
That is,
z
1
< z
0
But recall that x
0
, y
0
, z
0
is a solution to x
4
+y
4
= z
2
with the smallest possible value of z.
But x
1
, y
1
, z
1
is a solution to x
4
+y
4
= z
2
with a smaller value of z!
The case n = 4 of Fermats Last Theorem follows immediately.
Corollary 2 The Diophantine equation x
4
+y
4
= z
4
has no positive integer solution.
Proof: If x
0
, y
0
, z
0
were a positive integer solution of x
4
+y
4
= z
4
, then x
0
, y
0
, z
2
0
would
be a positive integer solution to x
4
+y
4
= z
2
, contradicting the previous theorem.
53.3 Reducing the Problem
It is not necessary to consider every exponent of x
n
+ y
n
= z
n
to prove Fermats Last
Theorem.
If n > 2, then n is either a power of 2 or divisible by an odd prime p. In the rst case,
n = 4k for some k 1 and the equation x
n
+y
n
= z
n
can be rewritten as
_
x
k
_
4
+
_
y
k
_
4
=
_
z
k
_
4
We have just seen that this equation has no positive integer solution.
336 Chapter 53 Fermats Theorem for n = 4
In the second case, n = pk for some k 1 and the equation x
n
+y
n
= z
n
can be rewritten
as
_
x
k
_
p
+
_
y
k
_
p
=
_
z
k
_
p
If it could be shown that u
p
+ v
p
= w
p
has no solution, then there would be no solution
of the form u = x
k
, v = y
k
, w = z
k
and so there would be no solution to x
n
+ y
n
= z
n
.
Therefore, Fermats Last Theorem reduces to
Theorem 3 (Fermats Last Theorem Reduced)
If p is an odd prime, then the Diophantine equation
x
p
+y
p
= z
p
has no non-trivial solutions.
53.4 History
For a very interesting documentary on the solution of FLT, please see
http://video.google.com/videoplay?docid=8269328330690408516
Chapter 54
Problems Related to FLT
54.1 Objectives
1. Read a proof of Squares From the Dierence of Quartics
2. Read a proof of a proposition on the area of Pythagorean triangles.
54.2 x
4
y
4
= z
2
From x
4
+ y
4
= z
2
, we turn to a closely related Diophantine equation, x
4
y
4
= z
2
. Our
proof is very similar to that of the Strong Version of FLT for n = 4. The approach in this
section mostly follows Elementary Number Theory, Seventh Edition by David Burton.
Proposition 1 (Squares From the Dierence of Quartics (SFDQ))
The Diophantine equation x
4
y
4
= z
2
has no non-trivial solutions.
Proof: Suppose that there exists a non-trivial solution to x
4
y
4
= z
2
. Of all such solutions
x
0
, y
0
, z
0
, choose any one in which x
0
is smallest. Choosing x
0
as small as possible forces
x
0
to be odd. (Why?)
We now show that we can also assume that gcd(x
0
, y
0
) = 1. Suppose gcd(x
0
, y
0
) = d > 1.
Then writing dx
1
= x
0
and dy
1
= y
0
and substituting into x
4
y
4
= z
2
we get d
4
(x
4
1
y
4
1
) =
z
2
0
. So d
4
[ z
2
0
, hence d
2
[ z
0
. Thus z
0
= d
2
z
1
for some integer z
1
. But then
d
4
x
4
1
d
4
y
4
1
= d
4
z
2
1
so x
1
, y
1
, z
1
is a non-trivial solution to x
4
y
4
= z
2
with 0 < x
1
< x
0
contradicting our
choice of a minimal x
0
.
If the equation x
4
0
y
4
0
= z
2
0
is written in the form
_
x
2
0
_
2
_
y
2
0
_
2
= z
2
0
then
z
2
0
+
_
y
2
0
_
2
=
_
x
2
0
_
2
337
338 Chapter 54 Problems Related to FLT
and we see that (z
0
, y
2
0
, x
2
0
) constitute a primitive Pythagorean triple.
From here there are two cases: y
0
odd and y
0
even. Consider the case where y
0
is odd. The
Characterization of Pythagorean Triples asserts that there exist integers s and t so that
s > t > 0 and gcd(s, t) = 1 and s , t (mod 2) satisfying
z
0
= 2st (this is forced from y
0
odd)
y
2
0
= s
2
t
2
x
2
0
= s
2
+t
2
Observe that
s
4
t
4
= (s
2
+t
2
)(s
2
t
2
) = x
2
0
y
2
0
= (x
0
y
0
)
2
so s, t, x
0
y
0
is a positive solution to x
4
y
4
= z
2
. But
0 < s <
_
s
2
+t
2
= x
0
which contradicts the minimality of x
0
so y
0
cannot be odd.
Now consider the case where y
0
is even. The Characterization of Pythagorean Triples asserts
that there exist integers s and t so that s > t > 0 and gcd(s, t) = 1 and s , t (mod 2)
satisfying
y
2
0
= 2st (this is forced from y
0
even)
z
0
= s
2
t
2
x
2
0
= s
2
+t
2
Because of the symmetry of expressions for s and t, we may assume that s is even and t is
odd. Consider the relation
y
2
0
= 2st
Since gcd(s, t) = 1 and s is even, we know that gcd(2s, t) = 1. This allows us to invoke the
proposition on Decomposing n-th Powers. That is, 2s and t are each squares of positive
integers, say 2s = w
2
and t = v
2
. Because w must be even, set w = 2u to get s = 2u
2
.
Therefore
x
2
0
= s
2
+t
2
= 4u
4
+v
4
and so (2u
2
, v
2
, x
0
) form a Pythagorean triple. Since gcd(2u
2
, v
2
) = gcd(s, t) = 1,
gcd(2u
2
, v
2
, x
0
) = 1 and so the Pythagorean triple is primitive. The Characterization
of Pythagorean Triples asserts that there exist integers a and b so that a > b > 0 and
gcd(a, b) = 1 and a , b (mod 2) satisfying
2u
2
= 2ab
v
2
= a
2
b
2
x
0
= a
2
+b
2
Now 2u
2
= 2ab implies u
2
= ab which implies, by the proposition on Decomposing n-th
Powers, that a and b are perfect squares. Say a = c
2
and b = d
2
. And here we use a pattern
we have seen before. Since
v
2
= a
2
b
2
= c
4
d
4
c, d, v is a positive integer solution to x
4
y
4
= z
2
. But
0 < c =
a < a
2
+b
2
= x
0
Section 54.3 Pythagorean Triangles 339
contradicting the minimality of x
0
. Hence, y
0
cannot be even.
Since the integer y
0
cannot be either odd or even, it must be the case that our assumption
that there is a non-trivial solution is incorrect.
This proposition has an unexpected use in a statement about the areas of Pythagorean
triangles.
54.3 Pythagorean Triangles
Denition 54.3.1
Pythagorean
Triangle
A Pythagorean triangle is a right triangle whose sides are of integral length.
The familiar 3 4 5 triangle is an example of a Pythagorean triangle. In the margin of
his copy of Diophantus Arithmetica, Fermat stated and proved a proposition equivalent to
the following.
Proposition 2 The area of a Pythagorean triangle can never be equal to a perfect square.
Here, perfect square means the square of an integer.
Proof: We will proceed by contradiction. Consider a Pythagorean triangle ABC where
the hypotenuse has length z and the other two sides have lengths x and y, so that
x
2
+y
2
= z
2
(54.1)
The area of ABC is (1/2)xy and if this were a square we could write (1/2)xy = u
2
. This
gives
2xy = 4u
2
(54.2)
Now Equation (54.1) plus Equation (54.2) gives
x
2
+y
2
+ 2xy = z
2
+ 4u
2
(x +y)
2
= z
2
+ 4u
2
and Equation (54.1) minus Equation (54.2) gives
x
2
+y
2
2xy = z
2
4u
2
(x y)
2
= z
2
4u
2
Now multiply these last two equations together to get
(x +y)
2
(x y)
2
= (z
2
+ 4u
2
)(z
2
4u
2
)
_
x
2
y
2
_
2
= z
4
16u
4
or
_
x
2
y
2
_
2
= z
4
(2u)
4
But we know by our proposition on the Squares From the Dierence of Quartics that no
non-trivial solution to this equation is possible, hence a contradiction.
Chapter 55
Practice, Practice, Practice:
Primes and Non-Linear
Diophantine Equations
55.1 Objectives
This class provides an opportunity to practice working with primes and non-linear Dio-
phantine Equations.
55.2 Practice
1. (Burton, Elementary Number Theory) From the examples we have done in class, it
may seem that all non-linear Diophantine equations have no non-trivial solutions.
This is not so, as the following example demonstrates.
(a) Use the Binomial Theorem to expand (n
2
+ 1)
3
.
(b) Show that x
2
+y
2
= z
3
has innitely many positive integer solutions. (Hint: For
any n 2, let x = n(n
2
3) and y = 3n
2
1.)
2. Joseph Louis Lagrange (1736 1813) was a brilliant French mathematician who
worked mostly in the 18th century. He worked on the Sum of Squares problem, that
is: What is the smallest value of n such that every positive integer can be written as
the sum of not more than n squares?
(a) The integer 18 can be written as the sum of three squares, 18 = 4
2
+ 1
2
+ 1
2
.
Show that all of the integers between 11 and 20 can be written as the sum of at
most four squares.
(b) Prove that if a and b are both the sum of two squares, then ab is the sum of two
squares.
(c) Prove that if p is a prime of the form 4k + 3, then p cannot be a sum of two
squares.
(d) Prove that an integer n can be represented as the dierence of two squares if and
only if n is not of the form 4k + 2.
340
Section 55.2 Practice 341
3. Let (x, y, z) be a primitive Pythagorean triple.
(a) Prove that exactly one of x or y is divisible by 3.
(b) Prove that xy is divisible by 12.
4. (Burton, Elementary Number Theory) Prove each of the following statements.
(a) If n 3 is an odd integer, then
_
n
2
1
2
, n,
n
2
+ 1
2
_
is a Pythagorean triple.
(b) If n 3 is an even integer, then
_
n,
n
2
4
1,
n
2
4
+ 1
_
is a Pythagorean triple.
(c) If n 2 (mod 4), then there is no primitive Pythagorean triple (x, y, z) in which
x or y equals n.
(d) If n , 2 (mod 4), then there is a primitive Pythagorean triple (x, y, z) in which
x or y equals n.
(e) For all integers n 3, there is a Pythagorean triple (not necessarily primitive)
having n as one of its members.
5. For each of the following statements, determine whether the statement is true or false.
For true statements give a proof. For false statements, give a counter-example.
(a) If n N, then n = p + a
2
for some p which is either a prime or 1, and some
a 0.
(b) If p is a prime of the form 3n + 1, then p is of the form 6m+ 1.
(c) If n is an odd integer, then gcd(n, n + 2) = 1.
(d) If n N and n > 1, then n
4
4 is composite.
(e) If n N and n > 1, then n
4
+ 4 is composite.
(f) If n > 4 is composite, then n divides (n 1)!.
(g) The sum of two consecutive odd primes has at least three prime divisors, not
necessarily distinct.
6. Let a < b < c, where a N and b and c are odd primes. Prove that if a [ (3b +2c) and
a [ (2b + 3c) then a = 1 or a = 5. Give examples to show that both of these values
for a are possible.
Chapter 56
Appendix
Proposition 1 (Decomposing n-th Power (DNP))
If ab = c
n
and gcd(a, b) = 1, then there exist integers a
1
and b
1
so that a = a
n
1
and b = b
n
1
.
Proof: Without loss of generality, we may assume that a > 1 and b > 1. If
a = p
k
1
1
p
k
2
2
p
kr
r
b = q
j
1
1
q
j
2
2
q
js
s
are the prime factorizations of a and b, then no p
x
can occur among the q
y
otherwise the
gcd(a, b) > 1. As a result, the prime factorization of ab is
ab = p
k
1
1
p
k
2
2
p
kr
r
q
j
1
1
q
j
2
2
q
js
s
Let us suppose that c can be factored into primes as
c = u
l
1
1
u
l
2
2
u
lt
t
Then ab = c
n
can be written as
p
k
1
1
p
k
2
2
p
kr
r
q
j
1
1
q
j
2
2
q
js
s
= u
nl
1
1
u
nl
2
2
u
nlt
t
This implies that each p
x
and q
y
equals some u
h
and that the corresponding exponents are
equal. That is k
x
= nl
h
(or j
y
= nl
h
). This implies that all of the exponents of the p
x
and
q
y
are divisible by n. Thus, we can choose
a = p
k
1
/n
1
p
k
2
/n
2
p
kr/n
r
b = q
j
1
/n
1
q
j
2
/n
2
q
js/n
s
and a = a
n
1
and b = b
n
1
as needed.
342