MAT1362-Mathematical Reasoning and Proofs
MAT1362-Mathematical Reasoning and Proofs
MAT 1362
Winter 2025
Alistair Savage
University of Ottawa
Preface 4
1 Integers 5
1.1 Axioms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 First consequences of the axioms . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 Subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3 Logic 27
3.1 Quantifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.2 Implications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.3 Negations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2
Contents 3
7 Real numbers 73
7.1 Axioms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
7.2 Positive real numbers and ordering . . . . . . . . . . . . . . . . . . . . . . . 76
7.3 The real numbers versus the integers . . . . . . . . . . . . . . . . . . . . . . 79
7.4 Upper and lower bounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
9 Limits 95
9.1 Unboundedness of the integers . . . . . . . . . . . . . . . . . . . . . . . . . . 95
9.2 Absolute value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
9.3 Distance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
9.4 Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Index 108
Preface
These are notes for the course Mathematical Reasoning & Proofs at the University of Ot-
tawa. This is an introduction to rigorous mathematical reasoning and the concept of proof
in mathematics. It is a course designed to prepare students for upper-level proof-based
mathematics courses. We will discuss the axiomatic method and various methods of proof
(proof by contradiction, mathematical induction, etc.). We do this in the context of some
fundamental notions in mathematics that are crucial for upper-level mathematics courses.
These include the basics of naive set theory, functions, and relations. We will also discuss, in
a precise manner, the integers, integers modulo n, rational numbers, and real numbers. In
addition, we will discuss concepts related to the real line, such as completeness, supremum,
and the precise definition of a limit. In general, this course is designed to provide students
with a solid theoretical foundation upon which to build in subsequent courses.
This course should be of interest to students who feel dissatisfied with mathematics
courses in which computation is emphasized over proof and explanation. In MAT 1362,
we will rarely perform computations based on standard techniques and algorithms, such as
computing derivatives using the chain and product rules. Instead, we will focus on why
certain mathematical statements are true and why given techniques work. This is often
much more difficult than following an algorithm to perform a computation. However, it is
much more rewarding and results in a deeper understanding of the material.
Acknowledgement: Significant portions of these notes closely follow the book The Art of
Proof by Matthias Beck and Ross Geoghegan [BG10], which is the official course text.
Alistair Savage
4
Chapter 1
Integers
In this chapter we discuss the integers. While you have encountered the integers in many
previous courses, dating back to grade school, you probably took certain properties for
granted. In this course, we will begin with some precise axioms and deduce other properties
of the integers in a more rigorous way.
1.1 Axioms
We will discuss the concept of a set later, in Chapter 5. For now, we will use the word
intuitively. A set S is a collections of things, called the elements or members of S. We write
a ∈ S to indicate that a is an element of S. A binary operation on a set S is a function that
takes two elements of S as input and produces another element of S as output.
We will assume there is a set Z, whose members we will call integers. This set comes
with two binary operations:
• addition, denoted +, and
• multiplication, denoted ·.
We will often denote multiplication by juxtaposition. That is, we will write ab instead of
a · b.
We assume that Z, together with these operations, satisfies the following five axioms, as
well as Axioms 2.1 and 2.17 to be introduced in Chapter 2.
Axiom 1.1 (Commutativity, associativity, and distributivity). For all integers a, b, and c,
we have
(i) a + b = b + a, (commutativity of addition)
(iii) a · (b + c) = a · b + a · c, (distributivity)
5
6 Integers
Axiom 1.2 (Additive identity). There exists an integer 0 such that a + 0 = a for all a ∈ Z.
This element 0 is called an additive identity, or an identity element for addition.
Axiom 1.3 (Multiplicative identity). There exists an integer 1 such that 1 ̸= 0 and a · 1 = a
for all a ∈ Z. The element 1 is called a multiplicative identity, or an identity element for
multiplication.
Axiom 1.4 (Additive inverse). For each a ∈ Z, there exists an integer, denoted −a, such
that a + (−a) = 0. The element −a is called an additive inverse of a.
Axiom 1.5 (Cancellation). If a, b, c ∈ Z, a · b = a · c, and a ̸= 0, then b = c. This is called
the cancellation property.
The symbol “=” means equals. When we write a = b for elements a and b of some set
S (e.g. Z), we mean that a and b are the same element. This symbol has the following
properties:
(i) a = a. (reflexivity of equality)
(iii) The symbol ̸= is not transitive. For example, 1 ̸= 2 and 2 ̸= 1, but it is not true that
1 ̸= 1 (which is what transitivity would imply).
The symbol ̸∈ means is not an element of.
a+b=a+c
=⇒ (−a) + (a + b) = (−a) + (a + c) replacement property
=⇒ ((−a) + a) + b = ((−a) + a) + c Axiom 1.1(ii) (associativity of addition)
=⇒ 0 + b = 0 + c Proposition 1.8
=⇒ b = c. Proposition 1.7
Above, we have used the symbol =⇒ . If P and Q are two statements, then P =⇒ Q
means that the statement P implies the statement Q or, equivalently, that Q follows logically
from P . It can also be read “if P , then Q”.
Proposition 1.10 (Uniqueness of the additive inverse). If a, b ∈ Z and a + b = 0, then
b = −a. In other words, the element −a mentioned in Axiom 1.4 is the unique additive
inverse of a (i.e. every integer has exactly one additive inverse).
Proof. Suppose a, b ∈ Z. Then we have
a+b=0
=⇒ (−a) + (a + b) = (−a) + 0 replacement property
=⇒ (−a) + (a + b) = −a Axiom 1.2 (add. ident.)
=⇒ ((−a) + a) + b = −a Axiom 1.1(ii) (assoc. of add.)
=⇒ 0 + b = −a Proposition 1.8
=⇒ b = −a. Proposition 1.7
8 Integers
Proposition 1.10 is a good example of how we have tried to make the axioms as weak as
possible. We could have worded Axiom 1.4 to say that every integer has a unique additive
inverse. However, Proposition 1.10 shows that it is enough to state the weaker axiom that
every integer has at least one additive inverse. The uniqueness of the additive inverse follows
from the axioms.
(iii) a + (b + c) = (c + a) + b,
Proof. We will prove part (v) and leave the remaining parts as an exercise (Exercise 1.2.3).
Suppose a, b, c, d ∈ Z. Then we have
Proof. Suppose a ∈ Z has the property that b + a = b for all b ∈ Z. In particular, choosing
b = 0, we have
0+a=0
=⇒ a = 0. Proposition 1.7
Proof. Suppose a ∈ Z has the property that b + a = b for some b ∈ Z. By Axiom 1.4, b has
an additive inverse −b ∈ Z. Then
b+a=b
=⇒ (−b) + (b + a) = (−b) + b replacement property
First consequences of the axioms 9
Note the difference between Propositions 1.12 and 1.13. In Proposition 1.12, the equation
b + a = b is assumed to hold for all b ∈ Z, whereas in Proposition 1.13, it is assumed to hold
only for some b ∈ Z.
Proof. We have
The equality 0 = 0·a then follows from Axiom 1.1(iv) (commutativity of multiplication).
If a, b ∈ Z, we say that a is divisible by b (or that b divides a) if there exists c ∈ Z such
that a = bc. We will write b|a to indicate that a is divisible by b and b ∤ a to indicate that a
is not divisible by b.
How can we define even integers? Well, as you learn in grade school, even integers are
integers that are divisible by 2. But what is 2? Neither our axioms nor anything we have
proved up to this point discusses the integer 2. However, we can define 2 to be the integer
1 + 1.
Proposition 1.15. If a and b are even integers, then a + b and ab are also even.
Proof. Suppose a and b are even integers. Then, by definition, there exist j, k ∈ Z such that
a = 2j and b = 2k. Thus
a + b = 2j + 2k replacement property
= 2(j + k) Axiom 1.1(iii) (distributivity)
Proposition 1.18. If a ∈ Z has the property that, for some nonzero b ∈ Z, ba = b, then
a = 1.
Proof. Suppose a ∈ Z has the given property. So there exists some nonzero b ∈ Z such that
ba = b. Then
ba = b
=⇒ b · a = b · 1 Axiom 1.3 (multiplicative identity)
=⇒ a = 1. Axiom 1.5 (cancellation)
(ii) −0 = 0.
(ii) We have
Note that Proposition 1.22 asserts that there is one and only one c with the given
property. Thus, this statement is asserting two things: that such an element c exists (the
existence part of the statement) and that any two elements with the given property must
be equal (the uniqueness part of the statement). Later, once we have discussed subtraction,
the element c in Proposition 1.22 will be denoted b − a.
Proof of Proposition 1.22. Suppose a, b ∈ Z. To prove the existence part of the statement,
we just need to find one element with the given property. In fact, (−a)+b is such an element,
since
a + (−a) + b = a + (−a) + b Axiom 1.1(ii) (associativity of addition)
=0+b Axiom 1.4 (additive inverse)
= b. Proposition 1.7
It remains to prove uniqueness. Suppose c1 and c2 are two elements with the given
property. Then we have
a + c1 = b = a + c2
=⇒ a + c1 = a + c2 transitivity of equality
=⇒ c1 = c2 . Proposition 1.9
Warning! You cannot start a proof with the statement you are trying to prove. Doing so
results in circular reasoning, which is not valid. For example, in Proposition 1.23, you cannot
start with the statement a = 0 or a = 1. Instead, you must deduce the statement you are
trying to prove from statements you know to be true, or the hypotheses of the proposition.
To illustrate how starting with the statement you are trying to prove can result in nonsense,
consider the following invalid “argument”:
1 = −1
=⇒ 1 · 1 = (−1)(−1) replacement property
=⇒ 1 = 1 Axiom 1.3 (multiplicative identity) and Prop. 1.21.
We ended up with a true statement, but that does not mean that our original statement is
true. Make sure you avoid this common pitfall.
Proof. The proof of this proposition is left as an exercise (Exercise 1.2.7). Note that some
of part (iii) was proved in Proposition 1.19.
Remark 1.25. In mathematics, the word “or”, without further qualification, is always inclu-
sive. For example, to say that “P or Q is true” means that P is true or Q is true or both P
and Q are true.
a · b = 0 = a · 0.
Exercises.
1.2.1. Prove Proposition 1.7.
1.2.6. Prove Proposition 1.23. Hint: Split the proof into two cases: a = 0 and a ̸= 0.
1.3 Subtraction
Although you are all familiar with subtraction of integers, we have not encountered this
concept yet, since it is not mentioned in our axioms or in the results we have proven so far.
We can now define the concept of subtraction precisely.
Definition 1.27 (Subtraction). For a, b ∈ Z, we define a−b to be a+(−b). This new binary
operation − will be called subtraction.
(i) (a − b) + (c − d) = (a + c) − (b + d),
(ii) (a − b) − (c − d) = (a + d) − (b + c),
Proof. The proof of part (i) can be found in [BG10, Prop. 1.27]. We will prove part (iii) and
leave the proofs of the other statements as an exercise (Exercise 1.3.1). We have
(a − b)(c − d) = a + (−b) c + (−d) def. of subtraction
= ac + (−b)c + a(−d) + (−b)(−d) Prop. 1.11(i)
= ac + (−b)c + a(−d) + (−b)(−d) Prop. 1.11(ii)
= ac + (−b)c + a(−d) + bd Prop. 1.21
= bd + ac + (−b)c + a(−d) Axiom 1.1(i) (comm. of add.)
14 Integers
= (bd + ac) + (−b)c + a(−d) Prop. 1.11(ii)
= (ac + bd) + (−b)c + a(−d) Axiom 1.1(i) (comm. of add.)
= (ac + bd) + − (bc) + (−(ad)) Prop. 1.24(iii)
= (ac + bd) + − (bc + ad) by Prop. 1.24(i)
= (ac + bd) − (bc + ad) def. of subtraction
= (ac + bd) − (ad + bc). Axiom 1.1(i) (comm. of add.)
As you can see, writing out some proofs in detail, citing all the appropriate axioms and
results, can become rather lengthy. As we begin to become familiar with the properties, we
will often omit straightforward steps, so that we can focus on the important new ideas in
a proof, instead of the small technical points that are similar to arguments we have done
before. But it is important to realize that one could fill in all the details, justifying every
step.
Remark 1.29. We have seen in this chapter that the arithmetic of integers, as defined by
our axioms, behave as we learned in grade school. From now on, we will start to use the
properties demonstrated in this chapter freely, often omitting some of the justifications. In
particular, as in Proposition 1.11(ii), we see that we can move the parentheses in the addition
of multiple integers however we like, leaving the result unchanged. Therefore, if a, b, c, d ∈ Z,
we can unambiguously write expressions like
a + b + c + d,
since the result of the additions is the same no matter how we group the terms.
Exercises.
1.3.1. Prove the remaining parts of Proposition 1.28.
Chapter 2
In this section we introduce the natural numbers and an ordering on the integers. We then
see the important principles of mathematical induction and well-ordering.
Axiom 2.1 (Natural numbers). There exists a subset N of Z with the following properties:
(iii) 0 ̸∈ N.
Remark 2.2. It is important to note that some references use the symbol N to denote a
slightly different subset of Z than the one introduced above. Namely, they include 0 in the
set of natural numbers. Keep this in mind when reading other sources, to avoid confusion.
The proof of our next proposition will involve proof by contradiction. This technique
works as follows. Suppose we want to show that some statement P is true. Instead of
showing this directly, we can show that the assumption that P is false leads to a logical
contradiction (such as 1 = 0). We implicitly use the Law of the Excluded Middle, which says
that P must be either true or false. Thus, if its being false leads to a contradiction, it must
be true.
Proposition 2.3. For a ∈ Z, one and only one of the following statements is true:
15
16 Natural numbers and induction
• a ∈ N,
• −a ∈ N,
• a = 0.
Proof. Suppose a ∈ Z. By Axiom 2.1(iv), at least one of the statements in the proposition
is true. So it remains to prove that at most one is true.
First suppose a = 0. Then, by Proposition 1.20(ii), we have −a = −0 = 0. Therefore,
by Axiom 2.1(iii), a ̸∈ N and −a ̸∈ N.
It remains to prove that, if a ̸= 0, then a and −a cannot both be in N. We prove this by
contradiction. Therefore, we assume that the statement
a ∈ N and − a ∈ N (2.2)
a + (−a) ∈ N.
Proof. Since 1 ̸= 0 (by the multiplicative identity axiom, Axiom 1.3), one and only one
of 1 ∈ N and −1 ∈ N is true by Proposition 2.3. If −1 ∈ N, then by the closure of N
under multiplication (Axiom 2.1(ii)), we have 1 = (−1)(−1) ∈ N, which would contradict
Proposition 2.3. Thus 1 ∈ N.
Definition 2.5 (Order on the integers). For a, b ∈ Z, we write a < b (and say a is less than
b) or b > a (and say b is greater than a) if and only if
b − a ∈ N.
We write a ≤ b (and say a is less than or equal to b) or b ≥ a (and say b is greater than or
equal to a) if and only if
a < b or a = b.
Ordering the integers 17
Proposition 2.6 (Transitivity of <). Suppose a, b, c ∈ Z. If a < b and b < c, then a < c.
In other words, the relation < is transitive.
Proof. Assume a, b, c ∈ Z such that a < b and b < c. Thus, by definition, we have b − a ∈ N
and c − b ∈ N. Then, by Axiom 2.1(i)
c − a = (c − b) + (b − a) ∈ N.
Thus, a < c.
Proposition 2.7 (N has no largest element). For each a ∈ N, there exists b ∈ N such that
b > a.
b − a ∈ N and a − b ∈ N.
Proof. The proof of part (iii) can be found in [BG10, Prop. 2.7]. We will prove part (iv) and
leave the proofs of the other parts as an exercise (Exercise 2.2.2).
Suppose a, b, c ∈ Z satisfy a < b and c < 0. So b − a ∈ N and
−c = 0 + (−c) = 0 − c ∈ N.
• a < b,
• a = b,
• a > b.
a2 = a · a = (−a)(−a) ∈ N
Proof. We will prove this by contradiction. Suppose there is an a ∈ Z such that a2 = −1.
We split the proof into two cases:
Case 1: a = 0. Then a2 = 0 · 0 = 0, and so 0 = −1. Adding 1 to both sides gives 1 = 0,
which contradicts Axiom 1.3.
Case 2: a ̸= 0. In this case, Proposition 2.11 implies that −1 = a2 ∈ N. By Proposi-
tion 2.4, we also have 1 ∈ N. This contradicts Proposition 2.3.
In both cases, we arrived at a contradiction. This completes the proof by contradiction.
Proof. We prove part (iv) and leave the other parts as exercises (Exercise 2.2.5). Assume
a ≤ b and 0 ≤ c. We split the proof into three cases.
Case 1: c = 0. Then ac = 0 and bc = 0. So ac ≤ bc is true since 0 ≤ 0.
Case 2: c > 0 and a = b. Then ac = bc and so ac ≤ bc is true.
Case 3: c > 0 and a < b. Then we have c ∈ N and b − a ∈ N. Therefore,
bc − ac = (b − a)c ∈ N,
If A and B are sets, we will write A ⊆ B to mean that A is a subset of B. In other words
A ⊆ B means that
x ∈ A =⇒ x ∈ B.
Two sets are equal , written A = B, if
A⊆B and B ⊆ A.
x ∈ A ⇐⇒ x ∈ B.
{n ∈ Z : some property of n}
to denote the set of integers satisfying a given property. For example {n ∈ Z : n > 3} is the
set of all integers greater than 3. We will discuss sets in more detail later, in Chapter 5.
Proof. We have
Exercises.
2.2.1. Prove Proposition 2.7.
2.2.4. Prove Proposition 2.13. Hint: Consider three cases: b < 0, b = 0, and b > 0.
2.2.6. Prove that if a, b, c ∈ Z satisfy a ≤ b and b ≤ c, then a ≤ c. (In other words, the
relation ≤ is transitive. Note that it follows from this that ≥ is also transitive.)
2.3 Induction
In this section we introduce an important method of proof: mathematical induction. This
method is based on the natural numbers, and we need one further axiom before discussing
induction. Before stating this axiom, we begin with a proposition.
Proposition 2.16. (i) 1 ∈ N.
(ii) n ∈ N =⇒ n + 1 ∈ N.
Proof. Part (i) was already proved in Proposition 2.4. Then part (ii) follows from Ax-
iom 2.1(i).
The new axiom states that N is the smallest subset of Z satisfying Proposition 2.16.
Axiom 2.17 (Induction Axiom). Suppose a subset A ⊆ Z satisfies the following properties:
(i) 1 ∈ A,
(ii) n ∈ A =⇒ n + 1 ∈ A.
Then N ⊆ A.
Proposition 2.18. Suppose B ⊆ N satisfies:
(i) 1 ∈ B,
(ii) n ∈ B =⇒ n + 1 ∈ B.
Then B = N.
Proof. By hypothesis, B ⊆ N. By Axiom 2.17, N ⊆ B. Thus B = N.
Proposition 2.18 is the basis of the principle of induction.
Induction 21
Theorem 2.19 (Principle of mathematical induction: first form). Suppose that, for each
k ∈ N, we have a statement P (k). Furthermore, suppose that
B := {k ∈ N : P (k) is true}.
Proofs that use Theorem 2.19 are called proofs by induction. In proofs by induction,
statement (i) is often called the base case and statement (ii) is often called the induction
step. While proving the induction step, we typically assume P (n) is true and then show
that P (n + 1) follows from this assumption. When doing this, P (n) is called the induction
hypothesis.
Base ten numbers. So far the only specific integers with names are 0, 1, and −1. It is
useful to have names for some more integers. We define the digits
2 := 1 + 1,
3 := 2 + 1,
..
.
9 := 8 + 1.
We can then define numbers write in base ten notation, e.g. 11 and 56, as you learn in
elementary school. This is discussed in detail in [BG10, Ch. 7], but we will omit such a
discussion in this course.
(i) We define b0 := 1.
Note that it follows from the above that 00 = 1. We also have, for all a ∈ Z and integers
m, k ≥ 0,
• am ak = am+k .
• (am )k = amk .
22 Natural numbers and induction
Example 2.20. We will prove by induction that 11n − 6 is divisible by 5 for every n ∈ N. Let
P (k) be the statement
11k − 6 is divisible by 5.
Base case: P (1) is the statement that 111 − 6 is divisible by 5. Since 111 − 6 = 5, this is
clearly true.
Induction step: Suppose that P (n) is true for some n ∈ N. Thus, 11n − 6 is divisible by 5.
Therefore, there exists m ∈ Z such that
11n − 6 = 5m.
11n+1 − 6 = 11 · 11n − 6
= 11(5m + 6) − 6 (by the induction hypothesis)
= 55m + 66 − 6
= 55m + 60
= 5(11m + 12).
Thus, 11n+1 − 6 is divisible by 5. In other words P (n + 1) is true. This completes our proof
of the induction step.
a ≥ 1.
(m + 1) − m = 1 ∈ N,
−a = −(bc) = b(−c) ∈ N,
Example 2.25. Let us prove that 8n − 3n is divisible by 5 for all n ∈ N. We will prove this
by induction. Let
Induction step: Suppose the statement is true for some k ≥ −2. Then
Now, we have
Thus
3(k + 1)2 + 15(k + 1) + 19 ≥ 0,
Exercises.
2.3.3 ([BG10, Prop. 2.27]). Prove that, for all integers k ≥ 2, we have k 2 < k 3 .
The well-ordering principle 25
(ii) If A has a greatest element, then this element is unique. In other words, A has at most
one greatest element.
Proof. Suppose a and b are both smallest elements of A. Then a ≤ b and b ≤ a. Thus,
by Proposition 2.8, we have a = b. The proof of the second part of the proposition is
analogous.
Example 2.30. By Propositions 2.4 and 2.21, 1 is the smallest element of N. On the other
hand, by Proposition 2.7, N has no greatest element.
Example 2.31. The set of even integers has neither a smallest element nor a greatest element.
However, the set of negative even integers has greatest element −2, but no smallest element.
Remark 2.32. We will always use the words positive and negative in the strict sense. So
a ∈ Z is positive if a > 0 and negative if a < 0. We say a ∈ Z is nonnegative if a ≥ 0.
Theorem 2.33 (Well-ordering principle). Every nonempty subset of N has a smallest ele-
ment.
Proof. Define the set
If we prove that A = N, then we have proved the theorem. We will prove by induction that
A contains every natural number.
Base case: As seen in Example 2.30, 1 is a smallest element of N. Therefore, if any subset
of N contains 1, then 1 is its smallest element. Therefore, 1 ∈ A.
Induction step: Assume n ∈ A for some n ∈ N. Suppose that S ⊆ N contains an integer
≤ n + 1. We want to prove that S has a smallest element. If S contains an integer ≤ n,
then S has a smallest element by the induction hypothesis. Otherwise (i.e. when S does not
contain an integer ≤ n), S must contain n + 1 (by Corollary 2.23), and this integer is the
smallest element of S.
26 Natural numbers and induction
a + 1 − b ∈ B =⇒ a + 1 − b ≥ c = d + 1 − b =⇒ a ≥ d.
Proposition 2.35. Suppose a and b are integers that are not both 0. Then the set
S = {k ∈ N : k = ax + by for some x, y ∈ Z}
is nonempty.
Definition 2.36 (gcd). Suppose a, b ∈ Z. If a and b are not both zero, we define
gcd(a, b) = min {k ∈ N : k = ax + by for some x, y ∈ Z} .
(Since this set is nonempty by Proposition 2.35, it has a minimum element by Theorem 2.33.)
If a = b = 0, we define gcd(0, 0) = 0.
We will see later that gcd(a, b) is actually the greatest common divisor of a and b, justi-
fying the notation (see Proposition 6.29).
Exercises.
2.4.1. Prove Proposition 2.35.
Chapter 3
Logic
We have already used logical argument in Chapters 1 and 2. One of our goals there was to
introduce ourselves to the concept of mathematical proof before getting into the technicalities
of logic. In the current chapter will examine some basic concepts of logic in more detail.
This will allow us to be more precise in our mathematical arguments.
3.1 Quantifiers
The symbol ∃ is called the existential quantifier . It means there exists or there exist. The
symbol ∀ is called the universal quantifier . It means for all or for each or for every or
whenever.
Examples 3.1. (i) “∃m ∈ Z such that m > 5” means “there exists an element m ∈ Z such
that m > 5”. (This statement is true.)
(ii) “∀m ∈ Z, m < 5” means “for all m ∈ Z, we have m < 5”. (This statement is false.)
Statements with quantifiers consist of quantified segments of the form (∃ . . . such that)
and/or (∀ . . .) in a certain order, and then a final statement or assertion. For instance, in
example (iii) above, we have
27
28 Logic
Statement (i) asserts that, for each integer a, there is an integer b ∈ Z, which could depend
on a, such that a + b = 0. This is true, since one can choose b = −a. On the other hand,
statement (ii) asserts that there is some integer b such that a + b = 0 for all integers a. This
is false, since there is no b that satisfies this condition for all a. So in statement (i), b may
depend on a, whereas in statement (ii) it may not.
The particular variable used in a quantified statement is not important. For example,
(∀a ∈ Z)(∃b ∈ Z such that) a + b = 0 ≡ (∀m ∈ Z)(∃n ∈ Z such that) m + n = 0,
where the symbol ≡ denotes logical equivalence.
One can combine several consecutive ∀-phrases in a row. For example
(∀a ∈ Z)(∀b ∈ Z) has the same meaning as (∀a, b ∈ Z).
Similarly, one can combine several ∃-phrases:
(∃a ∈ N)(∃b ∈ N) has the same meaning as (∃a, b ∈ N).
Examples 3.2. We can express many statements using quantifiers.
(i) “Every natural number is greater than −1” can be written as (∀n ∈ N) n > −1.
(ii) “Every integer is the sum of two integers” can be written as (∀a ∈ Z)(∃b, c ∈ Z such that) b+
c = a.
(iii) “There exists a smallest natural number” can be written as (∃n ∈ N such that)(∀m ∈
N) n ≤ m.
Examples 3.3. (i) The statement “(∀x ∈ Z)(∃y ∈ N such that ) x < y” is true.
(ii) The statement “(∃y ∈ N such that )(∀x ∈ Z) x < y” is false.
(iii) The statement “(∀x ∈ Z) x2 ≥ 0” is true.
For all statements can often be rewritten as if then statements. For example
(∀x ∈ Z) x2 ≥ 0 is equivalent to if x ∈ Z, then x2 ≥ 0.
The symbol ∄ means there does not exist. For example, the statement
(∄a ∈ N such that)(∀b ∈ N) a > b
means that there is no natural number that is greater than all other natural numbers.
Uniqueness. The symbol ∃! means there exists a unique. For example, Axiom 1.4 and
Proposition 1.10 imply the statement
(∀a ∈ Z)(∃!b ∈ Z such that) a + b = 0.
A statement of the form (∃!n ∈ N such that) is actually two statements:
• existence: (∃n ∈ N such that), and
• uniqueness: (if n ∈ N and m ∈ N both have the given property, then n = m).
Implications 29
Exercises.
3.1.1. Express each of the following statements using quantifiers. (Note that we make no
claim as to the validity of these statements. We merely translate them.)
(i) There exists a largest integer.
(v) The equation x2 + 5y 3 = 4 has a unique integer solution (i.e. it has one and only one
solution where x and y are integers).
3.1.2. For each of the following statements, decide whether it is true or false.
(i) (∀x ∈ Z)(∃y ∈ Z such that) x + y = 2
3.2 Implications
The symbol =⇒ means implies. If P and Q are statements, then the following are equiva-
lent:
• P =⇒ Q.
• P implies Q.
• If P , then Q.
• (not P ) or Q.
Remark 3.4. It is important to note that if P is a false statement, then the implication
P =⇒ Q is true. This follows from the fact, mentioned above, that “P =⇒ Q” is
equivalent to “(not P ) or Q”. For example, the statement
if 5 is an even number, then there is life on Mars
is true (regardless of whether or not there is life on Mars), since the statement “5 is an even
number” is false.
30 Logic
P Q P =⇒ Q (not P ) or Q
true true true true
true false false false
false true true true
false false true true
The double implication symbol ⇐⇒ means if and only if . If P and Q are statements,
then the following are equivalent:
• P ⇐⇒ Q.
• P if and only if Q.
• (P =⇒ Q) and (Q =⇒ P ).
n is divisible by 4 =⇒ n is even
n is even =⇒ n is divisible by 4,
which is false.
Negations 31
n is divisible by 4 =⇒ n is even
Exercises.
3.2.1. Give two examples of true mathematical statements whose converses are false. (Do
not give examples that we have already seen.)
3.2.2. Try re-proving some of the if-then propositions in Chapters 1 and 2 by proving their
contrapositives.
3.3 Negations
If P is a statement, then its negation is the statement (not P ). For example, the negation
of (n is even) is (n is not even). We will sometimes write ¬P for “not P ”.
Negation of “and” and “or”. Negation interchanges “and” and “or” in the following
sense (sometimes called De Morgan’s laws):
Example 3.8. Suppose P is some property that an integer may possess. Then the statement
“∃!n ∈ Z with property P ” is equivalent to
(∃n ∈ Z with property P ) and (there is at most one integer with property P ).
(there is no n ∈ Z with property P ) or (there is more than one integer with property P ).
32 Logic
Negations involving quantifiers. Now suppose we want to find the negation of a state-
ment involving the quantifiers ∀ and ∃. We write it in the form of quantified segments
followed by a final statement. Then, to find the negation we do the following:
(i) We maintain the order of the quantified segments, but change every (∀ . . .) segment
into a (∃ . . . such that) segment.
(We have replaced the quantified variable 0 by b, which does not change the meaning of the
implication.) Its negation is
Examples 3.10. (i) The negation of “every differentiable function is continuous” is “there
exists a differentiable function that is not continuous”.
(ii) The negation of “none of Paul’s Facebook posts is interesting” is “there exists a Face-
book post by Paul that is interesting”.
(∀ε > 0) (∃δ > 0 such that) (∀x ∈ R) (|x − a| < δ =⇒ |f (x) − f (a)| < ε)
is
(∃ε > 0 such that) (∀δ > 0) (∃x ∈ R such that) (|x − a| < δ and |f (x) − f (a)| ≥ ε).
Exercises.
3.3.1. Negate the following statements.
(ii) State the converse to (⋆). Is the converse true? Remember to justify your answer.
(iii) State the contrapositive of (⋆). Is the contrapositive true? Remember to justify your
answer.
(iv) State the negation of (⋆). Is the negation true? Remember to justify your answer.
Chapter 4
In this chapter we will introduce some common mathematical notions such as summation
notation, product notation, and factorials. We will then prove the important Binomial
Theorem and introduce a second form of mathematical induction.
4.1 Preliminaries
An (infinite) sequence is a list of integers xj for j ∈ N. We denote such a sequence by
(xj )∞
j=1 . (Later we will see that a sequence is a function with domain N. See Example 5.21.)
It is possible that the indices (i.e. the subscripts) do not start at 1, but rather at some other
integer m. In that case, we write (xj )∞ M
j=m . A finite sequence (xj )j=m is a list of numbers
xm , xm+1 , xm+2 , . . . , xM −1 , xM .
(Here m, M ∈ Z with m ≤ M .)
(i) Define x1 = 1.
Note that the sequence of Example 4.1 was defined directly. Given any k, we can imme-
diately compute xk . On the other hand, the sequence of Example 4.2 was defined recursively.
In order to compute the k-th term, we must compute all the terms before it.
x1 = −4,
34
Preliminaries 35
Summation and product notation. If (xj )nj=m is a finite sequence of integers, we define
n
X
xj = xm + xm+1 + · · · + xn ,
j=m
n
Y
xj = xm xm+1 · · · xn .
j=m
Pm Qm
(If m = n, we interpret these as j=m xj = xm and j=m xj = xm .)
We let
Z≥0 := {n ∈ Z : n ≥ 0}
denote the set of nonnegative integers..
(i) We define 0! := 1.
Qn
(ii) For n > 0, we define n! = j=1 j = 1 · 2 · · · · · n.
Exercises.
4.1.1 ([BG10, Proj. 4.3]). Suppose m is a natural number. Define the following sequence:
(i) Define x1 = m.
Does this sequence eventually take on the value 1, no matter what value of m ∈ N was
chosen to start with? Try to prove your assertion.
4.1.4 ([BG10, Proj. 4.9]). Determine for which natural numbers k the inequality k 2 < 2k
holds. Prove your answer.
x1 = 12,
xn+1 = 2xn + 6 for n ≥ 1.
x1 = 10,
xn+1 = x2n + 3xn − 5 for n ≥ 1.
n
X n(n + 1)(2n + 1)
(ii) j2 = .
j=1
6
Finite series 37
Proof. We will prove the first equality, and leave the second as an exercise. We prove the
first equality by induction on n. If n = 1, we have
1
X 1(1 + 1)
j=1= ,
j=1
2
n+1 n
!
X X
(1 − x) xj = (1 − x) xj + xn+1
j=0 j=0
38 Finite series and strong induction
n
X
= (1 − x) xj + (1 − x)xn+1 = 1 − xn+1 + xn+1 − xn+2 = 1 − xn+2 ,
j=0
M
! M
X X
a· xj = (axj ).
j=m j=m
(ii) We have
n
X
{z· · · + a} = (1| + 1 +{z· · · + 1})a = na.
a = |a + a +
j=1 n terms n terms
Proposition 4.7. Suppose a, b, c ∈ Z satisfy a ≤ b < c. Furthermore, suppose (xj )cj=a and
(yj )cj=a are finite sequences in Z.
c
X b
X c
X
(i) xj = xj + xj .
j=a j=a j=b+1
b
X b
X b
X
(ii) (xj + yj ) = xj + yj .
j=a j=a j=a
(ii) We have
b
X b
X b
X
(xj +yj ) = (xa +ya )+· · ·+(xb +yb ) = (xa +· · ·+xb )+(ya +· · ·+yb ) = xj + yj .
j=a j=a j=a
Finite series 39
The following proposition shows how we can shift the summation index without altering
a sum.
Proposition 4.8. Suppose (xj )M
j=m is a finite sequence in Z and that r ∈ Z. Then
M
X M
X +r
xj = xj−r .
j=m j=m+r
Proof. We have
M
X M
X +r
xj = xm + xm+1 + · · · + xM = x(m+r)−r + x(m+r+1)−r + · · · + x(M +r)−r = xj−r .
j=m j=m+r
Exercises.
Pk
4.2.1 ([BG10, Proj. 4.12]). Find and prove a formula for j=1 j 3.
(Strictly speaking, this question involves rational numbers, which we haven’t seen yet. But
you can do arithmetic with them just like you have in previous math courses.)
(a + b)2 = a2 + 2ab + b2 ,
(a + b)3 = a3 + 3a2 b + 3ab2 + b3 .
Here is the general form, allowing you to write a similar formula for any exponent.
Theorem 4.12 (Binomial Theorem for integers). If a, b ∈ Z and k ∈ Z≥0 , then
k
k
X k
(a + b) = am bk−m .
m=0
m
Proof. We prove the result by induction on k. For the base case, we have
0 0 0 0
(a + b) = 1 = ab.
0
42 Finite series and strong induction
Then
n+1
X n+1
am bn+1−m
m=0
m
n
n + 1 0 n+1 X n + 1 m n+1−m n + 1 n+1 0
= ab + a b + a b (by Prop. 4.7(i))
0 m=1
m n+1
n
n+1
X n n
=b + + am bn+1−m + an+1 (by Cor. 4.11)
m=1
m−1 m
n n
n+1
X n m n+1−m
X n m n+1−m
=b + a b + a b + an+1 (by Prop. 4.7(ii))
m=1
m − 1 m=1
m
n−1 n
n+1
X n m+1 n+1−(m+1) X n m n+1−m
=b + a b + a b + an+1 (by Prop. 4.8 with r = 1)
m=0
m m=1
m
n n
X n m+1 n+1−(m+1) X n m n+1−m
= a b + a b (by Prop. 4.7(i))
m=0
m m=0
m
n n
X n m n−m X n m n−m
=a a b +b a b (by Prop. 4.6(i))
m=0
m m=0
m
= a(a + b)n + b(a + b)n (by the induction hypothesis)
= (a + b)n+1 ,
k
X k
= 2k .
m=0
m
Exercises.
4.3.1 (Leibniz’s formula [BG10, Proj. 4.23]). Consider an operation denoted by ′ that is
applied to functions (denoted u, v, w). Assume that the operation ′ satisfies the following
axioms:
(u + v)′ = u′ + v ′ ,
(uv)′ = uv ′ + u′ v,
(cu)′ = cu′ , where c is a constant.
(ii) if P (j) is true for all integers j such that 1 ≤ j ≤ n, then P (n + 1) is true.
Then P (k) is true for all k ∈ N.
Proof. This can be proved by proving the statement “P (j) is true for all integers j such
that 1 ≤ j ≤ k” by induction (the first form of induction) on k. We leave the details as an
exercise (Exercise 4.4.1).
Note the difference between Theorem 4.14 and Theorem 2.19. In Theorem 2.19, one only
assumes P (n) in the induction step. However, in Theorem 4.14, one assumes P (j) for all
1 ≤ j ≤ n. Of course, one can start the induction at any integer (as opposed to 1).
The Fibonacci numbers (fj )∞j=1 are defined by
f1 = 1, f2 = 1, and
44 Finite series and strong induction
Using strong induction, one can obtain an explicit formula for the Fibonacci numbers—one
that gives the n-th Fibonacci number directly, without computing it recursively. The formula
involves irrational numbers, which we will discuss in more detail later. However, since this
is a such a classic example, we will assume for now that we know about irrational numbers.
Proposition 4.15. For k ∈ N, we have
√ !k √ !k
1 1+ 5 1− 5
fk = √ − . (4.1)
5 2 2
Proof. Let √ √
1+ 5 1− 5
a= and b= .
2 2
Since the recursive formula defining the Fibonacci numbers is not valid until n ≥ 3, we need
to check two bases cases. We leave it as an exercise to check that (4.1) gives f1 = 1 and
f2 = 1, as desired.
Now we assume that the formula (4.1) holds for all 1 ≤ k ≤ n for some n ≥ 2. We will
need the computations
√ √
3+ 5 1+2 5+5
a+1= = = a2 ,
2√ 4
√
3− 5 1−2 5+5
b+1= = = b2 .
2 4
Then we have
fn+1 = fn + fn−1
1 1
= √ (an − bn ) + √ (an−1 − bn−1 )
5 5
1 n
= √ (a + an−1 − bn − bn−1 )
5
1 n−1
= √ (a (a + 1) − bn−1 (b + 1))
5
1
= √ (an−1 a2 − bn−1 b2 )
5
1
= √ (an+1 − bn+1 ),
5
completing the induction proof.
You might wonder where the formula (4.1) comes from. We see from the proof that the
key property of a and b is that a2 = a + 1 and b2 = b + 1. In fact, the recursion relation
fn = fn−1 + fn−2 leads to the quadratic equation x2 = x + 1, and a and b are precisely the
two roots of this equation.
Strong induction 45
Exercises.
4.4.1. Prove Theorem 4.14.
1
x1 = 1, and for all m ≥ n ≥ 0, xm+n + xm−n = (x2m + x2n ).
2
Find a formula for xj . Prove that your formula is correct.
4.4.3 ([BG10, Prop. 4.30]). Prove that, for all k, m ∈ N, where m ≥ 2, we have
4.4.5 ([BG10, Prop. 4.32]). Prove that, for all k, m ∈ N, fmk is divisible by fm .
4.4.6 ([BG10, Proj. 4.33]). How many ways are there to order the numbers 1, 2, . . . , 20 in a
row so that the first number is 1, the last number is 20, and each pair of consecutive numbers
differ by at most 2?
Chapter 5
In this section we discuss some important basic concepts in set theory. Since everything in
mathematics is, in some sense, built from sets, the notion of a set is fundamental.
46
Subsets and equality 47
We also discussed the notion of set equality in Section 2.2. In particular, the following
statements are equivalent for two sets A and B:
• A = B.
• x ∈ A ⇐⇒ x ∈ B.
• A ⊆ B and B ⊆ A.
Example 5.2. Define
x = 3n + 1 = 3n − 9 + 10 = 3(n − 3) + 10.
x = 3m + 10 = 3m + 9 + 1 = 3(m + 3) + 1.
Proposition 5.5. The empty set is a subset of every set. That is, for every set S, we have
∅ ⊆ S.
x ∈ ∅ =⇒ x ∈ S,
which is true, since the hypothesis is always false. See Remark 3.4.
Exercises.
5.1.1 ([BG10, Proj. 5.3]). Consider the following sets:
A = {3x : x ∈ N},
B = {3x + 21 : x ∈ N},
C = {x + 7 : x ∈ N},
D = {3x : x ∈ N and x > 7},
E = {x : x ∈ N},
F = {3x − 21 : x ∈ N},
G = {x : x ∈ N and x > 7}.
Determine which of the following set equalities are true. If a statement is true, prove it. If
it is false, explain why the set equality does not hold. (Not all of the sets are used in this
exercise. These sets will play a role in Exercise 5.2.1.)
(i) D = E.
(ii) C = G.
(iii) D = B.
A ∩ B = {x : x ∈ A and x ∈ B}.
In other words,
(x ∈ A ∩ B) ⇐⇒ (x ∈ A and x ∈ B).
If A ∩ B = ∅, we say that A and B are disjoint.
The union of A and B is
A ∪ B = {x : x ∈ A or x ∈ B}.
In other words,
(x ∈ A ∪ B) ⇐⇒ (x ∈ A or x ∈ B).
Examples 5.6. (i) {1, 2, 5} ∪ {2, 8, 9} = {1, 2, 5, 8, 9} and {1, 2, 5} ∩ {2, 8, 9} = {2}.
(ii) {−n : n ∈ Z, n ≥ 0} ∪ N = Z.
A − B = {x : x ∈ A and x ̸∈ B}.
The set difference is also sometimes written as A \ B. The symmetric difference of A and B
is
A∆B = (A − B) ∪ (B − A).
It is clear from the definition that A∆B = B∆A, which is why this is called the symmetric
difference. (Note that A − B is not equal to B − A in general.)
If A ⊆ X, then the complement of A in X is X − A. If the larger set X is clear from the
context, then we sometimes write A∁ for the complement of A in X. But it is important to
note that the notation A∁ does not make sense unless we have some larger set X in mind.
Examples 5.7. (i) An integer is said to be odd if is it not even. Thus, the set of odd
integers is the complement in Z of the set of even integers:
Z − {n ∈ Z : n is even} = {n ∈ Z : n is odd}.
(ii) Z − N = {n ∈ Z : n ≤ 0} and N − Z = ∅.
A ⊆ B ⇐⇒ B ∁ ⊆ A∁ .
x ∈ B ∁ ⇐⇒ (x ∈ X) and (x ∈/ B)
=⇒ (x ∈ X) and (x ∈
/ A)
=⇒ x ∈ A∁ .
So B ∁ ⊆ A∁ .
∁
To prove the reverse implication, first note that, for any Y ⊆ X, we have Y ∁ = Y
(Exercise 5.2.3). Thus, by what we have already proved,
∁ ∁
B ∁ ⊆ A∁ =⇒ A∁ ⊆ B∁ =⇒ A ⊆ B.
(ii) (A ∪ B)∁ = A∁ ∩ B ∁ .
Proof. We will prove (ii) and leave the proof of (i) as an exercise (Exercise 5.2.4). For x ∈ X,
we have
x ∈ (A ∪ B)∁ ⇐⇒ ¬(x ∈ A ∪ B)
⇐⇒ ¬(x ∈ A or x ∈ B)
⇐⇒ x ̸∈ A and x ̸∈ B
⇐⇒ x ∈ A∁ and x ∈ B ∁
⇐⇒ x ∈ A∁ ∩ B ∁ .
(A ∪ B) ∪ C = A ∪ (B ∪ C) and (A ∩ B) ∩ C = A ∩ (B ∩ C).
(We leave this as an exercise for you to verify.) In other words, the operations of union and
intersection are associative. Therefore, as for addition (see Remark 1.29), we can unambigu-
ously write expressions like
A∪B∪C ∪D and A ∩ B ∩ C ∩ D,
Intersections and unions 51
since the result is the same no matter how we group the terms.
In fact, one can form even more arbitrary unions and intersections. If I is some set (which
we think of as an index set) and, for each i ∈ I, Ai is a set. Then
[ \
Ai = {x : x ∈ Ai for some i ∈ I} and Ai = {x : x ∈ Ai for all i ∈ I}.
i∈I i∈I
(ii) We have
\ [
{n : n ∈ N, n ≤ m} = {1}, {n : n ∈ N, n ≤ m} = N
m∈N m∈N
A special case of the arbitrary unions and intersections defined above is when we have
finitely many sets A1 , A2 , . . . , Ak for some k ∈ N. Then
k
[
Ai = {x : x ∈ Ai for some i ∈ {1, 2, . . . , k}} and
i=1
k
\
Ai = {x : x ∈ Ai for all i ∈ {1, 2, . . . , k}}.
i=1
C ∪ (A ∩ B) = (C ∪ A) ∩ (C ∪ B).
Proof. We have
x ∈ C ∪ (A ∩ B) ⇐⇒ x ∈ C or x ∈ A ∩ B
⇐⇒ x ∈ C or (x ∈ A and x ∈ B)
⇐⇒ (x ∈ C or x ∈ A) and (x ∈ C or x ∈ B)
⇐⇒ (x ∈ C ∪ A) and (x ∈ C ∪ B)
⇐⇒ x ∈ (C ∪ A) ∩ (C ∪ B).
Proposition 5.11 says that intersection is distributive over union and Proposition 5.12
says that union is distributive over intersection.
Then
C ∪ (A ∩ B) = {4, 5, 6, 7} ∪ {2, 5} = {2, 4, 5, 6, 7},
and
(C ∪ A) ∩ (C ∪ B) = {1, 2, 4, 5, 6, 7} ∩ {2, 3, 4, 5, 6, 7} = {2, 4, 5, 6, 7}.
Thus, C ∪ (A ∩ B) = (C ∪ A) ∩ (C ∪ B).
Exercises.
5.2.1 ([BG10, Proj. 5.11]). Consider the sets from Exercise 5.1.1. Determine which of the
following set equalities are true. If a statement is true, prove it. If it is false, explain why
the set equality does not hold.
(i) A ∩ E = B.
(ii) A ∩ C = B.
(iii) E ∩ F = A.
5.2.2 ([BG10, Proj. 5.12]). Determine which of the following statements are true for all sets
A, B, and C. If a double implication fails, determine whether one or the other of the possible
implications holds. If a statement is true, prove it. If it is false, provide a counterexample.
(i) C ⊆ A and C ⊆ B ⇐⇒ C ⊆ (A ∪ B).
(ii) C ⊆ A or C ⊆ B ⇐⇒ C ⊆ (A ∪ B).
Cartesian products 53
(iv) C ⊆ A or C ⊆ B ⇐⇒ C ⊆ (A ∩ B).
∁
5.2.3. Suppose Y ⊆ X. Prove that Y ∁ =Y
5.2.5 ([BG10, Proj. 5.16]). For each of the following assertions, prove it is true for all sets
A, B, and C, or provide a counterexample.
(i) A − (B ∪ C) = (A − B) ∪ (A − C).
(ii) A ∩ (B − C) = (A ∩ B) − (A ∩ C).
A × B := {(a, b) : a ∈ A, b ∈ B},
called the Cartesian product of A and B. We call (a, b) an ordered pair . Note that (a, b) is
not the same as the set {a, b}. In a set, the order of elements is not relevant, so {a, b} = {b, a}
for all a and b. However, equality of ordered pairs is given by
Example 5.15. The Cartesian product N×N is the set of all ordered pairs of natural numbers.
For example, (3, 5) ∈ N × N.
Example 5.16. We will learn about the set R of real numbers in Section 7. Then R × R is
the Cartesian plane you have likely seen in previous math courses.
Remark 5.18. Note ∅×A = ∅ = A×∅, for any set A. This is why we needed the hypothesis
that A and B are nonempty in Proposition 5.17.
54 Naive set theory
(x, y) ∈ A × (B ∪ C) ⇐⇒ x ∈ A and y ∈ (B ∪ C)
⇐⇒ x ∈ A and (y ∈ B or y ∈ C)
⇐⇒ (x ∈ A and y ∈ B) or (x ∈ A and y ∈ C)
⇐⇒ (x, y) ∈ A × B or (x, y) ∈ A × C
⇐⇒ (x, y) ∈ (A × B) ∪ (A × C).
Exercises.
5.3.1. Prove Proposition 5.19(ii).
5.3.2 ([BG10, Proj. 5.21]). For each of the following statements, prove that it is true for all
sets A, B, C, and D, or give a counterexample.
(i) (A × B) ∪ (C × D) = (A ∪ C) × (B ∪ D).
(ii) (A × B) ∩ (C × D) = (A ∩ C) × (B ∩ D).
5.4 Functions
We now turn our attention to the important concept of a function. You have all seen
functions in previous math classes. You probably thought of a function in the following way.
A function consists of
• a set A called the domain of the function;
• a set B called the codomain of the function;
• a “rule” f that “assigns” to each a ∈ A an element f (a) ∈ B.
We denote such a function f : A → B.
Example 5.20. Consider the function f : Z → Z given by f (n) = n2 + 2 for all n ∈ Z. The
domain of f is Z and the codomain is also Z. Note that, while f must assign some element
of the codomain to every element of the domain, it is not the case that every element of the
codomain is equal to f (n) for some element n of the domain. For instance, for the above
function f , there is no n ∈ Z such that f (n) = −1. The functions
Functions 55
are different functions, even though their domains are equal and the “rule” is the same.
The domain and the codomain are part of the function. So if two functions have different
codomains, they are different functions.
The above definition of a function is rather vague. In particular what do the words “rule”
and “assign” mean? To give a more precise definition of a function, we think of it in terms
of its graph. The graph of f : A → B is
If you think about the way you have drawn graphs (say, in calculus), you can convince
yourself that this definition corresponds to what you have seen before.
Remark 5.23. If you think about our precise definition of a function (Definition 5.22), it
corresponds to what you might have called the “vertical line test” for functions in calculus.
Exercises.
5.4.1. Which of the following are functions?
(i) {(a, a2 ) : a ∈ Z} ⊆ Z × Z
(ii) {(a, a2 ) : a ∈ N} ⊆ N × N
{x : x has property P }.
is R ∈ R?
R ∈ R ⇐⇒ R ̸∈ R.
• equality (=),
{(a, b) : b − a ∈ N or a = b}.
Example 6.3. The graph Γ(f ) of a function f : A → A is a special case of a relation, for
which there is exactly one (x, y) ∈ Γ(f ) for each x ∈ A.
57
58 Equivalence relations and modular arithmetic
[a] := {b ∈ A : b ∼ a}.
Sometimes, when we wish to emphasize the particular equivalence relation (for instance,
when we are working with more than one), we write [a]∼ instead of [a].
Examples 6.5. (i) The relation = on Z is an equivalence relation.
(ii) The relation ≤ on Z is not an equivalence relation, since it is not symmetric (e.g. 1 ≤ 2,
but 2 ̸≤ 1).
(iii) The relation = on subsets of Z (i.e. set equality) is an equivalence relation.
(iv) The relation ⊆ on subsets of Z is not an equivalence relation since it is not symmetric.
Note that, in (iii) and (iv), the relation is on the set
A = {X : X ⊆ Z}
of subsets of Z
Example 6.9. Let P1 be the set of even integers and let P2 be the set of odd integers. Then
Π = {P1 , P2 } is a partition of Z.
The next proposition says that equivalence relations and partitions are two ways of
viewing the same idea.
Proposition 6.10. (i) Suppose ∼ is an equivalence relation on A. Then the set Π of
equivalence classes of ∼ is partition of A.
(ii) Suppose Π is a partition of A. Then the relation ∼ defined by
a ∼ b ⇐⇒ a and b lie in the same element of Π
is an equivalence relation on A.
Proof. Part (i) is Proposition 6.6(i) and Proposition 6.7. To prove part (ii), let Π be a
partition of A. Define a relation ∼ on A by
a ∼ b ⇐⇒ a and b lie in the same element of Π.
x ∼ y ⇐⇒ |x| = |y|.
• Transitivity: For x, y, z ∈ Z,
Thus ∼ is an equivalence relation. The equivalence class of x ∈ Z is the set {x, −x}. The
set
Π = {{x, −x} : x ∈ Z}
is a partition of Z.
• Transitivity: Suppose (x, y) ∼ (v, w) and (v, w) ∼ (u, z). Then 2x − 3y = 2v − 3w and
2v − 3w = 2u − 3z. Hence 2x − 3y = 2u − 3z, and so (x, y) ∼ (u, z).
{(x, y) ∈ Z × Z : 2x − 3y = n}, n ∈ Z.
That is, they are the points with integer coordinates that lie on a fixed line 2x − 3y = n in
the plane.
Exercises.
6.1.1 ([BG10, Proj. 6.7]). For each of the following relations defined on Z, determine whether
it is an equivalence relation. If it is, determine the equivalence classes.
(i) x ∼ y if x < y.
The division algorithm 61
(ii) x ∼ y if x ≤ y.
(iv) x ∼ y if x ̸= y.
(v) x ∼ y if xy > 0.
6.1.2 ([BG10, Proj. 6.8]). Prove that each of the following relations defined on Z × Z is an
equivalence relation. Determine the equivalence classes for each relation.
6.1.3 ([BG10, Proj. 6.9]). On Z × (Z − {0}) we define the relation (m1 , n1 ) ∼ (m2 , n2 ) if
m1 n2 = n1 m2 .
(ii) For two equivalence classes [(m1 , n1 )] and [(m2 , n2 )], we define two binary operations
⊕ and ⊙ via
[(m1 , n1 )] ⊕ [(m2 , n2 )] = [(m1 n2 + m2 n1 , n1 n2 )]
and
[(m1 , n1 )] ⊙ [(m2 , n2 )] = [(m1 m2 , n1 n2 )].
What properties do the binary operations have? For example, which axioms of the
integers are satisfied?
Theorem 6.13 (The Division Algorithm). Suppose n ∈ N. For every m ∈ Z, there exist
unique q, r ∈ Z such that
m = qn + r and 0 ≤ r ≤ n − 1.
The integer q is called the quotient and r is called the remainder upon division of m by n.
62 Equivalence relations and modular arithmetic
Proof. Fix n ∈ N. Let us first prove the existence part of the theorem. We first consider the
m ≥ 0 case by induction. For the base case m = 0, we can set q = r = 0.
For the induction step, assume there exist q, r ∈ Z such that
m = qn + r and 0 ≤ r ≤ n − 1.
m + 1 = q ′ n + r′ and 0 ≤ r′ ≤ n − 1.
m + 1 = qn + r + 1 = (q + 1)n = q ′ n + r′ and 0 ≤ r′ ≤ n − 1.
In both cases, we found integers q ′ and r′ with the required properties, completing the proof
of the induction step.
Now consider the case m < 0. Since −m > 0 we can find, by the first part of our proof,
integers q and r such that
−m = qn + r and 0 ≤ r ≤ n − 1.
q1 n + r1 = m = q2 n + r2 for some q1 , q2 , r1 , r2 ∈ Z, 0 ≤ r1 , r2 ≤ n − 1.
Then we have
(q1 − q2 )n = r2 − r1 . (6.1)
Thus, r2 − r1 is divisible by n. But since 0 ≤ r1 , r2 ≤ n − 1, we have
1 − n ≤ r2 − r1 ≤ n − 1.
Exercises.
6.2.1. Prove the following statements.
x ≡ y ⇐⇒ x − y is divisible by n.
The natural number n is called the modulus. When we wish to make the modulus explicit,
we write
x ≡ y mod n.
If x ≡ y mod n, we say that x and y are equivalent modulo n or congruent modulo n (or
sometimes simply equivalent/congruent mod n). Note that x ≡ y mod 1 for all x, y ∈ Z,
and so equivalence modulo 1 is not so interesting. For this reason, we usually assume n ≥ 2.
Example 6.15. Suppose n = 2. Then x ≡ y mod 2 if and only if x − y is even, i.e. x and y
are either both even or both odd. In this case, we say that x and y have the same parity.
Example 6.16. Fix the modulus 7. Then 2 ≡ 16, since 2 − 16 = −14 is divisible by 7.
Similarly, we have
(ii) The equivalence relation ≡ has exactly n distinct equivalence classes, namely
Proof. To prove (i), we need to check that ≡ is reflexive, symmetric, and transitive.
Reflexivity: For a ∈ Z, we have a − a = 0, which is divisible by n, hence a ≡ a.
Symmetry: Suppose a ≡ b. Then n divides a − b. So there exists j ∈ Z, such that a − b = jn.
Then b − a = −jn = (−j)n is also divisible by n, and so b ≡ a.
Transitivity: Suppose a ≡ b and b ≡ c. Then n divides both a − b and b − c. So there exist
j, k ∈ Z such that
a − b = jn and b − c = kn.
Then
a − c = (a − b) + (b − c) = jn + kn = (j + k)n
is divisible by n, hence a ≡ c.
To prove (ii), we need to show that the equivalence classes [0], [1], . . . , [n − 1] are distinct,
and that every integer lies in one of them.
If m ∈ Z, then Example 6.17 shows that m ∈ [r] for some 0 ≤ r ≤ n − 1. So every integer
lies in one of the given classes.
It remains to show that the given equivalence classes are distinct. So suppose 0 ≤ m, k ≤
n − 1 and [m] = [k] (i.e. n divides m − k). We want to show that this implies m = k. Now,
0 ≤ m, k ≤ n − 1 =⇒ −n + 1 ≤ m − k ≤ n − 1,
The set of equivalence classes for the relation of equivalence modulo n is called the set
of integers modulo n, and is denoted by Zn or Z/nZ.
Example 6.20. By Proposition 6.18, for any integer a, its equivalence class modulo n is equal
to one of the classes
[0], [1], . . . , [n − 1].
Example 6.17 tells us how to find out which one: we have [a] = [r], where r is the remainder
upon division of a by n. For example, if n = 5, then we have
31 = 6 · 5 + 1,
(The basic idea is that we add or subtract multiples of n until the representative lies in the
range 0, 1, . . . , n − 1.) If n = 3, we have
a + b ≡ a′ + b ′ and ab ≡ a′ b′ .
Proof. Fix a modulus n. Suppose a ≡ a′ and b ≡ b′ . Then there exist k, ℓ ∈ Z such that
a − a′ = kn and b − b′ = ℓn.
Then
(a + b) − (a′ + b′ ) = (a − a′ ) + (b − b′ ) = kn + ℓn = (k + ℓ)n,
and so a + b ≡ a′ + b′ . Furthermore,
and so ab ≡ a′ b′ .
The above proposition allows us to define two operations on Zn . Namely, we define
addition ⊕ and multiplication ⊙ on Zn by
Remark 6.22. It is important that you understand why we needed Proposition 6.21 in order
to be able to define the above operations. Remember that [a] = [a′ ] ⇐⇒ a ≡ a′ and
[b] = [b′ ] ⇐⇒ b ≡ b′ (by Proposition 6.6(ii)). Our definition of ⊕ then says that the sum of
the classes [a] = [a′ ] and [b] = [b′ ] is
[a] ⊕ [b] = [a + b]
f : Z5 → Z, f ([n]) = n.
Then, since [1] = [6], we should have f ([1]) = f ([6]). But f ([1]) = 1 ̸= 6 = f ([6]). So, in
fact, this function is not well defined.
Remark 6.23. Many texts simply reuse the notation + and · for addition and multiplication
in Zn . (In fact, this is the most common convention.) We use the notation ⊕ and ⊙ to make
it explicit that these are operations on a different set (Zn as opposed to Z).
Example 6.24. Fix a modulus n ∈ N. By Proposition 6.18(ii), for every a ∈ Z, the equiva-
lence class [a] must be equal to one of the classes [0], [1], . . . , [n−1]. When doing computations
in modular arithmetic, we usually write our final answer in this form. (See Example 6.20.)
For example,
66 Equivalence relations and modular arithmetic
(iii) If n = 2, then
Proof. We will prove three of these statements, and leave the rest as exercises.
Addition in Zn is commutative: Choose two arbitrary elements [a], [b] ∈ Zn . Then we
have
Thus, for all [a] ∈ Zn , we have [a] ⊕ [0] = [a]. So [0] is an additive identity for Zn .
The remaining statements are left as an exercise (Exercise 6.3.3).
The integers modulo n 67
Exercises.
6.3.1. Perform the following computations in Zn for the given value of n. In each case, write
your final answer in the standard form: [0], [1], [2], . . . , [n − 1]. You should not have to use a
calculator.
6.3.2. For each of the following questions, write your answer in the standard form: [0], [1], [2], . . . , [n−
1], where n is the modulus.
(iv) Is there an element [a] of Z7 such that [a] ⊙ [3] = [1]? If so, find it. If not, prove that
no such element exists.
(v) Is there an element [a] of Z12 such that [a] ⊙ [3] = [1]? If so, find it. If not, prove that
no such element exists.
6.3.4. Fix a modulus n. Suppose a, b ∈ Z satisfy 0 < b < n and [a] ⊙ [b] = [0]. Prove that
[a] cannot have a multiplicative inverse. In other words, show that there is no [c] ∈ Zn such
that [c] ⊙ [a] = [1].
Hint: Prove the result by contradiction. Assume the equations have a solution and then do
some computations modulo 3 to arrive at a contradiction.
68 Equivalence relations and modular arithmetic
6.3.6. (i) Without using induction, prove that the following statement is true:
∀ a ∈ Z a2 is divisible by 4 or a2 + 3 is divisible by 4 .
∀ a ∈ Z, a2 is divisible by 4 or ∀ a ∈ Z, a2 + 3 is divisible by 4
Proof. We prove the result by induction on n. The base case is when n = 2, which is already
prime.
For the induction step, assume that n ≥ 3 and that any integer less than n (and ≥ 2)
can be factored into primes. If n is prime, we are done. Otherwise, there exist a, b ∈ N,
a, b ≥ 2, such that n = ab. Then a, b < n and so, by the induction hypothesis, a and b can
each be written as a product of primes. This gives a prime factorization of n.
Proof. We prove the result by contradiction. Suppose there are finitely many primes p1 , p2 , . . . , pn .
Then consider the number
q = p1 p2 · · · pn + 1.
The remainder upon division of q by pi is 1, for all 1 ≤ i ≤ n. Thus, q is not divisi-
ble by any prime number. Therefore q does not have a prime factorization, contradicting
Proposition 6.27.
Recall, from Definition 2.36 that, for m, n ∈ Z, not both zero, we define gcd(m, n) to be
the smallest element of the set
(iii) Every integer that divides both m and n also divides gcd(m, n).
Proof. The proof of this proposition can be found in [BG10, Prop. 6.29].
Propositions 6.29 and 2.24 imply that gcd(m, n) is the largest integer that divides both
m and n. Thus gcd(m, n) is the greatest common divisor of m and n, justifying the notation.
Proposition 6.30. For all k, m, n ∈ Z, we have
Proof. If k = 0, then
S = {j ∈ N : j = mx + ny for some x, y ∈ Z}
and
T = {j ∈ N : j = kmx + kny for some x, y ∈ Z}.
Set g = gcd(m, n) and h = gcd(km, kn). So g is the smallest element of S and h is the
smallest element of T . Our goal is to prove that |k|g = h.
Since g ∈ S, there exist integers x1 and y1 such that g = mx1 + ny1 . Therefore,
is an element of T . (Here we use the fact that |k| is equal to either k or −k.) Since h is the
smallest element of T , this implies that |k|g ≥ h.
On the other hand, h ∈ T , and so there exist integers x2 and y2 such that
Then, by Proposition 6.29(iii), since p divides both mn and pn, we can conclude that p also
divides n.
70 Equivalence relations and modular arithmetic
p
Proposition 6.34. If p is prime and 0 < r < p, then r
is divisible by p.
Proof. The proof of this proposition can be found in [BG10, Prop. 6.34].
Theorem 6.35 (Fermat’s Little Theorem). If m ∈ Z and p is prime, then
mp ≡ m mod p.
Proof. Fix a prime p. If p = 2, then Fermat’s Little Theorem says that m2 is even if and
only if m is even, which was Exercise 6.2.1(iii). So we assume p > 2.
Let P (k) be the statement
k p ≡ k mod p.
We will first prove that P (m) is true for all m ≥ 0. (We will deal with the case m < 0 after.)
Base case: Since 0p − 0 = 0 − 0 = 0 is divisible by p, we have 0p ≡ 0.
Induction step: We assume that P (m) is true for some m ≥ 0 and show that P (m + 1)
is true. By the Binomial Theorem (Theorem 4.12), we have
p p
p
X p ℓ p−ℓ
X p
(m + 1) = m1 = mℓ .
ℓ=0
ℓ ℓ=0
ℓ
p
By Proposition 6.34, ℓ
≡ 0 mod p for 0 < ℓ < p. Therefore,
p
p
X p ℓ p 0 p
(m + 1) = m ≡ m + mp = 1 + mp ≡ 1 + m mod p,
ℓ=0
ℓ 0 p
where we used the induction hypothesis in the last step. This completes the proof of the
induction step. (Note that the string of “equations” above involves both = and ≡. But since
equality implies equivalence mod p, the corresponding string, where we replace all = symbols
by ≡ symbols is also true. Then we use transitivity of ≡ to conclude that (m + 1)p ≡ 1 + m.)
It remains to prove the statement for m < 0. Suppose m < 0. Define n = −m. Then
n > 0 and so, by the above, we have np ≡ n mod p. Since p is odd, we have
mp−1 ≡ 1 mod p.
Remark 6.37. Fermat’s Little Theorem is the mathematics that underpins the theory of RSA
encryption. So your bank account information is secure when you check your balance online
because of Fermat’s Little Theorem.
72 Equivalence relations and modular arithmetic
Exercises.
6.4.1 ([BG10, Proj. 6.27]). For which n ≥ 2 does Zn satisfy the cancellation property (Ax-
iom 1.5)? Prove your assertion.
6.4.2. Let m, n ∈ N. Suppose m divides n, and p is a prime factor of n that is not a prime
factor of m. Prove that m divides np . Hint: Use prime factorizations.
where the p1 , . . . , pk are distinct prime numbers, and the exponents are elements of Z≥0 . (We
allow the exponent zero so that we can write the prime factorizations of a and b using the
same set of primes—using an exponent of zero if a particular prime does not appear in one
of the factorizations. This also allows us to consider the case a = 1 or b = 1, in which case
all of the corresponding exponents are zero.) Prove that a divides b if and only if ni ≤ mi
for all 1 ≤ i ≤ k.
is divisible by p.
where the p1 , . . . , pk are distinct prime numbers, and the exponents are elements of Z≥0 .
Define
GCD(a, b) = pℓ11 pℓ22 · · · pℓkk
where, for 1 ≤ i ≤ k, we define ℓi to be the minimum of ni and mi . (Note the difference
between this and the definition of gcd(a, b).)
(i) Prove that GCD(a, b) divides gcd(a, b). Hint: Use Proposition 6.29(iii).
(ii) Prove that gcd(a, b) divides GCD(a, b). Hint: Use Proposition 6.29(i).
Real numbers
In this chapter, we will introduce the real numbers. As was the case for the integers, you have
likely encountered real numbers before. However, we will take a more rigorous approach.
Namely, we will start from a precise list of axioms, and we will assume that a set R exists
that satisfies these axioms. Many of the axioms are the same as those we saw for the integers.
However, there are some important differences.
7.1 Axioms
We will assume that there is a set, denoted R, with binary operations + (addition) and ·
(multiplication) satisfying Axioms 7.1–7.5, 7.13 and 7.35. The elements of R are called real
numbers.
Axiom 7.1 (Commutativity, associativity, and distributivity). For all x, y, z ∈ R, we have
(i) x + y = y + x, (commutativity of addition)
(ii) (x + y) + z = x + (y + z), (associativity of addition)
(iii) x · (y + z) = x · y + x · z, (distributivity)
(iv) x · y = y · x, (commutativity of multiplication)
(v) (x · y) · z = x · (y · z). (associativity of multiplication)
As we did for the integers, we will often denote multiplication by juxtaposition. That is,
we will write xy instead of x · y.
Axiom 7.2 (Additive identity). There exists a real number 0 satisfying ∀x ∈ R, x + 0 = x.
This element 0 is called an additive identity, or an identity element for addition.
Axiom 7.3 (Multiplicative identity). There exists a real number 1 such that 1 ̸= 0 and
∀x ∈ R, x · 1 = x. The element 1 is called a multiplicative identity, or an identity element
for multiplication.
Axiom 7.4 (Additive inverse). For each x ∈ R, there exists a real number, denoted −x,
such that x + (−x) = 0. The element −x is called an additive inverse of x.
73
74 Real numbers
Axiom 7.5 (Multiplicative inverse). For each x ∈ R − {0}, there exists a real number,
denoted x−1 , such that x · x−1 = 1. The element x−1 is called a multiplicative inverse of x.
Remark 7.6. Although we use the same notation 0 and 1 for the additive and multiplicative
identities of the real numbers R as we did for the corresponding elements of the integers Z,
these are a priori different elements since we have not discussed any relationship between Z
and R. Later, in Section 8.2, we will discuss how we can view Z as a subset of R, and then
the 0 of Z will correspond to the 0 of R, and similarly for 1. This explains our use of the
same notation.
Proposition 7.7. For each x ∈ R − {0}, there exists a unique real number y such that
xy = 1.
Proof. Suppose x ∈ R−{0}. By Axiom 7.5, there exists a real number y such that xy = 1. It
remains to show that this element is unique. Suppose z is another real number such xz = 1.
Then we have
y = y · 1 = y(xz) = (yx)z = (xy)z = 1 · z = z · 1 = z.
Thus, the element with the given property is unique.
Proposition 7.7 justifies calling x−1 the (as opposed to a) multiplicative inverse of x.
−1
Corollary 7.8. For x ∈ R, x ̸= 0, we have (x−1 ) = x.
x−1 x = xx−1 = 1.
Remark 7.9. Since addition and multiplication of real numbers is associative, we can omit
the parentheses when writing the addition or multiplication of more than two elements. For
instance, if w, x, y, z ∈ R, we have unambiguously write expressions like
since the results of the additions and multiplications is the same no matter how we group
the terms. See Remark 1.29.
Proof. Suppose x, y ∈ R − {0}. By Axiom 7.5, x and y have multiplicative inverses x−1 and
y −1 , respectively. We have
(xy)(x−1 y −1 ) = xx−1 yy −1 = 1 · 1 = 1.
xy = xz
=⇒ x xy = x−1 xz
−1
=⇒ xx−1 y = xx−1 z
=⇒ 1 · y = 1 · z
=⇒ y · 1 = z · 1
=⇒ y = z.
Remark 7.12. You should compare Axioms 7.1–7.5 to Axioms 1.1–1.5. Replacing Z by R,
However, Axioms 1.5 and 7.5 are different. Nevertheless, Proposition 7.11 shows us that
Axiom 1.5 holds for R as well (i.e. Axiom 7.5 is stronger than Axiom 1.5). Therefore, any
proposition we proved for Z using only axioms Axioms 1.1–1.5 also holds for R, with an
identical proof. In particular all of the propositions of Section 1.2 hold with Z replaced
by R. We will refer to the R analogues of these propositions by appending “for R”. For
example, we may say “by Proposition 1.9 for R”.
x − y := x + (−y), x, y ∈ R.
Division. We have not yet discussed division in this course, because division is not very
well behaved for the integers. (More precisely, given two random integers, it is unlikely that
you can divide one by the other and obtain an integer.) However, we can define division in
R. If x, y ∈ R and x ̸= 0, we define
y
:= yx−1 .
x
Precisely, division is a function
Note that
1
= 1 · x−1 = x−1 .
x
76 Real numbers
Exercises.
7.1.1. Using only Axioms 7.1–7.5 and the definition of division, show that you can add
“fractions” with common denominators the way you learn in grade school. More precisely,
show that, for all a, b, c ∈ R with c ̸= 0,
a b a+b
+ = .
c c c
7.1.2. Suppose a, b, c, d ∈ R and b, d ̸= 0. Show that
a c ad + bc
+ = .
b d bd
Show all your steps.
Axiom 7.13. There exists a subset R>0 ⊆ R with the following properties:
(i) If x, y ∈ R>0 , then x + y ∈ R>0 . (The subset R>0 is closed under addition.)
(ii) If x, y ∈ R>0 , then xy ∈ R>0 . (The subset R>0 is closed under multiplication.)
(iii) 0 ̸∈ R>0 .
The elements of R>0 are called positive real numbers. A real number that is neither
positive nor zero is a negative real number .
Note that Axiom 7.13 is the same as Axiom 2.1, but with Z and N replaced by R and
R>0 , respectively.
Positive real numbers and ordering 77
Proposition 7.14. (i) For x ∈ R, one and only one of the following statements is true:
• x ∈ R>0 ,
• −x ∈ R>0 ,
• x = 0.
Proof. The proof of part (i) is the same as the proof of Proposition 2.3, but with Z and N
replaced by R and R>0 , respectively. Similarly, the proof of part (ii) is the same as that of
Proposition 2.4.
We now define an ordering on the set of real numbers, just as we did for the integers.
Definition 7.15 (Order on the real numbers). For x, y ∈ R, we write x < y (and say x is
less than y) or y > x (and say y is greater than x) if and only if
y − x ∈ R>0 .
We write x ≤ y (and say x is less than or equal to y) or y ≥ x (and say y is greater than or
equal to x) if and only if
x < y or x = y.
Remark 7.16. Note that Definition 7.15 is the same as Definition 2.5, but with Z and N
replaced by R and R>0 , respectively. Therefore, many of the propositions concerning the
ordering on Z that we proved in Section 2.2 also hold with Z and N replaced by R and
R>0 , with an identical proof. In particular, Propositions 2.6–2.15 all hold for R. Again (see
Remark 7.12) we will refer to the R analogues of these propositions by appending “for R”.
1
Proposition 7.17. (i) Suppose x ∈ R, x ̸= 0. Then x ∈ R>0 if and only if x
∈ R>0 .
1
(ii) Suppose x, y ∈ R>0 . If x < y, then 0 < y
< x1 .
by the closure of R>0 under multiplication (Axiom 7.13(ii)). But this contradicts Proposi-
tion 7.14. So we must have x1 ∈ R>0 .
Conversely, suppose x−1 = x1 ∈ R>0 . Then, by the above, x = (x−1 )−1 ∈ R>0 .
78 Real numbers
(ii) Now suppose x, y ∈ R>0 satisfy x < y. Then x−1 , y −1 ∈ R>0 by part (i), and hence
x−1 y −1 ∈ R>0 by the closure of R>0 under multiplication (Axiom 7.13(ii)). Therefore, we
have
x < y =⇒ x−1 y −1 x < x−1 y −1 y =⇒ y −1 < x−1 ,
where, in the first implication, we used Proposition 2.9(iii) for R.
x4 < 2x5 =⇒ (x4 )−1 x4 < (x4 )−1 2x5 (Proposition 2.9(iii) for R)
=⇒ 1 < 2x
1 1
=⇒ · 1 < · 2x (Proposition 2.9(iii) for R)
2 2
1
=⇒ < x.
2
For the other implication, we have
1 1
x> =⇒ 2x > 2 · (Proposition 2.9(iii) for R)
2 2
=⇒ 2x > 1
=⇒ x4 · 2x > x4 · 1 (Proposition 2.9(iii) for R)
=⇒ 2x5 > x4 .
Exercises.
7.2.1 ([BG10, Prop. 8.41]). Let x ∈ R. Prove that x2 < x3 if and only if x > 1.
The real numbers versus the integers 79
7.2.2. Recall that we defined 2 := 1 + 1 ∈ Z. Prove that there is no integer n ∈ Z such that
2n = 1. Therefore, unlike R, the set Z of integers does not have multiplicative inverses of
all nonzero elements. Hint: Try a proof by contradiction, using Proposition 2.21.
Proof. Since 2 = 1 + 1 ∈ R>0 by the closure of R>0 under addition (Axiom 7.13(i)), it follows
from Proposition 7.17(i) that 0 < 12 . Since 2 − 1 = (1 + 1) − 1 = 1 ∈ R>0 , we have 1 < 2.
Therefore, by Proposition 7.17(ii), we have 21 < 11 = 1.
Alternate proof : We can also prove that 12 < 1 by contradiction. Suppose 1 ≤ 21 . Then we
have
1
0 < 1 < 2 and 0 < 1 ≤ .
2
By Proposition 2.9(iii) for R, we then have
1
1·1<2· =⇒ 1 < 1 =⇒ 0 = 1 − 1 ∈ R>0 ,
2
which contradicts Axiom 7.13(iii).
Theorem 7.20. The set R>0 of positive real numbers does not have a smallest element.
80 Real numbers
Proof. We will prove the result by contradiction. Suppose x is a smallest element of R>0 .
Then (using Lemma 7.19) we have
1
0< < 1 and 0 < x ≤ x.
2
By Proposition 2.9(iii) for R, we then have
1
· x < x.
2
1
However, by the closure of R>0 under multiplication (Axiom 7.13(ii)), we have 2
· x ∈ R>0 .
This contradicts our assumption that x is a smallest element of R>0 .
Another important difference between Z and R concerns “gaps” between numbers. The
integers have gaps. For instance, by Proposition 2.22, there is no integer between 0 and 1.
In contrast, the real numbers have no such gaps, as the following theorem shows.
Theorem 7.21. For all x, y ∈ R such that x < y, there exists a z ∈ R such that x < z < y.
x+y
Proof. Suppose x, y ∈ R satisfy x < y. We will show that z = 2
satisfies x < z < y. First,
x+y x+y 1 1 1
z−x= −1·x= − · 2 · x = (x + y − 2x) = (y − x) ∈ R>0 ,
2 2 2 2 2
1
by closure of R>0 under multiplication (Axiom 7.13(ii)), since 2
∈ R>0 (by Lemma 7.19) and
y − x ∈ R>0 by assumption. Thus x < z. Second,
x+y 1 x+y 1 1
y−z =1·y− = ·2·y− = (2y − (x + y)) = (y − x) ∈ R>0 ,
2 2 2 2 2
and so z < y.
The final axiom for Z, Axiom 2.17 has no analogue for R. On the other hand, we will
introduce one final axiom for R which has no analogue for Z.
Exercises.
7.3.1 ([BG10, Proj. 8.44]). Construct a subset A ⊆ R that satisfies
(i) 1 ∈ A and
(ii) if n ∈ A, then n + 1 ∈ A,
(i) The set A is bounded above if there exists b ∈ R such that ∀a ∈ A, a ≤ b. Any real
number b with this property is called an upper bound for A.
(ii) The set A is bounded below if there exists b ∈ R such that ∀a ∈ A, b ≤ a. Any real
number b with this property is called a lower bound for A.
(iii) The set A is bounded if it is both bounded above and bounded below.
(iv) A least upper bound , or supremum, for A is an upper bound that is less than or equal
to every upper bound for A.
(v) A greatest lower bound , or infimum, for A is a lower bound that is greater than or
equal to every lower bound for A.
The next proposition shows that suprema and infima are unique, if they exist.
Proof. We will prove the first statement, since the proof of the second is analogous. Suppose
x1 and x2 are least upper bounds for A. Then, since x1 is an upper bound for A and x2 is a
least upper bound, we have x2 ≤ x1 . Similarly, we have x1 ≤ x2 . Thus x1 = x2 .
For a nonempty subset A of R, the least upper bound (supremum) of A is denoted by
sup(A) (or sup A) and the greatest upper bound (infimum) of A is denoted by inf(A) (or
inf A). Keep in mind that, for an arbitrary nonempty set A ⊆ R, inf A and/or sup A may
not exist, as we will see.
Example 7.24. We will show that inf R>0 = 0. Since 0 < x for all x ∈ R>0 , we have that 0 is
a lower bound for R. It remains to show that 0 is the greatest lower bound. We do this by
contradiction. Suppose y ∈ R is a lower bound for R>0 and 0 < y. Then, by Theorem 7.21,
there exists z ∈ R such that 0 < z < y. But then z ∈ R>0 does not satisfy y ≤ z. This
contradicts the fact that y is a lower bound for R>0 .
Example 7.25. We have inf R≥0 = 0. The proof is almost identical to that of Example 7.24.
Examples 7.24 and 7.25 illustrate an important point: the supremum or infimum of a set
A (if it exists) may or may not be an element of A. In addition, infima and suprema may
not exist, as the following example illustrates.
Proof. We prove the result by contradiction. Suppose x is an upper bound for R>0 . Then,
since 1 ∈ R>0 by Proposition 7.14(ii), we have
(x + 1) − x = 1 ∈ R>0 ,
we have x + 1 > x. This contradicts the assumption that x is an upper bound for R>0 .
A = {x−1 : x ∈ R>0 }.
x ∈ R>0 =⇒ x > 0
1
=⇒ >0 (Prop. 7.17(i))
x
−3
=⇒ <0 (Prop. 2.9(iv) for R)
x
3
=⇒ 2 − < 2. (Prop. 2.9(i) for R)
x
Since every element of A is of the form 2 − x3 for some x ∈ R>0 , the above argument implies
that 2 is an upper bound for A.
Now we must show that 2 is the least upper bound for A. We prove this by contradiction.
Suppose A has an upper bound b with b < 2. Thus 2 − b ∈ R>0 . Since b is an upper bound
for A, we have, for all x ∈ R>0 ,
3 3
2− ≤ b =⇒ ≥2−b
x x
Upper and lower bounds 83
x 1
=⇒ ≤ (Prop. 7.17(ii))
3 2−b
3
=⇒ x ≤ . (Prop. 2.9(iii))
2−b
3
This implies that R>0 is bounded above by 2−b
, contradicting Proposition 7.26.
Examples 7.30. (i) The set {x ∈ R : x < 0} has supremum 0, but no infimum.
(vi) The set {x ∈ Z : 0 < x} has infimum 1, but no supremum. (Technically speaking, we
have not defined infima and suprema for subsets of Z, but the definitions are the same.
Furthermore, we will discuss in Section 8.2 how we can view Z as a subset of R.)
(i) If A has a supremum and sup(A) ∈ A, then A also has a largest element and sup(A) =
max(A). Conversely, if A has a largest element then A has a supremum, max(A) =
sup(A), and sup(A) ∈ A.
(ii) If A has an infimum and inf(A) ∈ A, then A also has a smallest element and inf(A) =
min(A). Conversely, if A has a smallest element then A has an infimum, min(A) =
inf(A), and inf(A) ∈ A.
Proof. We will prove the first statement, since the proof of the second is analogous. Suppose
A has a supremum b and b ∈ A. Then, by the definition of supremum, we have ∀a ∈ A, a ≤ b.
Thus b = max(A).
Conversely, suppose A has a largest element b. Then b ∈ A and ∀a ∈ A, a ≤ b. Thus
b is an upper bound for A. We prove that b is a supremum by contradiction. Suppose that
b is not the least upper bound. Then there exists an upper bound c for A with c < b. But
since b ∈ A, this contradicts the fact that c is an upper bound for A. Therefore, b must be
the least upper bound of A, i.e. b = sup(A). Therefore sup(A) = b = max(A) ∈ A.
Proposition 7.32 essentially says that greatest elements of a set A are simply suprema that
are contained in A. Similarly smallest elements of A are simply infima that are contained
in A. It follows from this and Proposition 7.23 that greatest and smallest elements, if they
exist, are unique.
Examples 7.34. Let us take another look at the sets of Examples 7.30.
Axiom 7.35 (Completeness axiom). Every nonempty subset of R that is bounded above
has a least upper bound.
Proposition 7.36. Suppose that A ⊆ B ⊆ R, that A and B are nonempty, and that B is
bounded above. Then sup(A) ≤ sup(B).
Proof. Since B is bounded above and A ⊆ B, we know that A is also bounded above. Thus,
by Axiom 7.35, sup(A) and sup(B) exist. By definition, we have b ≤ sup(B) for all b ∈ B.
Since A ⊆ B, this implies that a ≤ sup(B) for all a ∈ A. Therefore, sup(B) is an upper
bound for A. Since sup(A) is the least upper bound, we have sup(A) ≤ sup(B).
We now define intervals. For x, y ∈ R, we define
[x, y] := {z ∈ R : x ≤ z ≤ y},
(x, y] := {z ∈ R : x < z ≤ y},
[x, y) := {z ∈ R : x ≤ z < y},
(x, y) := {z ∈ R : x < z < y},
(−∞, y] := {z ∈ R : z ≤ y},
(−∞, y) := {z ∈ R : z < y},
[x, ∞) := {z ∈ R : x ≤ z},
(x, ∞) := {z ∈ R : x < z},
(−∞, ∞) := R.
Remark 7.37. (i) Note that ∞ and −∞ are not real numbers. We are using these symbols
just as part of the notation.
(ii) The text [BG10] requires that x < y for the above intervals. However, this is not
necessary. For instance, when x = y, we have
(iii) We use the same notation for the interval (x, y) and the point (x, y) ∈ R2 , so there is
some potential chance for confusion. It should be clear from the context whether we
are referring to an interval or a point in R2 .
Proposition 7.38. Every nonempty subset of R that is bounded below has a greatest lower
bound.
Proof. Suppose A is a nonempty subset of R that is bounded below. Therefore, there exists
an m ∈ R such that ∀x ∈ A, m ≤ x. Define
B = {−x : x ∈ A}.
86 Real numbers
x ∈ B =⇒ −x ∈ A =⇒ m ≤ −x =⇒ x ≤ −m.
Thus, ∀x ∈ B, x ≤ −m, as desired. Therefore, by Axiom 7.35, B has a least upper bound y.
We will show that −y is a greatest lower bound for A. Since
x ∈ A =⇒ −x ∈ B =⇒ −x ≤ y =⇒ x ≥ −y,
we see that −y is a lower bound for A. It remains to show that −y is the greatest lower
bound for A. Suppose z is another lower bound for A. Then, as above, −z is an upper
bound for B. Since y is the least upper bound for B, we have y ≤ −z. Therefore −y ≥ z.
It follows that −y is a greatest lower bound for A.
Exercises.
7.4.1. Suppose that A ⊆ R has supremum M . Show that the set
B = {5 − 2x : x ∈ A}
has infimum 5 − 2M .
7.4.2. Suppose A and B are nonempty subsets of R that are bounded above. Furthermore,
suppose that A ∩ B ̸= ∅. Show that A ∩ B is bounded above and that
7.4.3. Suppose A is a subset of R with a maximum and minimum element, such that max A =
min A. Prove that A has exactly one element.
{x ∈ R : x2 < 4}
In this chapter will we examine some important types of functions. Namely we will consider
functions that are injective, surjective, or both. We will then discuss how we can identify
the set of integers as a subset of the set of real numbers in a way that preserves all of the
important operations and relations that we have discussed.
f : R → R, f (x) = cx,
f (x) = f (y) =⇒ cx = cy =⇒ x = y,
where the last implication follows from Proposition 7.11 (alternatively, multiply both sides
by c−1 ). Thus f is injective.
87
88 Injections, surjections, and bijections
f (S) := {f (a) : a ∈ S} ⊆ B.
The image of f is f (A). In other words, the image of f is the image of the domain of f
under f . Thus, f is surjective if and only if f (A) = B (i.e. the image of f is equal to the
codomain of f ).
Example 8.5. The function
is surjective. To prove this, note that, for all x ∈ N, we have f (x) = |x| = x.
Examples 8.9. (i) The function f : {0} → {2, 5, −4} given by f (0) = −4, is injective but
not surjective.
(ii) The function f : {1, 2} → {1} given by f (1) = f (2) = 1 is surjective but not injective.
(iii) The function f : {1, 2} → {1, 8} given by f (1) = f (2) = 8 is neither surjective nor
injective.
(iv) The function f : {−1, 1} → {−2, 13} given by f (−1) = −2, f (1) = 13, is bijective.
(v) The function f : Z → Z≥0 , f (n) = n2 , is not injective since, for example f (1) = 1 =
f (−1). It is also not surjective, since, for example, there is no n ∈ Z such that f (n) = 3.
(vi) The function f : Z≥0 → Z≥0 , f (n) = n2 , is injective but not surjective.
(viii) The function f : R≥0 → R≥0 , f (x) = 3x + 1 is injective, but not surjective. (For
instance, its image does not contain 0.)
Composition is the operation that takes two functions and returns their composite (i.e. the
composite function is the result of composition).
Then
g ◦ f : {1, 2, 3} → {1, 8, 10}
is given by
(g ◦ f )(a1 ) = (g ◦ f )(a2 )
=⇒ g(f (a1 )) = g(f (a2 ))
=⇒ f (a1 ) = f (a2 ) since g is injective
=⇒ a1 = a2 . since f is injective
(ii) Suppose f and g are both surjective. Let c ∈ C. Since g is surjective, there exists
b ∈ B such that g(b) = c. Then, since f is surjective, there exists a ∈ A such that f (a) = b.
Then
(g ◦ f )(a) = g(f (a)) = g(b) = c.
Thus, for all c ∈ C, there exists a ∈ A such that (g ◦ f )(a) = c. So g ◦ f is surjective.
(iii) This follows from the previous two parts, by the definition of bijectivity.
g ◦ f = idA .
f ◦ g = idB .
(iii) A two-sided inverse (or simply inverse) of f is a function that is both a left inverse
and a right inverse of f .
f : Z≥0 → Z, f (x) = x,
g : Z → Z≥0 , g(x) = |x|.
Thus
g ◦ f = idZ≥0 ,
and so g is a left inverse of f and f is a right inverse of g. However, f ◦ g ̸= idZ since, for
example
(f ◦ g)(−1) = f (g(−1)) = f (1) = 1 ̸= −1 = idZ (−1).
Therefore, g is not a right inverse of f and f is not a left inverse of g.
Injections, surjections, and bijections 91
f : R → R, f (x) = 3x + 1,
x−1
g : R → R, g(x) = .
3
Then
f ◦ g = idR and g ◦ f = idR .
Thus f is an inverse of g and g is an inverse of f .
Thus, f is injective.
(ii) Suppose f : A → B is surjective. We define a function g : B → A as follows. For
each b ∈ B, choose an a ∈ A such that f (a) = b (which we can do since f is surjective) and
define g(b) = a. Then, for all b ∈ B, we have
Proposition 8.17. Suppose f has left inverse g and right inverse h. Then g = h, and so f
is invertible with inverse g.
g = g ◦ idB = g ◦ f ◦ h = idA ◦ h = h.
Proof. Suppose f has two inverses g and h. Then g is a left inverse of f and h is a right
inverse of f . Thus, the result follows from Proposition 8.17.
Proposition 8.19. Suppose A and B are sets. There exists an injection from A to B if and
only if there exists a surjection from B to A.
Exercises.
8.1.1. Define the function
(ii) What is the image of g? Write your answer as an interval and justify your answer.
(iii) Is g surjective?
8.1.5. Suppose that A and B are nonempty subsets of R, and that f : A → B is a function
satisfying
∀a1 , a2 ∈ A, a1 < a2 =⇒ f (a1 ) < f (a2 ) .
(Such a function is said to be strictly increasing.) Prove that f is injective.
8.1.6. (i) Give an example of a function with two different left inverses.
(ii) Give an example of a function with two different right inverses.
8.1.7. (i) Suppose f : A → B and g : B → C both have left inverses. Prove that g ◦ f has
a left inverse.
(ii) Suppose f : A → B and g : B → C both have right inverses. Prove that g ◦ f has a
right inverse.
(iii) Suppose f : A → B and g : B → C both have inverses. Prove that g ◦ f has an inverse.
94 Injections, surjections, and bijections
8.2 Embedding Z in R
We introduced the set Z of integers and the set R of real numbers axiomatically. That is,
we assumed that there existed sets with binary operations of addition and multiplication
satisfying certain axioms. Because of this approach, there is a priori no connection between
Z and R. For example, the additive identity of Z is not related to the additive identity of
R (and similarly for the multiplicative identities). For this reason, in this section we will
denote the additive and multiplicative identities of Z by 0Z and 1Z , and the additive and
multiplicative identities of R by 0R and 1R .
We will now briefly outline how we can view Z as a subset of R in a way that respects
the operations of addition and multiplication. Further details can be found in [BG10, §9.2].
(i) We first define e on Z≥0 recursively. We define e(0Z ) = 0R and, assuming e(n) is defined
for some n ∈ Z≥0 , we define
e(n + 1Z ) := e(n) + 1R .
e(k) := −e(−k).
Proposition 8.21. The function e : Z → R defined in Definition 8.20 has the following
properties.
(i) e(1Z ) = 1R .
(ii) For all k ∈ Z, e(−k) = −e(k). (The function e preserves additive inverses.)
(iii) For all m, k ∈ Z, we have e(m + k) = e(m) + e(k). (The function e preserves addition.)
(iv) For all m, k ∈ Z, we have e(mk) = e(m)e(k). (The function e preserves multiplica-
tion.)
(v) For all m, k ∈ Z, we have m < k ⇐⇒ e(m) < e(k). (The function e preserves order.)
(vi) e is injective.
Limits
In this chapter, we introduce and discuss the concept of a limit. This is a crucial concept
in mathematics, especially in the field of analysis, which includes differential and integral
calculus. While limits are often treated in a intuitive way in calculus courses, we will work
with the precise definition.
Proposition 9.1. The set N of natural numbers, considered as a subset of R, is not bounded
above.
Proof. We prove the result by contradiction. Suppose N is bounded above. Then, by Ax-
iom 7.35, N has a least upper bound u. Consider the interval
1 1
u − ,u = x ∈ R : u − < x ≤ u .
2 2
If this interval did not contain any natural number, then u − 21 would be an upper bound
for N, contradicting the assumption that u is a least upper bound. So there is some n ∈ N
such that n ∈ (u − 12 , u]. Then
1 1
u− < n =⇒ u < n + < n + 1.
2 2
However, n + 1 ∈ N, since 1 ∈ N (by Proposition 2.4) and N is closed under addition
(Axiom 2.1(i)), this contradicts our assumption that u is an upper bound.
Corollary 9.2. The set Z of integers is neither bounded above nor bounded below.
Proof. Since N ⊆ Z, any upper bound for Z would also be an upper bound for N, contra-
dicting Proposition 9.1.
95
96 Limits
Now suppose, towards a contradiction, that Z is bounded below by b. Then, for all n ∈ N,
we have
−n ∈ Z =⇒ b ≤ −n =⇒ n ≤ −b,
and so N would be bounded above by −b, again contradicting Proposition 9.1.
1
Proposition 9.3. For every ε ∈ R>0 , there exists n ∈ N such that n
< ε.
Exercises.
9.1.1. Consider the set
3
A= 5+ :n∈N
2n
(ii) Find the minimum element of A or prove that it does not exist.
(iii) Find the maximum element of A or prove that it does not exist.
x < y ⇐⇒ x2 < y 2 .
by Axiom 7.13(ii). On the other hand, if x > 0, then we have y > x > 0, and so x + y ∈ R>0
by Axiom 7.13(i). Thus
y 2 − x2 = (y − x)(y + x) ∈ R>0
by Axiom 7.13(ii). So x2 < y 2 .
Conversely, suppose that x2 < y 2 , so that
(y − x)(y + x) = y 2 − x2 ∈ R>0 .
We cannot have x = y = 0, since this would imply x2 = 0 = y 2 . Thus, at least one of x and
y is positive, and hence x + y ∈ R>0 . Thus
y 2 − x2
y−x= ∈ R>0 ,
y+x
and so x < y.
Proposition 9.5. For all x ∈ R, we have |x|2 = x2 .
Proof. This proof is left as an exercise (Exercise 9.2.1).
Proposition 9.6. For all x, y ∈ R, we have:
(i) |x| = 0 if and only if x = 0,
The remaining cases, where x < 0, y ≥ 0, and where x, y < 0 are similar and are left
as an exercise.
(iv) We have
where the inequality −x < y follows from the assumption that −y < x.
Proposition 9.7. Suppose x ∈ R satisfies 0 ≤ x ≤ 1. Furthermore suppose m, n ∈ N such
that m ≥ n. Then xm ≤ xn .
Proof. Let 0 ≤ x ≤ 1 and fix n ∈ N. Let P (m) be the statement
xm ≤ x n .
xk+1 = xk · x ≤ xn · x ≤ xn ,
Exercises.
9.2.1. Prove Proposition 9.5. Hint: Consider the two cases x < 0 and x ≥ 0.
9.2.2 ([BG10, Prop. 10.7]). Let x, y ∈ R. Prove that |x| < |y| if and only if x2 < y 2 .
9.3 Distance
In this section, we briefly discuss the idea of the distance between two real numbers. For
x, y ∈ R, we define the distance between x and y to be |x − y|. This matches our intuition
of thinking of real numbers as points on the real line.
Proposition 9.8 (Properties of distance). Suppose x, y, z ∈ R.
(i) |x − y| = 0 ⇐⇒ x = y. (Distance satisfies the separation property.)
(ii) |x − y| = |y − x|. (Distance is symmetric.)
(iii) |x − z| ≤ |x − y| + |y − z|. (The triangle inequality.)
(iv) |x − y| ≥ |x| − |y| .
Proof. (i) By Proposition 9.6(i), we have
|x − y| = 0 ⇐⇒ x − y = 0 ⇐⇒ x = y.
(iv) Switching the roles of x and y if necessary, we may assume that |x| ≥ |y|. Then
|x| − |y| = |x| − |y|. Taking z = 0 in part (iii), we have
|x| = |x − 0| ≤ |x − y| + |y − 0| = |x − y| + |y|,
and so
|x − y| ≥ |x| − |y| = |x| − |y| .
Exercises.
9.3.1. Prove that, for all x, y ∈ R, we have |x − y| ≤ |x| + |y|.
1
z = 0 ⇐⇒ ∀n ∈ N, z < .
n
9.4 Limits
We are now ready to give the precise definition of the limit of a sequence.
or, equivalently, if
∀ε > 0, ∃N ∈ N such that n ≥ N =⇒ |xn − L| < ε .
When (xk )∞
k=1 converges to L, we call L the limit of the sequence (xk ) and we write
lim xk = L.
k→∞
We say that a sequence converges if there exists some L such that the sequence converges to
L. If no such L exists, then we say the sequence diverges. Thus, the sequence (xk ) diverges
if
∀L ∈ R ∃ε > 0 such that ∀N ∈ N ∃n ≥ N such that |xn − L| ≥ ε.
It can take some time to get used to the formal definition of a limit, but it is important
that you master this concept. Intuitively, the sequence (xk ) converges to L if, given any
distance ε, the terms of sequence are eventually within a distance ε of L.
Proof. Let ε > 0. By Proposition 9.1, there exists N ∈ N with N > 1ε . Then, for all n ≥ N ,
we have
1 1 1
−0 = ≤ <ε
n n N
1
Hence limk→∞ k
= 0.
Limits 101
Proposition 9.16 (Uniqueness of limits). If a sequence converges, then its limit is unique.
In other words, if a sequence (xk )∞
k=1 converges to L1 and to L2 , then L1 = L2 .
Proof. Suppose (xk ) converges to both L1 and L2 . Choose ε > 0. Then there exists a natural
number N1 such that
ε
n ≥ N1 =⇒ |xn − L1 | < .
2
Similarly, there exists a natural number N2 such that
ε
n ≥ N2 =⇒ |xn − L2 | < .
2
Let N = max{N1 , N2 }. Then, for n ≥ N , we have
ε ε
|xn − L1 | < and |xn − L2 | < ,
2 2
and so, by the triangle inequality, we have
ε ε
|L1 − L2 | ≤ |L1 − xn | + |xn − L2 | < + = ε.
2 2
Since our choice of ε > 0 was arbitrary, we conclude from Corollary 9.10 that L1 = L2 .
Proposition 9.17. Suppose r ∈ N and (xk )∞ ∞
k=1 is a sequence of real numbers. Then (xk )k=1
converges to L if and only if (xk+r )∞
k=1 converges to L
Proof. Suppose limk→∞ xk = L. Let ε > 0. Then there exists N ∈ N such that
n ≥ N =⇒ |xn − L| < ε.
|xn+r − L| < ε.
(1 + x)k ≥ 1 + kx.
Proof. The case x = 0 is easy (see Proposition 9.25(i)), so we assume 0 < |x| < 1. Then for
N ≥ 0, by Proposition 9.18, we have
N N
1 1 − |x| 1 − |x| 1 − |x|
= 1+ ≥1+ N> N. (9.1)
|x| |x| |x| |x|
Now suppose ε > 0. By Proposition 9.1, there exists a natural number N such that
|x| 1
N> . (9.2)
1 − |x| ε
Then, for n ≥ N , we have
|xn − 0| = |x|n
≤ |x|N (by Proposition 9.7)
|x| 1
< (by (9.1))
1 − |x| N
< ε. (by (9.2))
A = {xk : k ∈ N} ⊆ R
is bounded. Thus, by Proposition 7.38, it has a greatest lower bound s. We will show that
limk→∞ xk = s.
Let ε > 0. Then s + ε > s, and so s + ε is not a lower bound for A. Thus, there exists
some N ∈ N such that xN < s + ε. Since the sequence is decreasing, we have xn ≤ xN for
all n ≥ N . Therefore, for n ≥ N , we have
s − ε < s ≤ xn ≤ xN < s + ε,
Note that increasing sequences are always bounded below (by the first term), so they are
bounded if and only if they are bounded above. Similarly, decreasing sequences are bounded
if and only if they are bounded below.
∞
Examples 9.22. (i) The sequence 4 + n1 n=1 is decreasing and bounded below by 4. There-
fore it converges.
∞
(ii) The sequence 8 − 3k22+5 k=1 is increasing and bounded above by 8. Therefore it con-
verges.
(i) If (xk )∞
k=1 is increasing, then xk ≤ L for all k ∈ N.
(ii) If (xk )∞
k=1 is decreasing, then xk ≥ L for all k ∈ N.
Proof. We will prove part (i), since the proof of part (ii) is analogous.
Assume (xk )∞
k=1 is increasing and limk→∞ xk = L. We will prove the result by contradic-
tion. Assume there exists m ∈ N such that xm > L. Let ε = xm − L. Then for any N ∈ N,
let n = max{N, m}. So, in particular, n ≥ N . Since the sequence is increasing, we have
xn ≥ xm > L. But then
|xn − L| = xn − L ≥ xm − L = ε.
Thus the sequence (xk )∞
k=1 does not converge to L, which is a contradiction.
|xn − L| < 1 =⇒ |xn | − |L| ≤ |xn | − |L| ≤ |xn − L| < 1 =⇒ |xn | < |L| + 1,
where, in the second inequality after the first implication, we used Proposition 9.8(iv). Now
let
M = max{|x1 |, |x2 |, . . . , |xN −1 |, |L| + 1},
which exists since the maximum of any finite set exists. Then we have |xk | ≤ M for all
k ∈ N, and so the sequence is bounded.
(i) limk→∞ c = c.
Proof. We will prove parts (i), (iii), and (v). The proofs of the other parts can be found in
[BG10, Prop. 10.23].
Proof of (i): For any ε > 0, we have |c − c| = 0 < ε, and so we can take any N ∈ N in
the definition of a limit (Definition 9.11).
Proof of (iii): Let ε > 0. Then there exists N1 ∈ N such that
ε
n ≥ N1 =⇒ |an − A| < ,
2
and there exists N2 ∈ N such that
ε
n ≥ N2 =⇒ |bn − B| < .
2
Define N = max{N1 , N2 }. Then, for all n ≥ N , we have
Proof of (v): Suppose A ̸= 0. Choose N1 ∈ N such that, for n ≥ N1 , we have |an − A| <
|A|
2
. Note that
1 1 2 2 |A|2
− ≤ |A − a n | < ε = ε.
an A |A|2 |A|2 2
Proposition 9.25 is extremely useful, since it allows us to compute new limits from old
ones.
106 Limits
1
lim = 0.
k→∞ k ℓ
Proof. We prove the result by induction on ℓ. The base case ℓ = 1 is Proposition 9.12. Now
assume n ∈ N and the result holds for ℓ = n. Then, by Proposition 9.25(iv), we have
1 1 1
lim = lim lim = 0 · 0 = 0,
k→∞ k n+1 k→∞ k k→∞ k n
and so the result also holds for ℓ = n + 1. This completes the proof of the induction step.
4k 2 − 5k + 2 4k 2 −5k
2
lim = lim + + 2
k→∞ 3k 2 k→∞ 3k 2 3k 2 3k
4 5 1 2 1 4 4
= lim − lim + lim 2 = + 0 + 0 = .
k→∞ 3 3 k→∞ k 3 k→∞ k 3 3
∞
Example 9.28. Consider the sequence (−1)k k=1 . This sequence is bounded since |(−1)k | ≤
1 for all k ∈ N. However, this sequence does not converge. We prove this by contradiction.
Suppose limk→∞ (−1)k = L. Then there exists N ∈ N such that
1
∀n ≥ N, |(−1)n − L| < .
2
Since 2N, 2N + 1 > N , we then have, by the triangle inequality,
1 1
2 = (−1)2N − (−1)2N +1 ≤ (−1)2N − L + L − (−1)2N +1 < + = 1,
2 2
which is a contradiction.
ak = 2 − k and bk = k.
Neither of these sequences is bounded, hence both sequences diverge by Proposition 9.24.
However, (ak + bk )∞ ∞
k=1 is the constant sequence (2)k=1 , which converges to 2 by Proposi-
tion 9.25(i).
Limits 107
Exercises.
9.4.1. Using the definition of a limit directly, find
8
lim .
k→∞ 3k
xk ≤ yk ≤ zk for all k ∈ N.
Furthermore, suppose that limk→∞ xk = L = limk→∞ zk for some L ∈ R. Prove that
limk→∞ yk = L.
≡, 28 bounded, 81
∃, 27 above, 81
∀, 27 below, 26, 81
⇐⇒ , 30 sequence, 103
=⇒ , 29
∈, 5 cancellation property, 6
¬, 31 Cartesian plane, 53
∄, 28 Cartesian product, 53
̸⊆, 19 codomain, 54, 55
\, 49 commutativity
⊆, 19 of addition, 5, 73
⊊, 19 of multiplication, 5, 73
⊇, 46 complement, 49
×, 53 composite, 68, 89
∅, 47 congruent modulo n, 63
=, 6 contradiction, proof by, 15
contrapositive, 31
absolute value, 59 converge, 100
addition, 5, 73 converse, 30
modulo n, 65
additive identity, 6, 73 De Morgan’s laws, 31
additive inverse, 6, 73 decreasing, 103
associativity difference of sets, 49
of addition, 5, 73 digits, 21
of multiplication, 5, 73 disjoint, 49
axiomatic set theory, 56 distance, 99
axioms distributivity, 5, 73
integers, 5 diverge, 100
real numbers, 73 divisibility, 9
division, 75
base case, 21 division algorithm, 61
Bernoulli’s inequality, 102 domain, 54, 55
bijection, 88 double implication, 30
bijective, 88
binary operation, 5 empty set, 47
binomial coefficient, 40 equality of sets, 19
Binomial Theorem, 40 equivalence class, 58
for integers, 41 equivalence relation, 57
108
Index 109
separation, 99
sequence, 34
finite, 34
set, 46
difference, 49
set theory, 46
smallest element, 25, 83
strong induction, 43
subset, 19
subtraction, 13, 75
summation notation, 35
sup, 81
supremum, 81
surjection, 88
surjective, 88
symmetric, 99
symmetric difference, 49
symmetry of equality, 6
term, 34
transitivity of equality, 6
triangle inequality, 97, 99
two-sided inverse, 90
union, 49
universal quantifier, 27
upper bound, 81
Bibliography
[BG10] Matthias Beck and Ross Geoghegan. The Art of Proof. Undergraduate Texts in
Mathematics. Springer, 2010. http://dx.doi.org/10.1007/978-1-4419-7023-7.
111