Está en la página 1de 165

An Introduction To Mathematical Proofs

Jimmy T. Arnold Rachel Arnold Robert C. Rogers

June 26, 2015


Preface

Contained here is a textbook that was designed for the course Math 3034, Introduction to
Mathematical Proofs, taught at Virginia Tech. It is based on a 2002 text by Jimmy T.
Arnold, who taught the course for many years. Professor Arnold has graciously given his
permission for noncommercial adaptation, modification, and distribution of the material.
Rachel Arnold and Bob Rogers are responsible for the revised version you see before you.
This version reflects their preferences and techniques in teaching the course.
The text focuses on logic and technique, but it is rather sterile to do that without
mathematical applications. In order to keep applications at the forefront, we lay some
foundations for the following topics.

• Number theory,

• Set theory,

• Equivalence Classes,

• Functions.

i
Contents

1 Introdction 1
1.1 What Is a Proof? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Definitions and Axioms from Number Theory . . . . . . . . . . . . . . . . . 3

2 The Structure of Mathematical Statements 10


2.1 Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.1.1 Connectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.1.2 Summary of Connectives . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.2 Statement Forms, Logical Equivalence, and Negations . . . . . . . . . . . . . 20
2.2.1 Logical Equivalence . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.2.2 Rules for Negations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.2.3 More Equivalencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.3 Quantifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.3.1 Open statements, universal sets, and quantified statements . . . . . . 28
2.3.2 Negating quantified statements . . . . . . . . . . . . . . . . . . . . . 31
2.4 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2.4.1 General Form of a Definition . . . . . . . . . . . . . . . . . . . . . . . 35
2.4.2 Definitions in Practice . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2.4.3 Negation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

3 Methods of Proof 40
3.1 Basic Proofs with Quantifiers . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.1.1 Existence Proofs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.1.2 “For All” Proofs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
3.2 Proofs with Mixed Quantifiers . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.2.1 Proving Statements of the Form (∃x)(∀y) P (x, y). . . . . . . . . . . . 49
3.2.2 Proving Statements of the Form (∀x)(∃y) P (x, y) . . . . . . . . . . . 50
3.2.3 Proving Existence and Uniqueness . . . . . . . . . . . . . . . . . . . . 52
3.3 Implications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
3.3.1 Direct Proofs of Implications . . . . . . . . . . . . . . . . . . . . . . . 55
3.3.2 Contrapositive Proofs . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
3.4 Proofs by Contradiction and Equivalency Proofs . . . . . . . . . . . . . . . . 62
3.4.1 Proofs by Contradiction . . . . . . . . . . . . . . . . . . . . . . . . . 62
3.4.2 Proving Equivalencies . . . . . . . . . . . . . . . . . . . . . . . . . . 65
3.5 Review Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

ii
4 Introduction to Sets 70
4.1 Operations on Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
4.1.1 Basic Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
4.1.2 Set Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
4.1.3 Operations on Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
4.1.4 An Aside: Russell’s Paradox . . . . . . . . . . . . . . . . . . . . . . . 74
4.2 Relations Between Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
4.2.1 Subsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
4.2.2 Proper Subsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
4.2.3 Set Equality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
4.2.4 Set Equality and Abstract Sets . . . . . . . . . . . . . . . . . . . . . 83
4.2.5 Basic Set Identities . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
4.3 Indexed Families of Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

5 The Integers 96
5.1 Mathematical Induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
5.1.1 Weak Induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
5.1.2 Strong Induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
5.2 The Division Algorithm and Greatest Common Divisors . . . . . . . . . . . 109
5.2.1 The Division Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . 109
5.2.2 Greatest Common Divisors . . . . . . . . . . . . . . . . . . . . . . . . 110
5.2.3 Uniqueness of the GCD . . . . . . . . . . . . . . . . . . . . . . . . . 110
5.2.4 Existence of the GCD . . . . . . . . . . . . . . . . . . . . . . . . . . 111
5.2.5 Further Theorems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
5.3 Relatively Prime Integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

6 Equivalence Relations and Equivalence Classes 121


6.1 Equivalence Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
6.1.1 Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
6.1.2 Equivalence Relations . . . . . . . . . . . . . . . . . . . . . . . . . . 123
6.1.3 Congruence Modulo n . . . . . . . . . . . . . . . . . . . . . . . . . . 123
6.2 Equivalence Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
6.2.1 The Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
6.2.2 Equal Equivalence Classes . . . . . . . . . . . . . . . . . . . . . . . . 128
6.2.3 Congruence Classes and the Set Zn . . . . . . . . . . . . . . . . . . . 130

7 Functions 135
7.1 Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
7.1.1 Basic Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
7.1.2 Well-Defined Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
7.1.3 One-to-One Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . 140
7.1.4 Onto Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
7.2 Binary Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
7.2.1 Basic Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
7.2.2 Binary Operations on Equivalence Classes . . . . . . . . . . . . . . . 146

iii
7.2.3 Properties of Binary Operations . . . . . . . . . . . . . . . . . . . . . 149
7.3 Compostion and Invertible Mappings . . . . . . . . . . . . . . . . . . . . . . 155
7.3.1 Composition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
7.3.2 Invertible Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

iv
Chapter 1

Introdction

1.1 What Is a Proof ?


If you look up the term “proof” in the dictionary, you will probably encounter something
like the following:

Evidence sufficient to establish a thing as true, or to produce belief in its truth.

If you are not a mathematician, that might serve you pretty well. But if you study
mathematics long enough, you will find that things that seem to be “obviously” true
sometimes turn out to be false. It’s often difficult to determine whether a complicated
mathematical statement is true or false. Our main tool for determining whether something
is true or false is the use of mathematical proof. We’re a pretty skeptical bunch. We don’t
accept that a statement (let’s call it a “proposition”) is true unless someone has gone
through a very rigorous process to prove the proposition is true.
What is that process? Well, there are a lot of different ways to describe it, and here is one
attempt.

1. We begin with a collection of known true statements: axioms, definitions, and


previously proven theorems.

2. We use the tools of propositional logic to show that these statements imply additional
true statements.

3. Using further arguments of propositional logic we show that these statements imply
that the proposition is true.

This course is designed to introduce you to this process. It is a very structured way of
thinking and writing, but at the same time it can be a very creative activity. (There is not
that much emphasis on the creative part in this text. The point is more to give you the
tools to exercise your creativity in more advanced courses.)
What are the tools you will need?

1
• One of the first topics we will discuss is the concept of a mathematical statement. As
we will see, mathematical proofs focus on very precise, severely restricted statements
and terms. Not every assertion in everyday language can be considered a
mathematical statement.

• Mathematical statements can be very complicated, describing the relationship


between several component statements. One of the key skills you will learn in this
course is the ability to “unpack” complicated statements to clearly describe these
relationships.

• You will learn the tools of propositional logic and will be able to show that known
true statements imply the truth of new statements.

• You probably noticed in the discussion above that whole process of proof rested on
the foundation of a collection of true statements - basically axioms and definitions. It
can’t be emphasized enough that in order to create mathematical proofs you will
need precise, intimate familiarity with these building blocks. Unfortunately, the field
of mathematics is large and diverse. The axioms and definitions necessary for
analysis, algebra, topology, differential equations, numerical analysis, etc., are all
different (though there are significant overlaps.) We obviously can’t discuss all of
them in this course, but we will give a selection of axioms and definitions from:

– Number theory,
– Propositional logic,
– Set theory,
– Equivalence Classes,
– Functions.

In the next subsection, we summarize some of the basic axioms and definition of
number theory.

2
1.2 Definitions and Axioms from Number Theory
Number theory is a branch of mathematics devoted primarily to the study of the
natural numbers, N = {1, 2, 3, . . . }, and the integers, Z = 0, ±1, ±2, ±3, . . . . In order to
demonstrate proof techniques, we prove some elementary facts from number theory. Many
of these things will be “obvious” facts that you have know since you first learned
arithmetic. In proving them, your task will be to show their connection to a list of even
more basic axioms and definitions. We will make a list of these here. (A real course in
number theory would have a more systematic approach. Our intention is simply to present
a set of building blocks that can act as the foundation for some specific exercises.)

We will not give a formal definition of the integers or natural numbers and instead rely on
your intuitive notions of these objects. We note that N is a subset of Z. We also refer to
the natural numbers as the positive integers.

Axiom 1 (Properties of “=”).

The relation “=” has the following properties:

1. For any x ∈ Z, x = x,

2. For any x, y ∈ Z, if x = y then y = x.

3. For any x, y, z ∈ Z if x = y and y = z, then x = z.

There are two basic operations on the integers.

Axiom 2 (Closure Under Addition and Multiplication).

The operations of addition and multiplication are well-defined and closed on both the
integers and natural numbers, that is. . .

• For any x, y ∈ Z (N) there exists a unique x + y ∈ Z (N), called the sum of x and y.

• For any x, y ∈ Z (N) there exists a unique xy ∈ Z (N), called the product of x and y.

Addition obeys the following axioms.

3
Axiom 3 (Properties of Addition).

Addition on Z has the following properties.

1. For any w, x, y, z ∈ Z, if x = w and y = z then x + y = w + z.

2. For any x, y ∈ Z, x + y = y + x.

3. For any x, y, z ∈ Z, x + (y + z) = (x + y) + z.

4. There is a unique number 0 ∈ Z, called zero, such that x + 0 = x for all x ∈ Z.

5. For each x ∈ Z there exists a unique number −x ∈ Z, called the additive inverse of
x, such that x + (−x) = 0.

Multiplication obeys the following axioms.

Axiom 4 (Properties of Multiplication).

Multiplication on Z has the following properties.

1. For any w, x, y, z ∈ Z, if x = w and y = z then xy = wz.

2. For any x, y ∈ Z, xy = yx.

3. For any x, y, z ∈ Z, x(yz) = (xy)z.

4. There is a unique number 1 ∈ Z, called one, such that 1 6= 0 and 1x = x for all x ∈ Z.

The integers also satisfy a distributive property.

Axiom 5 (Distributive Property).

For any x, y, z ∈ Z, x(y + z) = xy + xz.

We wish to assume an ordering relationship on all of Z. To do this we assume the following.

4
Axiom 6 (Positive Integers).
There is a subset of Z called the positive integers or natural numbers, denoted N. It
has the following properties.

1. N is closed under addition. That is, if a, b, ∈ N then a + b ∈ N.

2. N is closed under multiplication. That is, if a, b, ∈ N then ab ∈ N.

3. For every a ∈ Z, exactly one of the following three statements is true.

(a) a = 0,
(b) a ∈ N,
(c) −a ∈ N.

Definition 1.2.1 (Inequality).


For any x, y ∈ Z we say x < y provided y − x ∈ N.

Theorem 1.2.2 (Trichotomy).


For any x, y ∈ Z exactly one of the following three relations hold:

• x < y,

• x = y, or

• x > y.

Axiom 7 (Properties of Inequalities).

Inequalities on Z have the following properties.

1. For any x, y, z ∈ Z, if x < y and y < z then x < z.

2. For any x, y, z ∈ Z, x < y, then x + z < y + z.

3. For any x, y, z ∈ Z, if x < y and z > 0 then xz < yz.

We will not prove the following a theorem, but we will use the results in the theorems and
problems that follow. Most of the results can be proved using the axioms above.

5
Theorem 1.2.3.

For all x, y, z ∈ Z the following hold.

1. If x + y = x + z, then y = z.

2. x 0 = 0.

3. (−1)x = −x.

4. xy = 0 if and only if x = 0 or y = 0.

5. If x 6= 0 and xy = xz then y = z.

6. If xy = 1 then either x = y = 1 or x = y = −1.

7. x < y if and only if −y < −x.

8. 1 ∈ N.

We introduce an axiom called the well-ordering principle of the natural numbers. It says
that every nonempty set of natural numbers has a least or smallest element.

Axiom 8 (Well-Ordering of N).

For any nonempty set S ⊆ N there is an element m ∈ S such that

m ≤ s for all s ∈ S.

We will assume you have an intuitive idea of what the relation “=” means, but just for the
record, we’ll describe some properties.

We now define some basic terms.

Definition 1.2.4 (Even Integer).

An integer n ∈ Z is even provided there exists an integer k ∈ Z such that n = 2k.

6
Definition 1.2.5 (Odd integer).

An integer n ∈ Z is odd provided there exists an integer k ∈ Z such that n = 2k + 1.

We will not prove the following, but it will prove very useful.

Theorem 1.2.6.

Every integer a ∈ Z is either odd or even, but is not both.

Definition 1.2.7 (Divides).

The integer b ∈ Z divides the integer a ∈ Z provided there exists an integer c ∈ Z such
a = bc. We will write b|a to denote symbolically that b divides a.

Remark 1.2.8. Note that the definition of “divides” does not include the fraction a/b. In
fact, while it may not be clear in the simple proofs we are going to do, it is best to follow
the definition and avoid introducing fractions when using the term “divides.” Other terms
(which perhaps better fit the definition) are:
• a is a multiple of b; and
• b is a factor of a.
For example, 4 divides 12 (written 4|12) since 12 = (4)(3).

Definition 1.2.9 (Prime).

An integer p ∈ Z is prime provided p > 1 and the only positive divisors of p are 1 and p.

Remark 1.2.10. Note that there is a hidden (i.e., unnamed) variable in this definition;
specifically, no symbol is given for a positive divisor of p.
An alternate form of the definiton of prime is: “An integer p is prime provided p > 1 and
for every positive integer d, if d divides p then either d = 1 or d = p. ”

7
Definition 1.2.11 (Composite).

An integer n ∈ Z is composite provided n 6= 0, n 6= ±1 and there exists integers a ∈ Z and


b ∈ Z such that n = ab, and a 6= ±1, and b 6= ±1.

8
Notation
We use the following standard notations.
Symbol Set
R The set of all real numbers
R+ The set of all positive real numbers
R# The set of all nonzero real numbers
Q The set of all rational numbers
Q+ The set of all positive rational numbers
Q# The set of all nonzero rational numbers
Z The set of all integers
Z# The set of all nonzero integers
N The set of all positive integers (natural numbers)
Mm×n (S) The set of all m × n matrices with entries from the set S.

9
Chapter 2

The Structure of Mathematical


Statements

2.1 Statements
Every mathematical proof is made up of a very specific type of sentences called
“statements.”

Definition 2.1.1 (Statement).

A statement (or proposition) is an assertion that is either true or false but not both. We
call “true” and “false” the possible truth values of the statement.

Example 2.1.2. Consider the following sentences.

(a) “4 is a prime integer.” This is a statement. The statement is, of course, false.

(b) “2400 + 1 is a prime integer.” This is also a statement. It might not be obvious whether
it is true of false, but it is one or the other. It can’t be both true and false.

(c) “Abe Lincoln was a great president.” This is not a statement. The term“great” has too
many different definitions. The assertion could be judged true under one definition and
false under another.

(d) “2400 + 1 is a large number.” Again, this is not a statement. The term “large” has the
same problems as the term “great” in the previous example.

(e) “x ≤ 5.” This is not a statement because x is a variable, and the assertion has a
different truth value for different values of x. This is an example of an open
statement, and we will consider these later.

10
In the rest of this section we will see how to take statements and change them into new
statements. The simplest technique is called “negation.”

Definition 2.1.3 (Negation).

Let P denote a statement. The negation of P , denoted by ∼ P , and described by the


English expression “not P ,” is the assertion that P is false. The following truth table relates
the truth values of P and ∼ P .

P ∼P
T F
F T

Exercise 2.1.4. For each of the following statements, write its negation in a useful form.
(That is, don’t simply say that the statement is false.)

(a) π < 4.

(b) ln(e2 x2 ) = 2(1 + ln(x)).

(c) The integer 9 is even.

2.1.1 Connectives
We now introduce “connectives” that can be used to combine two or more given
statements to obtain a new statement.

Conjunction and Disjunction (“and” and “or”)


One of the most common ways to combine two statements is to connect them with the
words “and” and “or.”

11
Definition 2.1.5 (Conjunction).

Let P and Q be statements. The conjunction of P and Q is the statement denoted P ∧Q or


“P and Q” that is true provided both P and Q are true. The truth table for the conjunction
is
P Q P and Q
T T T
T F F
F T F
F F F

Definition 2.1.6 (Disjunction).

Let P and Q be statements. The disjunction of P and Q is the statement denoted P ∨ Q


or “P or Q” that is true provided either P or Q is true. The truth table for the disjunction
“P or Q” is
P Q P or Q
T T T
T F T
F T T
F F F

Note that the statement “P or Q” is true when either P or Q (or both) is true.

Remark 2.1.7.

(a) Other terms that mean “and” are “but” and “also.” It may not be intuitive the “but”
can be a conjunction. However, “but” can often be replaced with “and, though you
may not have expected it. . . ” This is more obviously a conjunction.

(b) The mathematical “or” is always used in the “inclusive” sense. that is, if both P and
Q are true then P ∨ Q is also true.

In common English usage, “or” is sometimes used in an “exclusive” sense; that is, one
or the other, but not both, is true. A statement such as “You may have the chicken
entree or the beef,” is likely meant in the exclusive sense.

Exercise 2.1.8. Determine the truth value of the following statements



(a) 4 is an even integer and 3 ≥ 17.

12

(b) 4 is an odd integer and 3 ≥ 17.

(c) 4 is an even integer and 3 < 17.

(d) 4 is an odd integer and 3 < 17.

(e) 4 is an even integer or 3 ≥ 17.

(f) 4 is an odd integer or 3 ≥ 17.

(g) 4 is an even integer or 3 < 17.

(h) 4 is an odd integer or 3 < 17.

Implication
An “implication” is also called an “if - then” statement. This form is central to
mathematics. It is the way most theorems are stated.

Definition 2.1.9 (Implication).

Let P and Q be statements. The implication “if P then Q” is the statement denoted
P → Q defined by the following truth table

P Q P →Q
T T T
T F F
F T T
F F T

Remark 2.1.10.
Note that the implication P → Q is true whenever P is false. For example, the statement
“If 4 is an odd integer then 18 is prime,” is a true statement. Many people find this idea
very uncomfortable. Some protest, “The statement above isn’t true or false, it’s
nonsense1 .” One way to think of this in more colloquial terms is to think of a promise
phrased as an implication. “If you finish your chores, then I will take you to the park.” The
only way the promise can be broken is if you finish your chores and I don’t take you to the
park. If you don’t finish your chores, I will have “kept” the promise whether I take you to
the park or not.
Remark 2.1.11. While we refer to an implication as an “if - then” statement, there a very
large collection of ways to state an implication. The following are some of the various
English expressions that translate to P → Q.
1
There are systems of logic with more than two truth values. A quick internet search will yield some
basic information. The binary true/false logic that we are studying has been the by far most useful. We are
not going to accept a truth value of “nonsense.”

13
• If P then Q. • Q when P .

• P implies Q. • Q is necessary for P .

• P only if Q. • P is sufficient for Q.

One way to remember these is to remember that in an implication, certain key words
always refer to the hypothesis and others to the conclusion. The following table
summarizes some of these.

Terms for P and Q in the implication P → Q

P Q
hypothesis conclusion
if only if
sufficient necessary

Another way to identify the hypothesis and conclusion is to think of the hypothesis P as
being a smaller circle contained inside a bigger circle that represents the conclusion Q. For
example, being inside the circle P implies that you are inside the circle Q, also. Similarly,
it is necessary to be inside the circle Q in order to be inside the circle P .

Exercise 2.1.12. In each of the following, you are given an implication. Identify the
hypothesis and conclusion and rewrite the statement if “If (hypothesis) then (conclusion)”
form.

(a) 5 = 7 whenever 3 6= 2

(b) 3 is even only if 6 is prime.

(c) For 10 to be prime it is necessary that 4 be even.

(d) For 10 to be prime it is sufficient that 4 be even.

The following two related implications are associated with any implication.

14
Definition 2.1.13 (Converse and Contrapositive).

Suppose that P and Q are statements.

• The converse of the implication P → Q is Q → P .

• The contrapositive of the implication P → Q is ∼ Q →∼ P .

Example 2.1.14. Consider the statement,


“if a function is differentiable then it is continuous.”
The converse of that statement is,
“if a function is continuous then it is differentiable.”
The contrapositive is
“if a function is not continuous then it is not differentiable.”

Remark 2.1.15. As we will see later, the contrapositive of an implication is not the
negation of the converse.

Exercise 2.1.16. For each statement in (a) – (d) write both the converse and
contrapositive of the given statement. In each case, determine whether the given statement
is true or false, state whether the converse is true or false, and state whether the
contrapositive is true or false.

(a) If 3 < 17 then 4 is not a prime integer.

(b) If 3 ≥ 17 then 4 is not a prime integer.

(c) If 3 < 17 then 4 is a prime integer.

(d) If 3 ≥ 17 then 4 is is a prime integer.

15
Equivalence

Definition 2.1.17 (Equivalence).

Let P and Q be logical statements. The equivalence “P if and only if Q” is the statement
denoted P ↔ Q defined by the following truth table

P Q P ↔Q
T T T
T F F
F T F
F F T

Remark 2.1.18.

(a) We will show below that the equivalence statement P ↔ Q means that both (P → Q)
and (Q → P ) are true.

(b) The following are some of the various English expressions that translate to P ↔ Q.

• P if and only if Q.
• P is equivalent to Q.
• P is necessary and sufficient for Q.

Exercise 2.1.19. In each of (a) – (c), determine if the statement is true or false.

(a) 4 is an even integer if and only if 3 < 17.

(b) 4 is an odd integer if and only if 3 < 17.

(c) 4 is an odd integer if and only if 3 ≥ 17.

2.1.2 Summary of Connectives


We have defined four ways to connect two logical statements together to create a new
logical statement. These can be summarized as follows.

16
Mathematical English Symbolic Truth Table
Term Expression Form Definition
P Q P ∧Q
T T T
Conjunction P and Q P ∧Q T F F
F T F
F F F

P Q P ∨Q
T T T
Disjunction P or Q P ∨Q T F T
F T T
F F F

P Q P →Q
T T T
Implication If P then Q P →Q T F F
F T T
F F T

P Q P ↔Q
T T T
Equivalence P if and only if Q P ↔Q T F F
F T F
F F T

17
Problems
Problem 2.1.1. Determine if each of the following is statement.
(a) 2300 > 3200 .
(b) The solutions to x3 − 3x2 + 4x − 6 = 0 are difficult to find.
(c) 4198 + 7432.
(d) 853 = (56)15 + 13.
10
(e) There is a prime integer larger than 1010 .
Problem 2.1.2. In each of the following problems, an open statement is given. Determine
the value(s) of a and/or b for which the statement is true. If no such value exists, state “no
such value.”
(a) 3 < 2 and b = 6.
(b) a = 4 or 2 < 3.
(c) a = 4 or 3 < 2.
(d) If a = 4 then 2 < 3.
(e) If a = 4 then 3 < 2.
(f) If 2 < 3 then b = 6.
(g) If 3 < 2 then b = 6.
(h) a = 4 if and only if 2 < 3.
(i) 3 < 2 if and only if b = 6.
Problem 2.1.3. Identify the hypothesis and conclusion in each of the following
implications.
(a) 4 is an even integer only if 3 is prime.
(b) For 4 to be even it is sufficient that 3 be prime.
(c) For 3 to be prime it is necessary that 4 be even.
(d) For 4 to be even, 3 must be prime.
(e) 4 is even when 3 is prime.
(f) 3 is prime if 4 is even.
Problem 2.1.4. Write the converse and contrapositive of each of the following.
√ √
(a) If 3 ≤ 17 then 7 > 2.5.
√ √
(b) If 3 ≤ 17 then 7 6= 2.5.
√ √
(c) If 5 > 17 then 7 = 2.5.

18
Problem 2.1.5. Suppose the following statements are all true.

• If Joe passes Math 3034 then Joe will graduate.

• Either Joe will pass Math 3034 or he will get a job flipping hamburgers.

• Joe will not graduate.

Determine whether or not Joe will get a job flipping hamburgers. Explain your reasoning
in full sentences.

Problem 2.1.6. Knights always tell the truth but knaves never tell the truth. In a group
of three individuals (who we will label as #1, #2, and #3) each is either a knight or a
knave. Each makes a statement as follows.

#1 “We are all three knaves.”

#2 “Two of us are knaves and one of us is a knight.“

#3 “I am a knight and the other two are knaves.”

Which are knights and which are knaves? Explain your reasoning in full sentences.

Problem 2.1.7. The prom is Saturday night and the following facts are known.

• Either Mike is not taking Jen or Jason is going with Debbie.

• If Jason goes with Debbie and Bill stays home then Sue will go with Robbie.

• Bill is staying home but Sue will not go with Robbie.

Is Mike taking Jen to the prom? Justify your answer using full sentences.

19
2.2 Statement Forms, Logical Equivalence, and
Negations
2.2.1 Logical Equivalence
An expression such as (P ∧ ∼ Q) → ∼ (R ∨ S), where P , Q, R, and S represent variable or
unassigned statements, is called a statement form. While a statement must be either
true or false, a statement form has no meaning and no truth value until each unassigned
statement is replaced by a specific statement.

Definition 2.2.1 (Logical Equivalence).

Two statement forms are logically equivalent provided they have the same truth values
for all possible truth values of the unassigned statements. If R and S are statement forms,
we will write R ⇔ S to mean that R and S are logically equivalent.

One method for determining whether two statement forms are logically equivalent is to
construct a truth table that compares their truth values for all possible truth values of the
component variables. The proofs of the following theorems will illustrate this technique.

Theorem 2.2.2.

An implication and its contrapositive are logically equivalent; that is, for components P and
Q,
(P → Q) ⇔ (∼ Q → ∼ P ).

Proof. We construct a truth table for the two statement forms using the definition of an
implication.
P Q ∼P ∼Q P →Q ∼ Q →∼ P
T T F F T T
T F F T F F
F T T F T T
F F T T T T
Since the columns for the two statement forms are identical, the statement forms are
logically equivalent.

20
Theorem 2.2.3.

An implication and its converse are not logically equivalent; that is, for components P and
Q,
(P → Q) 6⇔ (Q → P ).

Proof. Once again, we construct a truth table.


P Q P →Q Q→P
T T T T
T F F T
F T T F
F F T T

Note that in the second and third rows the implication and its converse have different truth
values. Thus, the statement forms are not logically equivalent.
The following equivalent form for an implication will be more important later when we
consider the negation of an implication.

Theorem 2.2.4.

For symbolic statements P and Q,

(P → Q) ⇔ (∼ P ∨ Q).

Proof. Once again, we construct a truth table.


P Q ∼P P →Q ∼P ∨Q
T T F T T
T F F F F
F T T T T
F F T T T
Since the columns for the two statement forms are identical, the statement forms are
logically equivalent.

Remark 2.2.5. Equivalence (represented by ↔) and logical equivalence (represented by


⇔) are not the same. Recall that particular statements are equivalent provided both are
true or both are false. Only statement forms, not statements, can be logically equivalent.

21
The importance of logically equivalent forms is that when specific component statements
are “plugged in,” the resulting statements are always equivalent. For instance, since the
statement forms P → Q and ∼ Q →∼ P are logically equivalent, it automatically follows
that the statements:

“If 3 < 17 then 5 is prime”,
and

“If 5 is not prime then 3 ≥ 17”
are equivalent. Similarly,
“If a function is differentiable then it is continuous”,
and
“If a function is not continuous then it is not differentiable ”
are equivalent.

2.2.2 Rules for Negations


In mathematics we must routinely formulate and understand the negation of a given
statement. In one sense, the negation of a statement is trivial to formulate. For example
we can merely say, “it is not true that . . . .” For statement forms we can merely write the
negation of [P → (Q ∨ R)] as ∼ [P → (Q ∨ R)].
Formulations such as those above are not particularly useful. By a useful negation we
mean that in the corresponding form, the ∼ has been distributed across all connectives and
there are no double negatives. The following theorem provides the basic rules for writing
useful negations.

Theorem 2.2.6.

Let P and Q be statement forms.

(a) ∼ (∼ P ) ⇔ P .

(b) ∼ (P ∧ Q) ⇔ (∼ P ∨ ∼ Q).

(c) ∼ (P ∨ Q) ⇔ (∼ P ∧ ∼ Q).

(d) ∼ (P → Q) ⇔ (P ∧ ∼ Q).

Proof. We will prove (b) and (d). Parts (a) and (c) are left to the reader. To prove (b) we
construct a truth table.

22
P Q ∼P ∼Q P ∧Q ∼ (P ∧ Q) ∼ P∨ ∼ Q
T T F F T F F
T F F T F T T
F T T F F T T
F F T T F T T

To prove (d) we use Theorem 2.2.4, and parts (a) and (c) of Theorem 2.2.6, and note that

∼ (P → Q) ⇔ ∼ (∼ P ∨ Q) ⇔ (∼ (∼ P )∧ ∼ Q) ⇔ (P ∧ ∼ Q).

Example 2.2.7. We wish to give a useful and logically equivalent formulation for the
statement form
∼ [P → (∼ Q → R)]
Applying the rule for negating an implication twice, we get the following

∼ [P → (∼ Q → R)] ⇔ [P ∧ ∼ (∼ Q → R)] ⇔ [P ∧ (∼ Q∧ ∼ R)].

Exercise 2.2.8. Give a useful and logically equivalent form of eachof the following.

(a) ∼ [(P ∧ ∼ Q) → R]

(b) ∼ [P → (Q∨ ∼ R)]

(c) ∼ [P ∧ (Q → R)]

Exercise 2.2.9. In each of (a) – (d) below, write the negation in useful form as an English
statement, and determine which is true, the statement or its negation. (While it is not part
of the exercise, you may find it helpful to write the statement in symbolic form (this
requires assigning labels to the components) and write the negation in useful symbolic
form.)

(a) 2 is even but 2 is also prime.

(b) Either 5 is odd or 5 is a multiple of 3.

(c) 9 is neither even nor prime.

(d) For 8 to be odd but not prime, it is sufficient that 8 be a multiple of 4.

23
2.2.3 More Equivalencies
We begin with a few more basic definitions.

Definition 2.2.10 (Tautology, Contradiction).

A statement form T that is true for all truth values of its components is called a tautology.
A statement form C that is false for all truth values of its components is called a
contradicition.

Example 2.2.11. If P is a statement form, then P ∨ ∼ P is a tautology and P ∧ ∼ P is a


contradiction.

Theorem 2.2.12 (Basic Equivalencies).


Let P , Q, R, T , and C be statement forms, where T is a tautology and C is a contradiction.

1. Commutative Laws (a) P ∧Q ⇔ Q∧P


(b) P ∨Q ⇔ Q∨P

2. Associative Laws (a) (P ∧ Q) ∧ R ⇔ P ∧ (Q ∧ R)


(b) (P ∨ Q) ∨ R ⇔ P ∨ (Q ∨ R)

3. Distributive Laws (a) P ∧ (Q ∨ R) ⇔ (P ∧ Q) ∨ (P ∧ R)


(b) P ∨ (Q ∧ R) ⇔ (P ∨ Q) ∧ (P ∨ R)

4. Idempotent Laws (a) P ∧P ⇔P


(b) P ∨P ⇔P

5. Identity Laws (a) P ∧T ⇔P


(b) P ∨C ⇔P

6. Universal Bound Laws (a) P ∨T ⇔T


(b) P ∧C ⇔C

7. Absorption Laws (a) P ∨ (P ∧ Q) ⇔ P


(b) P ∧ (P ∨ Q) ⇔ P

24
Proof. We will prove 3(a) with a truth table. The other parts are left to the reader. Note
that there are three components in the statement form and for each component there are
two possible truth values – true or false. Thus, the total number of possibilities (that is,
the number of lines in the truth table) is 23 = 8.
P Q R Q∨R P ∧ (Q ∨ R) P ∧Q P ∧R (P ∧ Q) ∨ (P ∧ R)
T T T T T T T T
T T F T T T F T
T F T T T F T T
T F F F F F F F
F T T T F F F F
F T F T F F F F
F F T T F F F F
F F F F F F F F

Note that columns 5 and 8 of the table have the same truth values, thus proving 3(a).

Example 2.2.13. We use the basic equivalences of Theorems 2.2.4 and 2.2.12 to prove
that the statement forms P → (Q ∨ R) and (P ∧ ∼ Q) → R are logically equivalent. The
reader should label the specific part of the theorem used at each step.
Proof.

P → (Q ∨ R) ⇔ ∼ P ∨ (Q ∨ R)
⇔ (∼ P ∨ Q) ∨ R
⇔ ∼ (∼ P ∨ Q) → R
⇔ (P ∧ ∼ Q) → R.

Remark 2.2.14. We will later find the equivalence given in Example 2.2.13 to be quite
useful. To prove a statement of the form P → (Q ∨ R) involves assuming P and trying to
conclude the awkward form (Q ∨ R). If we substitute the equivalent form, (P ∧ ∼ Q) → R,
we begin with two hypotheses, P and ∼ Q, and need only to prove the single conclusion R.

25
Problems
Problem 2.2.1. Use a truth table to prove Theorem ?? (c).

Problem 2.2.2. Use truth tables to determine whether or not each of the following pairs
of statement forms are logically equivalent.
(a) ∼ (P → Q) and ∼ P → ∼ Q.
(b) (P → Q) → R and (P → R) → Q.

Problem 2.2.3. In (a) – (d) do each of the following steps:

(i) Use the assigned variables and the symbols ∼, ∧, and ∨ to write the statement in
symbolic form;
(ii) Write a useful (simplified) negation of the statement in symbolic form; and
(iii) Write a useful negation of the statement in English.

(a) 9 is an odd integer but is not a prime.


P : 9 is an odd integer Q: 9 is a prime.
(b) 9 is neither an odd integer nor a prime. (Same symbols as (a).)
(c) Mike is neither healthy nor wealthy, but Mike is wise.
P : Mike is healthy Q: Mike is wealthy R: Mike is wise
(d) Mike is healthy, wealthy, and wise. (Same symbols as (c).)

Problem 2.2.4. Give the converse, the contrapositive, and the negation (in useful form)
of each of the following statement forms.
(a) (P ∨ Q) → R
(b) (P ∧ Q) → R
(c) P → (∼ Q ∧ R)
(d) (P → Q) → R
(e) P → (Q → R)

Problem 2.2.5. Write a useful negation of each of the following statements.


(a) If 3 is even and 7 is prime then 3 > 2.
(b) If 4 is even then 5 is neither odd nor prime.
(c) If |x − 4| < 2 then −2 < x < 2.
(d) If |x − 4| > 2 then either x < −2 or x > 2.

26
Problem 2.2.6. Use a truth table to prove Theorem 5, part 3(b).

Problem 2.2.7. Use the Theorems of Section 2.2 to prove the following equivalencies.
(a) [(P ∨ Q) → R] ⇔ [(P → R) ∧ (Q → R)]
(b) [P → (Q → R)] ⇔ [(P ∧ Q) → R]
(c) [(P → Q) → R] ⇔ [(∼ P → R) ∧ (Q → R)]

Problem 2.2.8. The famous detective, Hercule Poirot, has arrived at the following facts.

• The statement, “if Col. Mustard did not commit the murder then neither Miss
Scarlet nor Mr. Green committed the murder” is false.

• Either Miss Scarlet did not commit the murder or the weapon was a candlestick.

• If the weapon was a candlestick then Col. Mustard committed the murder.

Who committed the murder? Explain how you know.

27
2.3 Quantifiers
2.3.1 Open statements, universal sets, and quantified statements
Consider the assertions:
• P (n): n is a prime integer.
• Q(x, y): 2x + y = 3.
In each case the assertion may be either true or false depending upon the value assigned to
the variables. P (n) and Q(x, y) are examples of open statements. That is, assertions
that contain variables. When appropriate values are assigned to the variables in an open
statement, it becomes a statement. For example:
• P (4) is a false statement.
• P (5) is a true statement.
• P (223 + 1) is a statement, but it is difficult to tell whether it is true or false.
• Q(1, 1) is a true statement.
• Q(1, 2) is a false statement.

Definition 2.3.1 (Universal Set, Truth Set).

Let P (x) denote an open statement. Associated with the variable x is a universal set (or
domain) Ux such that for each a ∈ Ux , P (a) is a statement. That is, P (a) is either true or
false.
The truth set of P (x) is the set of values in Ux for which P (x) becomes a true statement.

Example 2.3.2. Let P (x) denote the statement: x2 − 4 = 0. Let Ux = R, where R denotes
the set of all real numbers. The truth set of P (x) is the set { −2, 2 }.

Definition 2.3.3 (Existential Quantifer).

Let P (x) be an open statement with universal set Ux . The statement

“There exists x in Ux such that P (x),”

written symbolically as
(∃ x ∈ Ux s.t.) P (x),
is defined to be true provided the truth set of P (x) is not the empty set.

28
Example 2.3.4. Consider the statement:

“There exist real numbers x and y such that 2x + y 2 = 6.”

We now write the statement in a more compact form. Note that the universal sets for x and
y are given to be the set R of real numbers. Thus, we can write the statement in the form

(∃ x, y ∈ R s.t.) 2x + y 2 = 6.

If we let x = 3 and y = 0 we get

2x + y 2 = 2(3) + 02 = 6.

This is a true statement, so the given existentially quantified statement is also true.
Exercise 2.3.5. Consider the statement:

“There exists a prime integer p such that p > 10 and p is even.”

Write the statement in more compact form, expressing the existential quantifier
symbolically.
• What is the open statement?

• What are the variables?

• What is the universal set?

• Is the statement true?

Definition 2.3.6 (Universal Quantifer).

Let P (x) be an open statement with universal set Ux . The statement

“For all x in Ux , P (x),”

written symbolically as
(∀ x ∈ Ux ) P (x),
is defined to be true provided Ux is the truth set of P (x).

Remark 2.3.7. Note that a statement of the form


“If x ∈ Ux then P (x)”
can also be written as
“For all x in Ux , P (x)”
.

29
Example 2.3.8. Consider the following statements. We will write these statements in
compact form, expressing the quantifiers symbolically and identifying the universal sets
clearly. We will then give the truth value of the statement.

(a) There exist real numbers x and y such that x2 + y 2 < 0.

(∃ x, y ∈ R s.t.) x2 + y 2 < 0. The statement is false.

(b) There exist real numbers x and y such that x2 + y 2 = 0.

(∃ x, y ∈ R s.t.) x2 + y 2 = 0. The statement is true. (For example, x = y = 0).

(c) If x and y are real numbers then x2 + y 2 = 0.

(∀ x, y ∈ R) x2 + y 2 = 0. The statement is false. (For instance, 12 + 22 = 0 is false.)

(d) If x and y are real numbers then x2 + y 2 ≥ 0.

(∀ x, y ∈ R) x2 + y 2 ≥ 0. The statement is true.

Exercise 2.3.9. In each of the following, write the statements in compact form, expressing
the quantifiers symbolically and identifying the universal sets clearly. Then give the truth
value of the statement.

(a) There is some real number x such that x2 − 5x + 6 = 0.

(b) For any angle θ, sin2 θ + cos2 θ = 1.

(c) All real numbers x satisfy x2 > 0.

(d) For any real numbers x and y, x + y = 10.

(e) There are real numbers x and y for which x + y = 10.

Example 2.3.10. Consider the following two statements and their compact forms.

• For any real number x, there is some y such that x + y = 10.

(∀x ∈ R)(∃y ∈ R s.t.) x + y = 10.

• There is a real number y such that for any x we have x + y = 10.

(∃y ∈ R s.t.)(∀x ∈ R) x + y = 10.

The first statement is true. If we are given any x ∈ R, we can choose y = 10 − x and
x + y = x + (10 − x) = 10. However, the second statement is false. There is no single real
number y to which we can add any other real number x and alway get the sum of 10. This
points to a very important general observation: in general,

(∀ x ∈ Ux ) (∃ y ∈ Uy s.t.) S(x, y)

30
is not logically equivalent to

(∃ y ∈ Uy s.t.) (∀ x ∈ Ux ) S(x, y).

We will come back to this very important point: is statements with both universal and
existential quantifiers, the order in which the quantifiers are stated is crucial to the truth
value of the statement.

Remark 2.3.11. An open statement becomes a statement when each variable appearing is
either assigned a specific value from the universal set or is quantified.

Definition 2.3.12 (Properly Introduced).

In a mathematical statement that contains variables, each variable is said to be


properly introduced if each variable is either

• assigned a specific value,or

• quantified and have its universal set indicated in the statement.

2.3.2 Negating quantified statements


We now state without proof the rule for negating quantified statements.

Theorem 2.3.13 (Rules for Negations).

Let P (x) denote an open statement with universal set Ux . Then

∼ [(∃ x ∈ Ux ) P (x)] ⇐⇒ (∀ x ∈ Ux ) ∼ P (x). (2.1)

∼ [(∀ x ∈ Ux ) P (x)] ⇐⇒ (∃ x ∈ Ux ) ∼ P (x). (2.2)

Example 2.3.14. To give a useful logically equivalent form for the negation of:

(∀ x) [(∃ y) P (x, y) ∨ (∀ z) Q(x, z)]

we use Theorem 2.3.13 and our rules for negating disjunctions to get

(∃ x) [(∀ y) ∼ P (x, y) ∧ (∃ z) ∼ Q(x, z)].

31
Exercise 2.3.15. Give a useful, logically equivalent form for the negation of each of the
following:
(a) (∀ x) [(∃ y) P (x, y) ∧ (∀ z) (∃ w) Q(x, z, w)]
(b) (∀ x) [(∃ y) P (x, y) → (∀ z) (Q(x, z) ∧ (∃ w) ∼ R(x, w, z))]

Exercise 2.3.16. In each of (a) and (b) below:

(i) Write the statement in compact form2 , expressing the quantifiers symbolically and
identifying the relevant universal sets.

(ii) Write a useful notation in compact form; and

(iii) give a useful written negation of the statement in English.

(a) For every real number y there is a positive real number x such that y = ln x.

(b) For every positive real number y there exist real numbers x and z such that y = x2 − 1
and y = ez .

Example 2.3.17. Consider the statement form:


h i
(∀ x ∈ Ux ) (∃ y ∈ Uy ) P (x, y) → (∀ z ∈ Uz ) Q(x, z) .

Here the quantified open statement is an implication and both the hypothesis and the
conclusion of the implication are quantified open statements.
The contrapositive is:
h i
(∀ x ∈ Ux ) (∃ z ∈ Uz ) ∼ Q(x, z) → (∀ y ∈ Uy ) ∼ P (x, y) .

The converse is:


h i
(∀ x ∈ Ux ) (∀ z ∈ Uz ) Q(x, z) → (∃ y ∈ Uy ) P (x, y) .

The negation is:


h i
(∃ x ∈ Ux ) (∃ y ∈ Uy ) P (x, y) ∧ (∃ z ∈ Uz ) ∼ Q(x, z) .
Note that the terms “contrapositive” and “converse” refer to the open implication. The
term “negation” refers to the entire quantified statement.

Example 2.3.18. Consider the statement:

For all real numbers x, if x2 − 5x + 6 = 0 then either x = 2 or x = 3.


2
The balance between the use of symbols and English in compact form is a matter of taste. In this edition
of the text, symbols will be used for quantifies and universal sets, but “and” and “or” will be used rather
than ∧ and ∨. “If - then” will be used rather than →.

32
This is a universally quantified open implication. We first write it in compact form

(∀ x ∈ R) [ if (x2 − 5x + 6 = 0) then (x = 2 or x = 3)].

The compact negation of this statement is

(∃ x ∈ R s.t.) [(x2 − 5x + 6 = 0) but (x 6= 2 and x 6= 3)].

The written negation would be as follows: There exists a real number x such that
x2 − 5x + 6 = 0 but x 6= 2 and x 6= 3.

The compact contrapositive is

(∀ x ∈ R) [ if (x 6= 2 and x 6= 3) then (x2 − 5x + 6 6= 0)].

The written contrapositive would be as follows: For all real numbers x, if x 6= 0 and x 6= 3
then x2 − 5x + 6 6= 0.

Exercise 2.3.19. In each of (a) and (b) below:

(i) Write the statement in compact form

(ii) write a useful negation of the statement in compact form;

(iii) give a useful written negation of the statement;

(iv) write the contrapositive of the implication in compact form; and

(v) write the contrapositive as an English sentence.

(a) For integers m and n, if m + n is even, then both m and n are even.

(b) For every√positive integer n, if n is not prime then there exists a prime integer p such
that p ≤ n and p is a factor of n.

33
Problems
Problem 2.3.1. In each of (a) – (c), give a useful negation of the statement form.
(a)
(∀ x ∈ Ux ) [(∃ y ∈ Uy ) P (x, y) ∨ (∀ z ∈ Uz ) Q(x, z)].
(b) h  i
(∃ x ∈ Ux ) (∀ y ∈ Uy ) P (x, y) → (∀ z ∈ Uz ) Q(x, z) ∨ (∃ w ∈ Uw ) R(x, w) .

(c)
h  i
(∃ x ∈ Ux ) (∀ y ∈ Uy ) P (x, y) → (∀ z ∈ Uz ) (∃ w ∈ Uw ) Q(x, z, w)∧ ∼ R(x, z, w) .

In Problems 2.3.2 – 2.3.5 do each of the following steps:


(i) Write the statement in compact form.
(ii) Give the compact form of a useful negation of the statement.
(iii) Give a useful written negation of the statement.
Problem 2.3.2. For every 2 × 2 matrix A there exists a 2 × 2 matrix B such AB 6= BA.

Problem 2.3.3. There exist positive integers m and n such that 2m + 3n = 4.

Problem 2.3.4. For every pair of real numbers a and b, either a < b or b < a.

Problem 2.3.5. For all real numbers a and b there exists a real number c such that
a + c = 2 and b + c = 3.

Problem 2.3.6. In each of (a) and (b), give the contrapositive of the given statement form.
(a) h  i
(∃ x ∈ Ux ) (∀ y ∈ Uy ) P (x, y) → (∀ z ∈ Uz ) Q(x, z) ∨ (∃ w ∈ Uw ) R(x, w) .

(b)
h  i
(∃ x ∈ Ux ) (∀ y ∈ Uy ) P (x, y) → (∀ z ∈ Uz ) (∃ w ∈ Uw ) Q(x, z, w)∧ ∼ R(x, z, w) .

Problem 2.3.7. In each of (a) and (b):


(i) give a useful written negation of the statement, and
(ii) give a useful written contrapositive of the statement.
(a) For all real numbers x and y, if x < y then there exists a rational number r such that
x < r < y.
(b) For every real number x, if 0 < x < 1 then there exists a positive real number  such
that  < x < 1 − .

34
2.4 Definitions
As we said in the preface, definitions (along with axioms) are the basic building blocks of
mathematical proof. Intimate familiarity with these basic tools is crucial to understanding
and creating mathematical arguments.

2.4.1 General Form of a Definition


We begin with a very formal description of a mathematical definition.

Definition 2.4.1 (Definiton).

The general symbolic form of a definition is

(∀ x ∈ Ux ) [N (x) ↔ D(x, y1 , y2 , . . .)]

where N (x) introduces the term being defined and D(x, y1 , y2 , . . .) gives the definition of the
term.

Example 2.4.2. Consider the following familiar definition.

Definition 2.4.3 (Rational Number).

We say real number r is a rational number, and write r ∈ Q, if and only if there exist
integers m and n such that n 6= 0 and r = m/n.

Suppose we wish to express this in the fully symbolic form described above. We first assign
symbols as follows:
Ur = R, the set of all real numbers.
Um = Un = Z, the set of all integers.
N (r): r is a rational number.
P (n): n 6= 0.
Q(r, m, n): r = m/n.
Using these, we can give the following symbolic form of the definition:
h  i
(∀r ∈ R) N (r) ↔ (∃m, n ∈ Z s.t.) P (n) ∧ Q(r, m, n) .

35
Thus, the definition has general form (∀r ∈ R)[N
 (r) ↔ D(r, m, n)]
 indicated above, where
D(r, m, n) denotes the statement (∃m, n ∈ Z) P (n) ∧ Q(r, m, n)
A more readable compact form would be
h i
(∀r ∈ R) (r is a rational number) ↔ ((∃m, n ∈ Z s.t.) ((n 6= 0) and r = m/n)) .

2.4.2 Definitions in Practice


Our formal specification of a “correct form” of a definition is seldom satisfied in practice.
Definitions are often given in the narrative of an article or textbook, and authors rarely
stop to specify all of the components of the form given above. Moreover, authors are
seldom as picky about language as our formal template indicates. For instance, one might
see something like, “We say r is a rational number if there integers m and n with n 6= 0
such that r = m/n. Now, most people would not even notice the difference between that
statement and the more formal definition above, but let’s note the changes.

• The universal set that a rational number belongs to is not identified. The definition
tells us that it is the quotient of two integers. We are left to deduce that it must be a
real number.

• The definition is stated as an implication rather than an equivalence - “We say r is a


rational number if . . . ” rather than “We say r is a rational number if and only if
. . . ” This is a rather common language shortcut. Since we are giving a definition, the
equivalence of the name and the conditions is tacit; it is assumed. A shorter
connective can be substituted for the cumbersome “if and only if.” (In this text, we
usually use the word “provided” for this purpose.)

These are just a few of the minor problems one can encounter in real-life definitions.
Authors sometimes develop the conditions of a definition over the course of a narrative and
only tie things together at end by providing the reader with a name for the object being
described. In this text, definitions and formally stated, highlighted, and boxed. That is
nice, but it’s really “training wheels” for real life. We encourage you to go to other
mathematical texts and list all of the definitions, putting them into an unambiguous form.

2.4.3 Negation
We will not have occasion to negate an entire definition. Associated with every definition
“x is a term,” however, is the corresponding definition of “x is not a term”. This definition
has the general form

(∀x ∈ U ) [∼ N (x) ↔∼ D(x, y1 , y2 , . . .)]

36
Example 2.4.4. Continuing from Example 2.4.2, we wish to give the symbolic form then
the English statement of the definition of “r is not a rational number.”
The compact form of this definition is:
h i
(∀r ∈ R) (r is not a rational number) ↔ ((∀m, n ∈ Z) ((n = 0) or r 6= m/n)) .

The English statement is: “A real number r is a not rational number provided for all
integers m and n either n = 0 or r 6= m/n.”
Example 2.4.5. Consider the following definition.

Definition 2.4.6 (Bounded Function).

A function f : R → R is bounded provided there exists a positive real number M such


that for every real number x ∈ R, |f (x)| < M .

(a) We first write a compact form of this definition.


(∀f : R → R) [(f is bounded ) ↔ (∃M ∈ (0, ∞) s.t.) ((∀x ∈ R)(|f (x)| < M ))].

(b) Using this, we can give the compact form of the definition of: “f : R → R is not
bounded.”
(∀f : R → R) [(f is not bounded ) ↔ (∀M ∈ (0, ∞)) ((∃ x ∈ R s.t.)(|f (x)| ≥ M ))].

(c) In English, we would say ” A function f : R → R is not bounded provided for every
positive real number M there exists a real number x such that |f (x)| ≥ M .”
Exercise 2.4.7. Consider the following definition.

Definition 2.4.8 (Least Upper Bound).

For every real number u and set of real numbers A ⊆ R, we say u is a least upper bound of
A provided a ≤ u for every a ∈ A and for every positive real number  > 0 there exists b ∈ A
such that u −  < b.

(a) Write a compact form of this definition


(b) Write a compact form of the definition: “u ∈ R is not a least upper bound for a set
A ⊂ R of real numbers.”
(c) Write out a useful definition in English of: “u is not a least upper bound for a set A of
real numbers. ”

37
Problems
Problem 2.4.1. Consider the following definition.

Definition 2.4.9 (Perfect Square).

An integer n ∈ Z is a perfect square provided there is an integer k ∈ Z such that n = k 2 .

Write out a useful definition of “n ∈ Z is not a perfect square.”

Problem 2.4.2. Complete the following definition:


An integer n ∈ Z is not even provided . . . .

Problem 2.4.3. Complete the following definition:


An integer n ∈ Z is not odd provided . . . .

Problem 2.4.4. Complete the following definition:


The integer b ∈ Z does not divide the integer a ∈ Z provided . . . .

Problem 2.4.5. Argue that if an integer n > 1 is not prime then it is a composite.

Problem 2.4.6. Consider the following definition.

Definition 2.4.10 (Cauchy Sequence).

A sequence (xn ) of real numbers is a Cauchy sequence provided for every positive real
number  there exists a natural number (that is, a postive integer) M such that for all natural
numbers m and n, if m > M and n > M then |xn − xm | < .

Write out a useful definition of “(xn ) is not a Cauchy sequence. ”

Problem 2.4.7. Consider the following definition.

38
Definition 2.4.11 (Limit of a function).

For a function f : R → R and real numbers a ∈ R and L ∈ R we say that the limit of f
as x approaches a is L (hereafter written as limx→a f (x) = L) provided for every positive
real number  > 0 there exists a positive real number δ > 0 such that for every real number
x ∈ R, if |x − a| < δ then |f (x) − L| < .

Write out a useful definition of “limx→a f (x) 6= L.”

39
Chapter 3

Methods of Proof

This chapter covers some basic structures for mathematical proof. However, a more
comprehensive goal of the chapter is to help the reader understand how to develop the
structure of a proof from the very statement you are trying to prove.

3.1 Basic Proofs with Quantifiers


Proving quantified open statements is a routine task in mathematics. We start by
considering existentialy quantified statements.

3.1.1 Existence Proofs


Our first goal is to prove a statement of the form

(∃ x ∈ Ux s.t.) P (x).

There are two types of existence proofs: constructive and nonconstructive.

Constructive Proofs
Perhaps the most satisfying proof of the existence of an object is to display it and say,
“Here it is.” One type of constructive proof is to display a specific value x = a in the
universal set Uz and verify that P (a) is true. method.
Warning: Typically, finding the appropriate value, a, is the hardest part in a proof of this
type. However, the derivation of a need not be part of the proof. The proof is what we
often call the “check”; that is, verifying that P (a) is true. The choice of whether to display
the process of derivation to the reader is one of style. Is the derivation revealing, or does it
simply confuse matters?

Example 3.1.1. Our first proof is very simple. We will show that there exist integers m
and n such that 2m + 3n = 12.

40
Proof. We choose m = 3 and n = 2. Then

2m + 3n = 2(3) + 3(2) = 6 + 6 = 12.

The proof consisted of displaying a particular pair m and n (there are, of course, many
others) and demonstrating that the pair worked.

Example 3.1.2. The next proof is a bit harder (or, at least, less obvious.) We will show
that there exists an integer m such that
m−7
= 5.
2m + 4
In this example, the real work must take place “off to the side” before we can begin writing
the proof; specifically, we must derive an integer value for m that satisfies the given
equation. To find m, multiply both sides of the given equation by 2m + 4 to obtain
m − 7 = 5(2m + 4) = 10m + 20. This gives −9m = 27, so m = −3. We are now ready to
give a formal proof of the statement.
Proof. Let m = −3. Then
m−7 −3 − 7 −10
= = = 5.
2m + 4 2(−3) + 4 −2

This is a matter of taste, but one can argue that the “derivation” simply distracts from the
crucial fact that m = −3 is a solution. In fact, there was one “questionable” step in the
derivation. We should have ensured that 2m + 4 was not zero when used it to multiply
both sides of the equation. Our formal proof (the demonstration that m = −3 is a
solution) is valid without the derivation. It’s up to the person writing the proof to decide if
the derivation is helpful to the reader or not.

Remark 3.1.3. Another type of constructive proof is to show that a particular algorithm
produces a value, a, such that P (a) is true. We will give an example of such a proof in
Section ??, where we prove the existence of the greatest common divisor of two integers.

Nonconstructive Proofs of Existence


Nonconstructive proofs involve using previous theorems or results that imply the existence
of an a such that P (a) is true without indicating how to actually produce such an a. From
calculus, the Intermediate Value Theorem and the Mean Value Theorem are examples of
existence theorems that can be used in this manner.

41
Theorem 3.1.4 (Intermediate Value Theorem).

Let f [a, b] → R be continuous at each point in [a, b]. If

f (a) < l < f (b),

then there exists c ∈ (a, b) such that f (c) = l.

Note that this theorem does not tell us the exact location of the point c ∈ (a, b). We use
this in the following example.

Example 3.1.5. Set f (x) = x3 − 3x2 + 2x − 4. We will show that there exists a real
number r such that 2 < r < 3 and f (r) = 0.
Proof. Note that f (2) = 23 − 3(22) + 2(2) − 4 = −4 and f (3) = 33 − 3(32) + 2(3) − 4 = 2.
Thus f (2) < 0 < f (3). Since f is a continuous function, by the Intermediate Value
Theorem, there is a real number r ∈ (2, 3) such that f (r) = 0.

3.1.2 “For All” Proofs


Our next goal is to prove a statement of the form (∀x ∈ Ux ) P (x). A typical proof has the
following form:

• Let x ∈ Ux be arbitrary.

• If it is useful to do so, expand upon what it means for x to be in Ux .

• Give a logical argument concluding that P (x) is true.

Remark 3.1.6. In the construction of the proof that P (x) is true, you may want to both
work forward from the assumption x ∈ Ux and backwards from the conclusion P (x), but
the presentation of the proof should begin with the assumption x ∈ Ux and end with the
conclusion that P (x) is true. You should present your reader with a step-by-step “narrative
structure” that leads from the assumption to the conclusion.

Example 3.1.7. We will show that for all integers a, b ∈ Z, if a is even and b is odd, then
a + b is odd.
Before writing our proof, let’s see how the structure of the statement we are trying to prove
almost creates a “template” for our proof.

42
Statement Proof
For every a, b ∈ Z, Let a, b ∈ Z be given.
if a is even and b is odd, Suppose a is even and b is odd.
.. ..
. .
then a + b is odd. Therefore a + b is odd.
Of course, the hard part is filling in the dots. We do that using the definitions of the terms
involved. Let’s lay out the formal definitions from the preface section on number theory for
our assumptions and our conclusion.1 As we do so, note the difference in how we use a
definition that we assume to be true and one that we have to prove to be true.

• Since we are given that a is even, we know, by definition, that there exists an integer
n ∈ Z such that a = 2n.

• Since we are given that b is odd, we know, by definition, that there exists an integer
m ∈ Z such that b = 2m + 1.

• Since we want to prove that a + b is odd, we need to prove that there exists an
integer k ∈ Z such that a + b = 2k + 1. Note the following:

– Though we are using the same definition (of an odd integer) for b and a + b, we
used a different “dummy variable” (m and k) since these are different numbers.
– Note that in the assumptions the definition asserts the existence of n and m.
We don’t have to prove it.
– To prove the conclusion, we have to prove the existence of k. (We will give a
constructive proof.)

Let’s use these definitions to fill in our template a bit.

Statement Proof
For every a, b ∈ Z, Let a, b ∈ Z be given.

if a is even Suppose a is even.


By definition ∃ m ∈ Z s.t. a = 2m.

and b is odd, Suppose b is odd.


By definition ∃ n ∈ Z s.t. b = 2n + 1.
.. ..
. .
then a + b is odd. Therefore ∃ k ∈ Z s.t. a + b = 2k + 1,
so a + b is odd.

Again, there is still some work to do filling in the dots, but we now proceed with the formal
proof.
1
In this simple proof, this might not be necessary, but whenever you are stumped, writing out the
definitions of all the terms in the assumptions and conclusions is a very good practice.

43
Proof. Let a, b ∈ Z be given. Suppose a is even and b is odd. Then, by definition, there
exist integers n and m such that a = 2n and b = 2m + 1. Thus,
a + b = 2n + (2m + 1) = 2(m + n) + 1.
Since (m + n) ∈ Z, is an integer, a + b is odd by definition.
Remark 3.1.8. A proof always depends on the sophistication of your audience. In the last
steps we used several axioms from number theory: the associative property, the distributive
property, and the fact that integers are closed under addition. It is our judgement that
they don’t need to be mentioned to the audience of this book. We are correct if you can
look at each equal sign and each statement and identify the specific rules that make it true.

Some Common Errors in Proving (∀x ∈ Ux ) P (x)


Error 1: Putting additional constraints on x beyond the assumption that x ∈ Ux . This
proves only (∃x ∈ Ux ) P (x).
Illustration: Prove that for every positive real number x,
4
x + ≥ 4.
x

Bad Proof: Let x = 1. Then


4 4
x+ = 1 + = 5 > 4.
x 1

Remark 3.1.9. The “proof” above showed only that 1 is in the truth set of the statement
we were trying to prove. Since the set of positive reals is an infinite set, we can never try
them all. The usual reaction of someone grading this type of proof is to put a big, red slash
through it and write “Proof by example.” (It’s cruel, but sometimes we can’t avoid it.)

Error 2: Assuming P (x) and then concluding something that is obviously true.
Illustration: Prove that for every positive real number x,
4
x + ≥ 4.
x

Bad Proof: Let x be a positive real number and suppose


4
x + ≥ 4.
x
Multiplying by x > 0 gives
x2 + x ≥ 4x.
Now, subtracting 4x from both sides we get
x2 − 4x + 4 ≥ 0
which is the same as (x − 2)2 ≥ 0, which is always true.

44
Remark 3.1.10. What was proved above is that for all positive real numbers x > 0, if
x + x4 ≥ 4, then (x − 2)2 ≥ 0, a implication that is true even if the hypothesis is false. In
essence, this is the proof done backwards.
An even worse version of this proof is to give a list of successive statements without any
explanation connecting them.
Worse Proof: Let x be a positive real number and suppose
4
x+ ≥ 4.
x
Then
x2 + x ≥ 4x.
x2 − 4x + 4 ≥ 0
(x − 2)2 ≥ 0.
True.

Remark 3.1.11. Not only is this proof backwards, but there is no narrative structure
connecting one statement to the next. This method of communication is often taught to
students learning trig identities. While it might be valid in context, it is not a useful
method for discussing mathematical ideas with a wide audience. It is best left to the
privacy of a high school classroom.
Fortunately, the backwards “proofs” above do help us to construct a valid proof. In the
presentation, we just need to reverse the steps so we begin with that which is obviously
true and conclude with P (x).

Example 3.1.12. We will show that for every positive real number x,
4
x+ ≥ 4.
x
Proof. Let x be a positive real number. Then, since the square of a real number is never
negative, (x − 2)2 ≥ 0 . Expanding gives

x2 − 4x + 4 ≥ 0.

By assumption x > 0, so dividing by x preserves the inequality and gives


4
x−4+ ≥ 0.
x
Finally, adding 4 to both sides gives
4
x+ ≥ 4.
x

45
Note that this proof proceeds from our assumptions and basic facts about real numbers to
the conclusion. Reasons are given for each step. The proof has a narrative structure and
tells a story.
Exercise 3.1.13. Prove that the sum of any two rational numbers is rational.
Note: The statement to be proved can be stated symbolically as follows.

(∀r, s ∈ Q), r + s ∈ Q.

“For All” Proofs; Division into Cases


Sometimes in proving (∀x ∈ Ux ) P (x) we cannot find a proof that applies at once to all the
elements in Ux . In such instances, it is often convenient to divide the proof into cases.
That means that we partition Ux into subsets and give a separate proof for each subset.
Example 3.1.14. We will show that for every real number a ∈ R,
(x − 1) sin x
lim
x→a x2 − x
exists.
Remark 3.1.15. In doing this proof we are going to be using some results from calculus.
(Again, what you put in a proof depends on the audience. We assume our audience is
familiar with (at least) the following.)
• For a continuous function f : [a, b] → R and c ∈ (a, b),

lim f (x) = f (c).


x→c

• The quotient of any two continuous function is continuous, except where the
denominator is zero.
• The limit of a product is the product of the limits, if both limits exist.
• The sine function in continuous, as is any polynomial.

sin x
lim = 1.
x→0 x

Thus, the “problem” values of a for the limit of our function are when the denominator of
the given expression is zero; that is, a = 0 and a = 1. This suggests that we take three
cases.
Proof. Let a ∈ R be given.
Case 1: Suppose that a 6= 0 and a 6= 1. Then we are taking the limit of a continuous
function to a point of continuity and
(x − 1) sin x (a − 1) sin a
lim 2
= .
x→a x −x a2 − a

46
Case 2: Suppose a = 0. Then
     
(x − 1) sin x x−1 sin x x−1 sin x
lim = lim = lim lim = (1)(1) = 1.
x→0 x2 − x x→0 x−1 x x→0 x − 1 x→0 x

Case 3: Suppose a = 1. For x 6= 1 we have

(x − 1) sin x sin x
2
= .
x −x x
Therefore,
(x − 1) sin x sin x
lim 2
= lim = sin(1).
x→1 x −x x→1 x

Exercise 3.1.16. Prove that for every integer n either 4 divides n2 or n2 is odd. (Hint:
Consider two cases: n even and n odd.)

47
Problems
Problem 3.1.1. Prove: There exists an even integer n that can be written in two different
ways as a sum of two distinct primes. [Caution: 1 is not a prime. Also note that something
like 8 = 3 + 5 = 5 + 3 does not count since in both sums the two primes are the same.]

Problem 3.1.2. Disprove (that is, prove the negation): For every positive integer n,
3n + 2 is prime.

Problem 3.1.3. Disprove: For all integers r, m, and n, if r divides mn then either r
divides m or r divides n.

Problem 3.1.4. Prove: For all odd integers a and b, ab is also odd.

Problem 3.1.5. Prove: For every integer n, the integer n2 + n is even. [Hint: Take cases;
n even and n odd.]

Problem 3.1.6. Prove: For every positive integer n, n2 + 4n + 3 is not a prime.

Problem 3.1.7. Prove: If n is the product of any four consecutive integers then n + 1 is a
perfect square.

48
3.2 Proofs with Mixed Quantifiers
In this section, we confront proofs with mixed quantifiers. As we have seem previously,
changing the order of an existential and universal quantifier changes the meaning of a
statement (usually drastically). Thus, when proving a statement with mixed quantifiers,
maintaining the order of the quantifiers in the narrative of the proof is crucial.

3.2.1 Proving Statements of the Form (∃x)(∀y) P (x, y).


The proof of (∃x ∈ Ux )(∀y ∈ Uy ) P (x, y) is first an existence proof and second a “for all”
proof. If possible, we set x = a, where a is a specific element in Ux . Next we let y be
anarbitrary (variable) element in Uy and prove that P (a, y) is true.
Example 3.2.1. We show that there exists a real number x ∈ R such that for every real
number y ∈ R, xy − 3x − 3y + 12 = y.
Construction of the Proof: Again, the structure of the statement we are trying to prove
can provide a template for the proof.
Statement Proof
∃ x ∈ R s.t. We choose x = . . .

∀y∈R Let y ∈ R be given.

We have xy − 3x − 3y + 12 = y. Then xy − 3x − 3y + 12 = · · · = y.
As usual, the template has some things to be filled in. We will have to find a specific x ∈ R
that will work for an arbitrary y. That is, x has to be chosen before y is given. Thus, x
cannot depend on y.
Working backwards, we start with
xy − 3x − 3y + 12 = y
Adding −3y + 12 to both sides gives
xy − 3x = 4y − 12
Factor x out on the left side
x(y − 3) = 4y − 12
Divide by y − 3
4y − 12 4(y − 3)
x= = =4
y−3 y−3
This gives us our conjecture for x. Let’s see if it works in a rigorous proof.
Proof. We choose x = 4. Let y ∈ R be given. Then
xy − 3x − 3y + 12 = 4y − 3(4) − 3y + 12 = y.

Exercise 3.2.2. Prove that there exists a 2 × 2 matrix A such that for every 2 × 2 matrix
B, AB = 3B.

49
3.2.2 Proving Statements of the Form (∀x)(∃y) P (x, y)
The proof of (∀x ∈ Ux )(∃y ∈ Uy ) P (x, y) is first a “for all” proof and second an existence
proof. Thus, we begin by letting x be an arbitrary (variable) element in Ux . Then we find
find y, usually expressed in terms of x - say y = g(x) - and prove that P (x, g(x)) is true.
Note the following.

• In the proof, the variables should be introduced in same order that they are
introduced in the statement you are trying to prove.

• The choice of any variable can depend only on variables that were introduced
previously.

• The language of the proof has to clearly identify for the reader the type of quantifier
being verified. There are many ways to do this, but this isn’t a place to get too
creative. Pick something that fits your style and stick to it.

– For universal qualifiers, phrases like “let x ∈ Ux be given”, or “let x ∈ Ux be


arbitrary” work well.
– For existential quantifiers, phrases like “we choose y = g(x)”, “take y = g(x),”
or “let y = g(x)” work.

Example 3.2.3. We will show that for every real number x there exists a real number y
such that x2 y + 2x = x.

Construction of the Proof: Again, the structure of the statement we are trying to prove
(particularly the order in which the variables are introduced) provides a template for the
proof.
Statement Proof
∀x∈R Let x ∈ R be given

∃ y ∈ R s.t. We choose y = . . .

x2 y + 2x = x. Then x2 y + 2x = · · · = x.

Again, the template has some things that have to be filled in. For arbitrary (variable) x we
want to find y, in terms of x, so that x2 y + 2x = x. Solving this equation for y gives
y = −1
x
. Clearly, this choice of y is not defined for x = 0, but we can see that any choice of
y works if x = 0. Thus, we divide the proof into cases.

Proof. Let x ∈ R be given.


−1
Case 1: If x 6= 0, then we choose y = .
Then
x
 
2 2 −1
x y + 2x = x + 2x = −x + 2x = x.
x

50
Case 2: If x = 0, then we choose y = 1 (or any other choice of y). Then
x2 y + 2x = (0)1 + 0 = 0 = x.

Exercise 3.2.4. Prove that for every real number y > −2 there exists a real number x
such that y = 3ex − 2.
[Note: That y > −2 is a glaring restriction on y, so in your proof you should note exactly
where that restriction is required.]
Exercise 3.2.5. Let f : R → R be the function defined by
f (x) = 2x + 3
for all x ∈ R. Prove that for every y ∈ R, there exists x ∈ R such that f (x) = y.2

As Case 2 in the proof of Example 3.2.3 above illustrates, sometimes in proving


(∀x ∈ Ux )(∃y ∈ Uy ) P (x, y) there are multiple choices for y. The following example is
another demonstration of this.

Example 3.2.6. We will show that that for every real number x ∈ R there exist real
numbers y ∈ R and z ∈ R such that
2x − 3y + 4z = 12.
Construction of the Proof: For arbitrary x ∈ R we want to find specific y and z,
perhaps expressed in terms of x, such that 2x − 3y + 4z = 12. From this equation we get
−3y + 4z = 12 − 2x. But there are infinitely many choices for y and z. For instance, set
z = 0. Then we get −3y = 12 − 2x, so y = −4 + 23 x.

Proof. Let x ∈ R be given. We choose y = −4 + 32 x, and z = 0. Then


 
2
2x − 3y + 4z = 2x − 3 −4 + x + 4(0) = 2x + 12 − 2x + 0 = 12.
3

Example 3.2.7. Let’s put what we have learned together to prove a statement with more
than two quantifiers. In an advanced calculus class, to prove the convergence of the
sequence (1/n2 ) to the limit 0, we might prove the following statement.

For every  > 0, there exists N ∈ R such that for every n ∈ N, if n > N , then |1/n2 | < .

In more compact form, this can be written


(∀  > 0)(∃ N ∈ R s.t.)(∀ n ∈ N)(if n > N then |1/n2 | < .)

This compact form can be used to create a template for our proof.
2
In Chapter 6, we will define such functions to be “onto.”

51
Statement Proof
∀>0 Let  > 0 be given.

∃ N ∈ R s.t. We choose N = . . .

∀ n ∈ N. Let n ∈ N be given.

If n > N Suppose n > N ,

then |1/n2 | < . then |1/n2 | < · · · < .


As usual, the key is filling in the dots. Let’s focus on the final inequality, keeping in mind
that we get to choose N and that it can depend on . First, we note that since n2 > 0, we
can get rid of the absolute value3
1
= 1.
n2 n2
Next, note that since we are assuming n > N , we have4

1
= 1 < 1 .
n2 n2 N2

Now note that we can choose N so that N12 = . (That is, we will choose N = √1 .)

If we do
that
1
= 1 < 1 = .
n2 n2 N2
We can now put this together with our template to complete the formal proof.

Proof. Let  > 0 be given. We choose N = 1/ . Let n ∈ N be given, and suppose n > N .
Then
1
= 1 < 1 = .
n2 n2 N2

3.2.3 Proving Existence and Uniqueness


We must frequently prove statements of the form “there exists a unique x such that P (x).”
To say that x is unique means that there is only one x such that P (x) is true. We will
denote this symbolically as
(∃ ! x ∈ Ux ) P (x).
Thus “!” symbolizes the uniqueness of x. We present two common approaches to proving
existence and uniqueness.
Method 1:
3
One of a student’s biggest tasks in a traditional “advanced calculus” class is to learn how to deal
accurately and confidently with inequalities involving absolute values. Eliminating them when they are
unnecessary is usually smart.
4
Another big task is to learn to deal accurately and confidently with inequalities involving fractions.

52
• Prove the existence of x = a such that P (a) is true.

• To prove uniqueness we do the following.

– Let a1 and a2 be (variable) elements in Ux .


– Assume that both P (a1 ) and P (a2 ) are true.
– Prove that this implies a1 = a2 .

Since the proof of existence and uniqueness are separate in method 1, they can be done in
either order.

Method 2:

• Let x be a (variable) element in Ux .

• Suppose P (x) is true.

• Show that the assumption that P (x) is true leads to one, and only one, value x = a.

• Verify that P (a) is indeed true.

Method 2 has the advantage of proving both existence and uniqueness at once.
In Example 3.2.8 we will illustrate both method 1 and method 2.

Example 3.2.8. We will show that there exists a unique real number x ∈ R such that
ln x = 2.

The first proof uses method 1.


Proof. To prove existence, set x = e2 . Then

ln x = ln(e2 ) = 2.

To see that x is unique, suppose a and b are real numbers such that ln a = 2 and ln b = 2.
Then ln a = ln b, so eln a = eln b . Therefore a = b.

We now give a second proof using method 2.


Proof. Suppose that x is a real number such that ln x = 2. Then eln x = e2 , so x = e2 .
Thus, x is uniquely determined, and indeed, if we set x = e2 , we get ln x = ln(e2 ) = 2.

Exercise 3.2.9. Prove that for every real number y > −2 there exists a unique real
number x such that y = 3ex − 2.

Note: Existence was proved in Exercise 3.2.4 above.

53
Problems
Problem 3.2.1. Prove: There exists a unique integer m such that for every integer n,
mn + 2m + 2n + 2 = n.

Problem 3.2.2. Prove: There exists a unique integer m such that for every integer n,
mn + m + n + 1 = 0.

Problem 3.2.3. Prove: For every integer n there exists a unique integer m such that
2m + 8n = 6.

Problem 3.2.4. Prove: For every integer d there exists integers a, b, and c such that
−a + 3b − 2bc + 4 = d.

Problem 3.2.5. Prove: For all integers a, b, c, and d with a 6= c and ad − bc 6= 0, there
exists a unique rational number r such that
ar + b
= 1.
cr + d

Problem 3.2.6. Prove: For every integer n there exists integers a, b, c, and d such that
ab − cd = n.

Problem 3.2.7. Prove: For every positive integer n there exists an odd integer m such
that 22n + m is a perfect square.

54
3.3 Implications
An implication of the general form

(∀x ∈ Ux ) (P (x) → Q(x))

is one of the most frequently occurring forms of a mathematical statement. In Sections 2.3
and 2.4 we will introduce three methods for proving such a statement. These are

• direct proofs,
• contrapositive proofs,
• and proofs by contradiction.

3.3.1 Direct Proofs of Implications


Recall the truth table for P → Q. If P is false then the implication P → Q is true. Indeed,
P → Q is false only when P is true and Q is false. Thus, to prove that the implication
P → Q is a true statement, we need only to show that this one case cannot happen. That
is, we must show that whenever P is true, then Q is also true. Therefore, we begin a direct
proof of P → Q by assuming that P is true.
In assuming P is true, we are not asserting that P is always true. We are merely
considering the case in which P is true, since in the other case (i.e., when P is false) the
implication is always true. We then proceed to argue that in the case when P is true, Q is
necessarily true also.

The statement
(∀x ∈ Ux ) (P (x) → Q(x))
is first a “for all” statement, so our previous methods apply. In general, a direct proof of
this type of statement will take the following form.
• Let x be arbitrary (variable) in Ux .
• If useful, expand on what x ∈ Ux means.
• Assume P (x) to be true.
• If useful expand on the assumption P (x).
• Give a logical argument with conclusion that Q(x) is true.
Remark 3.3.1. The last step in the above form is the heart of the proof. You must argue
from the assumptions to the conclusion that Q(x) is true. The key is to focus on the
desired conclusion, Q(x). If you can continue from where you are to the conclusion that
Q(x) is true then do so. If there is a common procedure for proving Q(x), try using it.
Sometimes, it helps to reverse directions and work from Q(x) backwards to P (x). But in
the presentation, proceed from the assumption that P (x) is true to the conclusion that
Q(x) is true.

55
Example 3.3.2. We will show that for all integers a, b, and c, if a divides b and b divides
c, then a divides c.
Construction: Before writing our formal proof, let’s write out the definitions of our
hypotheses and conclusion.
• Since we are assuming a divides b, the definition says there exists m ∈ Z such that
b = am

• Since we are assuming b divides c, the definition says there exists n ∈ Z such that
c = bn.

• Since we want to prove that a divides c, we need to show that there exists an integer
q ∈ Z such that
c = aq.
Let’s see if we can construct q. We can use our two hypotheses to get
c = bn = (am)n = a(mn).
Thus, q = mn works. Let’s put this together as a formal proof.
Proof. Let a, b, and c be integers. Assume that a divides b and b divides c. Then, by
definition, there exist integers m and n such that b = am and c = bn. If we set
q = mn ∈ Z, then we see that
c = bn = (am)n = a(mn) = aq.
Thus, by definition, a divides c.
Example 3.3.3. We will prove that for every real number x, if x 6= 0 and x 6= 3, then
9 6
1+ 2 > .
x x

Construction: In this case, the hypotheses don’t give us much of a hint about how to
connect them to the conclusion. So let’s focus on the desired conclusion and try to work
backwards. We start with
9 6
1+ 2 >
x x
Since x 6= 0, we have x > 0, so we can multiply by x2 to get
2

x2 + 9 > 6x
Subtract 6x from both sides gives us
x2 − 6x + 9 > 0.
We can factor this to get
(x − 3)2 > 0.
This is true if x 6= 3. Let’s reverse this process to create a rigorous proof that is easy for a
reader to follow to the desired conclusion.

56
Proof. Let x be a real number. Suppose x 6= 0 and x 6= 3. Since x 6= 3, x − 3 6= 0, so

(x − 3)2 > 0.

Expanding this gives


x2 − 6x + 9 > 0,
and adding 6x to both sides gives
x2 + 9 > 6x.
Since x 6= 0, x2 is positive. Thus, division by x2 preserves the inequality and gives
9 6
1+ 2
> .
x x

Remark 3.3.4. Some of the steps in the last proof were pretty elementary. Depending on
your audience, you might want to skip those in writing the proof. However, you don’t want
to skip the steps where you use the hypotheses, no matter how simple they are. For
instance, the following might be an acceptable proof.
Proof. Let x be a real number. Suppose x 6= 0 and x 6= 3. Since x 6= 3, x − 3 6= 0, so

(x − 3)2 > 0.

Expanding this and doing some basic algebra gives us

x2 + 9 > 6x.

Since x 6= 0, x2 is positive. Thus, division by x2 preserves the inequality and gives


9 6
1+ > .
x2 x

That’s not much of a savings in this proof, but in another proof it might be substantial.

Exercise 3.3.5. Let a, b, c, m, and n be integers. Prove that if a divides both b and c
then a divides mb + nc.

Example 3.3.6. Let f : R → R be defined by

f (x) = 3x + 4

for all x ∈ R. We will show that for every x1 , x2 ∈ R, if f (x1 ) = f (x2 ), then x1 = x2 .5
5
In Chapter 6, we will define such a function to be “one-to-one.”

57
Proof. Let x1 , x2 ∈ R be given and suppose that f (x1 ) = f (x2 ). Then
3x1 + 4 = 3x2 + 4.
Subtracting 4 from both sides and dividing by 3 gives
x1 = x2 .

Exercise 3.3.7. Let f be the function f : R → (6, ∞) defined by


f (x) = 3e2x + 6.
Prove that
(a) For every x1 , x2 ∈ R, if f (x1 ) = f (x2 ), then x1 = x2 .
(b) For every y ∈ (6, ∞), there exists x ∈ R such that f (x) = y.

3.3.2 Contrapositive Proofs


Recall that an implication, P → Q, and its contrapositive, ∼ Q →∼ P , are logically
equivalent. Thus, to prove (∀x ∈ Ux ) (P (x) → Q(x)), it suffices to prove
(∀x ∈ Ux ) (∼ Q(x) →∼ P (x)). Thus, a contrapositive proof proceeds just as a direct proof
with the exception that we assume ∼ Q(x) and conclude ∼ P (x). A contrapositive proof
has the following form.
• State that the proof is by contrapositive.
• Let x be an arbitrary (variable) element in Ux .
• If useful, expand on what x ∈ Ux means.
• Assume ∼ Q(x).
• If useful expand on the assumption ∼ Q(x).
• Give a logical argument the concludes that ∼ P (x) is true.
Remark 3.3.8. In constructing a proof by contrapositive, it never hurts to have a careful
statement of the contrapositive of the implication you are trying to prove “off to the side”
as a guide.
Example 3.3.9. We shall prove that for all integers n, if n2 is even then n is even.

Construction: Let’s first try the direct approach. Let n be an integer. Suppose n2 is
even. Then, by definition,
√ there exists an integer k such that n2 = 2k. We are interested in
n. This gives n = 2k. Now what?
If we prove the contrapositive, we will begin with an assumption about n and try to reach
a conclusion about n2 . That seems more natural, so let’s try again. In fact, this works so
well, we move directly to the proof.

58
Proof. The proof is by contrapositive. Let n be an integer. Suppose n is not even; that is,
suppose that n is odd. Then, by definition, there exists an integer k such that n = 2k + 1.
Therefore,
n2 = (2k + 1)2 = 4k 2 + 4k + 1 = 2(2k 2 + 2k) + 1,
Since (2k 2 + 2k) ∈ Z it follows that n2 is also odd.

Example 3.3.10. We will now use Example 3.3.9 to give a direct proof that for every
integer n, if n2 is even then n2 is divisible by 4.

Proof. Let n be an integer. Suppose that n2 is even. By Example 3.3.9, n is even, so there
exists an integer k such that n = 2k. But then n2 = (2k)2 = 4k 2 , so n2 is divisible by 4.

Exercise 3.3.11. Prove that for a matrix


 
a11 a12 a13
A =  a21 a22 a23 
a31 a32 a33

in M3×3 (R), if A3 6= O then one of the entries a11 , a12 , a13 , a22 , a23 , a33 is not zero.

59
Problems
Problem 3.3.1. Prove that if a and b are integers such that a divides b, then a2 divides b2 .

Problem 3.3.2. Prove that if A is an n × n real matrix such that A3 = A then det(A)
must equal 1, −1, or 0.


Problem 3.3.3. Prove that if m and n are perfect squares then m + n + 2 mn is also a
perfect square.

Problem 3.3.4. (a) Let f (x) = 2x + 4. Prove that for every positive real number  there
exists a positive real number δ such that for all real numbers a and b, if |a − b| < δ then
|f (a) − f (b)| < . [NOTE: Before writing the proof you must find δ, likely in terms of
. To do so, work backwards from |f (a) − f (b)| < .]

(b) Let f (x) = 2x2 + 4. Prove that for all real numbers a and b and for every positive real
number  there exists a positive real number δ such that if |a − b| < δ then
|f (a) − f (b)| < . [NOTE: (b) has a different form than (a). In this case δ is likely a
function of which variables?]

Problem 3.3.5. In each of (a) – (c), find the error in the “proof” that for all real numbers
r and s, if r and s are rational numbers then r + s is a rational number.
1
(a) Proof: Let r = 2
and s = 13 . Then r + s = 1
2
+ 1
3
= 3
6
+ 2
6
= 56 , so r + s is a rational
number.
(b) Proof: Let r and s be rational numbers. Then by the definition of a rational
number, there exist integers m and n such that n 6= 0 and r = mn
. Likewise, there exists
integers m and n such that n 6= 0 and s = n . Therefore, r + s = m
m
n
+m n
= 2mn
. It follows
that r + s is a rational number.
(c) Proof: Let r and s be rational numbers. Then by the definition of a rational
number, there exist integers a, b, c, and d such that b 6= 0, d 6= 0, r = ab , and s = dc .
Therefore, r + s = ab + dc is a sum of two fractions. Since a sum of fractions is again a
fraction, r + s is a rational number.

Instructions: In each of 2.3.5 – 2.3.7, use a proof by contrapositive.

Problem 3.3.6. Prove that if a is an odd integer then the equation x2 + x − a = 0 has no
integer solution. [Hint: Use Exercise 2.1.5]

Problem 3.3.7. Let a, b, and c be consecutive integers with a < b < c. Prove that if
a 6= −1 and a 6= 3 then a2 + b2 6= c2 .

60
Problem
√ 3.3.8.
√ (a) Let n, a, b be integers, where n > 1. Prove that if n = ab then either
a ≤ n or b ≤ n.
Theorem for 2.3.8.(b): If a is an integer such that a > 1 then a is divisible by a prime
integer.
(b) Let n be an integer with n > 1. Give a direct proof √ that if n is not prime then there
exists a prime integer p such that p divides n and p ≤ n. [HINT: Recall that if n is not
prime then n is a composite; that is, there exist positive integers a and b such that
1 < a < n, 1 < b < n, and n = ab. Now use (a), the given Theorem, and Example 1.]
(c) Use (b) to determine if 103 is prime. What primes must be tested as possible divisors
of 103?

61
3.4 Proofs by Contradiction and Equivalency Proofs
3.4.1 Proofs by Contradiction
A proof by contradiction of a statement P has the following general form:

• State that the proof is by contradiction

• Assume ∼ P .

• Work from the assumption, ∼ P until you conclude R∧ ∼ R for some statement R.

• State that a contradiction has been reached, so conclude that P is true.

Remark 3.4.1. In practice, in the second to last step of the form, we often just conclude,
say ∼ R, where R is already known to be true. For example, if we conclude that 1 < 0 then
we have reached a contradiction since we already know that 1 ≥ 0.

The logic of the above method is as follows:

• In the proof, you have shown that the implication

∼ P → (R∧ ∼ R)

is a true statement.

• The statement R∧ ∼ R is clearly false.

• Therefore, since the implication is true, ∼ P must also be false, so P must be true.

Example 3.4.2. We will prove that for every positive real number x > 0,
x x+1
< .
x+1 x+2

Construction: The statement we are proving has the form


x x+1
∀ x > 0, < .
x+1 x+2
We begging the proof by contradiction by assuming it’s negation:
x x+1
∃ x > 0 such that ge .
x+1 x+2

62
Proof. The proof is by contradiction, so assume that there exists a real number x > 0 such
that
x x+1
≥ .
x+1 x+2
Since x is positive, both x + 1 and x + 2 are positive. Hence, (x + 1)(x + 2) is positive, so
we can multiply both sides of the inequality
x x+1

x+1 x+2
by (x + 1)(x + 2) and still preserve the inequality. This gives

x(x + 2) ≥ (x + 1)2 .

Expanding both sides results in

x2 + 2x ≥ x2 + 2x + 1.

Subtracting x2 + 2x from both sides leaves 0 ≥ 1, a contradiction (to the known fact that
0 < 1), so we conclude that for every positive real number x > 0,
x x+1
< .
x+1 x+2

Before stating the next exercise, we first review some relevant theorems from calculus.

Theorem 3.4.3.
Theorem A: If F (x) = G(x) for all x except possibly at x = a then limx→a G(x) =
limx→a F (x) provided the latter limit exists.

Theorem 3.4.4.
Theorem B: If limx→a F (x) and limx→a G(x) both exists then limx→a F (x)G(x) =
limx→a F (x) limx→a G(x).

Exercise 3.4.5. Prove by contradiction that limx→0 (cos x)/x does not exist.
Hint: Suppose the limit does exist, say limx→0 (cos x)/x = L. Now use the Theorem 3.4.3
above to get one value for limx→0 x(cos x)/x, then use Theorem 3.4.4 to get another value.

Example 3.4.6. We will prove the following by contradiction. Let

A = {x ∈ R | x 6= −2}.

63
We define the function f : A → R by
2x + 3
f (x) = .
x+2
Then for every x ∈ A, f (x) 6= 2.
Construction: Since our proof is by contradiction, we will need to negate that which is to
be proved. The statement we wish to prove is an implication
2x + 3
If f (x) = then (∀x ∈ A) (f (x) 6= 2).
x+2
Therefore, the negation has symbolic form
2x + 3 
f (x) = and (∃x ∈ A) (f (x) = 2).
x+2
Proof. The proof is by contradiction, so assume that
2x + 3
f (x) =
x+2
and assume that there exists a real number x ∈ A such that f (x) = 2. This gives
2x + 3
=2
x+2
for some real number x ∈ A. Multiplying both sides by x + 2 (since x 6= 2) gives
2x + 3 = 2(x + 2) = 2x + 4.
Subtracting 2x from both sides gives 3 = 4, a contradiction. We conclude, therefore, that
for every x ∈ A, f (x) 6= 2.
1
Exercise 2: Prove by contradiction: For every real number x, if x > 0 then x + x
≥ 2.

Disadvantages of Proofs by Contradiction


While proof by contradiction is a valid technique of proof, it has certain drawbacks.
• When doing a proof by contradiction, we don’t know what we are trying to prove.
We are trying to arrive at a contradiction, but we don’t know what it will be.
• Proofs by contradiction are usually not constructive, so they leave us with little
intuition about why the result is true.
• An error can lead to a contradiction and the false sense of having successfully
completed a proof.
Despite these drawbacks, there is a tendency for students first learning rigorous
mathematics to be drawn to proof by contradiction. It can be fun to write down an
assumption and then simply “push symbols around” until some nonsense appears on the
page. Unfortunately, as we have indicated above, this rarely leads to an understanding of
the problem, and it can lead to mistakes. Proof by contradiction can be very valuable, but
it is best not to become too fond of it.

64
3.4.2 Proving Equivalencies
Recall that statements P and Q are equivalent, written P ↔ Q, provided they have the
same truth value; that is, both are true or both are false.
Following are some of the most common English wordings that translate symbolically to
P ↔ Q.

• P is equivalent to Q.

• P if and only if Q.

• P is necessary and sufficient for Q.

Remark 3.4.7. Equivalence, denoted by “↔”, and logical equivalence, denoted by “⇔”,
are not the same. Logical equivalence refers to statement forms, not actual statements. If
actual statements are substituted into logically equivalent forms, the resulting statements
will be equivalent, with no proof required. For example, P → Q and ∼ Q →∼ P are
logically equivalent forms, so when specific statements are substituted for P and Q the
result is equivalent statements.
On the other hand, two statements may well be equivalent when their underlying forms are
not logically equivalent.

Theorem 3.4.8.
The statement forms P ↔ Q and (P → Q) ∧ (Q → P ) are logically equivalent.

Proof. The theorem is proved by the following truth table.


P Q P ↔Q P →Q Q→P (P → Q) ∧ (Q → P )
T T T T T T
T F F F T F
F T F T F F
F F T T T T

Remark 3.4.9. It follows from the preceding theorem that we can prove P ↔ Q by
proving two implications: both P → Q and Q → P . Thus, a proof of P ↔ Q is actually
two proofs, and for each part we may use whatever method works best: a direct proof, a
contrapositive proof, or a proof by contradiction.

Example 3.4.10. For real numbers a, b, c ∈ R, set


 
a b
A= .
0 c

65
Prove that  
2 0 0
A =
0 0
if and only if a = 0 and c = 0.

Proof. Let a, b, c ∈ R be arbitrary real numbers and let


 
a b
A= .
0 c

First, suppose  
2 0 0
A = .
0 0
Then       
2 a b a b a2 ab + bc 0 0
A = = = .
0 c 0 c 0 c2 0 0
It follows that a2 = 0 and c2 = 0. Therefore, a = 0 and c = 0.
Now, in the other direction, assume that a = 0 and c = 0. Then
        
a b 0 b 2 0 b 0 b 0 0
A= = so A = = .
0 c 0 0 0 0 0 0 0 0

In the following exercise, R2 denotes the set of all ordered pairs of real numbers.
Geometrically, R2 is the set of points in the plane. Thus, an element of R2 has the form
(x, y), where x and y are real numbers.
The notation f : R2 → R means that f is a function that corresponds points in R2 to real
numbers. For instance, if f (x, y) = ln(x2 + 1) − y 3 , then f (0, 2) = ln(1) − 23 = −8.

Exercise 3.4.11. Let f : R2 → R be defined by

f (x, y) = ln(x2 + 1) − y 3 .

Prove that for all (x, y) ∈ R2 , f (x, y) = 1 if and only if x = ± ey3 +1 − 1.

66
Problems
Problem 3.4.1. Prove by contradiction: If a, b, and c are consecutive integers such that
a < b < c then a3 + b3 6= c3 .

Problem 3.4.2. Prove by contradiction: For all integers a, b, and c, if a2 + b2 = c2 then


either a is even or b is even. [Hint: Use Example 4 of Section 2.3; in particular, show that
c2 is even but not divisible by 4.]

Problem 3.4.3. Use the method of contradiction to disprove: For all integers a and b
there exist integers m and n such that a = m + n and b = m − n.

Problem 3.4.4. Let p1 , p2 ,. . . ,pk be prime integers. Prove by contradiction that if


n = p1 p2 · · · pk + 1 then for every i, i = 1, 2,. . ., k, pi does not divide n. [NOTE: 1 is not
divisible by a prime, so to arrive at the conclusion that 1 is divisible by some prime would
be a contradiction.]

Problem 3.4.5. Prove by contradiction that there are infinitely many primes. [Hint: Use
Problem 3.4.4 and the theorem given in Problem 3.3.8(b).]

Problem 3.4.6. Let a and b be nonzero integers. Prove that a divides b and b divides a if
and only if a = ±b.

Problem 3.4.7. Prove that if y is a real number, then there exists a real number x such
that
2x − 1
= y,
x−3
if and only if y 6= 2.

x y
Problem 3.4.8. Prove that for all nonzero real numbers x and y, we have + ≥ 2 if
y x
and only if either x > 0 and y > 0 or x < 0 and y < 0.
Problem 3.4.9. (a) Prove that a 2 × 2 matrix A has an inverse if and only if det(A) 6= 0.
Hint: In the case when det(A) 6= 0, consider the matrix
 
d/det(A) −b/det(A)
.
−c/det(A) a/det(A)

(b) Let C and D be 2 × 2 matrices. Use (a) and the given matrix properties below to prove
that CD = I2 if and only if DC = I2 . Hint: Show that det(C) 6= 0 and, hence, C −1 exists
by (a). Now argue that D = C −1 .

Review: In doing these problems, you may use the following definitions and results from
linear algebra

67
• Let A be a 2 × 2 matrix. Recall that aninverse for A is a 2 × 2 matrix A−1 such that
1 0
AA−1 = I2 and A−1 A = I2 , where I2 = is the 2 × 2 identity matrix. (Recall
0 1
that matrix multiplication is not commutative, so if, for example, CD = I2 we cannot
automatically conclude that DC = I2 . )
 
a b
• If A = then the determinant of A is det(A) = ad − bc.
c d

• For matrices A and B, det(AB) = det(A)det(B).

68
3.5 Review Problems
Problem 3.5.1. Prove that for every integer n, if n is even then there exists an integer m
such that m is a perfect square and 4(m + n − 1) = n2 .

Problem 3.5.2. Prove, using Definition 2.4.10, that the sequence of real numbers
{n + 1/n}∞
n=1 is not a Cauchy sequence. Hint: See Problem 2.4.6.

Problem 3.5.3. Prove, using the Definition 2.4.11, that limx→0 (x2 + 1) 6= 0. Hint: See
Problem 2.4.7.

Problem 3.5.4. Prove, using the Definition 2.4.11, that limx→3 (2x − 4) = 2.

69
Chapter 4

Introduction to Sets

4.1 Operations on Sets


4.1.1 Basic Terms
Every definition uses terms other than the one being defined. If we insist that each of these
terms also be defined, those definitions would introduce other terms whose definitions
would, in turn, introduce even more terms. Eventually, we would find that our definitons
have circled. In mathematics, we wish to avoid circularity, so certain basic terms are
declared to be undefined. The concepts of point, plane, and set are examples of terms that
we declare as undefined.
Since “set” is, by choice, an undefined term, we give only an intuitive statement of what a
set is. Thus, we understand a set to be a collection of objects called elements. We insist,
however, that a set, say A, satisfy the following two requirements:

(1) The elements of A must come from some well-understood1 universal set, U .

(2) For each element x in the universal set, the sentence “x is an element of A” must be a
statement; that is, the sentence must be true or false.2

Definition 4.1.1 (Element Notation).

Let A be a set whose elements lie in a universal set U . If x is an element in U we write


x ∈ A to mean that x is an element of A, and we write x ∈ 6 A to denote that x is
not an element of A.

1
As we will see in the discussion of Russell’s paradox, the set of all sets is an example of something that
would not be an acceptable universal set.
2
We would not consider the collection of all “large integers” as set since, if n is a particular integer, the
sentence “n is a large integer” is not a statement.

70
Definition 4.1.2 (Empty Set).

The empty set, denoted by the symbol ∅, is the set that contains no elements.

Definition 4.1.3 (Cardnality).

If A is a set, the number of elements in A is called the cardinality of A and will be denoted
by |A|.

4.1.2 Set Notation


We use set braces {. . .} to enclose the elements of a set. For small finite sets, we can
actually list the elements of the set. For example, if A = { 1, 2, 3 } then 1 ∈ A but 4 6∈ A.
More commonly, we describe a set using set-builder notation wherein a set is defined
using the form
A = { x ∈ U | P (x) }.
In this notation, the vertical line, “|”, is read “such that” and P (x) is a statement. Thus,
A is the truth set of the statement P (x).

Example 4.1.4. If
A = { n ∈ N | n is prime and n ≤ 10 }
then A = { 2, 3, 5, 7 } and |A| = 4. On the other hand, the set
B = { n ∈ N | n is prime and n ≥ 10 }
is infinite, so we cannot list its elements.

Exercise 4.1.5. (cf. the review for Exercise 2.4.7) Let M2 (R) denote the universal set of
all 2 × 2 matrices with real number entries. Set
S = { A ∈ M2 (R) | det(A) = 1 }.
(a) Exhibit three matrices in M2 (R) that are elements of S.
(b) Argue that |S| is infinite.
(c) Prove that for all 2 × 2 matrices A and B, if A ∈ S, and B ∈ S, then AB ∈ S.

Remark 4.1.6. We conclude this subsection by noting that in listing the elements of a set,
order and repetition are not relevant. For example
{1, 2, 3} = {3, 2, 1} = {1, 2, 2, 3, 3, 3}.

71
4.1.3 Operations on Sets
We begin this section with several definitions.

Definition 4.1.7 (Union).

Let A and B be sets in the universal set U . The union of A and B, denoted A ∪ B and read
“A union B”, is the set

A ∪ B = { x ∈ U | x ∈ A or x ∈ B } = { x ∈ U | x ∈ A ∨ x ∈ B }.

Definition 4.1.8 (Intersection).

Let A and B be sets in the universal set U . The intersection of A and B, denoted A ∩ B
and read “A intersect B”, is the set

A ∩ B = { x ∈ U | x ∈ A and x ∈ B } = { x ∈ U | x ∈ A ∧ x ∈ B }.

Remark 4.1.9. Of course, the similarity between the symbol ∪ for the union of sets and
the logical connective “or,” ∨, and the symbol ∩ for the intersection of sets and the logical
connective “and,” ∧, is deliberate.

Definition 4.1.10 (Relative Complement).

Let A and B be sets in the universal set U . The complement of B relative to A, denoted
A − B and read “A minus B”, is the set

A − B = { x ∈ U | x ∈ A and x 6∈ B }.

Definition 4.1.11 (Complement).

Let A be a set in the universal set U . The complement of a set A, denoted by A0 is the set
U − A; that is
A0 = { x ∈ U | x 6∈ A }.

72
Example 4.1.12. Let A = {1, 2, 3, 4} and B = {3, 4, 5, 6, 7}. Then

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

Definition 4.1.13 (Cartesian Product).

If A and B are sets, the Cartesian product of A and B, denoted A × B and read “A cross
B”, is the set
A × B = { (a, b) | a ∈ A and b ∈ B }.
More generally, if A1 , A2 , . . . , An are sets then

A1 × A2 × · · · × An = { (a1 , a2 , . . . , an ) | a1 ∈ A1 , a2 ∈ A2 , . . . , an ∈ An }.

Remark 4.1.14. Note that an element (a1 , a2 , . . . , an ) ∈ A1 × A2 × · · · × An is an ordered


n-tuple; that is, the order in which the entries are listed matters. For instance, in Z × Z,
(1, 2) 6= (2, 1).

Example 4.1.15. Let A = {1, 2} and B = {a, b, c}. Then

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

Theorem 4.1.16.

Let A and B be finite sets. Then A × B is also a finite set and | A × B | = |A| |B|.

Proof. If (a, b) ∈ A × B then there are |A| choices for a and |B| choices for b. Thus, there
are |A| |B| choices for the element (a, b); that is, | A × B | = |A| |B|.

73
4.1.4 An Aside: Russell’s Paradox
Suppose there exists one underlying universal set, U that contains everything. Then, among
other things, every set A is an element in U . Now for all sets A with which we are familiar,
A 6∈ A. That is, A is not an element of itself. Let us then form the set B defined by

B = { A ∈ U | A 6∈ A }.

Since U contains everything, including all sets, we must have B ∈ U . Now either B ∈ B or
B 6∈ B. But if B ∈ B then, by definition of B, B 6∈ B, a contradiction. On the other hand,
if B 6∈ B then, by the definition of B, we get B ∈ B, again a contradiction.
This paradox leads to the conclusion that there is no single great universal set; that is,
nothing contains everything.

74
Problems

Problem 4.1.1. (a) Let A = { 2n + 1 | n is a prime integer }. List the smallest 4 elements
of A.

(b) Let B = { 2n + 1 | n ∈ N and 2n + 1 is a prime integer }. List the smallest 4 elements of


B.

(c) Let C = { n ∈ N | 2n + 1 is a prime integer }. List the smallest 4 elements of C.

Problem 4.1.2. Set A = { n ∈ Z | 6n2 − 7n + 2 = 0 }. List the elements of A.

In Exercises 3.1.3 - 3.1.5 let


A = R − {−2/3}
(so A is the set of all real numbers except −2/3) and define f : A → R by
2x − 1
f (x) = .
3x + 2
Let
R(f ) = { y ∈ R | there exists x ∈ A such that y = f (x) }.
(In Chapter 6, we will define R(f ) to be the range of the function f .)

Problem 4.1.3. The object of this exercise is to prove that 1 ∈ R(f ).


(a) Using the definition of R(f ) given above, complete the statement:

1 ∈ R(f ) provided . . . .

(b) Give a preliminary construction of the proof. In particular, derive the existence of an
appropriate x ∈ A.

(c) Give a proof that 1 ∈ R(f ).

2
Problem 4.1.4. The object of this exercise is to prove, by contradiction, that 3
6∈ R(f ).
(a) Using the definition of R(f ) given above, complete the statement:
2
3
6∈ R(f ) provided . . ..
2
(b) Give a proof, by contradiction, that 3
6∈ R(f ).

75
Problem 4.1.5. Let B = R − { 2/3 }. The object of this exercise is to prove that for every
y ∈ B, y ∈ R(f ); That is, we want to prove:

(∀y ∈ B)(∃x ∈ A) f (x) = y.

(a) Construct a preliminary proof. In particular, derive the existence of x, expressed in


terms of y.
(b) Prove the given statement. (Warning: Your proof must include an argument that
x ∈ A; that is, x ∈ R and x 6= − 32 . The latter can be proved by contradiction.)

Problem 4.1.6. Let A = { (x, y) ∈ R × R | x + 3y = 0 }.


(a) List 3 specific elements of A. Argue that A is an infinite set.
(b) Prove that for all (a, b), (c, d) ∈ R × R, if (a, b), (c, d) ∈ A, then (a + c, b + d) ∈ A.

Problem 4.1.7. Let A = { f : R → R | f 00 exists and for all x ∈ R, f 00 (x) + f (x) = 0 }.


(a) Verify that if h(x) = sin x and k(x) = cos x then h, k ∈ A.
(b) Prove that for all f, g ∈ A and for all a, b ∈ R, if q(x) = af (x) + bg(x) then q ∈ A.

Problem 4.1.8. In this problem take the universal set to be U = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 },


let A = { 1, 4, 6 }, B = { 1, 3, 4, 7, 8 }, and C = { 1, 4, 9}. Exhibit each of the following sets:

(a) A ∪ B (b) A ∩ B (c) B − A (d) A − B

(e) B 0 (f) (A ∪ B)0 (g) A × B (h) C × B 0 .

Problem 4.1.9. Let a, b, c, and d be real numbers such that a < b < c < d.
(a) Express the set [a, b] ∪ [c, d] as the difference of two intervals. (No proof required.)
(b) Express the set [a, c] ∩ [b, d] as the difference of two intervals. (No proof required.)

76
4.2 Relations Between Sets
4.2.1 Subsets

Definition 4.2.1 (Subset).

For sets A and B in the universal set U we say that A is a subset of B, written A ⊆ B,
provided for every x ∈ U , if x ∈ A, then x ∈ B.

Remark 4.2.2. If x ∈ A we do not write x ⊆ A. It would be correct, however, to write


{x} ⊆ A. Likewise, it would not (in general) be correct to write {x} ∈ A.

Exercise 4.2.3. Let A = {1, {1}, {1, 2} }. Determine |A| and label each of the following as
true of false.
(a) 1 ∈ A. (b) 1 ⊆ A. (c) {1} ⊆ A.

(d) {1} ∈ A. (e) {{1}} ⊆ A. (f) 2 ∈ A.

(g) {2} ⊆ A. (h) {1, 2} ∈ A. (i) {1, 2} ⊆ A.

(j) {{1, 2}} ⊆ A. (k) ∅ ∈ A. (l) ∅ ⊆ A.

Theorem 4.2.4.

For every set A, ∅ ⊆ A.

Proof. In symbols, ∅ ⊆ A means (∀x ∈ Ux ) (x ∈ ∅ → x ∈ A). Since the hypothesis, x ∈ ∅, is


always false, the implication, x ∈ ∅ → x ∈ A, is always true.

Exercise 4.2.5. Label each of the following as true or false.

(a) ∅ = { ∅ }. (b) ∅ ∈ { ∅ }. (c) ∅ ⊆ { ∅ }. (d) |{ ∅ }| = 1.

77
Proving that A ⊆ B
Suppose that for given sets A and B we wish to prove A ⊆ B. By the definition, A ⊆ B
means, in symbolic form,
(∀x ∈ U ) (x ∈ A → x ∈ B).
This suggest the following form for the proof.
• Let x ∈ U be an arbitrary element.

• Suppose that x ∈ A. (Expand on what this means, if helpful.)

• Show that this implies x ∈ B.


Remark 4.2.6. This is called an element-wise proof since it considers arbitrary
individual elements of A.
Example 4.2.7. We begin with a very simple “obvious” relation that illustrates how
important it is to know definitions to give concrete proofs. We will show

(1, 4] ⊆ [1, 5).

Before doing the proof, let’s focus on the formal definitions of these intervals on the real
line.

(1, 4] = {x ∈ R | 1 < x ≤ 4}.


[1, 5) = {x ∈ R | 1 ≤ x < 5}.

Proof. Let x ∈ R be given and suppose x ∈ (1, 4]. This means

1 < x and x ≤ 4.

We wish to show x ∈ [1, 5). To do this, we must show

1 ≤ x and x < 5.

Since 1 ≤ 1 and 1 < x we have 1 ≤ x. Since x ≤ 4 and 4 < 5, we have x < 5.

Proving that A 6⊆ B
Exercise 4.2.8. Use Definition 4.2.1 above to complete the following definition:
For sets A and B in the universal set U , we say that A is not a subset of B, written
A 6⊆ B, provided . . . .
Suppose that for given sets A and B we wish to prove A 6⊆ B. By the definition (cf.
Exercise 4.2.8), A 6⊆ B means, in symbolic form,

(∃x ∈ U ) (x ∈ A ∧ x 6∈ B).

This suggest the following form for the proof.

78
• Let x = a, where a is a specific element in U that you have derived. (This is a
constructive existence proof.)

• Verify that a ∈ A.

• Verify that a 6∈ B.

Example 4.2.9. Let


A = { x ∈ R | x2 − 4 > 0 }
and let
B = { x ∈ R | x2 − 9 > 0 }.
We claim that A 6⊆ B.
Proof. Let x = 3. Then
x2 − 4 = 32 − 4 = 9 − 4 = 5 > 0,
so 3 ∈ A. But
x2 − 9 = 32 − 9 = 9 − 9 = 0,
so 3 6∈ B. Therefore A 6⊆ B.

Exercise 4.2.10. Let f (x) = x2 − 3 and g(x) = x2 − 2. Set

A = { y ∈ R | there exists x ∈ R such that f (x) = y }

and set
B = { y ∈ R | there exists x ∈ R such that g(x) = y }.
The object of this exercise is to prove that A 6⊆ B. To review, we must prove:

(∃y ∈ R) (y ∈ A ∧ y 6∈ B).

As we noted, this definition suggests a proof of the following form

• Let y = b where b is a specific real number we have derived.

• Verify that b ∈ A.

• Verify that b 6∈ B.

As is often the case, the second and third steps in the form above are proofs within a proof,
so we will expand our form to include each of these.

1. To show b ∈ A we must prove (∃x ∈ R) f (x) = b. (A constructive proof often works


for existence proofs of this type.)

2. To show that b 6∈ B we must show (∀x ∈ R) g(x) 6= b. (Proof by contradiction often


works well for statements of this sort; that is, statements that something doesn’t
happen.)

79
We now repeat the form of the proof, with more detail:

• Let y = b where b is a specific real number we have derived.

• Verify that b ∈ A.

– Set x = a where a is a specific real number we have derived.


– Verify that f (a) = b.

• Verify, by contradiction, that b 6∈ B.

– Assume b ∈ B.
– Use the definition of B to expand on the previous assumption.
– Give a logical argument that leads to a contradiction.

Follow the form above to write a proof that A 6⊆ B.

The Power Set

Definition 4.2.11 (Power Set).

Let A be a set. The power set of A, denoted P (A) is the set whose elements are the subsets
of A.

Example 4.2.12. If A = { 1, 2, 3 } then

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

We include, without proof, the following result on the size of the power set. It follows from
the idea that we have n objects in a set, and we have two choices (to include or exclude)
for each object when constructing a subset. There are 2n ways to make those choices.

Theorem 4.2.13.

Let A be a set with |A| = n. Then |P (A)| = 2n .

80
4.2.2 Proper Subsets

Definition 4.2.14 (Proper Subset).

For sets A and B in the universal set U we say that A is a proper subset of B, written
A ⊂ B, provided A ⊆ B and B 6⊆ A.

In symbols, A ⊂ B means:
h i h i
(∀x ∈ U ) (x ∈ A → x ∈ B) ∧ (∃y ∈ U ) (y ∈ B ∧ y 6∈ A) .

This definition suggests that to prove A ⊂ B, we use a proof of the following form:

• First, prove that A ⊆ B.

– Let x be arbitrary(variable) in U . (If it contributes, expand on what it means to


be in U .)
– Suppose x ∈ A. (If it helps, expand on what x ∈ A means.)
– Now give a logical argument that concludes with x ∈ B.

• Now show that B 6⊆ A.

– Let y = b, where b is a specific element in U .


– Verify that b ∈ B; and
– Verify that b 6∈ A.

Example 4.2.15. (cf. Example 4.2.9) Let

A = { x ∈ R | x2 − 4 > 0 }

and let
B = { x ∈ R | x2 − 9 > 0 }.
Prove that B ⊂ A.
Proof. To see that B ⊆ A, let x ∈ R and suppose x ∈ B. Then x2 − 9 > 0. Now
x2 − 4 = (x2 − 9) + 5. Since both x2 − 9 and 5 are positive, it follows that their sum is
positive; that is, x2 − 4 > 0. Therefore, x ∈ A.
To see that A 6⊆ B (as in Example 4.2.9) let x = 3. Then x2 − 4 = 32 − 4 = 9 − 4 = 5 > 0,
so 3 ∈ A. But x2 − 9 = 32 − 9 = 9 − 9 = 0, so 3 6∈ B.
This proves that B ⊂ A.

81
Exercise 4.2.16. Let M2 (R) denote the set of all 2 × 2 matrices with real number entries.
Let    
0 0 1 2
O2 = , C= .
0 0 3 6
Now set    
−3a a
S= A ∈ M2 (R) A =
where a ∈ R ,
0 0
and let
T = { B ∈ M2 (R) | BC = O2 }.
Prove that S ⊂ T .

4.2.3 Set Equality

Definition 4.2.17 (Set Equality).

Let A and B be sets in the universal set U . Then A and B are equal, written A = B,
provided A ⊆ B and B ⊆ A.

The definition suggests that to prove that A = B typically requires two proofs:
 
1. A ⊆ B; that is, (∀x ∈ U ) (x ∈ A) → (x ∈ B) ; and
 
2. B ⊆ A; that is, (∀y ∈ U ) (y ∈ B) → (y ∈ A) .

This suggests the following form for a proof.

• First, prove that A ⊆ B.

– Let x be arbitrary (variable) in U . (If it contributes, expand on what it means


to be in U .)
– Suppose x ∈ A. (If it helps, expand on what x ∈ A means.)
– Now give a logical argument that concludes with x ∈ B.

• Now prove that B ⊆ A.

– Let x be arbitrary (variable) in U . (If it contributes, expand on what it means


to be in U .)
– Suppose x ∈ B. (If it helps, expand on what x ∈ B means.)
– Now give a logical argument that concludes with x ∈ A.

• Since we have shown that A ⊆ B and B ⊆ A, it follows that A = B

82
Example 4.2.18. Let
A = {x ∈ R| − 3 < x < 2}
and let
B = { x ∈ R | x2 + x − 6 < 0 }.
We will prove that A = B.
Proof. To see that A ⊆ B, let x ∈ R and suppose that x ∈ A. Then −3 < x < 2. Since
x > −3, x + 3 is positive and since x < 2, x − 2 is negative. Therefore, (x + 3)(x − 2) is
negative; that is, x2 + x − 6 = (x + 3)(x − 2) < 0. This proves that x ∈ B.
To see that B ⊆ A, let x ∈ R and suppose that x ∈ B. Thus, x2 + x − 6 < 0. Factoring the
left side gives (x + 3)(x − 2) < 0. Since the product of x + 3 and x − 2 is negative, one of
the terms must be negative and the other positive. There are two cases.

Case 1: Suppose that x + 3 < 0 and x − 2 > 0. This gives x < −3 and x > 2. This is
impossible, so this case cannot occur.

Case 2: Suppose that x + 3 > 0 and x − 2 < 0. This gives x > −3 and x < 2; that is,
−3 < x < 2. Therefore x ∈ A

This proves that B ⊆ A, so we conclude that A = B.

Exercise 4.2.19. (cf. Exercise 4.2.16) Let M2 (R) denote the set of all 2 × 2 matrices with
real number entries, let O2 denote the 2 × 2 zero matrix, and set
 
1 2
C= .
3 6

Let    
−3a a
S= A ∈ M2 (R) A =
where a, b ∈ R
−3b b
and let
T = { B ∈ M2 (R) | BC = O2 }.

(a) Do some preliminary proof construction. In particular, for arbitrary B ∈ M2 (R)


assume that B ∈ T and explore the implications of that assumption.

(b) Prove that S = T .

4.2.4 Set Equality and Abstract Sets


In previous examples, we have proven relationships between specific sets. These proofs
depended heavily on the definition of the particular sets involved. In fact, there are some
interesting relationships that one can prove between arbitrary, abstract sets. In preparation
for proving some of these, let’s consider some definitions.

83
Exercise 4.2.20. Use the definitions given in Section 2.1 to complete the following for
arbitrary sets A and B in a universal set U .

(a) For x ∈ U , x 6∈ A ∪ B provided . . . .

(b) For x ∈ U , x 6∈ A ∩ B provided . . . .

(c) For x ∈ U , x 6∈ A − B provided . . . .

Example 4.2.21. Consider the following relationship. For all sets A, B, and C,

(A ∪ B) − C = A ∪ (B − C).

The first thing we must decide is whether the given equality is true of false for arbitrary
sets A, B, and C. The following Venn diagrams will assist toward that end.

B B

A A
C C

(A ∪ B) − C A ∪ (B − C)

The Venn diagrams suggest that the sets are not, in general, equal. Since the set of points
in the plane indicated in the Venn diagrams is somewhat vague, some authors do not
accept the diagram above as a counterexample.3 If you are of that disposition (or are being
graded by someone who is,) you need to display specific sets A, B, and C, then verify that
(A ∪ B) − C 6= A ∪ (B − C) for those sets. For example . . .
Proof. Let A = {1, 2, 3}, B = {2, 3, 4}, and C = {1, 4, 6}. Then

(A ∪ B) − C = {1, 2, 3, 4} − {1, 4, 6} = {2, 3},

whereas
A ∪ (B − C) = {1, 2, 3} ∪ {2, 3} = {1, 2, 3}.
Therefore, (A ∪ B) − C 6= A ∪ (B − C).
3
On the other hand, some of us feel that Venn diagrams serve as perfectly good examples of “generic”
overlapping sets in the plane. They may lack precision, but they are immediately recognizable. This is a
matter of taste.

84
Example 4.2.22. Consider the following relation. For all sets A, B, and C,

A − (B ∩ C) = (A − B) ∪ (A − C).

Again, we use Venn diagrams to gain some insight into wether the sets might, in general,
be equal.

B B

A A
C C

A − (B ∩ C) (A − B) ∪ (A − C)

The Venn diagrams suggest that the sets are equal. However, they do not prove the set
equality for all sets, since they are, at best, examples of particular sets. We will now prove
that the two sets are equal for any sets A, B, and C.
Proof. Let A, B, and C be sets. To see that A − (B ∩ C) ⊆ (A − B) ∪ (A − C), let
x ∈ A − (B ∩ C). Then x ∈ A and x 6∈ (B ∩ C). Therefore (cf. Exercise 4.2.20(a) above)
either x 6∈ B or x 6∈ C. We consider each possiblity as a separate case.
Case 1: Suppose that x 6∈ B. Then x ∈ A and x 6∈ B, so x ∈ A − B. It follows that
x ∈ (A − B) ∪ (A − C).
Case 2: Suppose that x 6∈ C. Then x ∈ A and x 6∈ C, so x ∈ A − C. It follows that
x ∈ (A − B) ∪ (A − C).
This proves that A − (B ∩ C) ⊆ (A − B) ∪ (A − C).
To see that (A − B) ∪ (A − C) ⊆ A − (B ∩ C), suppose y ∈ (A − B) ∪ (A − C). Then either
y ∈ A − B or y ∈ A − C. We consider each of these possibilities as a separate case.
Case 1: Suppose y ∈ A − B. Then y ∈ A and y 6∈ B. Since y 6∈ B, y 6∈ B ∩ C. Therefore,
y ∈ A − (B ∩ C).
Case 2: Suppose y ∈ A − C. Then y ∈ A and y 6∈ C. Since y 6∈ C, y 6∈ B ∩ C. Therefore,
y ∈ A − (B ∩ C).
This proves that (A − B) ∪ (A − C) ⊆ A − (B ∩ C), so we conclude that the sets are
equal.

85
4.2.5 Basic Set Identities
We now prove some basic set identities for arbitrary sets.

Theorem 4.2.23.

Let A, B, and C be arbitrary sets in some universal set U .

1. Commutative Laws:

(a) A ∪ B = B ∪ A.
(b) A ∩ B = B ∩ A.

2. Associative Laws:

(a) (A ∪ B) ∪ C = A ∪ (B ∪ C).
(b) (A ∩ B) ∩ C = A ∩ (B ∩ C).

3. Distributive Laws:

(a) A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).
(b) A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C).

Proof. Most of this is left to the reader. We will prove 3(a): that

A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).

To see that A ∩ (B ∪ C) ⊆ (A ∩ B) ∪ (A ∩ C), let x ∈ A ∩ (B ∪ C). Then x ∈ A and


x ∈ B ∪ C. Thus, either x ∈ B or x ∈ C. We consider each possibility as a separate case:
Case 1: Suppose x ∈ B. Then x ∈ A ∩ B so it follows that x ∈ (A ∩ B) ∪ (A ∩ C).
Case 2: Suppose x ∈ C. Then x ∈ A ∩ C so it follows that x ∈ (A ∩ B) ∪ (A ∩ C).
It now follows that A ∩ (B ∪ C) ⊆ (A ∩ B) ∪ (A ∩ C).

To see that (A ∩ B) ∪ (A ∩ C) ⊆ A ∩ (B ∪ C), let y ∈ (A ∩ B) ∪ (A ∩ C). Then either


y ∈ (A ∩ B) or y ∈ (A ∩ C). We consider each of these cases.
Case 1: Suppose y ∈ (A ∩ B). Then y ∈ A and y ∈ B. It follows that y ∈ A and y ∈ B ∪ C;
that is, y ∈ A ∩ (B ∪ C).
Case 2: Suppose y ∈ (A ∩ C). Then y ∈ A and y ∈ C. It follows that y ∈ A and y ∈ B ∪ C;
that is, y ∈ A ∩ (B ∪ C).
This proves that (A ∩ B) ∪ (A ∩ C) ⊆ A ∩ (B ∪ C) so it follows that
(A ∩ B) ∪ (A ∩ C) = A ∩ (B ∪ C).

86
Theorem 4.2.24.

Let A, B, and C be arbitrary sets in some universal set U .

1. De Morgan’s Laws:

(a) (A ∪ B)0 = A0 ∩ B 0 .
(b) (A ∩ B)0 = A0 ∪ B 0 .

2. Double Complement Law:


(A0 )0 = A.

3. Set Difference Law:


A − B = A ∩ B0.

4. Complement Laws:

(a) A ∪ A0 = U .
(b) A ∩ A0 = ∅.

Proof. Note that De Morgan’s Laws 1 (a) and (b) are an immediate consequence of the
definitions from Exercise 4.2.20. The rest is left to the reader.
The following laws are considered to be “obvious” by most people. Nonetheless, it is useful
to have them noted. The proofs (left to the reader) are are simply exercises in the
definitions of union, intersection, the universal set, and the empty set.

87
Theorem 4.2.25.

Let A, B, and C be arbitrary sets in some universal set U .

1. Idempotent Laws:

(a) A ∪ A = A.
(b) A ∩ A = A.

2. Identity Laws:

(a) A ∪ ∅ = A.
(b) A ∩ U = A.

3. Universal Bound Laws:

(a) A ∩ ∅ = ∅.
(b) A ∪ U = U .

Example 4.2.26. We will now use the basic set identities given in the theorems above to
prove that for all sets A, B, and C,

A − (B ∩ C) = (A − B) ∪ (A − C).

Proof. Let A, B, and C be sets. Then we get

A − (B ∩ C) = A ∩ (B ∩ C)0 Theorem 4.2.24(3)


= A ∩ (B 0 ∪ C 0 ) Theorem 4.2.24(1b)
= (A ∩ B 0 ) ∪ (A ∩ C 0 ) Theorem 4.2.23(3a)
= (A − B) ∪ (A − C). Theorem 4.2.24(3)

Here we have noted the result used for each equality.

Exercise 4.2.27. Use the basic set identities given in the theorems above to prove that for
all sets A, B, and C,
(A − B) ∪ C = (A ∪ C) − (B − C).

88
Problems
Problem 4.2.1. Complete the following definition:
For sets A and B, A is not a subset of B, written A 6⊆ B, provided . . ..

Problem 4.2.2. Let A = { 2n − 1 | n is a prime integer } and let B be the set of all prime
integers. Show that A 6⊆ B and B 6⊆ A.

Problem 4.2.3. Let A = { x ∈ R | x2 − 9 ≤ 0 and x2 − 4 > 0 } and let


B = { x ∈ R | 2 < x ≤ 3 }.
(a) Prove that A 6⊆ B.
(b) Using (a), complete a proof that B is a proper subset of A.

Problem 4.2.4. Let A = { (x, y, z) ∈ R × R × R | x − y + 5z = 0 and 2x − y + 7z = 0 } and


let B = {(u, v, w) ∈ R × R × R | (u, v, w) = (−2c, 3c, c) for some c ∈ R }. Prove that A = B.

Problem 4.2.5. Recall that if A and B are 2 × 2 matrices defined by


   
a b w x
A= and B = ,
c d y z

then the product of A and B is given by


 
aw + by ax + bz
AB = .
cw + dy cx + dz

In general, AB 6= BA. Set


 
2 1
P = and let C(P ) = { A ∈ M2 (R) | P A = AP }.
0 3

Thus C(P ) is the set of all matrices that commute with P under matrix multiplication.
Also, set    
r s
S = B ∈ M2 (R) B = for some r, s ∈ R .
0 r+s
Prove that C(P ) = S.

Problem 4.2.6. (a) For arbitrary sets A, B and C, sketch Venn diagrams for each of the
sets (A − B) − C and A − (B − C).
(b) Use an elementwise argument to prove that for all sets A, B, and C,
(A − B) − C ⊆ A − (B − C).
(c) Prove or disprove: For all sets A, B, and C, (A − B) − C = A − (B − C).

Problem 4.2.7. (a) For arbitrary sets A, B and C, sketch Venn diagrams for each of the
sets A − (B ∪ C) and (A − B) ∪ (A − C).
(b) Prove or disprove: For all sets A, B, and C, A − (B ∪ C) = (A − B) ∪ (A − C).

89
Problem 4.2.8. Use an elementwise argument to prove Theorem 3, 4(b); that is, prove for
all sets A, B, and C, A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C).

Problem 4.2.9. Use basic set equalities to prove each of the following for all sets A, B
and C.
(a) A − (B ∪ C) = (A − B) ∩ (A − C) (b) (A ∪ B) − (A ∩ B) = (A − B) ∪ (B − A).

Problem 4.2.10. Prove by contradiction that for all sets A, B, and C,

(A ∩ B) − (B ∩ C) − (A ∩ C)0 = ∅.
 

(Note: If a set is assumed to be nonempty, then we can assert the existence of an element,
x, in that set.)

Problem 4.2.11. Prove by contrapositive that for all sets A, B, C, and D,

if (A ∩ B) ⊆ (C ∪ D) then (A − C) ∩ (B − D) = ∅.

(Note: If a set is assumed to be nonempty, then we can assert the existence of an element,
x, in that set.)

90
4.3 Indexed Families of Sets
Example 4.3.1. For each real number each r ∈ (1, ∞) define a set Ar by
 
1
Ar = x ∈ R ≤ x ≤ r .
r

For instance    
1 1
A2 = x ∈ R ≤ x ≤ 2 = ,2 .

2 2
and    
1 1
Aπ = x ∈ R ≤ x ≤ π = ,π .
π π
The collection of all Ar , where r ∈ (1, ∞) is an example of an indexed family of sets
and we denote such a family of sets by

{ Ar }r∈(1,∞) or by { Ar | r ∈ (1, ∞) }.

In this example, the set (1, ∞) is called the indexing set for the family. We can think of
(1, ∞) as a set of labels for our sets.

Remark 4.3.2.

• In the above family of sets there is no set labeled A1 , there is no “first” set in the
family, and given a set Ar in the family, there is no “next” set in the family. The
point is, an infinite collection of sets cannot necessarily be labeled simply as A1 , A2 ,
A3 , etc.

• For each set, Ar , in the above family, the index or label r is associated naturally with
the set.

• The indexing set (1, ∞) contains exactly one label for each set in the family.

Example 4.3.3. Recall that R2 = R × R. Geometrically, R2 denotes the set of points in


the plane. For each point (a, b) ∈ R2 define a set P(a,b) by

P(a,b) = { (x, y) ∈ R2 | x ≥ a and y ≥ b }.

For instance,
P(1,2) = { (x, y) ∈ R2 | x ≥ 1 and y ≥ 2 }.
Geometrically, P(1,2) consists of those points in the plane to the right of or on the vertical
line x = 1 and above or on the horizontal line y = 2.
{ P(a,b) }(a,b)∈R2 is an example of an indexed family of sets in which R2 is the indexing set,
or set of labels.

91
To explore properties of indexed families of sets requires notation for arbitrary indexed
families. We will use notation such as { Aα }α∈Λ or { Bi }i∈I to denote an abstract indexed
family of sets.

Definition 4.3.4 (Union and Intersection of an Indexed Family of Sets).

Let { Aα }α∈Λ be an indexed family of sets contained in the universal set U . Then

∪α∈Λ Aα = { x ∈ U | there exists α ∈ Λ such that x ∈ Aα }.

Similarly,
∩α∈Λ Aα = { x ∈ U | for all α ∈ Λ, x ∈ Aα }.

Example 4.3.5. For each real number r ∈ [1, ∞) set


 
1 1
Ar = x ∈ R − ≤ x ≤ 2 −
.
r r

Thus, in interval notation, Ar = [− 1r , 2 − 1r ].


To gain some intuition, we first exhibit some examples of Ar . We note that
   
1 3 1 5
A1 = [−1, 1], A2 = − , , and A3 = − , .
2 2 3 3
We will now show that
∪r∈[1,∞) Ar = [−1, 2).

Proof. This is a standard set equality proof.


We first prove that that
∪r∈[1,∞) Ar ⊆ [−1, 2).
Let x ∈ R be given, and suppose x ∈ ∪r∈[1,∞) Ar . Then, by the definition of union there
exists some r ∈ [1, ∞) such that
 
1 1
x ∈ Ar = − , 2 − .
r r

That is, − 1r ≤ x ≤ 2 − 1r . Therefore


1 1
−1 ≤ − ≤ x ≤ 2 − < 2,
r r
so x ∈ [−1, 2).

92
We now prove that that
[−1, 2) ⊆ ∪r∈[1,∞) Ar .
Let x ∈ R be given and suppose x ∈ [−1, 2). We will consider two cases.

Case 1: Suppose x ∈ [−1, 1]. Since A1 = [−1, 1], in this case we have x ∈ A1 , so
x ∈ ∪r∈[1,∞) Ar .

Case 2: Suppose x ∈ (1, 2).

We pause for some construction not included with the proof. We need to find a real number
r ≥ 1 so that x ∈ Ar = [− 1r , 2 − 1r ]. Since x > 1, let’s focus on finding r so that x ≤ 2 − 1r .
To simplify further, let’s find r so that x = 2 − 1r . Solving for r gives r = 2−x 1
. The proof
continues (uninterrupted) as follows.

1 1
Set r = 2−x . Since x ∈ (1, 2), 2 − x < 1, so r = 2−x > 1; that is, r ∈ [1, ∞). Further,
1 1 1
2 − r = 2 − (2 − x) = x, so x ∈ [− r , 2 − r ] = Ar . Therefore x ∈ ∪r∈[1,∞) Ar .
This proves that [−1, 2) ⊆ ∪r∈[1,∞) Ar , so we conclude that [−1, 2) = ∪r∈[1,∞) Ar .

Exercise 4.3.6. Prove that


∩r∈[1,∞) Ar = [0, 1]

Exercise 4.3.7. Recall that R2 = R × R is, geometrically, the set of points in the plane.
For each real number r ∈ R, define the subset Ar of R2 by

Ar = { (x, y) ∈ R2 | y = rx }.

(a) Graph A−1 , A0 , and A1 .

(b) Let
B = { (x, y) ∈ R2 | if x = 0 then y = 0 }.
(Note that B consists of all points in R2 except those on the positive and negative y
axis.)

Prove that ∪r∈R Ar = B.

Hint 1: To show that ∪r∈R Ar ⊆ B, let (a, b) ∈ R2 and suppose (a, b) ∈ ∪r∈R Ar . To
prove that (a, b) ∈ B you need only to show that if a = 0 then b = 0.

Hint 2: To show that B ⊆ ∪r∈R Ar , let (a, b) ∈ R2 and suppose (a, b) ∈ B. Consider
two cases, a = 0 and a 6= 0. In the case where a 6= 0 set r = ab .

93
Theorem 4.3.8.

Let { Aα }α∈Λ be an indexed family of sets in the universal set U and let B be a set in U .
(a) B ∪ ( ∪α∈Λ Aα ) = ∪α∈Λ (B ∪ Aα ).
(b) B ∩ ( ∩α∈Λ Aα ) = ∩α∈Λ (B ∩ Aα ).
(c) B ∩ ( ∪α∈Λ Aα ) = ∪α∈Λ (B ∩ Aα ).
(d) B ∪ ( ∩α∈Λ Aα ) = ∩α∈Λ (B ∪ Aα ).
(e) ( ∪α∈Λ Aα )0 = ∩α∈Λ A0α .
(f) ( ∩α∈Λ Aα )0 = ∪α∈Λ A0α .

Proof. We prove only part (c) and leave the rest to the reader. Once again, this is a
standard set equality proof

To see that B ∩ ( ∪α∈Λ Aα ) ⊆ ∪α∈Λ (B ∩ Aα ), let x ∈ U and assume that


x ∈ B ∩ ( ∪α∈Λ Aα ). Then x ∈ B and x ∈ ∪α∈Λ Aα . Since x ∈ ∪α∈Λ Aα , there exists β ∈ Λ
such that x ∈ Aβ . Therefore, x ∈ B ∩ Aβ . It follows that x ∈ ∪α∈Λ (B ∩ Aα ). This proves
that B ∩ ( ∪α∈Λ Aα ) ⊆ ∪α∈Λ (B ∩ Aα ).

To see that ∪α∈Λ (B ∩ Aα ) ⊆ B ∩ ( ∪α∈Λ Aα ) let x ∈ ∪α∈Λ (B ∩ Aα ). Thus, there exists


λ ∈ Λ such that x ∈ B ∩ Aλ . Therefore, x ∈ B and x ∈ Aλ . Since x ∈ Aλ it follows that
x ∈ ∪α∈Λ Aα . Consequently, x ∈ B ∩ ( ∪α∈Λ Aα ) and it follows that
∪α∈Λ (B ∩ Aα ) ⊆ B ∩ ( ∪α∈Λ Aα ).

We conclude that B ∩ ( ∪α∈Λ Aα ) = ∪α∈Λ (B ∩ Aα ).

Exercise 4.3.9. Use Theorem 4.3.8 and the basic identities from Section 2.2 to prove that
(with notation as in Theorem 4.3.8)

B − ∩α∈Λ Aα = ∪α∈Λ (B − Aα ).

94
Problems
Problem 4.3.1. For each natural number n let An = [0, 3 − n1 ).
(a) Describe (without proof) ∪n∈N An .
(b) Describe (without proof) ∩n∈N An .
(c) If [0, ∞) is the universal set then describe ∪n∈N A0n and ∩n∈N A0n . (cf. Theorem 4.3.8 (e)
and (f).)

Problem 4.3.2. For each positive real number α, define a subset Aα of the plane by

Aα = { (x, y) | x2 + y 2 = α2 }.

(a) Give a graphical representation for ∪{ Aα | α ∈ [1, 2] }.


(b) Set B = { (x, y) | 1 ≤ x2 + y 2 ≤ 4 }. Prove that ∪{ Aα | α ∈ [1, 2] } = B.
Hint: To show that B ⊆ ∪{ Aα | α ∈ [1, 2] } suppose (a, b) ∈ B. Now exhibit α such that
α ∈ [1, 2] and (a, b) ∈ Aα

Problem 4.3.3. For each positive real number α, define a subset, Aα , of the plane by
n α o
Aα = (x, y) 0 < y ≤ − x2 + α .

4
Thus, Aα is the set of points in the plane that lie above the x-axis and on or under the
α
graph of the parabola y = − x2 + α.
4
Let B be the set of points in the plane defined by

B = { (x, y) | − 2 < x < 2 and y > 0 }.

(a) Give a graphical representation of the sets A1 and A4 and B.


(b) Prove that
∪α∈R+ Aα = B.
Hint: To show that B ⊆ ∪α∈R+ Aα , let (a, b) ∈ B. Show the existence of a positive real
number α such that
α
b = − a2 + α
4

Problem 4.3.4. Let { Aα }α∈I be a nonempty collection of sets. For any set B give an
elementwise proof that B ∪ (∩α∈I Aα ) = ∩α∈I (B ∪ Aα ).

Problem 4.3.5. Let { Aα }α∈I be a nonempty collection of sets. Use basic set equalities
(i.e., theorems) to prove that for any set B, B − ∪α∈I Aα = ∩α∈I (B − Aα ).

95
Chapter 5

The Integers

5.1 Mathematical Induction


Mathematical induction is a method for proving a statement of the form

(∀n ≥ n0 ) P (n),

where n0 is a specific integer, n is an arbitrary integer with n ≥ n0 , and P (n) is an open


statement that contains the variable n. There are are two versions of the method: a “weak”
version that requires one to prove a more limited (weaker) condition is true to reach the
conclusion (∀n ≥ n0 ) P (n), and a “strong” version that requires more elaborate proof to
reach the same conclusion. While the weak version is actually a consequence of the strong,
we will discuss the weak version first and give an independent proof that it works.

5.1.1 Weak Induction

Theorem 5.1.1 (Weak Induction).

Let n0 ∈ Z be given and suppose P (n) is an open statement defined on the universal set
U0 = {n ∈ Z | n ≥ n0 }. Suppose the following two statements are true.

1. P (n0 ) is true.

2. For any integer k ≥ n0 , if P (k) is true then P (k + 1) is true.

Then, P (n) is true for all n ∈ U0 .

Proof. We first look at the case where n0 ≥ 1 so that U0 ⊆ N. Let S ⊆ U0 ⊆ N be the set
of natural numbers for which P (n) is false. Suppose (for the sake of contradiction) that S
is not empty. By the well ordering principle of the natural numbers (see Section 1.4.3)
there is a smallest element m ∈ S. Since P (n0 ) is true and P (m) is false, m > n0 , so
m − 1 ∈ U0 . Since m is the smallest element in S, P (m − 1) must be true. But (using

96
k = m − 1) this implies that P (m) is true, a contradiction. Thus, S must be empty, and
P (n) must be true for all n ∈ U0 . In the case where n0 < 1, we can redefine P with an
appropriate shift of the index. This is left to the reader.

Remark 5.1.2. A proof using weak induction involves two sub-proofs.


1. Proving that P (n0 ) is true is called proving the base case.
2. Proving, for k ≥ n0 , the inductive implication that if P (k) is true, then P (k + 1)
is true. Like most proofs of an implication, the inductive step has two parts.
(a) We assume that for some arbitrary k ≥ n0 , P (k) is true. This is known as the
inductive assumption.
(b) We show that the inductive assumption implies that P (k + 1) must be true.
This is called the inductive step.

Remark 5.1.3. One particular point of confusion with induction proofs is that if we don’t
use clear language, it can seem that in making the inductive assumption we are assuming
the very thing we are trying to prove. That’s not the case. In the inductive step we are
proving an implication. We are not assuming P (k) is true - the inductive assumption is
conditional: if P (k) is true then P (k + 1) is true.

Example 5.1.4. We will prove that for every integer n ∈ N, 13 divides 18n − 5n .
Proof. The proof is by induction on n ∈ N.
Base Case: For n = 1 we have 181 − 51 = 13, so 181 − 51 is divisible by 13. This proves the
base case.
Inductive Assumption: Now suppose that for some arbitrary k ∈ N that
13 divides 18k − 5k .
By the definition of “divides” there is an integer m ∈ Z such that
18k − 5k = 13m.
Inductive Step: Now, we show that the inductive assumption implies that that
13 divides 18k+1 − 5k+1 .

18k+1 − 5k+1 = 18k 18 − 5k 5


= 18k 18 − 18k 5 + 18k 5 − 5k 5
= 18k (18 − 5) + (18k − 5k )5
= 18k 13 + 13m5
= 13(18k + 5m)
Since 18k + 5m is an integer, 13 divides 18k+1 − 5k+1 by definition. This completes the
inductive step. Thus, by the weak induction theorem, 13 divides 18n − 5n for all n ∈ N.

97
Remark 5.1.5. Note that in the second equation of the major calculation above, we have
added 0 = −18k 5 + 18k 5 to the previous expression. This “trick” is often referred to as
“put and take” or “add and subtract.”

Exercise 5.1.6. Prove by induction on n that for every n ∈ N, 5 divides 22n−1 + 32n−1 .

Example 5.1.7. We will prove by induction on n that for every natural number n ≥ 2,

n3 + 1 > n2 + n.

Proof. The proof is by induction on n.


Base Case: Note that the base case is n = 2. In this case, we have

n3 + 1 = 23 + 1 = 9 > 6 = 22 + 2 = n2 + n.

Inductive Assumption: Now suppose that for some arbitrary natural number k ≥ 2,

k 3 + 1 > k 2 + k.

Inductive Step: To complete the inductive step we must show that the inductive
assumption implies
(k + 1)3 + 1 > (k + 1)2 + (k + 1).
Expanding the left side of this inequality, using the inductive assumption, and doing a bit
of algebra gives us the following.

(k + 1)3 + 1 = (k 3 + 3k 2 + 3k + 1) + 1
= (k 3 + 1) + 3k 2 + 3k + 1
> (k 2 + k) + 3k 2 + 3k + 1
= 4k 2 + 4k + 1
= (k 2 + 2k + 1) + 2k + 3k 2
= (k + 1)2 + 2k + 3k 2
> (k + 1)2 + 2k (since 3k 2 < 0)
> (k + 1)2 + (k + 1) (since 2k > k + 1.)

This completes the inductive step. By weak induction, n3 + 1 ≥ n2 + n for every integer
n ≥ 2.

Exercise 5.1.8. Prove that 2n+1 < 3n for every integer n ≥ 2.

98
Example 5.1.9. We say that a sequence, { an }∞ n=1 , is defined by a recurrence relation
or recursion relation provided that there is some n0 ∈ N such that for all n > n0 , an is
expressed as a function of the preceding terms in the sequence. The first few terms
n = 1, 2, . . . , n0 are explicitly defined via the initial conditions of the recurrence relation.
For example, consider the sequence of real numbers defined by the following.
3an + 4
a1 = 1, an+1 = , n = 1, 2, 3, . . . .
4
Here the initial condition is a1 = 1, the recursion relation is an+1 = (3an + 4)/4.

For this sequence, we will show that

an < 4, for all n ∈ N.

Proof. We proceed by induction on n.


Base Case: To prove the base case we note that a1 = 1 < 4.
Inductive Assumption: We suppose that for some arbitrary k ∈ N that ak < 4.
Inductive Step: To complete the inductive step we must show that this implies ak+1 < 4.
We use the recurrence formula and the inductive assumption to compute as follows.
3ak + 4
ak+1 =
4
3(4) + 4
<
4
= 4.

Thus, by induction, an < 4 for all n ∈ N.

Exercise 5.1.10. For the sequence defined in Example 5.1.9, show that

an < an+1 , for all n ∈ N.

5.1.2 Strong Induction


There are some situations in which we have to prove more than is required by weak
induction in order to prove an open statement is true for all natural numbers in its universal
set. Such proofs are based on a more general “Principle of Mathematical Induction.”

99
Theorem 5.1.11 (The Principle of Mathematical Induction).

Let S ⊆ Z be a set of integers that satisfies the following two properties:

1. n0 ∈ S.

2. For all k ∈ Z with k ≥ n0 , if n0 , . . . , k ∈ S then k + 1 ∈ S.

Then
{ n ∈ Z | n ≥ n0 } ⊆ S.

We will not prove Theorem 5.1.11, but we will state the strong induction theorem which
follows from it directly.

Theorem 5.1.12 (Strong Induction).

Let n0 , n1 ∈ Z be given with n0 ≤ n1 and suppose P (n) is an open statement defined on the
universal set U0 = {n ∈ Z | n ≥ n0 }. Suppose the following two statements are true.

1. P (i) is true for any i ∈ Z with n0 ≤ i ≤ n1 .

2. For any integer k > n1 , if P (m) is true for any m ∈ Z with n0 ≤ m ≤ k then P (k + 1)
is true.

Then P (n) is true for all n ∈ U0 .

Remark 5.1.13. There are two differences between a strong and weak induction proof.
1. For strong induction we might need to prove multiple base cases.
2. For strong induction we make the stronger inductive assumption that P (m) is true
for m = n0 , . . . , k to prove P (k + 1) is true. In weak induction we assume only that
P (k) is true to show P (k + 1) is true.

To see where the second of these differences might be necessary, consider the proof of the
following very important theorem from number theory.

Theorem 5.1.14.

For every integer n ≥ 2 either n is a prime or n can be expressed as a product of two or


more primes.

100
Proof. The proof is by induction on n.
Base Case: To prove the base case, we note that if n = 2, then n is a prime, so we are
done.
(Strong) Inductive Assumption: Let k be some arbitrary integer with k > 2. We suppose
that for every integer m such that 2 ≤ m ≤ k, either m is prime or m can be expressed as a
product of two or more primes.
Inductive Step: To complete the proof, we must show that this implies that k + 1 is either
prime or the product of two or more primes. If k + 1 is prime then we are done, so assume
that k + 1 is not prime. Then there exist integers a and b such that

2 ≤ a ≤ k, 2 ≤ b ≤ k, and k + 1 = ab.

By our strong inductive assumption, each of a and b is either a prime or can be expressed
as a product of two or more primes. It follows that k + 1 can be expressed as a product of
two or more primes.
Thus, by the strong induction theorem, for every integer n ≥ 2, either n is a prime, or n
can be expressed as a product of two or more primes.

Remark 5.1.15. Note that if we were using weak induction, the inductive assumption
would be that k was a prime or product of primes. We would not have assumed anything
about a and b.

Exercise 5.1.16. For an integer n ≥ 2, define f (n) to be the number of (not necessarily
distinct) prime factors1 of n. For example, f (5) = 1, f (6) = 2, f (8) = 3, and f (9) = 2. One
can show that that f (ab) = f (a) + f (b) for all positive integers a and b, with a ≥ 2 and
b ≥ 2.
Prove by induction on n that for every integer n ≥ 2, f (n) < 2 ln n.
Hint: After you have stated the inductive assumption, consider two cases:
Case 1: n + 1 is prime.
Case 2: n + 1 is not prime. Then n + 1 is a composite. What does that mean? Apply the
inductive assumption to the factors.

To see where one might need to prove multiple base cases consider the following example.

1
One can show (though we have not) that there is only one way to factor a natural number into the
product of primes. Because of this the function is “well-defined.”

101
Example 5.1.17. Consider the following sequence { an }∞
n=1 defined recursively as follows:

a1 = a2 = a3 = 1,
an = an−1 + an−2 + an−3 for n = 4, 5, 6, . . .
We will use strong induction to prove that an ≤ 2n−2 for every integer n ≥ 2.

Remark 5.1.18. Note that the formula to be proved, an ≤ 2n−2 , is false for n = 1. Thus,
for our base case, n0 , it is necessary that n0 ≥ 2. This will actually be our first example in
which we will need to prove more that one step in the base case. The sort of reasoning
below illustrates the type of analysis that leads us to a base case with more than a single
step.
First, after we have stated the inductive assumption and are ready to prove the “k + 1”
case, it will be convenient to to define ak+1 via the given recurrence relation. That is, we
will wish to write ak+1 = ak + ak−1 + ak−2 . Since the recurrence relation applies only to the
4th and later terms, this requires k + 1 ≥ 4, or k ≥ 3. But to suppose that k ≥ 3 in the
inductive assumption requires that we have proved the cases n = 2 and n = 3 in the base
case.
Further, to use the recurrence formula ak+1 = ak + ak−1 + ak−2 to prove the “k + 1” case
(that is, to prove that ak+1 ≤ 2k−1 ), we will wish to apply the inductive assumption to each
of the three preceding terms that define ak+1 . That is, we want to assume that we already
know that ak ≤ 2k−2 , ak−1 ≤ 2k−3 , and ak−2 ≤ 2k−4 . This means that we need k − 2 ≥ 2 or
k ≥ 4. But to suppose that k ≥ 4 in the inductive assumption requires that we have proved
the cases n = 2 and n = 3, and n = 4 in the base case.
The second analysis above implies a stronger requirement than the first, so in our base case
we will need to prove the first three cases, n = 2, 3, 4.
Proof. The proof is by induction on n.
(Multiple) Base Cases: We begin by proving three base cases.
• If n = 2 then an = a2 = 1 and 2n−2 = 20 = 1. Since 1 ≤ 1, we have an ≤ 2n−2 .
• If n = 3 then an = a3 = 1 and 2n−2 = 21 = 2. Since 1 ≤ 2, we again have an ≤ 2n−2 .
• If n = 4 then an = a4 = a3 + a2 + a1 = 1 + 1 + 1 = 3 and 2n−2 = 22 = 4. Since 3 ≤ 4,
we have an ≤ 2n−2 .

(Strong) Inductive Assumption: We now suppose that for some arbitrary k ≥ 4 we have
am ≤ 2m−2 for every integer m such that 2 ≤ m ≤ k.
Inductive Step: To complete the proof, we must show that the assumption above implies
ak+1 ≤ 2k−1 .
Since we are assuming that k ≥ 4, we have k + 1 ≥ 5 so ak+1 is defined by the recurrence
relation, that is,
ak+1 = ak + ak−1 + ak−2 .

102
Also, k ≥ 4 means that k − 2 ≥ 2, so the inductive assumption applies to each of the terms
ak , ak−1 , and ak−2 . Thus, by assumption,

ak ≤ 2k−2 ,
ak−1 ≤ 2k−3 ,
ak−2 ≤ 2k−4 .

Therefore,

ak+1 = ak + ak−1 + ak−2


≤ 2k−2 + 2k−3 + 2k−4
≤ 2k−2 + 2k−3 + 2k−3
= 2k−2 + 2k−3 2
= 2k−2 + 2k−2
= 2k−2 2
= 2k−1 .

This proves that ak+1 ≤ 2k−1 = 2(k+1)−2 .


By the strong induction theorem, an ≤ 2n−2 for every integer n ≥ 2.

Exercise 5.1.19. Let { an }∞ n=1 be the sequence defined in Example 5.1.17. The object of
this exercise is to prove that an < 2an−1 for every integer n ≥ 5.
(a) Determine the number of steps that need to be proved as base cases and prove them.
Hints: In proving the “k + 1” case, we will want ak+1 to be defined by the recurrence
relation; that is, we need k + 1 ≥ 4. But since the problem stipulates that n ≥ 5, we
actually have k + 1 ≥ 6.
When we use the recurrence relation to write ak+1 = ak + ak−1 + ak−2 , we will wish to
apply the inductive assumption to each of the terms ak , ak−1 , and ak−2 . Thus, what is the
minimum value for k − 2? for k?
(b) State the inductive assumption.
(c) Prove the “k + 1” case.

The following is a much more famous recursively defined sequence with multiple initial
conditions.

103
Definition 5.1.20 (Fibonacci Sequence).

The sequence { fn }∞
n=1 of Fibonacci numbers is defined by

f1 = f2 = 1,

and
fn = fn−1 + fn−2 for n ≥ 3.

The first few Fibonacci numbers are:

f1 = 1, f2 = 1, f3 = 2, f4 = 3, f5 = 5, f6 = 8, f7 = 13, f8 = 21, and f9 = 34.

Exercise 5.1.21. Let { fn }∞


n=1 be the sequence of Fibonacci numbers. Prove that for
every integer n ≥ 2,
f1 + · · · + fn−1 = fn+1 − 1.

104
Problems
Problem 5.1.1. Prove by induction on n that 6 divides n(n + 1)(n + 2) for every integer
n ≥ 1.
Problem 5.1.2. Prove by induction on n that for every integer n ≥ 6 there exists integers
r and s such that r ≥ 0, s ≥ 0 and n = 2r + 5s. (Thus, if n ≥ 6, n can be expressed as a
sum of 2’s and 5’s.)
Hint: Based on the induction assumption you can argue that there are integers r and s
such that r ≥ 0, s ≥ 0 and n = 2r + 5s. Consequently, n + 1 = 2r + 5s + 1. Consider the
following two cases:
Case 1: s ≥ 1. Now get n + 1 = 2r + 5(s − 1) + 6.
Case 2: s = 0. Then n + 1 = 2r + 1. Argue that r ≥ 3, so n + 1 = 2(r − 2) + 5.
Problem 5.1.3. Prove by induction on n that (1 + n1 )n < n for every integer n ≥ 3.
Problem 5.1.4. Suppose that you are presented with a sequence of closed doors
numbered 1 to m and behind these doors are the unknown real numbers x1 , x2 , . . . , xm−1 ,
xm , respectively. You are given that x1 < x2 < · · · < xm−1 < xm . Further, you are given a
number y such that y = xi for some i. The object is to find where y is located by opening
as few doors as possible. The actual number of doors that need to be opened will vary
depending on the location of y and the strategy employed. In this problem we will
determine a value, N (m), such that y can be located by opening at most N (m) doors.

(a) (An Example – Not to turn in.) Conjecture a value for N (15). (One strategy is given
below, but find your own before looking.)
A Strategy: First open door 8. If y = x8 we are done. Otherwise, either y < x8 and is
behind one of the first 7 doors, or y > x8 so is located behind one of the doors 9 − 15. The
cases are similar, so we consider the case where y < x8 .
Now open door 4. As above, if y = x4 we are done in two steps. Otherwise, either y < x4
so is behind one of the first 3 doors, or y > x4 so is located behind one of the doors 5 − 7.
Again the cases are similar, so assume y < x4 .
Finally, open door 2. If y = x2 we are done. If y < x2 , then y is behind door 1. If y > x2 ,
then y is behind door 3.
This shows that if y is hidden behind one of 15 doors, we need to open at most 3 doors to
locate y. Thus, we can take N (15) = 3.

(b) (Not to turn in): Conjecture a value (based on some strategy similar to that above) for
N (2) and N (3).
Repeat for N (4), N (5), N (6), and N (7).
(c) Prove by induction on n that if n ≥ 0 and m < 2n+1 then N (m) ≤ n; that is, we can
locate a value y, hidden behind one of m, doors by opening no more that n doors.
( Notes: When proving the “n + 1” case you will assume that m < 2n+2 . Consider two
cases. If, actually, m < 2n+1 your inductive assumption already applies. If m ≥ 2n+1 use

105
one move to open the door numbered 2n+1 . If y is not behind that door, what is the
maximum number of doors to either side. Apply the inductive assumption to those sets of
doors.)

Problem 5.1.5. Let { fn }∞ n=1 be the sequence of Fibonacci numbers. Prove that for every
integer n ≥ 1, f12 + · · · + fn2 = fn fn+1 .

Problem 5.1.6. Let Let m be a given positive integer with m ≥ 2. (So m remains
constant throughout the problem.) Let { fn }∞
n=1 be the sequence of Fibonacci numbers.
Prove that for every integer n ≥ 1, fm+n = fm fn+1 + fm−1 fn .
(Caution: I want you to include exactly the correct number of steps in your base case. You
may need to work through your argument first to see how many steps are needed. See, as
an illustration, the comments following Example 5.1.17.)

Problem 5.1.7. Prove by induction on n that for every integer n ≥ 1, there exists integers
t1 , t2 , . . . , tm such that

t1 > t2 > · · · > tm ≥ 0 and n = 2t1 + 2t2 + · · · + 2tm .

Some Examples: 1 = 20 , 4 = 22 , 13 = 23 + 22 + 20 , 35 = 25 + 21 + 20 .
Hint: When proving the “n + 1” case, note that n + 1 is either even or odd. Thus, there is
an integer l such that either n + 1 = 2l or n + 1 = 2l + 1. In either case, note that
1 ≤ l ≤ n and apply the inductive assumption to k.

Problem 5.1.8. First, a description of the game:


You are given a row of boxes, each containing a 0 or a 1.
A permissible move consists of removing a 0 from one and only one box then changing
the values in the neighboring boxes; that is, a neighboring 0 becomes 1 and a neighboring 1
becomes 0. (Thus, if no zero’s are present, the game is over.)
The object of the game is to empty all the boxes, if possible.
An Example:
The given boxes:
1 0 1 0 0
Remove the leftmost 0 to obtain:
0 0 0 0
Remove the leftmost 0 to obtain:
0 0 0
Remove the leftmost 0 to obtain:
1 0
Remove the leftmost 0 to obtain:
0
Remove the remaining 0 to obtain:

106
Thus, in this example, the boxes were successfully emptied.

Exercise: Let S denote a given string of n boxes containing zero’s and one’s. We will call n
the length of S and write L(S) = n. Let z(S) denote the number of zero’s present in the
string S. (So if L(S) = n, z(S) could have any integer value from 0 to n.)
Prove, by induction on n, that for every integer n ≥ 1, a given string S, with L(S) = n,
can be emptied if z(S) is odd but cannot be emptied if z(S) is even.
Comments: Include both the even and odd cases at each step of the proof. For instance, if
L(S) = 1 then either z(S) = 0, which is even, or z(S) = 1.
For the “n + 1” case, assume that S is a string of zero’s and one’s with L(S) = n + 1. First
suppose that z(S) is odd. (So at least one zero is present.) Remove the leftmost zero and
don’t forget to change the entries in the neighboring boxes.
If the leftmost zero is at either end of S, after removing it we have created a string, S 0 such
that L(S 0 ) = n. Argue that z(S 0 ) is still odd and apply the inductive assumption.
If the leftmost zero is not at either end, we have separated our given string S into two
strings, S1 and S2 , of zero’s and one’s. If L(S1 ) = q and L(S2 ) = r, argue that q ≤ n,
r ≤ n. Also argure that both z(S1 ) and z(S2 ) are odd. Apply the inductive assumption to
each of the strings S1 and S2 .
Next, assume that z(S) is even. What if z(S) = 0? If z(S) > 0, remove any zero from S
and change the neighboring entries. Proceed with a strategy similar to the odd case.

Problem 5.1.9. This game requires two players. You are given an n × n square
partitioned into n2 subquares that are each 1 × 1. (Like an n × n checkerboard without
colors.) On the first move, player 1 may claim (mark with a X) any square in the right
most column. (Player two can claim squares with O’s.) After the first move, players take
turns according to the following rule:
Rule: After an opposing player has claimed a square, you may then claim a square either in
the same column but anywhere below the opponent’s last square, or in the same row but
anywhere to the left of the opponent’s last square. (So play must move down or left.)
The winner is the player who claims the square in the lower left corner.

Examples: Following are two examples in a 6 × 6 grid. In both examples, player 2 won.

X
O X
O X O X O X
O X O

107
Exercise: Prove, by induction on n, that for every integer n ≥ 1, player 1 can always win
the above game played on an n × n grid.
Some Notation: Count the rows of the grid from the bottom and count the columns from
the left. Now let Sij denote the square in the ith row and jth column. For example, S11 is
the square in the lower left corner, Snn is the square in upper right corner and S23 is the
square on the 2nd row from the bottom and the third column from the left.
Comments: In the base case, n = 1, player 1 wins on the first move – player 2 never gets a
move. Thus, the base case is not helpful.
Your proof of the “n + 1” case will necessarily include the winning strategy for player 1, so
first play the game enough to find and understand such a strategy.
In proving the “n + 1” case, describe play through the second move for player 1. At that
point you should be able to apply your inductive assumption to a smaller grid.

108
5.2 The Division Algorithm and Greatest Common
Divisors
5.2.1 The Division Algorithm
The division algorithm is merely long division restated as an equation. For example, the
division
29 rem. 20
32 948
can be rewritten in equation form as

948 = 32(29) + 20

More generally, if m (the dividend) and d (the divisor) are positive integers, then we
know that division of m by d yields a quotient q and a remainder r which we represent
by
q rem. r
(5.1)
d m
Furthermore, we know that this process yields 0 ≤ r < d.

We can express (5.1) in equation form as:

m = dq + r where 0 ≤ r < d.

We express this observation without proof as the following theorem.

Theorem 5.2.1 (The Division Algorithm for Integers).

Let m ∈ Z be any integer and let d ∈ N be a positive integer. Then there exist unique
integers q ∈ Z and r ∈ Z such that 0 ≤ r < d and

m = dq + r.

Remark 5.2.2. Note that in the division algorithm, m, the dividend, is an arbitrary
integer. From long division, we are familiar only with the case where m ≥ d. The other
cases are easily handled as follows.
Case 1: Assume 0 ≤ m < d. Then set q = 0 and r = m; that is, m = d(0) + m.
Case 2: Assume the dividend is −m, where m is positive. Since m is positive, we can use
long division to find integers q and r such that m = dq + r. Then
−m = d(−q) − r = d(−q − 1) + (d − r). Since 0 ≤ r < d, it follows that 0 ≤ d − r < d.

109
Exercise 5.2.3. In each of (a) – (d) you are given values for m and d. In each case find
(using the notation of the Division Algorithm) the quotient q and the remainder r.

(a) m = 6, d = 10. (b) m = −6, d = 10.

(c) m = 15153, d = 83 (d) m = −15153, d = 83

5.2.2 Greatest Common Divisors

Definition 5.2.4 (Greatest Common Divisor).

Let a ∈ Z and b ∈ Z be integers. A positive integer d ∈ N is called the


greatest common divisor of a and b, written d = gcd(a, b), provided:

(a) d divides a, and d divides b; and

(b) if c is an integer such that c divides a and c divides b, then c divides d.

Remark 5.2.5. In words, the definition states that d = gcd(a, b) provided d is a common
divisor of a and b and d is divisible by all other common divisors of a and b.
Remark 5.2.6. Note that the definition of “Greatest” Common Divisor never mentions
any inequalities. The only concept used is division. You can’t prove that a number is the
greatest common divisor of two numbers by proving it is the “largest” number in the set of
divisors (at least, not using the definition.)
Example 5.2.7. The common divisors of 18 and 30 are

±1, ±2, ±3, and ± 6.

Since all other common divisors of 18 and 30 divide 6, the definition says that

6 = gcd(18, 30).

Of course, 6 is also the largest of all the common divisors, but that is not the definition of
the gcd.

5.2.3 Uniqueness of the GCD

Lemma 5.2.8.

Let d1 and d2 be positive integers such that d1 divides d2 and d2 divides d1 . Then d1 = d2 .

110
Proof. Let d1 and d2 be positive integers such that d1 divides d2 and d2 divides d1 . Then
there exist positive integers q1 and q2 such that d1 = q1 d2 and d2 = q2 d1 . Thus,

d1 = q1 d2 = q1 (q2 d1 ) = (q1 q2 )d1 .


Since d1 = (q1 q2 )d1 , it follows that 1 = q1 q2 . Recall that q1 and q2 are both positive, so it
follows from Theorem 1.2.3 that q1 = q2 = 1. (The only other possibility, q1 = q2 = −1, is
eliminated.) Thus, d1 = q1 d2 = d2 .

Theorem 5.2.9.

Let a and b be integers. If gcd(a, b) exists, it is unique.

Proof. Let a and b be integers and assume that gcd(a, b) exists. Suppose that
d1 = gcd(a, b) and suppose also that d2 = gcd(a, b). Let’s first view d1 as gcd(a, b). Since d2
is, by (a) of Definition 5.2.4, a common divisor of a and b, it follows from (b) of
Definition 5.2.4 that d2 divides d1 . Similarly, viewing d2 as gcd(a, b), we see that d1 divides
d2 . It now follows from Lemma 5.2.8 that d1 = d2 , so gcd(a, b) is unique when it exists.

5.2.4 Existence of the GCD


In proving the existence of the greatest common divisor, we first state a theorem that takes
care of some special cases. (The proof is left to the reader.)

Theorem 5.2.10.

Let a ∈ Z and b ∈ Z be integers. The following hold

• gcd(0, 0) does not exist.

• If a 6= 0 then gcd(a, 0) = |a|.

• If a divides b then gcd(a, b) = |a|.

• If a 6= 0 and b 6= 0 then gcd(a, b) = gcd(|a|, |b|).

The last item implies that in the algorithm given as the proof of Theorem5.2.12 below, we
may always assume that a and b are positive integers.

The next Lemma gives an essential “reduction step” for calculating gcd(a, b).

111
Lemma 5.2.11.

Let a, b, q, and r be integers such that a = qb + r. Then gcd(a, b) = gcd(b, r).

The proof of Lemma 5.2.11 is Problem5.2.3

Theorem 5.2.12.

If a and b are integers, not both zero, then gcd(a, b) exists.

Proof. The special cases were considered above. We give here an algorithm for finding
gcd(a, b) when a ≥ b > 0.
Apply the division algorithm, with b as the divisor, to obtain
a = q1 b + r1 where 0 ≤ r1 < b.
If r1 6= 0, apply the division algorithm to b and r1 , with r1 as the divisor, to obtain

b = q2 r1 + r2 where 0 ≤ r2 < r1 .
If r2 6= 0, apply the division algorithm to r1 and r2 , with r2 as the divisor, to obtain

r1 = q3 r2 + r3 where 0 ≤ r3 < r2 .
Since the remainders r1 , r2 , r3 , etc. form a sequence of positive integers with
r1 > r2 > r3 · · · ≥ 0. It follows that there is an integer k such that rk 6= 0 but rk+1 = 0.

We claim that
rk = gcd(a, b).
To see that this is true, we repeatedly apply Lemma 5.2.11 to get
gcd(a, b) = gcd(b, r1 )
= gcd(r1 , r2 )
= ···
= gcd(rk−1 , rk ).
But, since rk+1 = 0 we get
rk−1 = qk+1 rk + 0,
so rk divides rk−1 . Thus,
rk = gcd(rk−1 , rk ) = · · · = gcd(a, b).

112
This process of repeatedly applying the division algorithm and taking the last nonzero
remainder as the gcd is depicted in the following.

Algorithm 5.2.1 (Finding the GCD).


a = q1 b + r1 where 0 ≤ r1 < b
b = q2 r1 + r2 where 0 ≤ r2 < r1
r1 = q3 r2 + r3 where 0 ≤ r3 < r2
..
.
rk−3 = qk−1 rk−2 + rk−1 where 0 ≤ rk−1 < rk−2
rk−2 = qk rk−1 + rk where 0 ≤ rk < rk−1

rk−1 = qk+1 rk + 0
Example 5.2.13. Here, we find gcd(216, 80).

Repeated use of long division gives:

2 rem. 56 1 rem. 24 2 rem. 8 3 rem. 0


80 216 56 80 24 56 8 24
In equation form, this gives us
216 = (2)80 + 56
80 = (1)56 + 24

56 = (2)24 + 8
24 = (3)8 + 0.
Therefore, 8 = gcd(216, 80).
Exercise 5.2.14. In each of (a) – (d), find gcd(a, b).
(a) a = −44, b = 0 (b) a = −22, b = 660

(c) a = 715, b = 208 (d) a = 715, b = −208

5.2.5 Further Theorems

Theorem 5.2.15.

Let a and b be integers and suppose d = gcd(a, b). Then there exist integers m and n such
that d = ma + nb.

113
Remark 5.2.16. As we have noted before 6 = gcd(18, 30). Note that we may write
6 = (2)18 + (−1)30 = (−3)18 + (2)30 = (7)18 + (−4)30,
so, in the notation of Theorem 5.2.15, m and n are not unique.

The following algorithm for finding one choice for m and n is a continuation of
Algorithm 5.2.1 for find gcd(a, b).
Algorithm 5.2.2 (Writing gcd(a, b) = ma + nb). Beginning with the second to last
equation of Algorithm 5.2.1 and working from bottom to top, we solve each equation for
the remainder. This gives the following
rk = rk−2 − qk rk−1
rk−1 = rk−3 − qk−1 rk−2
..
.
r3 = r1 − q3 r2
r2 = b − q 2 r1
r1 = a − q 1 b
Recall that rk = gcd(a, b). In the equation for rk , we are given rk as a function of rk−1 and
rk−2 . We substitute for rk−1 , using the second equation. This gives
rk = rk−2 − qk rk−1 = rk−2 − qk (rk−3 − qk−1 rk−2 ) = (1 + qk−1 )rk−2 + (−qk )rk−3 .
This gives us rk = gcd(a, b) as a function of rk−2 and rk−3 . In this equation, we next
substitute for rk−2 and simplify to get rk as a function of rk−3 and rk−4 . Then substitute for
rk−3 and simplify. Continuing, we eventually substitute for r1 and simplify. This will yield
rk = gcd(a, b) = ma + nb.
Example 5.2.17. We have seen in Example 5.2.13 that 8 = gcd(216, 80). We now wish to
find integers m and n such that 8 = 216m + 80n. In finding gcd(216, 80) we obtained
several equations representing the repeated applications of the division algorithm. In
reverse order, we solve each those equations for the remainder to get the following
8 = 56 − (2)24
24 = 80 − (1)56
56 = 216 − (2)80.
Now in 8 = 56 − (2)24 substitute 24 = 80 − (1)56 to obtain
 
8 = 56 − 2 80 − (1)56 = (−2)80 + (3)56.

Next, substitute 56 = 216 − (2)80 to obtain:


 
8 = (−2)80 + (3)56 = (−2)80 + 3 216 − (2)80 = (3)216 − (8)80.

Thus, 8 = (3)216 − (8)80.

114
Exercise 5.2.18. Find d = gcd(4977, 405) and find integers m and n such that
d = 4977m + 405n.

Theorem 5.2.19.

Let a, and b be integers, where a and b are not both zero. Then gcd(a, b) exists, so let
d = gcd(a, b). For an integer c ∈ Z, there exist integers m ∈ Z and n ∈ Z such that
c = ma + nb if and only if c is a multiple of d.

Proof. Note that this is an equivalence, so two proofs are required.


First, let c be an integer and assume that there exist integers m and n such that
c = ma + nb. Let d = gcd(a, b). Then d divides both a and b, so there exist integers a1 and
b1 such that a = a1 d and b = b1 d. Thus,

c = ma + nb = ma1 d + nb1 d = (ma1 + nb1 )d.

Consequently, c = qd, where q = ma1 + nb1 , and so d divides c.


In the opposite direction, set d = gcd(a, b), let c be an integer, and assume that d divides c.
Then there exists an integer k such that c = kd. By Theorem 5.2.15, there exist integers
m1 and n1 such that d = m1 a + n1 b. Therefore, c = kd = k(m1 a + n1 b) = km1 a + kn1 b.
Thus, c = ma + nb, where m = km1 and n = kn1 .

Exercise 5.2.20. Suppose 11 = ma + nb, where a, b, m, and n are integers. List all
possible choices for d = gcd(a, b).

115
Problems
Problem 5.2.1. In each of (a) – (e) you are given integers m and n, where n is positive.
In each case, find integers q and r such that m = qn + r and 0 ≤ r < n.

(a) m = 2, n = 5 (b) m = −2, n = 5


(c) m = 30, n = 6 (d) m = −30, n = 6
(e) m = 4129, n = 232 (f) m = −4129, n = 232.

Problem 5.2.2. In each of (a) – (c) below you are given integers a and b. In each case use
the division algorithm to find gcd(a, b) and to find integers m and n such that
gcd(a, b) = ma + nb

(a) a = 899, b = 29 (b) a = 224, b = 98 (c) a = 963, b = 177

Problem 5.2.3. Let a, b, q, and r be integers such that a = bq + r. Prove that


gcd(a, b) =gcd(b, r).
Hint: Let d1 = gcd(a, b) and let d2 = gcd(b, r). Use part (b) of the definition of greatest
common divisor to argue that d1 divides d2 and d2 divides d1 .

Problem 5.2.4. Let a, b, c, and d be integers such that a divides bc and d = gcd(a, b).
Prove that a divides cd.
Hint: Apply Theorem 5.2.15 and multiply the resulting equation by c.

Problem 5.2.5. Let a and b be integers and let d = gcd(a, b). If k is a positive integer,
prove that kd = gcd(ka, kb).
Hint: Set d1 = gcd(ka, kb). Argue that kd is a common divisor of ka and kb, so kd divides
d1 . Next, apply Theorem 5 to argue that d1 divides kd.

116
5.3 Relatively Prime Integers
Let a and b be integers, not both zero (so gcd(a, b) exists). Let d = gcd(a, b) and let

S = { c ∈ Z | there exist integers m and n such that c = ma + nb }.


We have seen, in Theorem 5.2.19, that c ∈ S if and only if d divides c; that is, S consists of
all integer multiples of d. Thus, an alternate description of S is

S = { md | m ∈ Z }.
The following theorem is an immediate consequence of this observation.

Theorem 5.3.1.

Let a and b be integers, not both zero. Let d = gcd(a, b) and let

S = { c ∈ Z | there exist integers m and n such that c = ma + nb }.

Then d is the smallest positive integer in S.

Example 5.3.2. Let a and b be integers, not both zero. Suppose there exist integers m
and n such that 15 = ma + nb. What are the possibilities for gcd(a, b)? To answer this, we
note that if d = gcd(a, b) then, by Theorem 5.2.19, d is a positive divisor of 15. Thus, the
choices for d are 1, 3, 5, and 15.

Exercise 5.3.3. Let a and b be integers, not both zero. Suppose gcd(a, b) < 10 and there
exist integers m and n such that 17 = ma + nb. What are the possibilities for gcd(a, b)?

Definition 5.3.4 (Relatively Prime).


Let a and b be integers, not both zero. Then a and b are relatively prime provided

1 = gcd(a, b).

Example 5.3.5. The integers 15 and 22 are relatively prime, and 1 = (−2)22 + (3)15.

117
Theorem 5.3.6.

Let a and b be integers, not both zero. Then a and b are relatively prime if and only if there
exist integers m and n such that 1 = ma + nb.

Proof. Note that Theorem 5.3.6 is an equivalence, so two proofs are required.
First, let a and b be integers, not both zero, and suppose a and b are relatively prime. Then
1 = gcd(a, b) so, by Theorem 5.2.15, there exist integers m and n such that 1 = ma + nb.
In the other direction, let a and b be integers, not both zero, and suppose there exist
integers m and n such that 1 = ma + nb. If

S = { c ∈ Z | there exist integers m and n such that c = ma + nb }

then we are assuming that 1 ∈ S. Let d = gcd(a, b). By Theorem 5.3.1, d is the smallest
positive integer in S. We noted in Theorem ?? that 1 is the smallest positive integer. Since
1 ∈ S and d is the smallest positive integer in S, it follows that d = 1.

Exercise 5.3.7. Determine whether the following statement is true or false:


For all integers a, b, and c, if a divides bc, then either a divides b, or a divides c.

Theorem 5.3.8.

For all integers a, b, and c, if a divides bc and gcd(a, b) = 1, then a divides c.

Proof. Let a, b, and c be integers. Suppose that a divides bc and gcd(a, b) = 1. Since a
divides bc, there exists an integer k such that bc = ak. Since gcd(a, b) = 1, by
Theorem 5.3.6 (or by Theorem 5.2.15), there exist integers m and n such that 1 = ma + nb.
Multiplying by c gives c = mac + nbc. This gives

c = mac + nbc = mac + nak = (mc + nk)a.

That is,
c = qa where q = mc + nk.
This proves that a divides c.

Example 5.3.9. Let k be an integer such that 12 divides 35k. Since 12 and 35 are
relatively prime, it follows from Theorem 5.3.8 that 12 divides k.

118
Exercise 5.3.10. Let a be an integer, and let p be a prime integer. List all possibilites for
gcd(a, p).

Theorem 5.3.11.

Let a be an integer, and let p be a prime integer. Then either p divides a and p = gcd(a, p)
or a and p are relatively prime.

Proof. Let a be an integer, and let p be a prime integer. Set d = gcd(a, p). Then d is a
positive integer divisor of p, so either d = p or d = 1. If d = p then it follows that p divides
a (since d divides a). If d = 1, then a and p are relatively prime.

Exercise 5.3.12. Let n be a positive integer such that 7 divides 3n and 25 ≤ 3n ≤ 60.
Determine the value of 3n.

Theorem 5.3.13.

Let a and b be integers. If p is a prime integer such that p divides ab, then either p divides
a, or p divides b.

Proof. We will prove the equivalent formulation:


If p is a prime integer such that p divides ab and p does not divide a, then p divides b.
Thus, assume that p divides ab and p does not divide a. By Theorem 5.3.11, a and p are
relatively prime. By Theorem 5.3.8, p divides b.

Exercise 5.3.14. Let p and q be distinct prime integers such that 15p = 35q. Find values
for p and q and prove that those are the only values possible.

119
Problems
Problem 5.3.1. Let a and b be integers, not both zero, and let d be a positive integer that
divides both a and b. Then there exists integers a1 and b1 such that a = a1 d and b = b1 d.
Prove that d = gcd(a, b) if and only if 1 = gcd(a1 , b1 ).
Note: This is an equivalence, so requires two proofs.
Hint: In one direction, Exercise 4.2.5 should be quite helpful.

Problem 5.3.2. Let a, b, and n be integers such that 1 = gcd(a, n) and 1 = gcd(b, n).
Prove that 1 = gcd(ab, n).
Hint: Theorem 5.3.6 should prove quite useful.

Problem 5.3.3. Let p be a prime integer. Prove by induction that for every integer n ≥ 2,
if a1 , a2 , . . . , an are integers such that p divides the product a1 a2 · · · an then there exists an
integer i such that 1 ≤ i ≤ n and p divides ai .
Hint: For the base case cf. Theorem 5.3.13.
After you have stated the induction hypothesis, suppose p divides a1 a2 · · · an an+1 and set
b = a1 a2 · · · an . Then p divides ban+1 .

120
Chapter 6

Equivalence Relations and


Equivalence Classes

6.1 Equivalence Relations


6.1.1 Relations
Most people have an intuitive grasp of the idea of a “relation” on a set. Examples of
relations on the set of real numbers include “=”, “<”, and “≤”. Examples of relations on
P (R), the power set, or set of subsets, of R, include “=” and “⊆”. The following formal
definition is a bit less intuitive.

Definition 6.1.1 (Relation).

A relation on a set S is subset of S × S.

Remark 6.1.2. At first glance, the examples of relations given above don’t seem to fit this
formal definition of a relation. To make the connection, consider the relation “<” on R.
We can think of “<” as the subset of the plane (x, y) ∈ R × R above the line x = y. For
instance, (1, 2) ∈<. Our practice, however, is to write 1 < 2, and we will continue that
practice, even in the abstract.

If S is a set, we will use the symbol “'” to denote either an abstract relation or a specific
relation for which there is no standard notation. For a, b ∈ S we will write a ' b, not
(a, b) ∈', to indicate that a and b are related.

121
Definition 6.1.3 (Reflexive, Symmetric, Transitive).

Let ' be a relation on a set S.


We say that ' is reflexive provided for all a ∈ S,

a ' a.

We say that ' is symmetric provided for all a, b ∈ S,

if a ' b, then b ' a.

We say that ' is transitive provided for all a, b, c ∈ S,

if a ' b and b ' c, then a ' c.

Exercise 6.1.4. Let ' be a relation of a set S. Complete each of the following definitions:
(a) ' is not reflexive provided . . . .
(b) ' is not symmetric provided . . . .
(c) ' is not transitive provided . . . .

Example 6.1.5. For a, b ∈ Z consider the relation a|b. That is, a divides b. We make the
following claims.
(a) The relation “divides” is reflexive.

(b) The relation “divides” is not symmetric.

(c) The relation “divides” is transitive.


Proof. Recall the definition that for any a, b ∈ Z, we say a|b provided there exists n ∈ Z
such that b = na.
(a) Since, for any a ∈ Z, we have a = (1)a, or a|a, so “divides” is reflexive.
(b) Since 2 divides 4 but 4 does not divide 2, “divides” is not symmetric.
(c) To see that “divides” is transitive, let a, b, c be integers. Suppose that a|b and b|c.
Thus, by definition, there exist integers k and l such that b = ak and c = bl. This gives

c = bl = (ak)l = a(kl).

Therefore, since kl ∈ Z, a|c so “divides” is transitive.

122
Exercise 6.1.6. For A, B ∈ P (Z) define A ' B to mean that A ∩ B = ∅. (Recall that
P (Z) is the power set of Z, the set of all subsets of Z.)
(a) Prove or disprove that ' is reflexive.
(b) Prove or disprove that ' is symmetric.
(c) Prove or disprove that ' is transitive.

6.1.2 Equivalence Relations

Definition 6.1.7 (Equivalence Relation).

A relation ' on a set S is called an equivalence relation provided ' is reflexive, symmetric,
and transitive.

Example 6.1.8. For x, y ∈ R define x ' y to mean that x − y ∈ Z. We claim that ' is an
equivalence relation on R.
Proof. To see that ' is reflexive, let x ∈ R. Then x − x = 0. Since 0 ∈ Z, we have x ' x.
To see that ' is symmetric, let a, b ∈ R. Suppose a ' b. By definition, a − b = m, where
m ∈ Z. Then b − a = −(a − b) = −m. Since −m ∈ Z, b ' a.
To see that ' is transitive, let a, b, c ∈ R. Suppose that a ' b and b ' c. Thus, a − b ∈ Z,
and b − c ∈ Z. Suppose a − b = m and b − c = n, where m, n ∈ Z. Then
a − c = (a − b) + (b − c) = m + n. Now m + n ∈ Z; that is, a − c ∈ Z. Therefore a ' c.
It now follows from the definition that ' is an equivalence relation on the set R.

Exercise 6.1.9. For (a, b), (c, d) ∈ R2 define (a, b) ' (c, d) to mean that 2a − b = 2c − d.
Prove that ' is an equivalence relation on R2 .

6.1.3 Congruence Modulo n

Definition 6.1.10 (Congruence Modulo n).

Let n ∈ N be a positive integer. For integers a, b ∈ Z we say that a is congruent to b


modulo n, and write a ≡ b (mod n), provided a − b is divisible by n, that is, n|(a − b).

There are various ways to say a ≡ b (mod n). The following theorem follows directly from
the definitions of the terms involved. The proof is left to the reader.

123
Theorem 6.1.11.

The following statements are equivalent.

(a) a ≡ b (mod n)

(b) a − b = kn for some integer k.

(c) a = kn + b for some integer k.

Theorem 6.1.12.

For any n ∈ N, congruence modulo n is an equivalence relation on Z.

Proof. To see that congruence modulo n is reflexive, let a be an integer. Then a − a = 0


and 0 is divisible by n (since 0 = 0n). Therefore, a ≡ a (mod n) for every integer a.
To prove symmetry, let a and b be integers. Suppose that a ≡ b (mod n) – say a − b = kn,
where k is an integer. Then b − a = −(a − b) = −(kn) = (−k)n. Thus, n divides b − a and
b ≡ a (mod n).
The proof that congruence mod n is transitive is Exercise 6.1.13 below.

Exercise 6.1.13. Complete the proof of Theorem 6.1.12 by proving that congruence
modulo n is transitive.

Example 6.1.14. Suppose we wish to describe the set of all integers x such that
x ≡ 4 (mod 9) and use the description to list all integers x such that −36 ≤ x ≤ 36 and
x ≡ 4 (mod 9). By (c) of Theorem 6.1.11, for an integer x we have x ≡ 4 (mod 9) if and
only if x = 9k + 4. Thus, we simply calculate multiples of 9, then add 4, and then restrict x
so that −36 ≤ x ≤ 36. The possibilities for x are −32 (which equals (−4)9 + 4), −23, −14,
−5, 4, 13, 22, and 31.

Exercise 6.1.15. Find all integers x such that 7x ≡ 2x (mod 8).

124
Problems
Problem 6.1.1. For a, b ∈ R define a ' b to mean that ab = 0. Prove or disprove each of
the following:
(a) The relation ' is reflexive.
(b) The relation ' is symmetric.
(c) The relation ' is transitive.

Problem 6.1.2. For a, b ∈ R define a ' b to mean that ab 6= 0. Prove or disprove each of
the following:
(a) The relation ' is reflexive.
(b) The relation ' is symmetric.
(c) The relation ' is transitive.

Problem 6.1.3. For a, b ∈ R define a ' b to mean that | a − b | < 5. Prove or disprove
each of the following:
(a) The relation ' is reflexive.
(b) The relation ' is symmetric.
(c) The relation ' is transitive.

Problem 6.1.4. Define a function f : R → R by f (x) = x2 + 1. For a, b ∈ R define a ' b


to mean that f (a) = f (b).
(a) Prove that ' is an equivalence relation on R.
(b) List all elements in the set { x ∈ R | x ' 3 }.

Problem 6.1.5. For points (a, b), (c, d) ∈ R2 define (a, b) ' (c, d) to mean that
a2 + b 2 = c 2 + d 2 .
(a) Prove that ' is an equivalence relation on R2 .
(b) List all elements in the set { (x, y) ∈ R2 | (x, y) ' (0, 0) }.
(c) List five distinct elements in the set { (x, y) ∈ R2 | (x, y) ' (1, 0) }.

Problem 6.1.6. Recall that for a, b ∈ Z, a ≡ b (mod 8) means that a − b is divisible by 8.


(a) Find all integers x such that 0 ≤ x < 8 and 2x ≡ 6 (mod 8).
(b) Use the Division Algorithm to prove that for every integer m there exists an integer r
such that m ≡ r (mod 8) and 0 ≤ r < 8.
(c) Use the Division Algorithm (as in (a)) to find integers r1 and r2 such 0 ≤ r1 < 8,
0 ≤ r2 < 8, 1038 ≡ r1 (mod 8), and −1038 ≡ r2 (mod 8).

125
Problem 6.1.7. For what positive integers n > 1 is:
(a) 30 ≡ 6 (mod n) (b) 30 ≡ 7 (mod n)

Problem 6.1.8. Let m and n be positive integers such that m divides n. Prove that for all
integers a and b, if a ≡ b (mod n) then a ≡ b (mod m).

Problem 6.1.9. (a) Prove or disprove: For all positive integers n and for all integers a and
b, if a ≡ b (mod n) then a2 ≡ b2 (mod n).
(b) Prove or disprove: For all positive integers n and for all integers a and b, if
a2 ≡ b2 (mod n) then a ≡ b (mod n).

126
6.2 Equivalence Classes
6.2.1 The Definition
Example 6.2.1. For x, y ∈ R define x ' y to mean that x − y ∈ Z. We have seen in
Example 6.1.8 that ' is an equivalence relation on R.

• Suppose
√ we√wish to√ list three √ x√such that x ' 2. It is easily verified
√ real numbers
that 2 ' √ 2 + 1, 2 ' 2 + 2, and 2 ' 2 − 1. Thus, each of these numbers is
“related” to 2.

• Now suppose we √
wish to give (without proof) a useful description of all real numbers
x such that x ' 2. That is, give a statement P (x) such that

{ x ∈ R | x ' 2 } = { x ∈ R | P (x) }.

But in this case we have


√ √
{x ∈ R|x ' 2} = {x ∈ R|x − 2 ∈ Z}

= {x ∈ R|x − 2 = m for some m ∈ Z }

= { x ∈ R | x = 2 + m for some m ∈ Z }

Example 6.2.2. For x, y ∈ R define x ' y to mean that |x| = |y|. You are given that ' is
an equivalence relation in R. (Verify this if you wish.) Then

[0] = { x ∈ R | x ' 0 } = { x ∈ R | |x| = |0| } = { 0 }.


[5] = { x ∈ R | x ' 5 } = { x ∈ R | |x| = |5| } = { −5, 5 }.
[−5] = { x ∈ R | x ' −5 } = { x ∈ R | |x| = | − 5| } = { −5, 5 }.

Remark 6.2.3. Later, we will begin to treat an equivalence class as a single mathematical
object (rather than view it as a set). For example, in certain circumstances we will add and
multiply equivalence classes.
The difficulty that arises in working with equivalence classes is illustrated by Example 6.2.2
above. In that example, we have a single object, [5], that has two different labels, That is,
[5] and [−5] are both valid labels for the same object. We are already accustomed to this
with the rational numbers. For instance, 21 and 42 are valid labels for one object.

127
Exercise 6.2.4. For (a, b), (c, d) ∈ R2 define (a, b) ' (c, d) to mean that 2a − b = 2c − d.
We have seen in Exercise 6.1.9 that ' is an equivalence relation on R2 .
(a) Give a set-theoretic description of [(1, 1)]. That is, find a statement P (x, y) such that
[(1, 1)] = { (x, y) ∈ R2 | P (x, y) }.
(b) Graph [(1, 1)].
(c) Give a set-theoretic description of the equivalence class [(0, −1)]. How are the
equivalence classes [(1, 1)] and [(0, −1)] related?
(d) Give a set-theoretic description of the equivalence class [(2, 0)]. How are the
equivalence classes [(1, 1)] and [(2, 0)] related?

Remark 6.2.5. In Exercise 6.2.4 we once again encounter a single equivalence class with
distinct labels. For instance, [(1, 1)] and [(0, −1)] are different labels for the same
equivalence class. In contrast with Example 6.2.2, it is not at all obvious at a glance that
[(1, 1)] = [(0, −1)].

6.2.2 Equal Equivalence Classes


The next theorem is useful for working with equivalence classes as mathematical objects.
The theorem permits us to quickly determine whether or not two equivalence classes are
equal.

Theorem 6.2.6.

Let ' be an equivalence relation on the set S. For a, b in S the following statements are
equivalent:
(a) [a] = [b].
(b) a ' b.
(c) a ∈ [b].
(d) [a] ∩ [b] 6= ∅.

Proof. Let a, b ∈ S be given.


(a) → (b): Assume that [a] = [b]. Now ' is an equivalence relation, so is reflexive. In
particular, a ' a. Thus a ∈ [a]. Since [a] = [b], it follows that a ∈ [b]. Therefore a ' b.
(b) → (c): Assume that a ' b. Then, by the definition of [b], a ∈ [b].
(c) → (d): Assume that a ∈ [b]. Since a ' a we also have a ∈ [a]. Thus a ∈ [a] ∩ [b], so
[a] ∩ [b] 6= ∅.
(d) → (a): See Exercise 6.2.7 below.

128
Exercise 6.2.7. Complete the proof of Theorem 6.2.6 by proving that (d) → (a). (Hint:
First prove that a ' b then use that to prove that [a] = [b].)

Since the statements (a) – (d) of Theorem 6.2.6 are equivalent, either all are true or all are
false. Thus, the negations of (a) – (d) are also equivalent. That is, we have the following
corollary.

Corollary 6.2.8.

Let ' be an equivalence relation on the set S. For all a, b ∈ S, the following statements are
equivalent:
(a) [a] 6= [b].
(b) a 6' b.
(c) a 6∈ [b].
(d) [a] ∩ [b] = ∅.

Exercise 6.2.9. Let R# denote the set of all nonzero real numbers and let Q# denote the
set of all nonzero rational numbers. For a, b ∈ R# define a ' b to mean that a/b ∈ Q# .
Given that ' is an equivalence relation (prove it, if you wish), use Theorem 6.2.6 to prove
each of the following.
√ √
(a) [ 3] = [ 12].
√ √
(b) [ 3] ∩ [ 6] = ∅.
√ √
(c) [ 8] 6= [ 12].
√ √
(d) x = 3 is a solution to the equation [x 2] = [2 2].

129
6.2.3 Congruence Classes and the Set Zn
This section covers a very important and useful example of equivalence classes.

Definition 6.2.10 (Congruence Classes, Zn ).

Let n ∈ N be given. Equivalence classes for congruence mod n are also called
congruence classes. By the definition of an equivalence class, we have, for any a ∈ Z,

[a] = { x ∈ Z | x ≡ a (mod n) } = { x ∈ Z | x = a + kn for some integer k }.

When we want to emphasize the role of n ∈ N we sometimes write

[a]n = { x ∈ Z | x ≡ a (mod n) }.

We denote by Zn the set of all congruence classes of Z for the relation congruence mod n.
Thus,
Zn = { [a]n | a ∈ Z}.

Example 6.2.11.
(a) For n = 3 we have

[0] = { x ∈ Z | x ≡ 0 (mod 3) }
= { x ∈ Z | x = 0 + 3k for some integer k }
= { x ∈ Z | x = 3k for some integer k }.

Thus, [0] consists of all integer multiples of 3. Written informally,

[0] = { . . . , −6, −3, 0, 3, 6, . . . }.

Similarly,

[3] = { x ∈ Z | x ≡ 3 (mod 3) }
= { x ∈ Z | x = 3 + 3k for some integer k }
= { x ∈ Z | x = 3(k + 1) for some integer k }.

Thus, [3] also consists of all integer multiples of 3. That is

[0] = [3].
Note that 0 ≡ 3 (mod 3), and recall Theorem 6.2.6, parts (a) and (b).
In a similar fashion, we can see that [−6] = [0] = [3].

130
(b) For n = 3, we have

[1] = { x ∈ Z | x ≡ 1 (mod 3) }
= { x ∈ Z | x = 1 + 3k for some integer k }.

Thus, [1] consists of all integer multiples of 3 with one added. Written informally,

[1] = { . . . , −5, −2, 1, 4, 7, . . . }.

By similar analysis, or by applying Theorem 6.2.6, we get [1] = [4] = [−2].

Example 6.2.12. Suppose we wish to list all of the elements of Z3 . We have seen in
Example 6.2.11 that
[0] = { . . . , −6, −3, 0, 3, 6, . . . },
and
[1] = { . . . , −5, −2, 1, 4, 7, . . . }.
Similarly,
[2] = { . . . , −4, −1, 2, 5, 8, . . . }.
Intuitively, it appears that every integer is included in one of these equivalence classes, so
all equivalence classes are accounted for. For example, 7 ∈ [1] so [7] = [1] and 8 ∈ [2] so
[8] = [2]. That is, we conjecture that

Z3 = {[0], [1], [2]}.

Exercise 6.2.13. In Z3 . determine which of [0], [1] or [2] equals the congruence class
[4192].

Theorem 6.2.14.

For every positive integer n ∈ N, Zn = { [0], [1], . . . , [n − 1] }.

Remark 6.2.15. We need to be clear about what Theorem 6.2.14 says. To illustrate with
a specific example, although Theorem 6.2.14 implies that Z4 = { [0], [1], [2], [3] }, the
definition of Z4 still includes, for instance, [413]. What the theorem tells us then, is that
[413] equals one of the listed congruence classes. Indeed, [413] = [1] in Z4 .

Proof. Let a ∈ Z be an integer. By the division algorithm, there exists integers q and r
such that a = qn + r and 0 ≤ r < n. Thus, a − r = qn. That is, n divides a − r. This
means that a ≡ r (mod n). By Theorem 6.2.6 (parts (a) and (b)), [a] = [r].

131
Example 6.2.16. By Theorem 6.2.14, Z6 = { [0], [1], [2], [3], [4], [5] }. Suppose we wish to
identify which of these elements is [917]. If we divide 917 by 6, the remainder is 5;
specifically, 917 = (152)6 + 5. Therefore, 917 ≡ 5 (mod 6), so [917] = [5].

Exercise 6.2.17. Is Z2 ⊆ Z3 ⊆ Z4 ⊆ · · · ?

The following theorem is a restatement of Theorem 6.2.6 for congruence classes.

Theorem 6.2.18.

Let n ∈ N be a positive integer. For a, b ∈ Z the following statements are equivalent.


(a) In Zn , [a] = [b].
(b) a ≡ b (mod n). That is, n divides a − b.
(c) a ∈ [b].
(d) [a] ∩ [b] 6= ∅.

Exercise 6.2.19. In Z9 , use Theorem 6.2.18 to argue the following.


(a) [32] = [50].
(b) [−33] = [75].
(c) [5278] = [3082].
(d) [16] 6= [37]

132
Problems

In Problems 6.2.1 - 6.2.4, ' denotes the following equivalence relation (cf. Exercise 6.1.15):
(∗∗) For points (a, b), (c, d) ∈ R2 define (a, b) ' (c, d) to mean that a2 + b2 = c2 + d2 .

Problem 6.2.1. Let ' be the equivalence relation defined in (∗∗) above.
(a) Give a set-theoretic description of [(3, 4)]. That is, [(3, 4)] = { (x, y) ∈ R2 | ?????? }.
(b) Graph [(3, 4)].

Problem 6.2.2. Let ' be the equivalence relation defined in (∗∗) above. Use Theorem 1
of Section 5.2 to prove each of the following:

(a) [(0, 2)] = [(1, 3)].
(b) [(0, 2)] 6= [(1, 1)].
(c) (2, 0) ∈ [(0, 2)].
(d) [(1, 1)] ∩ [(2, 1)] = ∅.
(e) (1, 0) 6∈ [(1, 1)].

Comments for 6.2.3 and 6.2.4: If [(a, b)] is an equivalence class (other than [(0, 0)]) for the
relation ' defined in (∗∗) above, there are infinitely many different labels for the class.
Specifically, if r2 = a2 + b2 then for any point (x, y) on the circle x2 + y 2 = r2 we have
(x, y) ' (a, b) so [(x, y)] = [(a, b)]
The objective in Problems 6.2.3 and 6.2.4 is to exhibit a “standard” set of labels for the
equivalence classes so that we can immediately distinguish one equivalence class from
another by its label. We will choose labels of the form [(c, 0)], where c ≥ 0.
Problem 6.2.3 shows that every equivalence class has such a label and Problem 6.2.4 shows
that different labels represent different equivalence classes.

Problem 6.2.3. Let ' be the equivalence relation defined in (∗∗) above. Prove that for all
(a, b) ∈ R2 there exists c ∈ R such that c ≥ 0 and [(a, b)] = [(c, 0)].

133
Problem 6.2.4. Let ' be the equivalence relation defined in (∗∗) above. Prove that for all
nonnegative real numbers c and d, [(c, 0)] = [(d, 0)] if and only if c = d.

Problem 6.2.5. In each of the following, prove that there exists (that is, exhibit) an
integer x such that 0 ≤ x < 9 and the given equation is satisfied in Z9 .
(a) [3156] = [x] (b) [−3156] = [x]
(c) [7 + x] = [3] (d) [7x] = [1].

Problem 6.2.6. For a positive integer n set

Z(n) = { [a] ∈ Zn | 1 = gcd(a, n) }.

Thus, for example, Z(10) = { [1], [3], [7], [9] }.


(a) Prove that the set Z(n) is well-defined. That is, prove that for all integers a1 and a2 , if
[a1 ] = [a2 ] in Zn and if [a1 ] ∈ Z(n) then [a2 ] ∈ Z(n) .
(b) Prove that for all integers a and b, if [a], [b] ∈ Z(n) , then [ab] ∈ Z(n) .

134
Chapter 7

Functions

7.1 Mappings
7.1.1 Basic Definitions
We begin with the basic definition of a concept that you have been familiar with for some
time: a function or mapping. (We will use the words interchangeably.) Since we will
consider some functions that are a bit stranger than those encountered in calculus, we will
have to be more precise with our language. We begin with the definition of a more
primitive object: a rule.

Definition 7.1.1 (Rule).

Let A and B be sets. A rule α ⊆ A × B is a set of “admissible” or (more colloquially)


“legal” pairs (a, b) in the product space A × B.
Often a rule is defined by a formula or algorithm α : A → B, which, for a ∈ A, describes
α(a) ∈ B such that (a, α(a)) ∈ α. (Note that we have used the same notation for the rule
and the formula. This is an abuse of notation, but seldom causes confusion.)

Example 7.1.2. We define a rule α ⊂ R × R to be the collection of points (x, y) satisfying


the equation
x2 + y 2 = 1.
Of course, this is simply the graph1 of the unit circle.
We can define a related rule β ⊂ [−1, 1] × R to be the collection of points (x, y) satisfying

y = β(x) = 1 − x2 , x ∈ [−1, 1].
This rule is the graph of the upper half circle.
1
The term “graph” is sometimes used instead of “rule.” This is quite intuitive in R × R, but we prefer
the term “rule” when dealing with more abstract sets.

135
Example 7.1.3. A relation on a set S is a particular type of rule with A = B = S.

Definition 7.1.4 (Function).

A function or mapping from a set A to a set B is a rule α ⊂ A × B that assigns to each


element of A, a uniquely determined α(a) ∈ B. That is, we say that a rule α ⊂ A × B
is a function if the set of legal points defined by α consists entirely of ordered pairs of the
form (a, α(a)), with exactly one ordered pair for each a ∈ A.
The set A is called the domain of the function and B is called the codomain of of the
function.
We will denote mappings with lower-case Latin and Greek letters. If α is a mapping of the
set A to the set B we write α : A → B. For element a ∈ A, α(a) is the image (or value) of
a under the mapping α.

Remark 7.1.5. As we indicated above, if one is being precise, the symbols α and α(a) are
not interchangeable. α ⊂ A × B refers to the rule, whereas α(a) ∈ B is the value of the
mapping at a point a ∈ A. However, we often speak of “the function” f (x) = x3 − 2x.
Technically, that is the value of the function at a generic point x in its domain. It usually
doesn’t hurt to be a bit sloppy about this distinction, but one should be aware that the
distinction exists.

Remark 7.1.6. There are two pieces to the definition of a mapping: (1) existence of a
value of the mapping at each point of the domain and (2) uniqueness of that value.

• In Example 7.1.2, the rule α (the unit circle in R × R) fails both tests and hence is
not a function. There are no points (x, y) ∈ R × R for |x| > 1 and for each |x| < 1
there are two values of y ∈ R such that x2 + y 2 = 1.

On the other hand, in defining the rule β we have fixed both problems. We have
restricted the domain so that the mapping

y = β(x) = 1 − x2

is defined for each x ∈ [−1, 1], and we have chosen the positive square root to give us
a unique value of y for each x. Thus, β : [−1, 1] → R is a function.

• The formula f : R → R defined by

f (x) = x3 − 3x2 + 6x − 9

defines a function: for any x ∈ R we can compute a unique f (x) ∈ R using simple
algebra.

136
• The existence portion can usually be satisfied with an appropriate choice of the
domain.

– The formula g : A → R given by


1
g(x) =
x2
is not defined on all of A if we choose the domain A = R because the function
has no specified value at x = 0. We can create a well-defined function by
changing the domain to A = (−∞, 0) ∪ (0, ∞) = R − {0}.
– The formula α : R → R given by α(x) = ln(x2 − 1) does not generate a mapping
since, for example, α(0) is not defined. If we use the same formula for α but
change the domain to the interval (1, ∞) then α satisfies the definition of a
mapping.
– The formula β : R2 → R given by β(x, y) = x/y does not define a mapping since
β is not defined at any point of the form (x, 0).
– Let A = { 1, 2 } and B = { a, b }. The correspondence γ : A → B defined by
γ(1) = a generates a rule

γ = {(1, a)} ∈ A × B.

However, the rule is not a mapping until we also define γ(2).

Example 7.1.7. Let A = {a, b } and B = {1, 2, 3 }. If we define α1 : A → B by α1 (a) = 1


and α1 (b) = 2 then α1 : A → B is a mapping.

Exercise 7.1.8. Let A = {a, b } and B = {1, 2, 3 }.

(a) How many mapping are there from A to B?

(b) List all the mappings from A to B. (Call them α1 , α2 , etc.)

(c) How many mappings are there from B to A?

(d) Let A and B be finite sets with |A| = m and |B| = n. How many mappings are there
from A to B?

7.1.2 Well-Defined Rules


In rules defined on sets where the points in the domain have multiple representatives, there
are more subtle aspects to the uniqueness part of the definition of a function. We
emphasize this with the following definition.

137
Definition 7.1.9 (Well-Defined Rule).

A rule α ⊆ A × B is well-defined provided for all (a1 , b1 ), (a2 , b2 ) ∈ α, if a1 = a2 , then


b1 = b2 .
For a rule defined by a formula α : A → B, the rule is well defined provided for all (a1 , α(a1 )),
(a2 , α(a2 )) ∈ α, if a1 = a2 , then α(a1 ) = α(a2 ).

Remark 7.1.10. A few remarks are in order.

• To say a rule is well-defined is equivalent to saying that equals can be substituted


for equals.

• By definition, a mapping or function must be a well-defined rule.

• With most of the functions in calculus defined on the real line (polynomials, trig
functions, exponentials, etc.) the issue of whether the function is a well-defined rule
never comes up. We will see below that the issue becomes important when the rule
depends on how the point in the domain is represented.

The following theorem is an immediate consequence of the definition above.

Theorem 7.1.11.

A rule α : A → B is not well-defined, provided there exists a1 , a2 ∈ A such that a1 = a2


but α(a1 ) 6= α(a2 ).

Example 7.1.12. One familiar set of objects with multiple representatives is the rational
a
numbers, Q. Define a rule α : Q → Z as follows: For any x ∈ Q, write x = , where a and
b
b are integers with b 6= 0. Let a
α(x) = α = a + b.
b
Note that α is not well-defined since
   
1 2 1 2
= , but α = 1 + 2 = 3, whereas α = 2 + 4 = 6.
2 4 2 4

Exercise 7.1.13. In each of (a) and (b), demonstrate that the given rule is not
well-defined.

138
a c 
(a) Define α : Q2 → Q as follows: For (x, y) ∈ Q2 write (x, y) = , where a and c are
b d
integers and b and d are positive integers. Then
a c  a + c
α(x, y) = α , = .
b d b+d
(b) Define β : Z4 → Z12 by
β([a]4 ) = [a]12
(where the [a]4 on the left is the congruence class of a ∈ Z mod 4 and the [a]12 on the right
is the congruence class of a ∈ Z mod 12).

Remark 7.1.14. We will need to check whether a rule is well-defined when the following
two conditions hold:
(i) Elements of the domain have multiple representations, and
(ii) the rule is defined in terms of a particular representation.
To prove that a rule α : A → B is well-defined, we must prove, in symbolic form:
 
(∀a1 , a2 ∈ A) a1 = a2 → α(a1 ) = α(a2 )

Example 7.1.15. Define α : Q → Q by


 a  a + 3b
α = ,
b 2b
where a and b are integers and b 6= 0. We claim that α is a well-defined rule. (Since α(x)
exists for all x ∈ Q (by the constructive formula) this shows that α is a function.)
Proof. Let
a c a c
, ∈ Q with = .
b d b d
Then ad = bc so it follows that 2ad + 6bd = 2bc + 6bd. Factoring both sides gives
(a + 3b)(2d) = (2b)(c + 3d).
It now follows that
a + 3b c + 3d
= .
2b 2d
That is, a c
α =α .
b d
Therefore, α is well-defined.

Exercise 7.1.16. Define β : Z12 → Z3 × Z4 by


β([a]12 ) = ([a]3 , [a]4 ) ,
where [a]n denotes the congruence class of a in Zn . Prove that β is a well-defined rule.

139
7.1.3 One-to-One Mappings

Definition 7.1.17 (One-to-One Mapping).

Let A and B be sets. A mapping α : A → B is one-to-one, provided for all a1 , a2 ∈ A, if


a1 6= a2 , then α(a1 ) 6= α(a2 ).

Exercise 7.1.18. Complete the following definition, with the notation as in the definition
above.
A mapping α : A → B is not one-to-one provided . . . .

Exercise 7.1.19. In each of (a) – (d) prove that the given mapping is not one-to-one.
(a) α : R → R defined by α(x) = x2 − x − 6 for all x ∈ R.
(b) β : R → R defined by β(x) = cos(2x) for all x ∈ R.
(c) γ : R2 → R defined by γ(x, y) = x + y for all (x, y) ∈ R2 .
(d) Let M2 denote the set of all 2 × 2 matrices with real number entries. Define
λ : M2 → R by λ(A) = det(A) for all A ∈ M2 .

Remark 7.1.20. To prove that a mapping α : A → B is one-to-one using the definition,


we must prove
(∀a1 , a2 ∈ A) a1 6= a2 → α(a1 ) 6= α(a2 ).
Since we are usually more comfortable and competent working with equality, we will
typically prove that α is one-to-one by proving the contrapositive of this. This is common
enough to state as a theorem.

Theorem 7.1.21.

A mapping α : A → B is one-to-one if and only if for every a1 , a2 ∈ A, if α(a1 ) = α(a2 ),


then a1 = a2 .

Example 7.1.22. Let f : R → R be defined by f (x) = 3x + 2. We claim that f is


one-to-one.

140
Proof. Let x1 , x2 be real numbers. Suppose that f (x1 ) = f (x2 ). Thus, 3x1 + 2 = 3x2 + 2.
Subtracting 2 from both sides gives 3x1 = 3x2 . Dividing by 3 now gives x1 = x2 , so f is
one-to-one.

Exercise 7.1.23. Define α : R → R by α(x) = 3e2x + 5 for all x ∈ R. Prove that α is


one-to-one.

7.1.4 Onto Mappings

Definition 7.1.24 (Onto Mapping).


Let A and B be sets. A mapping α : A → B maps A onto B provided for every b ∈ B there
exists a ∈ A such that α(a) = b.

Exercise 7.1.25. Complete the following definition, with the notation as in the definition
above.
A mapping α : A → B does not map A onto B provided . . . .

Exercise 7.1.26. In each of (a) – (c), verify that the given mapping is not onto.
(a) α : R → R defined by α(x) = x2 − x − 6 for all x ∈ R.
(b) β : R → R defined by
2x2 + 1
β(x) =
x2 + 5
for all x ∈ R.
(c) γ : R2 → R2 defined by γ(x, y) = (x + y, x + y) for all (x, y) ∈ R2 .

Definition 7.1.27 (Range).

For a function α : A → B the range of α is the set

R(α) = {b ∈ B | there exists a ∈ A such that α(a) = b} ⊆ B.

Exercise 7.1.28. Prove that a function α : A → B maps A onto B if and only if


R(α) = B.

141
Example 7.1.29. Define α : R2 → R by
2x + 1
α(x, y) =
y2 + 3

for all (x, y) ∈ R2 . We claim that α maps R2 onto R.


3z−1
Proof. Let z ∈ R be given. Set x = 2
and y = 0. Then

2 3z−1
 
3z − 1 2
+1 3z
α(x, y) = α ,0 = 2
= = z.
2 0 +3 3

Therefore, α maps R2 onto R.

Exercise 7.1.30. Let M2 denote the set of all 2 × 2 matrices with real number entries.
Define α : M2 → M2 by    
a b a a−b
α = .
c d 2c 3c + d
Prove that α maps M2 onto M2 .

142
Problems
Problem 7.1.1. Let A = { a, b, c } and B = { 1, 2 }.
(a) How many one-to-one mappings are there from A to A? List them.
(b) How many mappings are there from A onto A?
(c) How many one-to-one mappings are there from A to B?
(d) How many mappings are there from A onto B? (Hint: It may be easier to count the
mappings that are not onto.)
(e) How many one-to-one mappings are there from B to A?
(f) How many mappings are there from B onto A?

Problem 7.1.2. Explain why each of the following is not a function.


(a) α : R → R defined by
x
α(x) =
x2 −4
for every x ∈ R.
(b) β : R → R defined by β(x) = x ln |x| for every x ∈ R.
(c) γ : Q → Q defined as follows: For a rational number r, write r = a/b, where a and b are
integers and b 6= 0. Set
a a+b
γ(r) = γ( ) = 2 .
b a + b2

(d) λ : Z8 × Z8 → Z6 defined by λ([a], [b]) = [ab] for all ([a], [b]) ∈ Z8 × Z8 .


(Note: On the left, [a] and [b] are congruence classes mod 8, whereas on the right, [ab] is a
congruence class mod 6.)

Problem 7.1.3. Let m and n be positive integers such that m divides n. Prove that
α : Zn → Zm defined by α([a]n ) = [a]m is well-defined.

Problem 7.1.4. Define α : R → R by α(x) = 3x + 5 for all x ∈ R.


(a) Prove that α is one-to-one.
(b) Prove that α maps R onto R.

Problem 7.1.5. Define β : R → R by β(x) = 3x2 + 5 for every x ∈ R. Prove that β is


neither one-to-one nor onto.

143
Problem 7.1.6. Let A = R − { 3 } and B = R − { 2 } and define γ : A → B by
2x + 1
γ(x) = .
x−3
(a) Verify that γ maps A to B. That is, show that for all a ∈ A, γ(a) 6= 2. (Hint: Use
contradiction.)
(b) Prove that γ is one-to-one.
(c) Prove that γ maps A onto B.

Problem 7.1.7. Let M2 denote the set of all 2 × 2 matrices with real number entries.
Define λ : M2 → R by λ(A) = det(A). Prove that λ maps M2 onto R.

Problem 7.1.8. Let m and n be relatively prime positive integers. Define


α : Zmn → Zm × Zn by α([a]mn ) = ([a]m , [a]n ).
(a) Prove that α is well-defined.
(b) Prove that if k is an integer divisible by both m and n then k is divisible by mn.
(c) Prove that α is one-to-one. (Part (a) will be helpful.)
(d) Use (c) to conclude that α is onto.

144
7.2 Binary Operations
In this section we will consider binary operations defined on a set. Addition and
multiplication of integers are examples of binary operations. We will use the symbol “∗” to
denote a binary operation.

7.2.1 Basic Definitions

Definition 7.2.1 (Binary Operation).

A binary operation ∗ on a set S is a mapping ∗ : S × S → S.

Remark 7.2.2. For a, b, c ∈ S we write a ∗ b = c rather than using the functional notation
∗(a, b) = c. Thus, for instance, we can think of addition as a mapping + : Z × Z → Z, but
we write 2 + 3 = 5, not +(2, 3) = 5.

Remark 7.2.3. Let S be a set, and suppose the rule ∗ ⊂ (S × S) × S is a candidate for a
binary operation on S. Since ∗ must be a mapping from S × S to S it follows that:
• ∗ must be defined on S × S. That is, for all a, b ∈ S, a ∗ b must exist.
• ∗ must be well-defined; that is for a1 , a2 , b1 , b2 ∈ S, if a1 = a2 and b1 = b2 then
a1 ∗ b 1 = a2 ∗ b 2 .
• The set S must be closed with respect to “∗”. That is, for all a, b ∈ S, we must have
a ∗ b ∈ S.

Example 7.2.4. In each of the following “∗” is not a binary operation.


(a) For x, y ∈ R, consider the rule x ∗ y = x/y. This is not a binary operation since “∗” is
not defined if y = 0.
(b) For nonzero integers m and n, consider the rule m ∗ n = m/n. This is not a binary
operation since the set of nonzero integers is not closed under division. For instance,
2 ∗ 3 = 2/3 and 2/3 6∈ Z
a c
(c) For , ∈ Q, where a, b, c, d ∈ Z and b 6= 0 and d 6= 0, set
b d
a c a+c
∗ = .
b d bd
1 2
This is not a binary operation since “∗” is not a well-defined rule. For example, =
2 4
1 1 1+1 2 1 2 1 2+1 3 1
but ∗ = = = whereas, ∗ = = = .
2 3 (2)(3) 6 3 4 3 (4)(3) 12 4

145
Exercise 7.2.5. Determine whether each of the following is a binary operation.
x−y
(a) For x, y ∈ R define x ∗ y = .
x2 + y
(b) For m, n ∈ Z define m ∗ n = (m + n)/2.

(c) For m, n ∈ Z define m ∗ n = 1.


a c a c 2ad + 3bc
(d) For , ∈ Q, where a, b, c, d ∈ Z and b 6= 0 and d 6= 0, set ∗ = .
b d b d bd

7.2.2 Binary Operations on Equivalence Classes


Let S denote a set on which there is defined a binary operation ∗. Suppose ' is an
equivalence relation on S and let E denote the set of all equivalence classes of S
corresponding to '. That is, E = { [a] | a ∈ S }.

We sometimes wish to “extend” the operation ∗ on S to a binary rule ~ on the set E,


defined by
[a] ~ [b] = [a ∗ b].
We note that the rule ~ is defined on E since ∗ is already defined on S. Also, S is closed
with respect to ∗, so it follows that E is closed with respect to ~. A single equivalence
class, however, may have many labels. So to see if our binary rule is a binary operation, it
is essential that we verify that a change of labels does not change the answer. That is, we
need to verify that the binary rule ~ on E is well-defined. The following example
illustrates a case when ~ is not well-defined.

Example 7.2.6. For x, y ∈ R define x ' y to mean that |x| = |y|. It was mentioned in
Example 6.2.2 that ' is an equivalence relation on R. Note that if x ∈ R with x 6= 0 then
[x] = { x, −x }, and [0] = { 0 }.
Let E be the set of all equivalence classes of R for the relation '. Extend addition and
multiplication on R to operations ⊕ and on the set E defined by

[a] ⊕ [b] = [a + b] and [a] [b] = [ab].

(a) To see that ⊕ is not well-defined note that in E we have [2] = [−2] since 2 ' −2. But
[2] ⊕ [1] = [2 + 1] = [3], whereas [−2] ⊕ [1] = [−2 + 1] = [−1]. Now 3 6' −1 since
|3| =
6 | − 1|, so [3] 6= [−1]. Therefore, [2] ⊕ [1] 6= [−2] ⊕ [1]. Since we cannot substitute
equals for equals, the operation ⊕ is not well-defined.
(b) To see that is well-defined let [a1 ], [a2 ], [b1 ], and [b2 ] be elements in E such that
[a1 ] = [a2 ] and [b1 ] = [b2 ]. Then a1 ' a2 and b1 ' b2 . That is, |a1 | = |a2 | and |b1 | = |b2 |. It
follows that |a1 b1 | = |a1 | |b1 | = |a2 | |b2 | = |a2 b2 |. Consequently, a1 b1 ' a2 b2 , so
[a1 b1 ] = [a2 b2 ]. Thus, we can conclude that [a1 ] [b1 ] = [a1 b1 ] = [a2 b2 ] = [a2 ] [b2 ] and is
well-defined.

146
Exercise 7.2.7. For x, y ∈ R define x ' y to mean that x − y ∈ Z. We observed in
Example 6.1.8 that “'” is an equivalence relation on R. Let E be the corresponding set of
equivalence classes.
For [a] and [b] in E define [a] [b] = [ab] and define [a] ⊕ [b] = [a + b].
(a) Prove that in E, [0] = [1].
(b) Use the equality in (a) to verify that is not well-defined.
(c) Prove that ⊕ is well-defined.

We now wish to extend the binary operations of addition and multiplication on Z to binary
operations on the congruence classes in Zn . We begin with the proof that these extensions
are well defined rules.

Theorem 7.2.8.

Let n ∈ N be given. We define the following binary rules on Zn .

(a) For [a], [b] in Zn ,


[a] ⊕ [b] = [a + b].

(b) For [a], [b] in Zn ,


[a] [b] = [ab].

Then, the rules ⊕ and on Zn are well-defined. That is, if [a1 ], [a2 ], [b1 ], [b2 ] are elements
of Zn such that [a1 ] = [a2 ] and [b1 ] = [b2 ] then

(a) [a1 ] ⊕ [b1 ] = [a2 ] ⊕ [b2 ], and

(b) [a1 ] [b1 ] = [a2 ] [b2 ].

Proof. We prove only (a). The proof of (b) is an exercise. Let [a1 ], [a2 ], [b1 ], [b2 ] be
elements of Zn such that [a1 ] = [a2 ] and [b1 ] = [b2 ]. Then a1 ≡ a2 (mod n) and
b1 ≡ b2 (mod n). Thus, n divides both a1 − a2 and b1 − b2 , so there exist integers k and l
such that a1 − a2 = kn and b1 − b2 = ln. Consequently,
(a1 + b1 ) − (a2 + b2 ) = (a1 − a2 ) + (b1 − b2 ) = kn + ln = (k + l)n
so n divides (a1 + b1 ) − (a2 + b2 ). Therefore,
a1 + b1 ≡ a2 + b2 (mod n).
It now follows that
[a1 ] ⊕ [b1 ] = [a1 + b1 ] = [a2 + b2 ] = [a2 ] ⊕ [b2 ].
This proves that ⊕ is well-defined.

147
Since the extended binary rules are well defined, they are binary operations, and we are
entitled to make the following definition.

Definition 7.2.9 (Modular Arithmetic).

Let n ∈ N be a natural number. Extend addition and multiplication on Z to binary opera-


tions ⊕ and on Zn defined as follows:

(a) For [a], [b] in Zn ,


[a] ⊕ [b] = [a + b].

(b) For [a], [b] in Zn ,


[a] [b] = [ab].

Example 7.2.10. To illustrate the definitions above, note that in Z6 we have

[3] ⊕ [4] = [3 + 4] = [7] = [1]

and
[3] [4] = [(3)(4)] = [12] = [0].

Exercise 7.2.11. In Z6 , verify that [3] = [9] and [4] = [16], then verify that
[3] ⊕ [4] = [9] ⊕ [16] and [3] [4] = [9] [16].

Definition 7.2.12 (Modular Multiplicative Inverse).

For [a] and [b] in Zn we say that [b] is the inverse of [a] and write [b] = [a]−1 provided
[a] [b] = [1].

Example 7.2.13.

(a) To determine which elements of Z9 have inverses. We note that [1]−1 = [1], [2]−1 = [5]
and [5]−1 = [2], [4]−1 = [7] and [7]−1 = [4]. The elements [0], [3], and [6] have no inverse.

(b) Suppose that in Z9 we wish to solve the equation

[4] [x] ⊕ [3] = [8].

We first add [−3] to both sides to get [4] [x] = [5]. Now multiply both sides by
[4]−1 = [7] to obtain [x] = [7] [5] = [35] = [8].

148
7.2.3 Properties of Binary Operations

Definition 7.2.14 (Associative, Commutative, Identity, Inverse).

Let “∗” be a binary operation on a set S.

(a) The operation ∗ is associative provided for all a, b, c ∈ S, a ∗ (b ∗ c) = (a ∗ b) ∗ c.

(b) The operation ∗ is commutative provided for all a, b ∈ S, a ∗ b = b ∗ a.

(c) An element e ∈ S is an identity for the operation * provided for all a ∈ S, a ∗ e = a


and e ∗ a = a.

(d) Suppose S contains an identity e for the operation ∗. An element b ∈ S is an inverse


for an element a ∈ S provided a ∗ b = e and b ∗ a = e.

Exercise 7.2.15. Let “∗” be a binary operation on a set S. Complete each of the
following:
(a) The operation ∗ is not associative provided . . ..
(b) The operation ∗ is not commutative provided . . ..
(c) An element f ∈ S is not an identity for ∗ provided . . ..
(d) The set S contains no identity for ∗ provided . . ..
(e) If S has identity e then an element b ∈ S is not an inverse for the element a ∈ S
provided . . ..
(f) If S has identity e then an element a ∈ S has no inverse in S provided . . ..

Remark 7.2.16. To say that an operation is binary means that we perform the operation
on two elements. The associativity of an operation ∗ permits one to easily perform the
operation on three or more elements. For example, the instructions to add or multiply the
numbers 2, 4, 7 and 10 make sense since both addition and multiplication of real numbers
is associative. On the other hand, the instructions to subtract or divide the list of numbers
makes no sense since neither subtraction on R nor division on R# is associative. For
instance (3 − 2) − 1 = 0 whereas 3 − (2 − 1) = 2. Similarly, (16 ÷ 4) ÷ 2 = 2 but
16 ÷ (4 ÷ 2) = 8.

149
Remark 7.2.17. Addition and multiplication of real numbers are commutative operations.
Likewise, the addition of matrices is a commutative operation. Matrix multiplication is an
example of a noncommutative operation.

Sometimes we wish to restrict an operation to a subset of S.

Theorem 7.2.18.

Let ∗ be a binary operation on a set S and let T ⊆ S be a nonempty subset of S. Then ∗


restricted to T is also a binary operation on T if and only if T is closed with respect to ∗.

Proof. Note that ∗ is automatically defined and well-defined on T since it is already


defined and well-defined on the larger set S. On the other hand, for t1 , t2 ∈ T we only
know that t1 ∗ t2 ∈ S. Thus, T need not be closed with respect to ∗. When it is, ∗
restricted to T is a binary operation on T .

Example 7.2.19. Consider the following subsets of Z. We’d like to determine whether
addition and/or multiplication binary operations on these sets.
(a) E, the set of all even integers. Both addition and multiplication are binary
operations on E. To give a proof, let m, n ∈ E. Then there exists integers k and l such that
m = 2k and n = 2l. Therefore, m + n = 2k + 2l = 2(k + l) and mn = (2k)(2l) = 2(2kl). In
particular, both m + n and mn are even.
(b) O, the set of all odd integers. Addition is not a binary operation on O since, for
instance, 1, 3 ∈ O, but 1 + 3 = 4 and 4 6∈ O. In a proof similar to that given in (a) it can
be shown that O is closed with respect to multiplication, so multiplication is a binary
operation on O.
(c) T = { −1, 0, 1 }. T is not closed under addition since, for instance, 1 + 1 = 2 and
2 6∈ T .
Constructing a Cayley table for multiplication on T gives:
· −1 0 1
−1 1 0 −1
0 0 0 0
1 −1 0 1
We conclude that T is closed with respect to multiplication, so multiplication is a binary
operation on T .

150
Exercise 7.2.20. Let ∗ be an operation on a set S, let T be a subset of S, and suppose
that ∗ restricted to T is a binary operation on T . Prove or disprove each of the following.
(a) If ∗ is associative in S then ∗ is also associative in T .
(b) If ∗ is commutative in S then ∗ is also commutative in T .
(c) If S contains an identity for ∗ then T contains an identity for ∗.

151
Problems
Problem 7.2.1. . For x, y ∈ R define x ' y to mean that x2 − 2x = y 2 − 2y. You may
assume that ' is an equivalence relation on R.
Let E be the set of all equivalence classes of R for the relation '. That is,

E = { [x] | x ∈ R }.

Extend addition on R to a binary operation “⊕” on E defined by [x] ⊕ [y] = [x + y]. For
example [3] ⊕ [4] = [3 + 4] = [7].
(a) Display one other label for each of the equivalence classes [3] and [4].
(b) Use the equivalence classes [3] and [4] to demonstrate that “⊕” is not a well-defined
operation.

Problem 7.2.2. In Z8 solve each of the following for [x]. In each case choose x so that
0 ≤ x ≤ 7.
(a) [6] ⊕ [x] = [3].
(b) [5] [x] = [4].
(c) [5] [x] = [1].
(d) [5] [x] ⊕ [7] = [5].

Problem 7.2.3. Let n be a positive integer, n ≥ 2. For the operation ⊕ in Zn prove:


(a) The operation is associative and commutative.
(b) Zn contains an identity.
(c) Every element [a] in Zn has an inverse in Zn .

Problem 7.2.4. Let n be a positive integer, n ≥ 2. For the operation in Zn prove:


(a) The operation is associative and commutative.
(b) Zn contains an identity.

Problem 7.2.5. Disprove each of the following:


(a) For every positive integer n ≥ 2 and for all integers a and b, if [a] [b] = [0] in Zn then
either [a] = [0] or [b] = [0].
(b) For every positive integer n ≥ 2 and for all integers a, b and c, if [a] 6= [0] and
[a] [b] = [a] [c] in Zn then [b] = [c].

152
Problem 7.2.6. Let n be a positive integer. This exercise is concerned with the existence
of inverses for the operation in Zn .
(a) Prove that for all [a] ∈ Zn , [a] has an inverse in Zn if and only if gcd(a, n) = 1.
Hint: First note that the statement is an equivalence so two proofs are required.
In each direction, Theorem 2 of Section 4.3 will be useful.
In one direction, suppose 1 = gcd(a, n). Then there exist integers s and t such that
1 = as + nt. Argue that [s] = [a]−1 .
(b) Use the algorithms of Section 4.2 to show that 1 = gcd(809, 5124) and find integers s
and t such that 1 = 809s + 5124t. Now find an integer b such that 0 ≤ b < 5124 and
[b] = [809]−1 in Z5124 .
(c) Use [809]−1 found in (b) to solve the equation [809] [x] = [214] in Z5124 . Reduce your
final answer so that 0 ≤ x < 5124.

Problem 7.2.7. Let n be a positive integer. Prove that is a well-defined operation in


Zn . That is, prove that if [a1 ], [a2 ], [b1 ], [b2 ] are elements in Zn such that [a1 ] = [a2 ] and
[b1 ] = [b2 ], then [a1 ] [b1 ] = [a2 ] [b2 ].

Problem 7.2.8. Let R# and Q# denote, respectively, the set of nonzero real numbers and
the set of nonzero rational numbers. For x, y ∈ R# define x ' y to mean that x/y ∈ Q# .
You are given that “'” is an equivalence relation on R# .
Let E be the set of all equivalence classes of R# for the relation '. That is,
E = { [x] | x ∈ R# }. Extend the operation of multiplication from R# to E by defining
[x] [y] = [xy].
Prove that the operation is well-defined.

Problem 7.2.9. In each of the following, prove or disprove that:


(i) ∗ is associative;
(ii) ∗ is commutative;
(iii) the given set contains an identity for ∗; and
(iv) if the set contains an identity for ∗, then each element in the set has an inverse in
the set.
(a) For x, y ∈ R, x ∗ y = y.
(b) For m, n ∈ N (where N is the set of natural numbers), m ∗ n = 3mn .
(c) For x, y ∈ R − {2}, x ∗ y = xy − 2x − 2y + 6.

153
Problem 7.2.10. Let M2 (R) denote the set of all 2 × 2 real matrices. Then matrix
multiplication is a binary
 operation
 on M2 (R). Let
a 0
T = { A ∈ M2 (R) | A = for some a ∈ R }.
0 0
(a) Verify that matrix multiplication is a binary operation on T .
(b) Show that matrix multiplication is noncommutative in M2 (R) but is commutative in T .

(c) Show that both M2 (R) and T contain identities for matrix multiplication, but the
identities are not the same.

Problem 7.2.11. Let ∗ be an associative binary operation on a set S and let e ∈ S be an


identity for ∗.
(a) Prove that e is the unique identity of S for ∗.
(b) Suppose a, b ∈ S are such that b is an inverse for a. Show that b is the unique inverse
for a.
(c) Suppose that x, y, z ∈ S are such that x ∗ y = e and y ∗ z = e. Prove that x = z; hence
x is the inverse of y.

154
7.3 Compostion and Invertible Mappings
7.3.1 Composition

Definition 7.3.1 (Composition).

Definition 1: Let A, B, and C be sets and let α : A → B and β : B → C be mappings.


The composition of α and β is the mapping β ◦ α : A → C defined by

(β ◦ α)(a) = β(α(a))

for every a ∈ A.

Exercise 7.3.2. In the definition above, se have asserted that β ◦ α : A → C is a mapping.


What needs to be shown to verify this? Is it always true?

Example 7.3.3. Let M2 (R) denote the set of all 2 × 2 matrices with real entries. Define
α : M2 (R) → R2 by  
a b
α = (ad, bc)
c d
and define β : R2 → R by
β(x, y) = x − y.
To give a formula for β ◦ α we note that
    
a b a b
(β ◦ α) =β α = β(ad, bc) = ad − bc.
c d c d

It follows that for A ∈ M2 (R), (β ◦ α)(A) = det A.

Exercise 7.3.4. Recall that R+ denotes the set of all positive real numbers. Define
α : R3 → R by α(a, b, c) = 3a − 2b + c and define β : R → R+ by β(x) = 3e2x . Give a
formula for β ◦ α and find (β ◦ α)(1, 1, 1).

Theorem 7.3.5.

Let α : A → B and β : B → C be mappings. If α and β are both one-to-one then β ◦ α is


also one-to-one.

155
Proof. Let α : A → B and β : B → C be mappings. Assume that α and β are both
one-to-one. To see that β ◦ α is one-to-one let a1 , a2 ∈ A be such that
(β ◦ α)(a1 ) = (β ◦ α)(a2 ). Thus, β(α(a1 )) = β(α(a2 )). But β is 1 − 1 so it follows that
α(a1 ) = α(a1 ). But α is also one-to-one so a1 = a2 . We conclude that β ◦ α is
one-to-one.

Theorem 7.3.6.

Let α : A → B and β : B → C be mappings. If β ◦ α is one-to-one then α is also one-to-one.

Exercise 7.3.7. Complete the following proof of Theorem 7.3.6.


Proof. Let α : A → B and β : B → C be mappings. Suppose β ◦ α is one-to-one. To see
that α is one-to-one let a1 , a2 ∈ A and assume . . . .

Theorem 7.3.8.

Let α : A → B and β : B → C be mappings. If α and β are both onto then β ◦ α is also


onto.

Proof. Let α : A → B and β : B → C be mappings. Assume that α and β are both onto.
To see that β ◦ α is onto let c ∈ C. Now β : B → C is onto by assumption, so there exists
b ∈ B such that β(b) = c. We are also assuming that α : A → B is onto, so there exists
a ∈ A such that α(a) = b. It now follows that (β ◦ α)(a) = β(α(a)) = β(b) = c. This proves
that β ◦ α is onto.

Theorem 7.3.9.

Let α : A → B and β : B → C be mappings. If β ◦ α is onto then β is also onto.

Exercise 7.3.10. Complete the following proof of Theorem 7.3.9.


Proof. Let α : A → B and β : B → C be mappings. Suppose β ◦ α is onto. To see that β is
onto let c ∈ C. . . .

156
7.3.2 Invertible Mappings

Definition 7.3.11 (Identity Mapping).

Let S be a set. The identity mapping on S is the mapping i : S → S defined by i(s) = s


for every s ∈ S.

Remark 7.3.12. When it is not clear for which set i is the identity map, we use the
notation iS to specify the identity mapping on S. For example:

• iR is the identity mapping on the reals; for every x ∈ R we have iR (x) = x.

• If M2 (R) denotes the set of all 2 × 2 real matrices then iM2 (R) is the identity mapping
on M2 (R); for every matrix A ∈ M2 (R) we have iM2 (R) (A) = A.

Remark 7.3.13. The identity mapping is both one-to-one and onto. (Prove it.)

Exercise 7.3.14. Let α : A → B be a mapping. Prove that

α ◦ iA = α, and iB ◦ α = α.

Definition 7.3.15 (Inverse Mapping).

We say that a mapping β : B → A is the inverse of the mapping α : A → B, and we write


β = α−1 , provided
α ◦ β = iB and β ◦ α = iA .
The mapping α is said to be invertible provided it has an inverse.

Remark 7.3.16. A note of caution: when we write α−1 to designate the inverse of the
mapping α we are borrowing multiplicative notation. The operation involved, however, is
composition, not multiplication. In particular, α−1 6= 1/α; indeed, the symbol 1/α is
nonsense.

Example 7.3.17. Define α : Z → E by α(n) = 2n. (E denotes the set of all even integers.)
We claim that that α is invertible.

157
Proof. Define β : E → Z by
β(m) = m/2.
(Is this a mapping? Why?) For every n ∈ Z we have
(β ◦ α)(n) = β (α(n)) = β(2n) = 2n/2 = n = iZ (n).
Therefore, β ◦ α = iZ . Similarly, for m ∈ E we have
(α ◦ β)(m) = α (β(m)) = α(m/2) = 2(m/2) = m = iE (m).
Hence α ◦ β = iE . We conclude that β = α−1 .

Exercise 7.3.18. Set Y = { y ∈ R | y > −1 }. Define γ : R → Y by γ(x) = 3ex − 1 for


every x ∈ R. Prove that γ is invertible.

Example 7.3.19. Define α : R → R by α(x) = x2 . We claim that α is not invertible.


Proof. The proof is by contradiction, and to make a point we will arrive at two
contradictions. Thus, assume that α is invertible and that β = α−1 . Thus, β is a mapping
and
β ◦ α = α ◦ β = iR .
It follows that
β(4) = β (α(2)) = (β ◦ α)(2) = iR (2) = 2.
Likewise,
β(4) = β (α(−2)) = (β ◦ α)(−2) = iR (−2) = −2.
Therefore, β(4) = 2 and β(4) = −2 so β is not well-defined, contrary to the assumption
that β is a mapping.
Commencing once again with the assumption that β = α−1 , set β(−1) = x. Then
−1 = iR (−1) = (α ◦ β)(−1) = α (β(−1)) = α(x) = x2 .
Thus, we have x ∈ R and x2 = −1. Thus β(−1) is not defined, a contradiction to the
assumption that β is a mapping.

Remark 7.3.20. Note that in the proof above, β failed to be well-defined since
α(2) = 4 = α(−2). That is, α is not one-to-one. Further, β(−1) was not defined because
there exists no real number x such that α(x) = −1; that is, α is not onto.

Theorem 7.3.21.

A mapping α : A → B is invertible if and only if α is both one-to-one and onto.

158
Proof. Suppose α is one-to-one and onto. We will define a mapping β : B → A and show
that β = α−1 . Thus, for b ∈ B define β(b) = a provided α(a) = b. Since β is onto, for every
b ∈ B there exists a ∈ A such that α(a) = b. Thus β is defined for every b ∈ B. Further,
since α is one-to-one, the choice of a is unique and β is well-defined. By definition of β,
α ◦ β = iB and β ◦ α = iA . Therefore, β = α−1 and α is invertible.
The rest of the proof is given as an exercise below.

Exercise 7.3.22. Complete the proof of Theorem 7.3.21 by proving that if α : A → B is


invertible, then α is both one-to-one and onto. (Hint: Use Theorems 7.3.6 and 7.3.9.)

159
Problems
Problem 7.3.1. Let A = { 1, 2 }, B = { x, y, z }, and C = { a, b }. Define mappings
α : A → B and β : B → C so that β ◦ α is both one-to-one and onto but β is not
one-to-one and α is not onto.

Problem 7.3.2. Let α : A → B, β : B → C, and γ : B → C be such that α is onto and


β ◦ α = γ ◦ α. Prove that β = γ. That is, prove that for every b ∈ B, β(b) = γ(b).

Problem 7.3.3. Let α : A → B, β : A → B, and γ : B → C be such that γ is one-to-one


and γ ◦ α = γ ◦ β. Prove that α = β. That is, prove that for every a ∈ A, α(a) = β(a).

Problem 7.3.4. Set Y = { y ∈ R | y ≥ 0 }, define f : R → Y by f (x) = x2 and define



g : Y → R by g(y) = y. Verify that f ◦ g = iY but that g ◦ f 6= iR .

Problem 7.3.5. In each of the following:

• If the given mapping is invertible, exhibit an inverse mapping and verify that your
mapping is the inverse.
• If the given mapping is not invertible, prove that it isn’t by demonstrating that the
mapping is either not one-to-one or is not onto.
(a) f : R → R defined by f (x) = 2x + 5.
(b) α : M2 (R) → M2 (R) defined by α(A) = BA for every A ∈ M2 (R), where
 
−1 2
B=
0 2
and where M2 (R) denotes the set of all 2 × 2 real matrices.
(c) γ : M2 (R) → M2 (R) defined by α(A) = CA for every A ∈ M2 (R), where
 
−1 2
C=
−2 4
and where M2 (R) denotes the set of all 2 × 2 real matrices.
(d) δ : Z × Z# → Q defined by δ(m, n) = m/n for all (m, n) ∈ Z × Z# . (Recall that Z#
denotes the set of all nonzero integers.)

Problem 7.3.6. Let α : A → B and β : B → C and γ : C → D be mappings. Prove that


α ◦ (β ◦ γ) = (α ◦ β) ◦ γ. (Thus, composition is associative.)

Problem 7.3.7. Let α A → B and β : B → C be invertible mappings.


(a) Prove that β ◦ α : A → C is invertible.
(b) Express (β ◦ α)−1 in terms of α−1 and β −1 .

160

También podría gustarte