Professional Documents
Culture Documents
Logic Proof Notes
Logic Proof Notes
AN INTRODUCTION TO
LOGIC
and
PROOF TECHNIQUES
Michael A. Henning
School of Mathematical Sciences
University of KwaZulu-Natal
ii
Contents
1 Logic 1
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Negation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Conjunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.5 Disjunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.10 Tautologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.11 Contradictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
iii
iv CONTENTS
2 Proof Techniques 29
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.2 Trivial Proofs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.3 Vacuous Proofs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.4 Direct Proofs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.5 Proof by Contrapositive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2.6 Proof by Cases and the Quotient-Remainder Theorem . . . . . . . . . . . . 37
2.7 Proof by Contradiction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
2.8 Existence Proofs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
2.9 Disproof by Counterexample . . . . . . . . . . . . . . . . . . . . . . . . . . 45
2.10 Proof by Mathematical Induction . . . . . . . . . . . . . . . . . . . . . . . . 46
Chapter 1
Logic
1.1 Introduction
In this chapter we introduce the student to the principles of logic that are essential for
problem solving in mathematics. The ability to reason using the principles of logic is key
to seek the truth which is our goal in mathematics.
Before we explore and study logic, let us start by spending some time motivating this
topic. Mathematicians reduce problems to the manipulation of symbols using a set of rules.
As an illustration, let us consider the following problem:
Example 1.1 Joe is 7 years older than Themba. Five years from now Joe will be twice
Themba’s age. How old are Joe and Themba?
Solution. To answer the above question, we reduce the problem using symbolic formula-
tion. We let Themba’s age be x. Then Joe’s age is x + 7. We are given that five years from
now Joe will be twice Themba’s age. In symbols, (x + 7) + 5 = 2(x + 5). Solving for x yields
x = 2. Therefore, Themba is 2 years old and Joe is 9.
Our objective is to reduce the process of mathematical reasoning, i.e., logic, to the
manipulation of symbols using a set of rules. The central concept of deductive logic
is the concept of argument form. An argument is a sequence of statements aimed at
demonstrating the truth of an assertion (a “claim”). Consider the following two arguments.
Argument 1. If x is a real number such that x < −2 or x > 2, then x2 > 4. Therefore,
if x2 ≤ 4, then x ≥ −2 and x ≤ 2.
Argument 2. If it is raining or I am sick, then I stay at home. Therefore, if I do not
stay at home, then it is not raining and I am not sick.
Although the content of the above two arguments is very different, their logical form is
the same. To illustrate the logical form of these arguments, we use letters of the alphabet
(such as p, q and r) to represent the component sentences and the expression “not p” to
refer to the sentence “It is not the case that p.” Then the common logical form of both the
1
2 CHAPTER 1. LOGIC
We start by identify and giving names to the building blocks which make up an argument.
In Arguments 1 and 2, we identified the building blocks as follows:
2
Argument 1. If x is a real number such that x
| <{z−2} or x > 2}, then x
| {z > 4}.
| {z
p q r
Therefore, if x2 ≤ 4, then x ≥ −2 and x ≤ 2.
| {z } | {z } | {z }
not r not p not q
1.2 Statements
Every statement has a truth value, namely true (denoted by T ) or false (denoted by
F ). We often use p, q and r to denote statements, or perhaps p1 , p2 , . . . , pn if there are
several statements involved. For example, we might write
p : One plus one equals two.
q : One plus one equals three.
1.3. NEGATION 3
We have seen that p and q are statements, where p has truth value T and q has truth
value F .
The possible truth values of a statement are often given in a table, called a truth table.
The truth values for two statements p and q are given in Figure 1.1. Since there are two
possible truth values for each of p and q, there are four possible combinations of truth values
for p and q. It is customary to consider the four combinations of truth values in the order
of TT, TF, FT, FF from top to bottom as shown in Figure 1.1.
p q
T T
T F
F T
F F
Exercises
1.1 Which of the following are statements? For those that are, indicate their truth value.
√
(a) 2 is an integer.
(b) Pietermaritzburg is the capital of KwaZulu-Natal.
(c) Why should we study mathematics?
(d) 3x + 1 is an odd integer.
(e) Please be quiet.
(f) Camels can fly.
We now introduce four symbols, called logical connectives, used to build more compli-
cated logical expressions out of simpler ones. We begin with the negation of a statement.
1.3 Negation
The negation of statement p has the opposite truth value from p: if p is true, then ∼ p is
false; if p is false, then ∼ p is true. The truth table for ∼ p (in terms of the possible truth
values of p) is given in Figure 1.2.
p ∼p
T F
F T
Exercises
1.3 Write the statement “It is not the case that 0 is an odd integer” in symbolic form and
determine the truth value of the statement.
1.4 Conjunction
The conjunction p ∧ q is true only if both p and q are true; otherwise, p ∧ q is false. For
example, consider the statements
p : The integer 2 is even.
q : 4 is less than 3.
The conjunction of p and q, namely,
p ∧ q : The integer 2 is even and 4 is less than 3.
is a false statement since q is false (even though p is true). The truth table for the conjunc-
tion of two statements is shown in Figure 1.3. (As before, we write the truth values for p
and q in the order of TT, TF, FT, FF from top to bottom in the table.) This truth table
describes precisely when p ∧ q is true (or false).
p q p∧q
T T T
T F F
F T F
F F F
Exercises
1.4 Write each of the following statements in symbolic form and determine their truth
value.
(a) 1 < 2 and 2/3 is a rational number.
(b) 3 is a prime number and 3 > 4.
1.5 Let p and q be the statements
p : 1 is an odd integer.
q : 1 < 2.
Write each of the following sentences in terms of p, q and logical connectives, and find
the truth values of the given statements.
(a) 1 is an odd integer and 1 < 2.
(b) 1 is not an odd integer and 1 < 2.
(c) 1 is not an odd integer and 1 ≮ 2.
6 CHAPTER 1. LOGIC
1.5 Disjunction
is a true statement since at least one of p and q is true (in this case, p is true). The truth
table for the disjunction of two statements is shown in Figure 1.3.
p q p∨q
T T T
T F T
F T T
F F F
Exercises
1.6 Write each of the following statements in symbolic form and determine their truth
value.
(a) 1 < 2 or 2/3 is a rational number.
(b) 3 is a prime number or 3 > 4.
1.7 Let p and q be the statements
p : 1 is an odd integer.
q : 1 < 2.
Write each of the following sentences in terms of p, q and logical connectives, and find
the truth values of the given statements.
(a) 1 is an odd integer or 1 < 2.
(b) 1 is not an odd integer or 1 < 2.
(c) 1 is not an odd integer or 1 ≮ 2.
1.6. THE IMPLICATION 7
Of special importance to us will be a connective called the implication (also called the
conditional).
If p, then q.
p implies q.
q if p.
p only if q.
p is sufficient for q.
q is necessary for p.
p q p→q
T T T
T F F
F T T
F F T
Notice that the only situation for which the implication p → q is false is when p is true
and q is false. The truth table for p → q is actually a definition, but let us convince ourselves
with an example that the truth values in this truth table are indeed justified.
Example 1.3 Suppose your boss makes you the following promise:
“If you meet the month-end deadline, then you will get a bonus.”
Under what circumstances are you justified in saying that your boss spoke falsely?
Solution. The answer is: You do meet the month-end deadline and you do not get a
bonus. Your boss’s promise only says you will get a bonus if a certain condition (you meet
8 CHAPTER 1. LOGIC
the month-end deadline) is met; it says nothing about what will happen if the condition is
not met. So if the condition is not met, your boss did not lie (your boss promised nothing
if you did not meet the month-end deadline); so your boss told the truth in this case. Are
you convinced? Good! If not, let us then check the truth and falseness of the implication
based on the various combinations of the truth values of the statements
The given statement can be written as p → q. Suppose first that p is true and q is true.
That is, you meet the month-end deadline and you do get a bonus. Did your boss tell the
truth? Yes, indeed. So if p and q are both true, then so too is p → q, which agrees with the
first row of the truth table of Figure 1.5.
Second, suppose that p is true and q is false. That is, you meet the month-end deadline
and you did not get a bonus. Then your boss did not do as he/she promised. What your
boss said was false, which agrees with the second row of the truth table of Figure 1.5.
Third, suppose that p is false and q is true. That is, you did not meet the month-end
deadline and you did get a bonus. Your boss (who was most generous) did not lie (your
boss promised nothing if you did not meet the month-end deadline); so he/she told the
truth. This agrees with the third row of the truth table of Figure 1.5.
Finally, suppose that p and q are both false. That is, you did not meet the month-end
deadline and you did not get a bonus. Your boss did not lie here either. Your boss only
promised you a bonus if you met the month-end deadline. So your boss told the truth. This
agrees with the fourth row of the truth table of Figure 1.5.
In summary, the implication p → q is false only when p is true and q is false. A conditional
(or implication) statement that is true by virtue of the fact that its hypothesis is false is
said to be vacuously true or true by default. Thus the statement: “If you meet the
month-end deadline, then you will get a bonus” is vacuously true if you do not meet the
month-end deadline!
Exercises
1.8 Write each of the following statements in symbolic form and determine their truth
value.
(a) If 0 is an odd integer, then South Africa will win the World Cup Soccer in 2010.
(b) If Mtunzini is the capital of KwaZulu-Natal, then 2 is an even integer.
p : 1 is an odd integer.
q : 1 < 2.
1.7. THE CONVERSE, INVERSE AND CONTRAPOSITIVE OF AN IMPLICATION 9
Write each of the following sentences in terms of p, q and logical connectives, and find
the truth values of the given statements.
(a) If 1 is not an odd integer, then 1 ≮ 2.
(b) If 1 is an odd integer, then 1 ≮ 2.
1.10 Suppose that p and q are statements so that p → q is false. Find the truth values of
each of the following:
(a) ∼p → q (b) p ∨ q (c) q → p.
Example 1.4 Write the converse, inverse and contrapositive of the statement in Exam-
ple 1.3.
Solution. Recall that the given statement can be written as p → q where p and q are the
statements
p : You meet the month-end deadline.
q : You get a bonus.
The converse of this implication is q → p, which is
q → p : If you get a bonus, then you have met the month-end deadline.
The inverse of this implication is ∼ p →∼ q, which is
∼ p →∼ q : If you do not meet the month-end deadline, then you will not get a bonus.
The contrapositive of this implication is ∼ q →∼ p, which is
∼ q →∼ p : If you do not get a bonus, then you will not have met the month-end deadline.
Example 1.5 Write the converse, inverse and contrapositive of the following statements:
“If today is Saturday, then I will go for a 10km run.”
Solution. Let p and q be the following statements:
p : Today is Saturday.
q : I will go for a 10km run.
10 CHAPTER 1. LOGIC
Then the given statement can be written as p → q. The converse of this implication is
q → p, which is
q → p : If I go for a 10km run, then today is Saturday.
The inverse of this implication is ∼ p →∼ q, which is
∼ p →∼ q : If today is not Saturday, then I will not go for a 10km run.
The contrapositive of this implication is ∼ q →∼ p, which is
∼ q →∼ p : If I do not go for a 10km run, then today is not Saturday.
Exercises
1.11 Write the converse, inverse and contrapositive of each of the following statements.
(a) If 0 is an odd integer, then South Africa will win the World Cup Soccer in 2010.
(b) If Mtunzini is the capital of KwaZulu-Natal, then 2 is an even integer.
The symbols ∼, ∧, ∨ and → are sometimes referred to as logical connectives. From given
statements, we can use these logical connectives to form more intricate statements, called
compound statements.
For example, for given statements p and q, the conjunction p∧q is a compound statement.
For a slightly more complex example, consider the compound statement given by
((∼ p)∨ ∼ (q ∧ r)) ∨ (∼ (s ∧ (q ∨ (∼ t)))).
∼ performed first,
∧, ∨ performed second,
→ performed third.
For example,
∼ p ∧ q = (∼ p) ∧ q.
As in ordinary algebra, however, the order of operation can be overridden by the use of
parentheses. Thus,
∼ (p ∨ q)
represents the negation of the disjunction of p and q. Notice that the symbols ∧ and ∨
are coequal in order of operation. Therefore an expression such as p ∧ q ∨ r is considered
ambiguous. It should be written as either
(p ∧ q) ∨ r or p ∧ (q ∨ r).
Example 1.6 Write each of the following sentences symbolically, letting p and q be the
statements:
p : It is hot.
q : It is sunny.
Example 1.6 Construct the truth table for the compound statement
(p → q) ∧ (q → p).
p q p→q q→p (p → q) ∧ (q → p)
T T T T T
T F F T F
F T T F F
F F T T T
Example 1.7 Construct the truth table for the compound statement
(∼ (p ∨ q)) → (q ∧ p).
Exercises
For statements p and q, we are often interested in both the implication p → q and its
converse q → p.
(p → q) ∧ (q → p)
p q p↔q
T T T
T F F
F T F
F F T
We remark that the phrase “if and only if” occurs often in mathematics. Many math-
ematicians abbreviate this phrase by writing “iff”. Although “iff” is informal and not a
word, its use is common and you should be familiar with it.
1.10 Tautologies
p ∼p p ∨ (∼ p)
T F T
F T T
p q ∼p q→p (∼ p) ∨ (q → p)
T T F T T
T F F T T
F T T F T
F F T T T
Exercises
1.13 Show using truth tables that the following statements are tautologies:
(a) ∼(∼p ∧ q) ∨ q.
(b) (∼p ∨ q) ∨ (p ∧ ∼q).
1.11 Contradictions
p ∼p p ∧ (∼ p)
T F F
F T F
p q p∧q ∼p q →∼ p (p ∧ q) ∧ (q → ∼ p)
T T T F F F
T F F F T F
F T F T T F
F F F T T F
Exercises
1.14 Show using truth tables that the following statements are contradictions:
(a) (∼p ∨ q) ∧ (p ∧ ∼q). (b) (p ∧ q) ∧ (p ∧ ∼q).
p q p∧q q∧p
T T T T
T F F F
F T F F
F F F F
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
Solution. The logical equivalence of p ↔ q and (∼p ∨ q) ∧ (∼q ∨ p) follows directly from
the definition of a biconditional and from Example 1.13.
Example 1.15 Show that the statements ∼(p ∧ q) and ∼p ∧ ∼q are not logically equivalent.
Solution. The statements ∼(p ∧ q) and ∼p ∧ ∼q have different truth values in rows 2 and
3 of in the truth table (shown in Figure 1.15), and are therefore not logically equivalent.
p q ∼p ∼q p∧q ∼(p ∧ q) ∼p ∧ ∼q
T T F F T F F
T F F T F T 6= F
F T T F F T 6 = F
F F T T F T T
Solution. The logical equivalence of ∼(p ∨ q) and (∼p) ∧ (∼q) is verified in the truth
table shown in Figure 1.16 since the corresponding columns (columns 4 and 7) of these two
statements are identical.
There are many fundamental logical equivalences that we often encounter. We summarize
a number of these in Theorem 1 for future reference.
Theorem 1 Let p, q and r be statements. Then the following logical equivalences hold.
(1) Commutative Laws
(i) p ∧ q ≡ q ∧ p
(ii) p ∨ q ≡ q ∨ p
(2) Associate Laws
(i) (p ∧ q) ∧ r ≡ p ∧ (q ∧ r)
(ii) (p ∨ q) ∨ r ≡ p ∨ (q ∨ r)
18 CHAPTER 1. LOGIC
Proof. A proof of the Commutative Law 1(i) was given in Example 1.12, while proofs of
the Distributive Law 3(i) and De Morgan’s Law 4(i) were given in Examples 1.17 and 1.16,
respectively. We leave the proofs of the other Laws as an exercise. 2
De Morgan’s Laws.
From Example 1.16 and the Double Negation Law, we have the logical equivalence
Exercises
1.15 Determine which of the pairs of statement forms listed below are logically equivalent.
Justify your answers using truth tables.
(a) p ∧ (p ∨ q) and p.
(b) p ∨ (p ∧ q) and p.
(c) (∼p) ∨ (∼q) and ∼(p ∨ q).
1.16 Using Theorem 1, supply reasons for each step in the logical equivalence derived in
(i) and (ii) below.
1.17 Without using truth tables, verify the following logical equivalences using Theorem 1.
(a) p ∨ (p ∧ q) and p.
(b) p ∧ (p ∨ q) and p.
(c) ∼(p ∨ ∼q) ∨ (∼p ∧ ∼q) and ∼p.
(d) ∼(∼p ∧ ∼q) and p ∨ q.
1.18 Use the logical equivalences given in Example 1.13, Example 1.14, and Fact 1.1, to
rewrite the given compound statements using only the connectives ∧ and ∼.
(a) (p ∧ ∼q) → r.
(b) (∼p ∨ q) → (r ∨ ∼q).
(c) (p → r) ↔ (q → r).
20 CHAPTER 1. LOGIC
∼(p → q) ≡ p ∧ ∼q
Solution. We can prove this using truth tables. However, let us prove this without using
truth tables and rather present a proof using the logical equivalences in Theorem 1. We
have
∼(p → q) ≡ ∼(∼p ∨ q) (by Example 1.13)
≡ ∼(∼p) ∧ (∼q) (by De Morgan’s Laws)
≡ p ∧ ∼q (by the Double Negation Law).
p → q ≡ ∼q → ∼p
Solution. We can prove this using truth tables. However, let us prove this without using
truth tables and rather present a proof using the logical equivalences in Theorem 1. We
have
p → q ≡ ∼p ∨ q (by Example 1.13)
≡ q ∨ ∼p (by the Commutative Laws)
≡ ∼(∼q) ∨ ∼p (by the Double Negation Law)
≡ ∼q → ∼p (by Example 1.13).
1.15. QUANTIFIED STATEMENTS 21
In the previous sections, we defined and discussed basic properties of compound statements.
We were interested in whether a particular statement was true or false. This logic is called
propositional logic or statement logic. However there are many arguments whose
validity cannot be verified using propositional logic. Consider, for example, the sentence
p : x is an even integer.
This sentence is neither true nor false. The truth or falsity depends on the value of the
variable x. For some values of x the sentence is true; for others it is false. Thus this sentence
is not a statement. However, let us denote this sentence by P (x), i.e.,
Then, P (4) is true, while P (5) is false. To study the properties of such sentences, we need
to extend the framework of propositional logic to what is called first-order logic.
In our earlier example, the sentence “P (x) : x is an even integer” is a predicate (or propo-
sitional function) with domain D the set of integers since for each x ∈ D, P (x) is a statement,
i.e., for each x ∈ D, P (x) is true or false, but not both.
Example 1.20 The following are examples of propositional functions:
(a) The sentence “P (x): x+3 is an odd integer” with domain D the set of positive integers.
(b) The sentence “P (x): x + 3 is an odd integer” with domain D the set of integers.
(c) The sentence “P (x, y, z): x2 + y 2 = z 2 ” with domain D the set of positive integers.
Some sets are encountered so often that they are given special names. These are summa-
rized below:
Thus,
N = {1, 2, 3, . . .},
Z = {. . . , −2, −1, 0, 1, 2, . . .}, and
Q = { ab | a, b ∈ Z and b 6= 0}.
Example 1.21 Let P (x) be a predicate with domain D. Then the sentence
is a statement. To see this, notice that either P (x) is true at each value x ∈ D (the notation
x ∈ D indicates that x is in the set D, while x ∈ / D means that x is not in D) or P (x) is
false for at least one value x ∈ D. If P (x) is true at each value x ∈ D, then Q(x) is true.
However, if P (x) is false for at least one value x ∈ D, then Q(x) is false. Hence, Q(x) is a
statement because it is either true or false (but not both).
∀x ∈ D, P (x).
Example 1.22 Let P (x) be the predicate “P (x) : x2 ≥ x.” Determine whether the following
universal statements are true or false.
(a) ∀x ∈ R, P (x);
(b) ∀x ∈ Z, P (x).
1
Solution. (a) Let x = 2 ∈ R. Then, ( 12 )2 = 1
4 < 1
2, and so P ( 12 ) is false. Therefore,
“∀x ∈ R, P (x)” is false.
(b) For all integers x, x2 ≥ x is true, and so P (x) is true for all x ∈ Z. Hence, “∀x ∈
Z, P (x)” is true.
1.17. THE EXISTENTIAL QUANTIFIER 23
Exercises
1.19 Symbolize the following by using quantifiers, predicates, and logical connectives.
(a) The square of any real number is nonnegative.
(b) All fish can swim.
(c) No integer has a square equal to 2.
1.20 Let P (x) be the predicate “x is an odd integer”, Q(x) the predicate “x is a prime
integer” and R(x) the predicate “x2 is an odd integer.” Write the following symbolic
statements in English.
(a) ∀x ∈ Z, P (x) → R(x).
(b) ∀x ∈ Z, P (x) ∧ Q(x).
Definition. Each of the phrases “there exists”, “there is”, “for some”,
and “for at least one” is referred to as the existential quantifier and
is denoted in symbols ∃. Let P (x) be a predicate with domain D. An
existential statement is a statement of the form
Example 1.23 Let P (x) be the predicate “P (x) : x2 < x.” Determine whether the following
existential statements are true or false.
(a) ∃x ∈ R, P (x);
(b) ∃x ∈ Z, P (x).
Solution.
1
(a) Let x = 2 ∈ R. Then, ( 21 )2 = 1
4 < 12 , and so P ( 12 ) is true. Therefore, “∃x ∈ R, P (x)”
is true.
(b) For all integers x, x2 ≥ x is true, and so there is no integer x such that P (x) is true.
Hence, “∃x ∈ Z, P (x)” is false.
24 CHAPTER 1. LOGIC
Exercises
1.21 Symbolize the following by using quantifiers, predicates, and logical connectives.
(a) Some rational numbers are integers.
(b) Some integers are even.
(c) There is an integer x such that x2 = 4.
(d) There exists an integer that is odd and prime.
(e) Everybody trusts somebody.
(f) Somebody trusts everybody.
(g) Between every integer and its double there is a prime number.
1.22 Let P (x) be the predicate “x is an odd integer” and Q(x) the predicate “x is a prime
integer.” Write the following symbolic statement in English.
∃x ∈ Z, P (x) ∧ Q(x).
∀x ∈ D, P (x)
Symbolically,
∀x ∈ D, P (x).
It is false if P (x) is false for at least one x ∈ D; otherwise, it is true. Hence it is false if
and only if P (x) is false for at least one x ∈ D if and only if ∼P (x) is true for at least one
x ∈ D. Thus the negation of this statement is the statement
Example 1.24 What is the negation of the statement “All mathematicians wear glasses”?
Solution. Let us write this statement symbolically. Let D be the set of all mathematicians
and let P (x) be the predicate “x wears glasses” with domain D. The given statement can
be written as
∀x ∈ D, P (x).
The negation is
∃x ∈ D such that ∼P (x).
In words, the negation is “There exists a mathematician who does not wear glasses” or
“Some mathematicians do not wear glasses”.
∀x ∈ D, ∼P (x).
Symbolically,
It is true if P (x) is true for at least one x ∈ D; otherwise, it is false. Hence it is false if
and only if P (x) is false for all x ∈ D if and only if ∼P (x) is true for all x ∈ D. Thus the
negation of this statement is the statement
∀x ∈ D, ∼P (x).
Example 1.25 What is the negation of the statement “Some politicians are honest”?
Solution. Let us write this statement symbolically. Let D be the set of all politicians and
let P (x) be the predicate “x is honest” with domain D. The given statement can be written
as
∃x ∈ D such that P (x).
The negation is
∀x ∈ D, ∼P (x).
In words, the negation is “All politicians are not honest” or “No politician is honest”.
26 CHAPTER 1. LOGIC
Consider next the negation of a universal conditional statement. By Fact 1.2, we have
that
But the negation of an “if p then q” statement is logically equivalent to an “p and not
q” statement (see Example 1.18). Hence,
∀x ∈ D, P (x) → Q(x)
Symbolically,
Recall from Section 1.7 that a conditional statement has a contrapositive, a converse, and
an inverse. These definitions can be extended to universal conditional statements.
1.19. UNIVERSAL CONDITIONAL STATEMENTS 27
∀x ∈ D, ∼Q(x) → ∼P (x).
∀x ∈ D, Q(x) → P (x).
∀x ∈ D, ∼P (x) → ∼Q(x).
Example 1.26 Write the contrapositive, converse, and inverse of the statement:
“If a real number is greater than 3, then its square is greater than 9”.
(Here P (x) is the statement “x > 3” and Q(x) the statement “x2 > 9”.)
1. The contrapositive is: ∀x ∈ R, if x2 ≯ 9 then x ≯ 3, or, equivalently,
∀x ∈ R, if x2 ≤ 9 then x ≤ 3.
∀x ∈ R, if x ≤ 3 then x2 ≤ 9.
28 CHAPTER 1. LOGIC
Exercises
1.23 Write the contrapositive, converse, and inverse of the following statements:
(a) If the square of an integer is odd, then the integer is odd.
(b) If an integer is divisible by 4, then it is even.
(c) ∀x ∈ R, if x(x + 1) > 0 then x > 0 or x < −1.
We close this chapter with a review of the symbols that we have introduced.
∼ negation (not)
∨ disjunction (or)
∧ conjunction (and)
→ implication
↔ biconditional
∀ universal quantifier (for every)
∃ existential quantifier (there exists)
Chapter 2
Proof Techniques
2.1 Introduction
In this chapter, we discuss the topic of mathematical proofs. Our goal is to introduce the
student to several important proof techniques for verifying mathematical statements. For
a given true mathematical statement, how exactly can we verify that it is true? Finding
answers to mathematical questions is all very well, but we must be certain that we are right
and we must be able to able to convince others, not just ourselves, of this!
A true mathematical statement is called a result. Interesting or significant mathematical
results are called theorems (or propositions). For example, the mathematical statement
“1+1 = 2” is true, but we would not call this a theorem, but rather a result. A corollary is
a mathematical result that can be deduced from or is a consequence of some earlier result. A
lemma is a mathematical result that is useful in proving another (more interesting) result.
A lemma can be thought of as a “helping result” to prove some other result.
Before presenting several proof techniques, we will need some elementary definitions in
number theory.
Example 2.1
(a) The integer 8 is even since 8 = 2 · 4 (i.e., 8 = 2k where k = 4 ∈ Z).
(b) The integer −5 is odd since −5 = 2(−3) + 1 (i.e., −5 = 2k + 1 where k = −3 ∈ Z).
We shall show in Section 2.6 (using the so-called quotient-remainder theorem) that every
integer is either even or odd.
29
30 CHAPTER 2. PROOF TECHNIQUES
Definition. An integer n is prime if and only if n > 1 and for all positive
integers r and s, if n = r·s, then r = 1 or s = 1. An integer n is composite
if and only if n = r · s for some positive integers r and s with r 6= 1 and
s 6= 1.
Example 2.2
(a) The first six prime numbers are 2, 3, 5, 7, 11, 13.
(b) The first six composite numbers are 4, 6, 8, 9, 10, 12.
(c) Every integer greater than 1 is either prime or composite since the two definitions are
negations of each other (see Section 1.18!).
Example 2.3
(a) The integers 2 and 18 are of the same parity (since they are both even).
(b) The integers 7 and 12 are of the opposite parity (one is even, the other odd).
Example 2.4
(a) Is 16 divisible by 8? (b) Does 3 divide 21? (c) Is 21 a multiple of 7?
(d) Does 5 | 30? (e) Is 7 a factor of 42? (f) Is 8 a factor of −8?
Solution
(a) Yes: 16 = 8 · 2. (b) Yes: 21 = 3 · 7. (c) Yes: 21 = 7 · 3.
(d) Yes: 30 = 5 · 6. (e) Yes: 42 = 7 · 6. (f) Yes: −8 = 8 · (−1).
2.2. TRIVIAL PROOFS 31
Exercises
2.1 Let m and n be (fixed) integers. Justify your answers to each of the following questions:
(a) Is 4mn + 10n even?
(b) Is 8mn + 5 odd?
(c) If m and n are positive, is m2 + 2mn + n2 composite?
(d) If m ≥ n + 2 ≥ 3, is m2 − n2 composite?
∀x ∈ D, P (x) → Q(x)
Recall from the Truth Table 1.5, that if Q(x) is a true statement, then so too is the
implication P (x) → Q(x). Furthermore, the universal statement ∀x ∈ D, P (x) → Q(x)
is a true statement provided P (x) → Q(x) is true for every x ∈ D. In particular if
Q(x) is true for all every x ∈ D, then immediately we can deduce that the statement
∀x ∈ D, P (x) → Q(x) is true. Such a proof we call a trivial proof.
Proof. Consider the statements P (x) : x > −5 and Q(x) : x2 + 2 > 0. Since x2 ≥ 0 for
every x ∈ R, it follows that x2 + 2 ≥ 0 + 2 > 0 for every x ∈ R. Hence, Q(x) is true for
every x ∈ R. Thus, P (x) → Q(x) is true for every x ∈ R, i.e., for x ∈ R, if x > −5, then
x2 + 2 > 0. 2
32 CHAPTER 2. PROOF TECHNIQUES
The symbol 2 that occurs at the end of the proof of Result 2.1 indicates that the proof
is complete. Note that the proof of Result 2.1 does not depend on x > −5. We could have,
in fact, replaced x > −5 by any hypothesis and the result would still be true. It would have
been better to replace the statement of Result 2.1 by “If x ∈ R, then x2 + 2 > 0.”
We remark that the proof of Result 2.1 could be simplified if we do not introduce the
statements P (x) and Q(x):
Proof of Result 2.1. Since x2 ≥ 0 for every x ∈ R, it follows that x2 + 2 ≥ 0 + 2 > 0 for
every x ∈ R. Hence, x2 + 2 > 0. 2
Note that in Result 2.2 the fact that 6n3 + 4n + 3 is odd does not depend on n being
odd. It would have been better to replace the statement of Result 2.2 by
Exercises
1
2.3 For x ∈ R, prove that if x < −1, then x2 + 4 > 0.
2.4 Prove that if n is an odd integer, then 4n3 + 6n2 + 12 is an even integer.
∀x ∈ D, P (x) → Q(x)
Recall from the Truth Table 1.5, that if P (x) is a false statement, then the implication
P (x) → Q(x) is true. Hence if P (x) is false for all every x ∈ D, then we can deduce that
the statement ∀x ∈ D, P (x) → Q(x) is true. Such a proof we call a vacuous proof.
2.4. DIRECT PROOFS 33
Proof. Consider the statements P (x) : x2 − 2x + 1 < 0 and Q(x) : x > 4. Since x2 − 2x + 1 =
(x − 1)2 ≥ 0 for every x ∈ R, we have that x2 − 2x + 1 < 0 is false for every x ∈ R. Hence,
P (x) is false for every x ∈ R. Thus, P (x) → Q(x) is true for every x ∈ R, i.e., for x ∈ R, if
x2 − 2x + 1 < 0, then x > 4. 2
Note that in the proof of Result 2.3, the truth value of the statement x > 4 plays no role
whatsoever. We could have, in fact, replaced x > 4 by any conclusion and the result would
still be true.
Exercises
One of the most important proof techniques is the method of direct proof.
Recall that the universal statement ∀x ∈ D, P (x) → Q(x) is true provided P (x) → Q(x)
is true for every x ∈ D. If P (x) is a false statement, then the implication P (x) → Q(x) is
true. Hence to show that the universal statement ∀x ∈ D, P (x) → Q(x) is true for every
x ∈ D, we need only show that P (x) → Q(x) is true for all x ∈ D for which P (x) is true.
Such a proof we call a direct proof.
34 CHAPTER 2. PROOF TECHNIQUES
Proof. If we let “P (n): n is even” and “Q(n): 3n + 5 is odd”, then we need to show that
the universal statement
∀n ∈ Z, P (n) → Q(n)
is true. To do this, we assume P (n) is true for some particular but arbitrary element n ∈ Z
and show that Q(n) is true for this element n. Since P (n) is true, n = 2k for some integer
k. Hence, 3n + 5 = 3(2k) + 5 = 6k + 5 = 2(3k + 2) + 1 = 2m + 1, where m = 3k + 2.
Since k ∈ Z, we must have m ∈ Z (since the product of two integers is an integer, and the
sum and difference of two integers is an integer). Hence, 3n + 5 = 2m + 1 for some integer
m, whence Q(n) is true. Thus by the method of direct proof, we have proven our desired
result. 2
We remark that the proof of Result 2.4 could be simplified if we do not introduce the
statements P (x) and Q(x).
Proof of Result 2.4. Assume that n is an even integer. Then, n = 2k for some integer k.
Hence,
3n + 5 = 3(2k) + 5 = 6k + 5 = 2(3k + 2) + 1 = 2m + 1,
where m = 3k + 2. Since k ∈ Z, we must have m ∈ Z. Hence, 3n + 5 = 2m + 1 for some
integer m, whence 3n + 5 is an odd integer. 2
Proof. Assume that n is an odd integer. Then, n = 2k + 1 for some integer k. Hence,
5n + 3 = 5(2k + 1) + 3 = 10k + 8 = 2(5k + 4) = 2m,
where m = 5k + 4. Since k ∈ Z, we must have m ∈ Z. Hence, 5n + 3 = 2m for some integer
m, whence 5n + 3 is an even integer. 2
Proof. Assume that n is an odd integer. Then, n = 2k + 1 for some integer k. Hence
n2 + n = (2k + 1)2 + (2k + 1) = 4k 2 + 6k + 2 = 2m,
where m = 2k 2 + 3k + 1. Since k ∈ Z, we must have m ∈ Z. Hence, n2 + n is even. 2
Result 2.7 If the sum of any two integers is even, then so is their difference.
Proof. Assume that m and n are (particular but arbitrarily chosen) integers such that
m + n is even. (We show that m − n is even.) Then, m + n = 2k for some integer k. Thus,
m = 2k − n. Hence,
m − n = (2k − n) − n = 2k − 2n = 2(k − n) = 2`,
2.5. PROOF BY CONTRAPOSITIVE 35
Exercises
2.7 Find the mistake in the “proof” of the following result, and provide a correct proof.
2.8 Find the mistake in the “proof ” of the following result, and provide a correct proof.
Recall that the contrapositive of a conditional statement P (x) → Q(x) is the statement
∼Q(x) → ∼P (x). In Section 1.14, we showed that a conditional statement P (x) → Q(x) is
logically equivalent to its contrapositive ∼Q(x) → ∼P (x).
36 CHAPTER 2. PROOF TECHNIQUES
∀x ∈ D, P (x) → Q(x)
∀x ∈ D, ∼Q(x) → ∼P (x);
that is, we assume that ∼Q(x) is true for some particular but
arbitrary element x ∈ D, and then show that ∼P (x) is true for
this element x.
Proof. Let P (n) be the statement “n2 + 5 is odd” and let Q(n) be the statement “n is
even”. Then we need to show that the universal statement
∀n ∈ Z, P (n) → Q(n)
We remark that the statements of Results 2.8 and 2.9 begin with the sentence “Let
n ∈ Z.” We call this the overriding assumption or hypothesis, and so n is assumed to
be an integer throughout the proofs of Results 2.8 and 2.9.
Exercises
Theorem 2.10 (Quotient-Remainder Theorem) For every given integer n and positive in-
teger d, there exist unique integers q and r such that
Example 2.5 For each of the following values of n and d, find integers q and r such that
n = d · q + r and 0 ≤ r < d.
(a) n = 36, d = 7
(b) n = −36, d = 7.
(c) n = 36, d = 40.
1
A proof of the existence part of the Quotient-Remainder Theorem follows from the so-called well-ordering
principle for the integers, while a proof of the uniqueness part follows using the greatest common divisor of
two integers. We omit the proof.
38 CHAPTER 2. PROOF TECHNIQUES
Thus n div d and n mod d are the integer quotient and integer remainder,
respectively, obtained when n is divided by d.
Observe that given a nonnegative integer n and a positive integer d, we have that
n mod d ∈ {0, . . . , d − 1} (since 0 ≤ r ≤ d − 1) and that n mod d = 0 if and only if n
is divisible by d.
Example 2.6 Compute 31 div 7 and 31 mod 7.
Solution. Since 31 = 7 · 4 + 3, we have that 31 div 7 = 4 and 31 mod 7 = 3.
Using the Quotient-Remainder Theorem, we can show that every integer is either even
or odd.
Proof. By the Quotient-Remainder Theorem with d = 2, there exist unique integers q and
r such that n = 2 · q + r and 0 ≤ r < 2. Hence, r = 0 or r = 1. Therefore,
n = 2q or n = 2q + 1
By Result 2.11, every integer has the property that it is either even or odd. This obser-
vation is useful when using a proof by cases as is illustrated by the proofs of the next three
results.
2.6. PROOF BY CASES AND THE QUOTIENT-REMAINDER THEOREM 39
Result 2.13 Let m, n ∈ Z. If m and n are of the same parity, then m + n is even.
Proof. We use a proof by cases, depending on whether m and n are both even or both
odd.
Case 1. m and n are both even. Then, m = 2k and n = 2` for some integers k and `.
Thus, m + n = 2k + 2` = 2(k + `). Since k + ` ∈ Z, the integer m + n is even.
Case 2. m and n are both odd. Then, m = 2k + 1 and n = 2` + 1 for some integers k
and `. Thus, m + n = (2k + 1) + (2` + 1) = 2(k + ` + 1). Since k + ` + 1 ∈ Z, the integer
m + n is even. 2
Proof. We shall combine two proof techniques and use both a proof by contrapositive and
a proof by cases. Suppose that n is not a multiple of 3. (We wish to show then that n2 is
not a multiple of 3.) By the Quotient-Remainder Theorem with d = 3, there exist unique
integers q and r such that n = 3 · q + r and 0 ≤ r < 3. Hence, r ∈ {0, 1, 2}. Therefore,
n = 3q or n = 3q + 1 or n = 3q + 2
Proof. We shall use both a direct proof and a proof by cases. Assume that n is an odd
integer. By the Quotient-Remainder Theorem with d = 4, there exist unique integers q and
r such that n = 4 · q + r and 0 ≤ r < 4. Hence, r ∈ {0, 1, 2, 3}. Therefore,
n = 4q or n = 4q + 1 or n = 4q + 2 or n = 4q + 3
Exercises
2.13 For each of the following values of n and d, find integers q and r such that n = d · q + r
and 0 ≤ r < d.
(a) n = 38, d = 9
(b) n = −38, d = 13.
(c) n = −45, d = 11.
2.15 Prove that every two consecutive integers have opposite parity.
2.16 Prove that the product of two consecutive integers is an even integer.
2.17 Prove that the square of any integer has the form 3k or 3k + 1 for some integer k.
2.18 Prove that the square of any integer has the form 4k or 4k + 1 for some integer k.
2.19 Prove that every prime number greater than 3 has the form 6k + 1 or 6k + 5 for some
integer k.
2.7. PROOF BY CONTRADICTION 41
In this section, we discuss another very important proof technique, called proof by contra-
diction.
Proof. Assume, to the contrary, that there is a greatest integer, say N . Then, N ≥ n for
every integer n. Let m = N + 1. Now m is an integer since it is the sum of two integers.
Also, m > N . Thus, m is an integer that is greater than the greatest integer, which is a
contradiction. Hence our assumption that there is a greatest integer is false. Thus there is
no greatest integer. 2
Proof. Assume, to the contrary, that there is a least positive rational number x. Then,
x ≤ y for every positive rational number y. Consider the number x/2. Since x is a positive
rational number, so too is x/2. Multiplying both sides of the inequality 1/2 < 1 by x,
which is positive, gives x/2 < x. Hence, x/2 is a positive rational number that is less than
x, which is a contradiction. Hence our assumption that there is a least positive rational
number is false. Thus there is no least positive rational number. 2
42 CHAPTER 2. PROOF TECHNIQUES
Result 2.18 The sum of a rational number and an irrational number is irrational.
Proof. Assume, to the contrary, that there exists a rational number r and an irrational
number s whose sum is a rational number. Thus, by definition of rational numbers, r = a/b
and r + s = c/d for some integers a, b, c and d with b 6= 0 and d 6= 0. Hence,
c c a bc − ad
s= −r = − = .
d d b bd
Now, bc − ad ∈ Z and bd ∈ Z since a, b, c, d ∈ Z. Since b 6= 0 and d 6= 0, bd 6= 0. Hence,
s ∈ Q, which is a contradiction. Hence our assumption that there exists a rational number
and an irrational number whose sum is a rational number is false. Thus, the sum of a
rational number and an irrational number is irrational. 2
Recall that earlier we proved Result 2.9 using a proof by contrapositive. We could have
also used a proof by contradiction. Note that in Result 2.9, we take P to be the statement
“n2 is even” and Q to be the statement “n is odd.”
√
Result 2.19 The real number 2 is irrational.
√
Proof. Assume, to the contrary, that 2 is rational. Then,
√ m
2=
n
2.7. PROOF BY CONTRADICTION 43
m2 = 2n2 .
Thus, m2 is even. Hence by Result 2.9, m is even, and so m = 2k, where k ∈ Z. Substituting
this into our earlier equation m2 = 2n2 , we have (2k)2 = 2n2 , and so 4k 2 = 2n2 . Therefore,
n2 = 2k 2 .
Thus, n2 is even, and so n is even by Result 2.9. Therefore each of m and n has 2 as a
factor, which contradicts our assumption that m/n has been reduced to lowest terms and
therefore
√ that m and n have no common √ factors. We deduce, therefore, that our assumption
that 2 is rational is incorrect. Hence, 2 is irrational. 2
Exercises
2.22 Prove that the product of an irrational number and a nonzero rational number is
irrational.
√
2.23 Prove that 1 + 5 2 is irrational.
√ √
2.24 Prove that 2 + 3 is irrational.
2.25 The Three Cheating Students Problem: Three students were caught cheating
in a first year mathematics quiz and sentenced to a relatively light sentence (given the
seriousness of the crime) of 20 years in prison with hard labour. But due to overcrowd-
ing, one of these three students must be pardoned. A distinguished Persian professor
of mathematics devises a scheme to determine which student is to be pardoned. He
tells the three students that he will blindfold them and then paint a red dot or a blue
dot on each forehead. After he paints the dots, he will remove the blindfolds, and a
student should raise his hand if he sees a red dot on one of the other two students. The
first student to identify the colour of the dot on his own forehead will be pardoned and
may resume his mathematical studies. An incorrect answer would triple his sentence.
The professor blindfolds the students, as promised, and then paints a red dot on the
foreheads of all three students. He removes the blindfolds and, since each student sees
a red dot (in fact two red dots), each student raises his hand. After a considerable
time has passed, one student exclaims, ”I know what colour my dot is! It’s red!” The
student is then pardoned and allowed re-entry into first year mathematics. How did
this student correctly identify the colour of the dot painted on his forehead?
44 CHAPTER 2. PROOF TECHNIQUES
Recall that (see Section 1.17) an existential statement is a statement of the form ∃x ∈
D such that P (x). It is true if P (x) is true for at least one x ∈ D; otherwise, it is false.
Hence to prove this statement, we need only display or find an element x ∈ D that makes
P (x) true. Such a proof is called an existence proof.
Example 2.7 Prove the following statements. √ √
√
(a) There are distinct positive integers such that a + b = a + b − 2.
(b) There exists an even integer that can be written as a sum of two prime numbers.
(c) There exist positive integers a, b and c such that a2 = b2 + c2 .
Solution √ √ √ √ √ √
(a) Take a = 9 and b = 16. Then, a + b = 25 = 5, while a+ b−2 = 9+ 16−2 = 5.
(b) Take n = 4. Then, n = 2 + 2.
(c) Take a = 5, b = 3 and c = 4. Then, a2 = 25 = b2 + c2 .
Result 2.20 There exist irrational numbers a and b such that ab is rational.
√ √2
Proof. Consider the real number 2 . This number is either rational or irrational. We
consider each case in turn.
√ √2 √ √
Case 1. 2 is rational. Let a = 2 and b = 2. By Result 2.19, a and b are irrational.
By assumption, ab is rational.
√ √2 √ √2 √
Case 2. 2 is irrational. Let a = 2 and let b = 2. By assumption, a is irrational,
while by Result 2.19, b is irrational. Moreover,
µ √ ¶√2
√ 2 √ (√2·√2) √ 2
ab = 2 = 2 = 2 = 2,
which is rational.
In both cases, we proved the existence of irrational numbers a and b such that ab is
rational, and so we have the desired result. 2
√ √2
We remark that it has been proven that 2 is rational. Of course, the proof of√Re-
√ 2
sult 2.20 presented above is a perfectly valid proof irrespective of the fact that 2 is
rational.
We close this section with perhaps one of the most famous mathematical assertions. In
Example 2.7(c), we showed that if n = 2, then there exist positive integers a, b and c such
that an = bn + cn . Pierre de Fermat (1601–1665), a famous mathematician, claimed the
following assertion:
Theorem 2.21 (Fermat’s Last Theorem) For each integer n ≥ 3, there are no positive
integers a, b and c such that an = b n + cn .
2.9. DISPROOF BY COUNTEREXAMPLE 45
The above result became known as Fermat’s Last Theorem. Fermat’s assertion was
discovered, unproved, in a margin of a book, along with the comment “I have discovered
a truly remarkable proof of this theorem which this margin is too small to contain.” It
was only some 350 years later (in 1993) that a proof to his assertion was finally found by
the British mathematician Andrew Wiles. His proof used very sophisticated mathematical
techniques that had eluded the greatest mathematical minds of the last few centuries.
Exercises
2.26 Prove that there exists an integer whose cube equals its square.
2.27 Prove that there exists real numbers x and y such that (x + y)2 = x2 + y 2 .
2.28 Prove that there exists a real number x such that x3 < x < x2 .
Some statements may very well be false. To disprove a statement, we use a disproof by
counterexample.
∀x ∈ D, P (x)
If the statement ∀x ∈ D, P (x) is not true, then its negation ∼(∀x ∈ D, P (x)) is true.
By Fact 1.2, ∼(∀x ∈ D, P (x)) ≡ ∃x ∈ D such that ∼P (x). Hence we wish to show that
∃x ∈ D such that ∼P (x) is true. That is, we wish to show that ∼P (x) is true for some
element x ∈ D. Such a disproof is called a disproof by counterexample.
Example 2.8 Find counterexamples to the following statements.
(a) The product of any two irrational numbers is irrational.
(b) If a and b are rational numbers, then ab is rational.
(c) The sum of any two positive irrational numbers is irrational.
Solution √
(a) Let a = b = 2. By Result 2.19, a and b are irrational, but ab = 2 which is rational.
46 CHAPTER 2. PROOF TECHNIQUES
b 1/2
√
(b) Let a = √
2 and b = 1/2. Then,
√ a, b ∈ Q, but a = 2 = 2, which is irrational.
(c) Let a = 2 and let b = 2 − 2. Then both a and √ b are positive
√ and both are irrational
(by Result 2.18 and Exercise 2.22). However, a + b = 2 + (2 − 2) = 2, which is rational.
Exercises
2.29 Find a counterexample to the statement that the difference of any two irrational
numbers is irrational.
2.30 Find a counterexample to the statement that for every rational number r and every
irrational number s, we have that r/s is irrational.
In this section we discuss a very powerful proof technique called mathematical induction.
Before doing so, we introduce a mathematical structure called a sequence. A sequence is
informally a set of elements written in a row. In a sequence
am , am+1 , am+2 , . . . , ak , . . . , an ,
where m and n are integers with m ≤ n, each individual element ak (read “a sub k”) is
called a term. The term ak is called the kth term. The k in ak is called a subscript or
index. The term am is called the initial term. The notation
am , am+1 , am+2 , . . .
(read asPthe “summation from k equals m to n of ak ”). We use the capital Greek letter
sigma, , to denote the word sum (or summation). We call k the index of the summation,
m the lower limit of the summation, and n the upper limit of the summation. We remark
that the index of summation is called a dummy variable of summation since it can be
replaced by any other symbol as long as the replacement is made in every location where
the symbol occurs. For example,
n
X n
X n
X
ak = ai = aj = am + am+1 + am+2 + · · · + an .
k=m i=m j=m
2.10. PROOF BY MATHEMATICAL INDUCTION 47
Solution
4
X
(a) ak = a1 + a2 + a3 + a4 = 3 + (−5) + 1 + 2 = 1;
k=1
3
X
(b) ak = a2 + a3 = (−5) + 1 = −4.
k=2
Thus to show that the statement P (n) is true for every n ≥ n0 , we need not show that
each of the statements P (n0 ), P (n0 + 1), P (n0 + 2), . . . is true individually. We need only
show that two statements are true, namely (1) P (n0 ) and (2) the implication: If P (k) is
true for an arbitrary integer k with k ≥ n0 , then P (k +1) is true. This is a two-step process.
To prove that P (n0 ) is true (Step 1) is called the basis step or base case. To prove that
the implication “if P (k) is true, then P (k + 1) is true” (Step 2) is called the inductive
step. For this purpose, we often use a direct proof and assume that P (k) is true (for an
arbitrary integer k with k ≥ n0 ). This assumption is called the inductive hypothesis or
the induction hypothesis.
To summarize, a proof of a mathematical statement by the principle of mathematical
induction involves the following steps.
In this introductory course on proof technique, we omit the proof of Theorem 2.22 which
follows from the so-called Well-Ordering Principle. Rather we will focus our attention on
applications of this powerful theorem, called the principle of mathematical induction.
To visualize the idea of mathematical induction, imagine a ladder that reaches to the
heavens constructed in such a way that if we are sitting at any particular but fixed rung
of the ladder, then we can always climb one rung higher. The principle of mathematical
induction then tells us that if we can climb onto the ladder, we can climb as high as we like
on the ladder! To see the connection between this image and the principle of mathematical
induction, let P (n) denote the statement “We can climb to the nth rung of the ladder”. It
is given that we can climb onto the ladder, i.e., P (1) is true (here “n0 = 1”). This is the
base step. We are also given that for each k ≥ 1, if P (k) is true (i.e., we can climb to the
kth rung of the ladder), then P (k + 1) is true (i.e., we can climb to the (k + 1)st rung of
the ladder). Thus by the principle of mathematical induction, P (n) (i.e., we can climb to
the nth rung of the ladder) is true for every integer n ≥ 1.
We now illustrate the principle of mathematical induction with a few examples.
n(n + 1)
1 + 2 + ··· + n = .
2
Proof. We proceed by mathematical induction. For every integer n ≥ 1, let P (n) be the
statement
n(n + 1)
P (n) : 1 + 2 + · · · + n = .
2
is certainly true since 1(1 + 1)/2 = 2/2 = 1. This establishes the base case when n = 1
(here “n0 = 1”). For the inductive hypothesis, let k be an arbitrary (but fixed) integer such
that k ≥ 1 and assume that P (k) is true; that is, assume that
k(k + 1)
1 + ··· + k = .
2
For the inductive step, we show that P (k + 1) is true. That is, we show that
(k + 1)(k + 2)
1 + 2 + · · · + (k + 1) = . (2.1)
2
2.10. PROOF BY MATHEMATICAL INDUCTION 49
1 + 2 + · · · + (k + 1) = (1 + 2 + · · · + k) + (k + 1)
k(k + 1)
= + (k + 1) (by the inductive hypothesis)
2
k(k + 1) 2(k + 1)
= +
2 2
(k + 1)(k + 2)
= ,
2
thus verifying Equation (2.1); that is, P (k + 1) is true. Hence, by the principle of mathe-
matical induction, P (n) is true for all integers n ≥ 1; that is,
n(n + 1)
1 + 2 + ··· + n =
2
is true for every positive integer n. 2
We remark that in the inductive hypothesis of our proof of Result 2.23, we assume that
P (k) is true for an arbitrary, but fixed, positive integer k. We certainly do not assume that
P (k) is true for all positive integers k, for this is precisely what we wish to prove! It is
important to understand that our aim is to establish the truth of the implication “If P (k) is
true, then P (k + 1) is true.” which together with the truth of the statement P (1) allows us
to conclude that an infinite number of statements (namely, P (1), P (2), P (3), . . .) are true.
n(n + 1)(2n + 1)
12 + 22 + · · · + n2 = .
6
Proof. We proceed by mathematical induction. For every integer n ≥ 1, let P (n) be the
statement
n(n + 1)(2n + 1)
P (n) : 12 + 22 + · · · + n2 = .
6
When n = 1, the statement
1(1 + 1)(2 · 1 + 1)
P (1) : 1 =
6
is true since 1(1 + 1)(2 · 1 + 1)/6 = (1 · 2 · 3)/6 = 6/6 = 1. This establishes the base case
when n = 1. For the inductive hypothesis, let k be an arbitrary (but fixed) integer such
that k ≥ 1 and assume that P (k) is true; that is, assume that
k(k + 1)(2k + 1)
12 + 22 + · · · + k 2 = .
6
50 CHAPTER 2. PROOF TECHNIQUES
For the inductive step, we show that P (k + 1) is true. That is, we show that
(k + 1)(k + 2)(2k + 3)
12 + 22 + · · · + (k + 1)2 = . (2.2)
6
Evaluating the left-hand side of this equation, we have
k(k + 1)(2k + 1)
= + (k + 1)2 (by the inductive hypothesis)
6
(k + 1)(2k 2 + 7k + 6)
=
6
(k + 1)(k + 2)(2k + 3)
=
6
thus verifying Equation (2.2); that is, P (k + 1) is true. Hence, by the principle of mathe-
matical induction, P (n) is true for all integers n ≥ 1; that is,
n(n + 1)(2n + 1)
12 + 22 + · · · + n2 =
6
is true for every positive integer n. 2
Recall that in a geometric sequence, each term is obtained from the preceding one by
multiplying by a constant factor. If the first term is 1 and the constant factor is r, then
the sequence is 1, r, r2 , r3 , . . . , rn , . . .. The sum of the first n terms of this sequence is given
by a simple formula which we shall verify using mathematical induction. We comment that
although in the proof of Results 2.23 and 2.24 we defined statements P (n) so that we could
apply Theorem 2.22 it is not actually necessary to do this, even though it is often useful.
We illustrate this remark in our next few examples.
Theorem 2.25 (Sum of a Geometric Sequence) For all integers n ≥ 0 and all real numbers
r with r 6= 1,
Xn
rn+1 − 1
ri = .
r−1
i=0
Proof. We proceed by mathematical induction. To show that the formula holds for n = 0,
we must show that
X0
r0+1 − 1
ri = .
r−1
i=0
2.10. PROOF BY MATHEMATICAL INDUCTION 51
rk+1 − 1
= + rk+1 (by the inductive hypothesis)
r−1
rk+1 − 1 (r − 1)rk+1
= +
r−1 r−1
rk+1 − 1 + (r − 1)rk+1
=
r−1
rk+2 − 1
= ,
r−1
thus verifying Equation (2.3). Hence, by the principle of mathematical induction, the
formula is true for all integer n ≥ 0. 2
Induction can also be used to solve problems involving divisibility, as the next two exam-
ples illustrates.
52 CHAPTER 2. PROOF TECHNIQUES
= 4 · 22k − 1
= 4(3m + 1) − 1
= 12m + 3
= 3(4m + 1).
Proof. We proceed by mathematical induction. When n = 2, the result is true since in this
case n3 − n = 23 − 2 = 8 − 2 = 6 and 6 is divisible by 6. Hence, the base case when n = 2
is true. For the inductive hypothesis, let k be an arbitrary (but fixed) integer such that
k ≥ 2 and assume that the property holds for n = k, i.e., suppose that k 3 − k is divisible
by 6. For the inductive step, we must show that the property holds for n = k + 1. That is,
we must show that (k + 1)3 − (k + 1) is divisible by 6. Since k 3 − k is divisible by 6, there
exists, by definition of divisibility, an integer r such that k 3 − k = 6r. Now, by the laws of
algebra and the inductive hypothesis, it follows that
(k + 1)3 − (k + 1) = (k 3 + 3k 2 + 3k + 1) − (k + 1)
= (k 3 − k) + 3(k 2 + k)
= 6r + 3k(k + 1).
Now, k(k + 1) is a product of two consecutive integers, and is therefore even (see Exer-
cise 2.16). Hence, k(k + 1) = 2s for some integer s. Thus, 6r + 3k(k + 1) = 6r + 3(2s) =
6(r + s), and so, by substitution,
(k + 1)3 − (k + 1) = 6(r + s),
2.10. PROOF BY MATHEMATICAL INDUCTION 53
Induction can also be used to verify certain inequalities, as the next two examples illus-
trates.
2k+1 = 2 · 2k
= 2(k + 1) + 2k
For the inductive step, we must show that the inequality holds for n = k + 1. That is, we
must show that
√ 1 1 1 1
k + 1 < √ + √ + ··· + √ + √ .
1 2 k k+1
54 CHAPTER 2. PROOF TECHNIQUES
√ √ √
Since k ≥ 2, k < k + 1, and so (multiplying both sides by k),
√ √
k < k k + 1.
Exercises
µ ¶2
3 3 3 n(n + 1)
2.31 Prove that for all integers n ≥ 1, 1 + 2 + · · · + n = .
2
n(n + 1)(n + 2)
2.32 Prove that for all integers n ≥ 1, 1 · 2 + 2 · 3 + · · · + n(n + 1) = .
3
1 1 1 n
2.33 Prove that for all integers n ≥ 1, + + ··· + = .
1·2 2·3 n(n + 1) n+1
2.34 Prove that for all integers n ≥ 0, 5n + 3 is divisible by 4.
[2] Epp S. S., Discrete Mathematics with Applications (Third Edition). Thomson
Brooks/Cole (2004).
[3] Johnsonbaugh R., Discrete Mathematics (Fourth Edition). Prentice Hall, Inc., New
Jersey (1997).
[4] Malik D. S. and M. K. Sen, Discrete Mathematical Structures: Theory and Applications
Thomson Course Technology (2004).
55