MATH 421 Practice
MATH 421 Practice
Abstract
These are collaboratively TeXed notes for our section of Math 421 at UW-Madison
this semester. Each student will volunteer to be the official notetaker for one week.
When it’s your turn, please feel free to consult with each-other and with Alex if you
need help getting started with LaTeX.
Contents
1 Introduction to sets, logic, and proofs 2
1.1 Introduction to set theory (Jan 26) . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Logical statements, implications, and quantifiers (Jan 28) . . . . . . . . . . . . 5
1.3 Proofs (Feb 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3 Infinity 25
3.1 Finite and infinite sets (Feb 16) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.2 Countable sets (Feb 18) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.3 Uncountable sets (Feb 23) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.4 Another look at Cantor’s proof (Feb 25) . . . . . . . . . . . . . . . . . . . . . . . 33
4 Number systems 35
4.1 Rules of Arithmetic (March 9) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.2 Equivalence relations (Mar 11) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.3 The rational numbers (Mar 11) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.4 Properties of Q (Mar 16) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.5 The real numbers (Mar 18) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
4.6 Properties of R (Mar 23) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.7 Supremum and infimum (Mar 23) . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
S = {0, 1, π, tomato}.
We write
1∈S
to say that the element “1” belongs to S. On the other hand, we write
carrot ∈/ S
S = {1, 1, 0, π, tomato, π}
2
Example 1.1.2. Consider the two sets
and
B = {states in the U.S.A. that share a corner with three other states}.
By consulting a map, one can observe that every element of the set A shares a corner with
three other states (indeed, with the other three elements of A). Hence, every element of A
belongs to B. By studying the rest of the map exhaustively, one checks that none of the
remaining 46 states has a 4-way corner. Therefore A = B.
But what is a state? And, more importantly, what is a tomato? (Vegetable? Fruit?
Berry?) These questions are outside the purview of this class.
In mathematics, we generally restrict ourselves to a very limited “universe” of sets. In
fact, we will start with only the following two sets: the natural numbers
N = {1, 2, 3, 4, 5, . . .}
S ⊂ T.
N ⊂ Z.
In fact, the former is precisely the set of “positive integers.” We can thus specify the subset
of natural numbers using the following notation:
N = {n ∈ Z ∣ n > 0}.
1
In fact, I encourage you not even to take the familiar properties of the natural numbers (a + b = b +
a, a(b + c) = ab + ac, etc) for granted. These are consequences of Peano’s axioms — see Wikipedia.
3
Example 1.1.4. Consider the subset of Z defined by
“E is the set of all integers, n, such that n = 2m for some natural number, m.”
For instance, why is 0 ∈ E? Because there does exist an integer (namely, m = 0) such that
2 ⋅ m = 0.
Example 1.1.5. The set of odd integers is given by
Definition 1.1.6. We say that an integer p divides an integer n if and only if there exists
an integer m such that
n = p ⋅ m.
For instance, given an integer n ∈ Z, we have n ∈ E if and only if 2 divides n. (In this case,
m = n/2 is an integer).
Example 1.1.7. Consider the subset of N defined by
Q = {n ∈ N ∣ m divides n ⇒ m = 1 or m = n}.
The symbol ⇒ means “implies;” in other words, the set Q is defined to be “the set of all
positive integers such that if m divides n, then m = 1 or m = n.” (See Section 1.2.2 below for
more on implications.)
What precisely is the set Q? Let’s translate the definition into more familiar terms. An
integer that divides n is also called a “factor.” So the statement is that “if” m is a factor of
n, then m must equal either 1 or n itself. In other words:
Hence
Q = {1, 2, 3, 5, 7, 11, 13, 17, 19, . . .}
is just the set of all prime numbers (including 1).
Next week, we will continue discussing “set operations,” i.e., things one can do with sets
(or collections of sets) to obtain new sets. But first, we need to discuss logical statements
and implications, and go over what it means to prove a statement mathematically.
4
1.2 Logical statements, implications, and quantifiers (Jan 28)
References for this section and the next are Hutchings’s notes and Chapter 3 of “Transition
to higher math,” both available on Canvas.
1.2.1 Statements
3. “The time has come.” (The time for what, exactly?) Not a statement, at least as far
as math is concerned.
Given one or more statements, there are several standard logical “operations” that we
can perform on them. These are:
Negation: ¬P = “6 is not an even integer” (False.)
The negation of a statement is true if and only if its negation is false. A double negation
gives us back the original statement:
P Q ¬P P ∨Q P ∧Q
T T F T T
F T T T F
T F F T F
F F T F F
5
The conjunction of these would be:
“Liz is not taking math and not taking o. chem” = (¬P ) ∧ (¬Q).
1.2.2 Implications
Suppose that P and Q are two separate statements (as above). We say P implies Q, and
write
P ⇒Q
to mean
“if P, then Q”
or, in other words,
“P is true only if Q is true.”
6
Example 1.2.3. Let
P = “Harry is a Packers fan”
Q = “Harry is a human being.”
Does P imply Q? Certainly....if Harry is a Packers fan, then he must be a human being. If
Harry is a household cat, he might potentially be a mascot, but calling him a “fan” would
be difficult to justify. In other words, Harry can be a Packers fan only if he is also a human
being.
On the other hand, does Q imply P ? In other words, if Harry is a human being, does it
follow that he is a Packers fan? Blasphemous as it may sound, there do exist human beings
that do not actively root for the Packers. So for all we know, Harry may think and breathe,
but not be a Packers fan. Therefore Q does not imply P, in which case we write
Q⇒
/ P.
¬Q ⇒ ¬P = “If Harry is not a human being, then Harry is not a Packers fan.”
7
Example 1.2.5. Let S and T be sets. The statement:
“If x ∈ S, then x ∈ T ”
Why? Because if the first one is true, then the second one is definitely true. On the other
hand, if the first one is false (i.e. there does exist an x ∈ S such that x ∈/ T ), then the second
one is also obviously false. Indeed, both implications are equivalent to the statement that S
is a subset of T (i.e. S ⊂ T )—see Definition 1.1.3 above.
It takes some getting-used-to; but once we’ve been doing proofs for a little while, the
freedom to change between an implication (P ⇒ Q) and its contrapositive (¬Q ⇒ ¬P ) will
become second nature.
This discussion can be summarized in the following truth table:
1.2.3 Quantifiers
Things get more interesting when we combine logic with set theory (as we have already
begun to do in Example 1.2.5 above).
Let S be a set (for instance, S = Z is the set of integers), and suppose that P (x) is a
sentence about some element x ∈ S. For example, we might take the sentence
This isn’t quite a statement (yet), because we don’t know which x we’re talking about. But
there are two common ways to make it into a statement:
and
∃x ∈ S, R(x) = “There exists an x ∈ S, (such that) if x > 0 then x2 + 1 > 0.”
The two symbols ∀ (“for all”) and ∃ (“for some,” or, “there exists”) are known as quanti-
fiers. They determine the range of x’s that a statement needs to be true for: either for all
of them, or just for one.
8
The two statements above are both true for S = Z (in fact, the first one implies the second
one). But here is another example:
Example 1.2.6. Consider the statement
Is this statement true or false? It’s a bit more difficult to tell...because of the “∀” symbol,
we are somehow asked to check all possible integers x. But in fact the statement is false,
because for x = −1, we have
(−1)2 + 2(−1) + 1 = 0 >/ 0.
Since P is false, we have established that the negation ¬P is true.
Notice that to establish ¬P, for a statement involving “∀,” we had to show that there
“∃” an x for which it fails. (Such an x is sometimes called a counterexample.)
Example 1.2.7. Consider the statement
∃x ∈ Z, x2 + 2x + 1 > 0.
This statement is clearly true: for instance, we can just take x = 1, and note that 12 + 2 + 1 =
4 > 0.
Example 1.2.8. Consider the statement:
∃x ∈ Z, x2 = 2.
This statement asserts that there exists an integer whose square is 2; but of course, this is
√
false, since 2 is not an integer (indeed, not even a rational number....to be proved later).
To show this, we can check that the set
∀x ∈ Z, x2 ≠ 2.
9
1.3 Proofs (Feb 2)
A proof is a translation of statements that we know (or assume) to be true into a new
true statement, using the rules of logic discussed above. As our first example, we read a
dramatic dialogue from Hutchings’s notes, in which the following proposition3 and its proof
were “discovered.”
Proposition 1.3.1. If x ∈ Z is an even number, then x2 is also even.
Proof. If x is even, then we know by definition that
x = 2y
x2 = (2y)2 = 4y 2 .
x2 = 4y 2 = 2(2y 2 ) = 2z.
A direct proof is usually carried out by starting from a true statement, P, and establishing
a chain of implications
P ⇒ P1 ⇒ P2 ⇒ P2 ⇒ ⋯ ⇒ Q,
from which we conclude that Q is also true.
The above proposition was our first example of a direct proof. Here is another one:
Proposition 1.3.2. For every x ∈ Z, if x is odd then x + 1 is even.
Proof. Let x ∈ Z.4 If x is odd, then by definition,
x = 2y + 1
10
Here is another example, this time involving set theory instead of arithmetic.
Proof by “cases” is a technique that one does very often in combination with the other proof
techniques.
x(x + 1) = 2y(2y + 1)
(1.2)
= 2 (y(2y + 1)) .
x + 1 = 2z
So x(x + 1) is even.
Since we’ve covered both cases, we’re done.5
This is where instead of proving an implication P ⇒ Q directly, we instead prove its con-
trapositive ¬Q ⇒ ¬P. As discussed above, we are free to do this, since the contrapositive of
any statement is always logically equivalent to it (i.e. if one is true then the other is true,
and vice-versa).
11
Proof. We prove the contrapositive of the statement, namely:
“If a = 0 or b = 0, then ab = 0”.
This also breaks up into cases:
Case 1. If a = 0, then ab = 0 ⋅ b = 0 and we’re done.
Case 2. If b = 0, then ab = a ⋅ 0 = 0 and we’re also done.
12
1.3.4 Proof by induction
Suppose that P (n) is a statement that involves a natural number n ∈ N. The Principle of
Mathematical Induction (PMI) states that:
if
then
Proposition 1.3.7. If a1 , . . . , an ∈ Z are such that the product a1 ⋯an = 0, then ai = 0 for
some i with 1 ≤ i ≤ n.
a1 ⋯an+1 = 0.
13
Case 1. If a1 ⋯an = 0, then by the inductive hypothesis, we know that ai = 0 for some
1 ≤ i ≤ n, so we’re done.
Case 2. If an+1 = 0, then we’re also done.
In either case, we have established the claim for n + 1, completing the inductive step. By
the PMI, it follows that the proposition is true for all n ∈ N, as desired.
n(n + 1)
1+2+⋯+n=
2
holds for all n ∈ N.
1(1 + 1) 2
1= = =1
2 2
so the formula is true.
For the inductive step, suppose that the formula is true for n. We need to show that the
left-hand side (LHS) of the formula with n + 1 equals the right-hand side (RHS). The LHS
is:
1 + 2 + ⋯ + n + (n + 1).
By the induction hypothesis, we have:
n(n + 1)
1 + 2 + ⋯ + n + (n + 1) = +n+1
2
n
= (n + 1) ( + 1)
2
(1.3)
n+2
= (n + 1) ( )
2
(n + 1)(n + 2)
= .
2
But this is precisely the RHS of the formula for n + 1, completing the inductive step. By the
PMI, the formula holds for all n ∈ N, as desired.
14
Contradiction arguments should only be used as a “method of last resort,” when a direct
proof or proof by contrapositive is infeasible. When you do get to do one, though, it can be
quite fun.
Below, we will use a contradiction argument to prove a very famous theorem. First we
need the following lemma.7
Lemma 1.3.9. Let p ∈ N be a natural number, and n ∈ Z be an integer. If p > 1, then p does
not divide both n and n + 1.
Proof. We will prove the contrapositive statement: supposing that p ∈ N divides both n and
n + 1, then p = 1.
If p divides both n and n + 1, then there exist integers m, m′ ∈ Z such that
n=p⋅m and n + 1 = p ⋅ m′ .
1 = (n + 1) − n = pm′ − pm
(1.4)
= p(m′ − m).
Theorem 1.3.10 (Euclid, ca. 300BC). There exist infinitely many prime numbers.
Proof. Suppose the contrary. Then there exist only finitely many prime numbers, which we
label as
p1 , p2 , . . . , pm
for some m ∈ N. Here, we assume that pi ≥ 2 by definition.
Consider the number
n = p1 p2 ⋯pm .
By construction, n is divisible by every prime number pi . By Lemma 1.3.9, it follows that
n + 1 is not divisible by any prime numbers. But since n + 1 > 1, it must have at least one
prime factor. This is a contradiction.
It follows that our assumption must have been false, i.e., infinitely many prime numbers
exist.
Note: Later on, we will discuss what it means for a set to be “finite” or “infinite” in much
greater detail.
7
A lemma is a “simple” proposition that will be used afterwards to prove a theorem.
15
2 Set operations and functions
2.1 Intersection and union (Feb 4)
Definition 2.1.1. Let A and B be sets.
• The union A ∪ B is the set of all elements belonging either to A or to B (or both).
Example 2.1.2.
• {0, 2, 4}∩{1, 3} = {} = ∅. This set, which has no elements at all, is known as the empty
set.
Proposition 2.1.3. Here are several basic properties of intersection and union.
1. A ∪ ∅ = A
2. A ∩ ∅ = ∅
3. A ∩ B ⊂ A ⊂ A ∪ B
4. A ∪ B = B ∪ A, A ∩ B = B ∩ A (commutativity)
5. A ∪ (B ∪ C) = (A ∪ B) ∪ C, A ∩ (B ∩ C) = (A ∩ B) ∩ C (associativity)
6. A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) (distributivity)
7. A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C).
A ∩ (B ∪ C) ⊂ (A ∩ B) ∪ (A ∩ C)
and
A ∩ (B ∪ C) ⊃ (A ∩ B) ∪ (A ∩ C).
16
(⊂) Let x ∈ A ∩ (B ∪ C). Then x is in A, and x is either in B or in C. If x ∈ B, then
x ∈ A ∩ B, so x ∈ (A ∩ B) ∪ (A ∩ C). If x ∈ C, then x ∈ C ∩ A = A ∩ C, so x ∈ (A ∩ B) ∪ (A ∩ C).
This shows that x ∈ (A ∩ B) ∪ (A ∩ C), as desired.
(⊃) Let x ∈ (A ∩ B) ∪ (A ∩ C). Then either x ∈ A ∩ B or x ∈ A ∩ C. In the first case, we
have x ∈ A and x ∈ B, so x ∈ B ∪ C. So x ∈ A ∩ (B ∪ C). In the second case, we have x ∈ A
and x ∈ C, so x ∈ C ∪ B = B ∪ C. This shows that x ∈ A ∩ (B ∪ C), as desired.
Since each set is a subset of the other, they are equal.
It is actually easy to picture the above result using Venn Diagrams; still, at the end of
the day, one has to write out the proof formally.
Answer. Yes. This is a set with the single element {1, 2}, which is also an element of S.
Therefore, every element of {{1, 2}} is also an element of S.
Question. Is ∅ a subset of S?
Answer. Yes; in fact the empty set is a subset of any set. (Why?)
Example 2.2.2. Let S be as above and consider T = {{1, 2}, 3}. We have:
• S ∩ T = {{1, 2}}.
Question. Is 2 an element of S ∪ T ?
17
Answer. No; but 3 is.
Now that we have started making collections of sets, it is tempting to become a bit too
grandiose, as follows.
Example 2.2.3 (Russell’s Paradox). Let U be the set of all sets. Define the subset
R = {S ∈ U ∣ S ∈/ S}.
Question. Is R an element of R?
It is possible to avoid these kinds of problems by being more strict about what kinds of
sets one allows in one’s theory: this is called axiomatic set theory (as opposed to naive set
theory, which we have been practicing). But for everyday use, naive set theory is almost
always good enough.
A∁ = {x ∈ U ∣ x ∈/ A}
18
Proof. We need to show that each x ∈ Z is either even or odd. We assume without loss of
generality that x ≥ 0 and use induction.
Base Case: x = 0 is even since 0 = 2 ⋅ 0.
Inductive Step: assume that all integers up to n = k are either even or odd. We want to show
that n = k + 1 is either even or odd.
Case 1: k = 2m, m ∈ Z is even. Then k + 1 = 2m + 1 is odd.
Case 2: k = 2m + 1, m ∈ Z is odd. Then k + 1 = 2m + 1 + 1 = 2m + 2 = 2(m + 1) is even.
This completes the inductive step, and the proof.
Theorem 2.3.3. Suppose A and B are subsets of U . Then (A ∪ B)∁ = A∁ ∩ B ∁
Proof. (⊂) Let x ∈ (A ∪ B)∁ . Then x ∈/ A and x ∈/ B (otherwise x ∈ A or x ∈ B, hence
x ∈ A ∪ B). But this just means x ∈ A∁ ∩ B ∁ .
(⊃) Let x ∈ A∁ ∩B ∁ . Then x ∈/ A and x ∈/ B Ô⇒ x ∈/ A∪B (otherwise, x ∈ A or x ∈ B).
Note: This is “the same” as De Morgan’s Law!
Now, what about A ∩ B ∩ C? We have:
A ∩ B ∩ C = {x ∣ x ∈ A and B and C}.
Similarly,
A ∪ B ∪ C = {x ∣ x ∈ A or B or C}.
Suppose we have a collection of sets {A1 , A2 , A3 , ⋯}. We normally don’t use {} and simply
write
A 1 , A2 , A3 , ⋯
We say that this collection is “indexed” by the natural numbers N. Their intersection is
∞
⋂ An = A1 ∩ A2 ∩ A3 ∩ ⋯ = {x ∣ x ∈ An ∀n}.
n=1
Their union is
∞
⋃ An = A1 ∪ A2 ∪ A3 ∪ ⋯ = {x ∣ x ∈ An for some n}.
n=1
Example 2.3.4. For each n ∈ N, let
An = {1, 2, 3, . . . , n} = {x ∈ N ∣ x ≤ n}
Question. What is ⋃∞
n=1 An ?
Answer. ⋂∞
n=1 An = {1}.
19
2.4 Functions (Feb 11)
Consider two sets A (the domain) and B (the codomain). A function (written f ∶ A → B) is
an assignment of a value f (x) ∈ B for each element x ∈ A. A “function” can also be called a
“map”. The set of all outputs
is called the image of f (Note: the image of f is a subset of B, i.e. f (A) ⊂ B).
Given a subset Y ⊂ B, the pre-image (or inverse image) is the set of all points that map
to Y . I.e.
f −1 (Y ) = {x ∈ A ∣ f (x) ∈ Y }.
Note that the image of a subset of A is a subset of B, and the pre-image of a subset of B is
a subset of A.
Example 2.4.1. Let A = {1, 2, 3}, B = {0, 2, 4, 6, 8}. Let
f ∶A→B
x z→ 2x.
Answer: {2, 6}
Answer: {2, 3}
Answer: ∅, because 4 ∈/ A.
f ∶Z→Z
x z→ x2
20
Question. What is f −1 ({1})? What about f −1 ({−1})? f −1 ({2, 3, 5})?
Answer: The pre-image of N is the set of all numbers x ∈ Z such that x2 ∈ N. This is every
integer except 0. So f −1 ({N}) = Z ∖ {0}.
Note: We will sometimes use the set difference between two sets:
A ∖ B = {x ∈ A ∣ x ∈/ B} = A ∩ B ∁ .
Definition 2.4.3. A function f is injective (one to one) if f maps distinct elements of the
domain to distinct elements of the codomain. I.e. for each y ∈ B, there is at most one x ∈ A
such that f (x) = y.
If a function f is injective, we can say that if x1 , x2 ∈ A and that x1 ≠ x2 , then f (x1 ) ≠
f (x2 ). Example 2.4.1 is injective but Example 2.4.2 is NOT injective (because f (n) = f (−n)
for all n ≠ 0).
Definition 2.4.4. A function is surjective (onto) if f (A) = B (the image of the domain
equals the codomain). I.e. for every y ∈ B, there exists at least one x ∈ A such that f (x) = y.
f (A) = B ⇐⇒ f −1 (y) ≠ ∅
for all y ∈ B. Neither Example 2.4.1 nor Example 2.4.2 is surjective.
Example 2.4.5. f ∶ Z Ð→ N ∪ {0}, x ↦ ∣x + 2∣. Is this surjective? Yes!
21
Yes!
⎧
⎪
⎪
⎪
⎪ 0 x=0
⎪
⎪
f (x) = ⎨2x + 1 x > 0
⎪
⎪
⎪
⎪
⎪
⎪ 2∣x∣ x<0
⎩
Although Z seems to have more elements than N, we can map every element in Z to every
element of N. Interesting...
f −1 (y) = x ⇐⇒ f (x) = y.
Since f is surjective, for any y, there exists an x such that f (x) = y. Since f is injective,
that x is unique. Consequently, (f ○ f −1 )(x) = x , and (f −1 ○ f )(x) = x.
Note: The notation “f −1 ” has two different meanings! It is both used to denote the
“inverse image” of a set, and to denote the “inverse function” of a bijective function. It
should always be clear from the context which one we mean.
S × T = {(x, y) ∣ x ∈ S and y ∈ T }
Example 2.5.2.
S = {0, 1, 2}
T = {3, 4}
S × T = {(0, 3), (0, 4), (1, 3), (1, 4), (2, 3), (2, 4)}
S ×T ≠T ×S
Example 2.5.3. N × N =
{(x, y) ∣ x ∈ N, y ∈ N}
⎧
⎪ (1, 1) (1, 2) (1, 3) (1, 4) ...⎫
⎪
⎪
⎪
⎪ ⎪
⎪
⎪
⎪
⎪(2, 1) (2, 2) (2, 3) (2, 4) ...⎪
⎪ ⎪
⎪
⎨ ⎬
⎪
⎪
⎪ ⋮ ⎪
⎪
⎪
⎪
⎪
⎪ ⎪
⎪
⎪
⎪
⎩ ⋮ ⎪
⎭
22
N×N=
Question. Let S = {1, 2, 3} and T = {4, 5}. Which of the following subsets of S × T are equal
to the graph of some function f ∶ S Ð→ T ?
Example 2.5.6. {(1, 4), (2, 4), (3, 5)}
5
4
1 2 3
1 2 3
23
f (3) = ???
Answer: Not a function, since f (3) = ”undefined.”
24
3 Infinity
3.1 Finite and infinite sets (Feb 16)
Let
Pn = {1, 2, 3, . . . , n} ⊂ N
be the set of all integers from 1 to n.
Definition 3.1.1. We say that a set is finite if there exits a bijection from Pn to S, for
some n ∈ N. In this case, we write
∣S∣ = n,
and say “the order of S is n.”
Otherwise, we say that S is infinite.
Example 3.1.2. Consider the set
1 z→ ∗
2 z→ @
3 z→ †
(3.1)
4 z→ Ivanka
5 z→ x
6 z→ potato.
N, N × N, N × Z, Z × N, and Z × Z
25
Example 3.1.4. If A and B are finite, and
∣A∣ = n = ∣B∣,
then there exists bijections
∼
→A
Pn Ð
∼
→ B.
Pn Ð
∼
But any bijection is invertible. So we also have A Ð
→ Pn , and the composition
∼ ∼
AÐ →B
→ Pn Ð
is a bijection.
Informal definition. Two sets S and T have “the same size” if there exists a bijection
(i.e. a 1-1 correspondence) between them.
Example 3.1.5. Z N
Do these have the same size?
{..., −4, −3, −2, −1, 0, 1, 2, 3, 4, ...}
{1, 2, 3, 4, ...}
We saw last time that there does exist a bijection:
∼
ZÐ
→N
∼
and Z ←
ÐN
So they have the same size!
Question. Do all the sets of Example 3.1.3 have the ”same size?” I.e., is it possible to
construct bijections between them?
More generally, are all infinite sets the “same size?”
26
Definition 3.2.2. We say that a set S is countable if it is either finite or countably infinite.
∼
Example 3.2.3. We saw last time that there is a bijection g ∶ N → Z (specifically, the inverse
∼
of the bijection Z → N of Example 2.4.7). Therefore Z is countably infinite.
Example 3.2.4. Let
be the set of even integers. To show that E is countable, we just need to construct a bijection
∼
N → E.
f ∶Z→E
(3.2)
n ↦ 2n.
To obtain a bijection N → E, we just take the composition with the map g of the previous
example:
g f
N Ð→ Z Ð→ E.
Since the composition of two bijections is a bijection, f ○ g ∶ N → E is the required bijection.
We will now prove a few lemmas that will save us from having to construct bijections
explicitly every time we want to show that a set is countable.
Pk → A
n z→ an
is a bijection, so A is finite (⇒ countable).
Case 2. A does not contain a largest element (i.e ∀a ∈ A, ∃ a′ ∈ A s.t a′ > a). Then the
above list
a1 < a2 < a3 < ...
27
goes on forever. So the map
N Ð→ A
n z→ an
is a bijection. ⇒ A is countably infinite (⇒ countable).
Q = {m ∈ N ∣ m ∈ N divides n ⇒ m = 1 or m = n}
= {1, 2, 3, 5, 7, 11, 13, 17, 19, 23, ...}.
This is the set of all prime numbers (including 1). We proved in Theorem 1.3.10 above that
this set is infinite! By the previous Lemma, Q is in fact countably infinite.
Proof. Define the subset A = f (S) ⊂ N. By the previous Lemma, A is countable. But we
can define a map
g ∶ S Ð→ A
x z→ f (x).
Since f is injective, g is also injective. Since A = f (S), g is also surjective. Therefore g is a
bijection. Since A is countable, S is also countable.
f ∣A ∶ A → N
x ↦ f (x)
Lemma 3.2.9. Suppose that there exists a surjective map N ↠ A. Then A is countable.
f ∣M ∶ M → A
(3.3)
x ↦ f (x)
is bijective. (For each y ∈ S, choose exactly one x ∈ f −1 ({y}), and let x ∈ M.)
∼ ∼
Case 1. M is finite. Pn Ð→M Ð → S is bijective ⇒ S is finite.
∼ ∼
Case 2. M is infinite. N Ð →M Ð → S is a bijection. ⇒ S is countably infinite.
28
Theorem 3.2.10. Let A and B be countable sets. Then A ∪ B is countable.
Proof. We may assume without loss of generality that A∩B = ∅. (If not, replace B by B ∖A,
which is countable by Lemma 3.2.8.)
Since A and B are countable, there exist injective maps
f ∶A↪N
g ∶ B ↪ N.
Consider the map
h ∶ A ∪ B Ð→ Z
⎧
⎪f (x) x ∈ A
⎪
h(x) = ⎨
⎪
⎩−g(x) x ∈ B.
⎪
∼
Then h is injective. So the composition A ∪ B ↪ Z Ð→ N is a composition of injective maps,
so is injective.
Therefore, by the lemma above, A ∪ B is countable.
Question. Is N × N countable?
Answer: Yes. We showed two ways to “count” the points...either by using “boxes,” or by
using “diagonals.”
We also showed how to count Z × Z. In the picture below, we label the 1st, 2nd, 3rd, ...,
37th dot, etc.
...
37 31
...
17 13
4
5 3
10
21 26
...
29
Theorem 3.2.11. Let A and B be countable sets. Then the Cartesian product A × B is
countable.
Proof of Theorem 3.2.11. Since A and B are countable, there exist surjective maps
f ∶N↠A
g ∶ N ↠ B.
(Why?) Consider the “product map”
f × g ∶ N × N Ð→ A × B
Corollary 3.2.12. Let A1 , . . . , An be a finite collection of countable sets. Then the cartesian
product
A1 × A2 × ⋯ × An
is countable.
Proof. This follows by induction from the previous theorem (see homework).
Example 3.2.13. We now know that the sets N, Z, Z × N, Z × Z, Z × Z × Z × N, etc., are all
countable.
Question: Do there exist uncountable sets??
30
Given a set S and a positive integer n ∈ N, we shall denote the n-fold cartesian product
by
n times
³¹¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹·¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ ¹ µ
S n =S × S × S × ⋯ × S
= {(a1 , a2 , . . . , an ) ∣ ai ∈ S for i = 1, . . . , n}.
The elements of this set are sometimes called “n-tuples.” (For n = 2, we say “pairs,” and for
n = 3 we say “triples,” etc.)
Example 3.3.1. Take S = {0, 1}. Then ∣S∣ = 2. It was shown on homework that ∣S × S∣ = 4,
by constructing an explicit bijection with P4 . More generally, we have:
Proof. The base case is clear. For induction, assume the result for n. We have
Since the union is “disjoint,” i.e. the sets do not overlap, we have:
Notice that the order of this set grows “exponentially” with n; although of course if S is
finite, then S n is still finite for each n ∈ N. What we need is a much bigger set.
Definition 3.3.3. Given any set S, we denote the “infinite” cartesian product by
SN = S × S × S × ⋯
= {(a1 , a2 , a3 , ⋯) ∣ ai ∈ S for i ∈ N}.
31
• (1, 0, 0, 1, 0, 0, 1, 0, 0, . . .) sequence of 1, 0, 0 repeating ad infinitum
The point here is that the set {0, 1}N contains an absolutely vast array of possible se-
quences....in fact, it turns out to be even bigger than the set of natural numbers N.
Theorem 3.3.5 (G. Cantor, 1878). The set {0, 1}N is uncountable.
Proof. Suppose, on the contrary, that {0, 1}N is countable. Then it is possible to list (i.e.
index) all of its elements by the natural numbers, as follows:
s1 = 0, 1, 0, 1, 0, ⋯
s2 = 1, 0, 1, 0, 0, ⋯
s3 = 1, 1, 1, 0, 1, ⋯
s4 = 0, 1, 1, 0, 0, ⋯
s5 = 1, 0, 0, 1, 1, ⋯
⋮ ⋮ ⋱
We now construct a new sequence, s, as follows. If the first digit of s1 is 0, let the first
digit of s be 1, and vice-versa. If the second digit of s2 is 1, let the second digit of s be 0, and
vice-versa. Continuing, if the n’th digit of sn is 0, let the n’th digit of s be 1, and vice-versa.
So, in the above example, we would change each digit on the diagonal,
s = 1, 1, 0, 1, 0, ⋯
1, 1, 1, 0, 0, ⋯
1, 1, 0, 0, 1, ⋯
0, 1, 1, 1, 0, ⋯
1, 0, 0, 1, 0, ⋯,
32
to obtain the sequence s = (1, 1, 0, 1, 0, . . .).
By construction, the n’th element of s is different from the n’th element of sn , for each
n ∈ N. Therefore, as elements of {0, 1}N , we have
s ≠ sn for all n ∈ N.
But this means that the sequence s appears nowhere on the list s1 , s2 , s3 , . . . , which contra-
dicts our assumption.
We conclude that no such list can include all the elements of {0, 1}N , i.e., this set is
uncountable.
f (n) = an ∈ {0, 1}
as the set of all possible functions from N to {0, 1}. More generally, given two sets S and T,
we can define
T S = {set of all functions from S to T }.
We should note that two functions f and g are equal if and only if
f (x) = g(x) ∀ x ∈ S.
So, to show that f ≠ g, you just have to make sure that there exists at least one x ∈ S such
that
f (x) ≠ g(x).
(Above, we treated sequences in the same way.)
It’s worth reviewing the proof of Cantor’s theorem from this perspective.
Proof of Theorem 3.3.5, redux. Assume that the set of all functions from N → {0, 1} can
be indexed by the natural numbers:
33
Define a new function by
f ∶ N → {0, 1}
⎧
⎪0 if f (n) = 1
⎪
n↦⎨
⎪
⎩1 if f (n) = 0.
⎪
Since each n ∈ N is mapped to exactly one value, this is a function. And, by construction,
we have
f (n) ≠ fn (n) ∀ n ∈ N,
and so
f ≠ fn
as functions, for all n ∈ N. But this contradicts our assumption.
This proof can easily be adapted to show that for any set S with ∣S∣ ≥ 2, the set S N is
uncountable. For instance, with S = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, we could just define
⎧
⎪
⎪
⎪ 1 if fn (n) = 0
⎪
⎪
⎪
⎪
⎪
⎪ 2 if fn (n) = 1
⎪
⎪
⎪
f (n) = ⎨ ⋮
⎪
⎪
⎪
⎪
⎪
⎪ 9 if fn (n) = 8
⎪
⎪
⎪
⎪
⎪
⎩0
⎪ if fn (n) = 9.
Theorem 3.4.1. For any set S, there does not exist a bijection between S and {0, 1}S .
So, given any set S, one can always make a strictly larger set just by taking the set of
all functions from S to {0, 1}. This shows that “infinity” actually comes in infinitely many
different sizes.
34
4 Number systems
4.1 Rules of Arithmetic (March 9)
Below is the set of all integers
Z = {. . . − 3, −2, −1, 0, 1, 2, 3, . . .}
This is more than just a set, it comes equipped with arithmetical operations.
4.1.1 Addition
Proof. if x + a = a, then,
(−a) + (x + a) = (−a) + a (Because f+ is a function). But
(−a) + a = a + (−a) (A1)
=0 (A4)
Therefore
(−a) + (x + a) = 0
= (−a) + (a + x) (A1)
= ((−a) + a) + x (A3)
=0+x (A4)
=x+0 (A1)
=x (A3)
∴ x = 0.
35
Definition 4.1.2. “a − b” = a + (−b). In the last proof, we just ”subtracted a from both
sides”.
4.1.2 Multiplication
f⋅ ∶ Z × Z Ð→ Z
(a, b) z→ f⋅ (a, b) = “a ⋅ b”
This map satisfies the following axioms, for any a, b, c ∈ Z.
1⋅a=a
2⋅a=a+a
3 ⋅ a = 2a + a
...
(n + 1) ⋅ a = n ⋅ a + a
Proposition 4.1.3. a ⋅ 0 = 0.
Proof.
a ⋅ 0 + a ⋅ 0 = a ⋅ (0 + 0) (M 4)
=a⋅0 (A3)
a⋅0=0 (M 4)
36
Proposition 4.1.4. (−a) ⋅ (−b) = a ⋅ b.
∴ (−a) ⋅ (−b) = a ⋅ b
Note: we just showed that the product of two negative numbers is positive!
4.1.3 Ordering
37
Rewriting O2 and O3 from before:
O2: if (a, b) ∈ S< and (b, c) ∈ S< , then (a, c) ∈ S<
O3: if (b, c) ∈ S< , then (f+ (a, b), f+ (a, c)) ∈ S<
38
4.1.4 Division
p
We now want to “extend” Z to contain fractions , where p, q ∈ Z.
q
p
We want to build a set that contains these elements. Notice that is a pair of integers,
q
where q ≠ 0.
Z × (Z ∖ {0}).
p
We think of a pair (p, q) as a fraction . How do we add, subtract, multiply these pairs?
q
p p′ pq ′ + qp′
Definition 4.1.6. + ′ =
q q qq ′
So what we need to do is define a new set, called Q, the rational numbers, by “declaring”
that (p, p) = (1, 1). And more generally, that (p, q) = (p′ , q ′ ) if and only if ∃r ∈ Z s.t.
39
p ⋅ r = p′ and q ⋅ r = q ′
or
p = r ⋅ p′ and q = r ⋅ q ′ .
x ∼ y ⇐⇒ x2 = y 2 .
40
⇒ x2 = z 2
⇒ x ∼ z (transitive)
x ∼ y ⇐⇒ x ≤ y
Reflexive: x ∼ x?
x ≤ x.
Symmetric: if x ≤ y, is y ≤ x?
2 ≤ 3 but 3 ≰ 2.
a f i
e b d
g h c
Symmetric? Yes.
Reflexive? Yes.
Transitive? Yes.
So this is an equivalence relation!
41
Definition 4.2.5. Given an equivalence relation on a set, and an element a ∈ S, we write
[a] = {b ∈ S ∣ a ∼ b}
[a] = {a, f, i}
[f ] = {f, a, i} = [a]
[g] = {g, h, c}
Definition 4.2.7. We write S/ ∼ to denote “S modulo ∼”, the set of all equivalence classes
of ∼ on S. This is a collection of disjoint subsets of S.
42
if A ∈ X/ ∼ and B ∈ X/ ∼ ,
then if A ≠ B, then
A∩B =∅
Also,
⋃ A=S
A∈S/∼
In example 1, we have
Z/ ∼= {{0} , {1, −1} , {2−, −2} , . . . }
We could write
{[0], [1], [2], [3], . . . }
There is an obvious bijection
N ∪ {0} z→ Z/ ∼
n z→ [n]
Z/ ∼ is countably infinite. In example 4.2.4 (lecture hall), we had
(p, q) ∼ (p′ , q ′ ) ⇐⇒ pq ′ = p′ q.
p ⋅ q ′ = p ⋅ (q ⋅ r) = (p ⋅ r) ⋅ q = p′ ⋅ q.
43
Proposition 4.3.1. ∼ is an equivalence relation.
Proof.
1) (p, q) ∼ (p, q)? Yes.
2) if (p, q) ∼ (p′ , q ′ ), does (p′ , q ′ ) ∼ (p, q)?
pq ′ = p′ q
⇒ p′ q = pq ′ (M1)
⇒ (p′ , q ′ ) ∼ (p, q)
3) if (p, q) ∼ (p′ , q ′ ) and (p′ , q ′ ) ∼ (p′′ , q ′′ ), does (p, q) (p′′ , q ′′ )?
Have: pq ′ = p′ q and p′ q ′′ = p′′ q ′ .
Need: pq ′′ = p′′ q.
pq ′ q ′′ = p′ qq ′′
⇒ pq ′′ q ′ = q(p′ q ′′ )
⇒ pq ′′ = qp′′
Q = (Z × N)/ ∼
(p, q) ∼ (p′ , q ′ ) ⇐⇒ pq ′ = p′ q
We can define the equations “+” and “⋅”, and the order “<”, as follows:
pq ′ + p′ q
[(p, q)] + [(p′ , q ′ )] = [ ]
qq ′
[(p, q)] ⋅ [(p′ , q ′ )] = [(pp′ , qq ′ )]
[(p, q)] < [(p′ , q ′ )] if pq ′ < qp′ .
Moreover, if p ≠ 0, we can also define the inverse:
⎧
⎪(q, p)
⎪ p>0
[(p, q)] −1
=⎨
⎪
⎩(−q, −p) p < 0.
⎪
44
This satisfies:
⎧
⎪[(p, q) ⋅ (q, p)] = [(pq, pq)] = [(1, 1)]
⎪ p>0
[(p, q)] ⋅ [(p, q)]−1 = ⎨
⎪
⎩[(p, q) ⋅ (−q, −p)] = [(−pq, −pq)] = [(1, 1)] p < 0
⎪
Note: Strictly speaking, we need to check that these operations are “well-defined”, i.e. if
then
[(p, q)] + [(p′′ , q ′′ )] = [(p′ , q ′ )] + [(p′′ , q ′′ )].
i.e, that “f+ ” is a function on Q. I encourage you to check this as an exercise.
Theorem 4.3.3. The rational numbers, Q, also satisfy the axioms A1-A4, M1-M5, O1-O4.
Proof. We actually checked A1 and A2 already last class, and you have M4 and O3 on your
homework. The rest can be checked in a similar way.
Proof. We have to check that if m ≠ n, then [(n, 1)] ≠ [(m, 1)], i.e. (m, 1) ∼ (n, 1). But if
m ≠ n, then m ⋅ 1 ≠ n ⋅ 1, so by definition of ∼,
We will now switch to the following “standard” notation for rational numbers:
p
= [(p, q)]
q
p
= [(2p, 2q)]
q
p
= [(100p, 100q)]
q
45
p p q
= [( , )] if p and q are both even.
q 2 2
n
n = = [(n, 1)]
1
0
0 = = [(0, 1)]
1
1
1 = = [(1, 1)].
1
Theorem 4.4.2. Let x, y ∈ Q with x < y. There exist infinitely many rational numbers, z ∈ Q,
with
x < z < y.
x+x<x+y <y+y
2x < x + y < 2y
x+y
x< <y
2
x < z < y.
If we continue this method for more z-values, we can choose:
x+z
z′ =
2
Thus, we know that
x < z ′ < z < y.
Continuing, we write
x + z′
z ′′ =
2
⇒ x < z < z′ < z < y
′′
46
Proof. Q is certainly infinite, since there is an injective map from Z to Q (by the last
proposition).
Note that Z × N is countable, and there exists a surjective map:
Z×N↠Q
Proof. Suppose that x = pq satisfies the equation x2 = 2. We may assume, without loss of
generality, that p and q are not both even. (This can be achieved this by cancelling their
common factors of 2). We can write:
x2 = 2 ⇐⇒ p2 = 2q 2
Ô⇒ p is even
Ô⇒ p = 2r for some r ∈ Z.
But then
p2 = (2r)2
= 4r2 , and so
4r2 = 2q 2 .
2r2 = q 2
Ô⇒ q 2 is also even
Ô⇒ q is even.
But, this contradicts our assumption that p and q are not both even.
r r rr r r rrr r r
0 1 2 3
The blue set of numbers satisfy r2 < 2. The green set of numbers satisfy r2 > 2. Between
√
these two sets, there should exist a number called “ 2.” But we do not yet know that such
a number exists!
√
We need to define a number system in which 2 exists. This number system will be called
the real numbers, R. More generally, we want R to have the following special property.
47
Definition 4.4.5. (i) Given a set E, we say that M is an upper bound for E if for all
x ∈ E, x ≤ M.
(ii) We say that E is bounded above if an upper bound exists.
(iii) We say that M is the least upper bound for E if M is itself an upper bound for
E and for any given upper bound, M , we have M ≤ M.
(iv) We say that a number system (for instance, R) has the least upper bound prop-
erty if, for any subset E that is bounded above, there exists a least upper bound M for E.
In this case,
M = sup E
is called the supremum of E.
Example 4.4.6. Let E = {x ∈ Q ∣ x2 < 2}. Is this set bounded above? Yes. Let M = 2.
Ô⇒ s ∈ 0∗ ✓
48
3. Let s ∈ 0∗ . Then s < 0. Let r = 2s . Then,
s
s< <0
2
Ô⇒ s < r and r ∈ 0∗ .✓
Therefore, 0∗ is a Dedekind cut.
Example 4.5.3. Given any rational number t ∈ Q, we define
t∗ = {r ∈ Q ∣ r < t}.
This is called a ”rational” Dedekind cut. Then we must check if this set follows the param-
eters of a Dedekind cut:
1. t − 1 ∈ t∗ and t + 1 ≠ t∗
Ô⇒ t ≠ 0, Q
2. Given r ∈ t∗ , we have r < t. So if s < r, then s < r < t
Ô⇒ s ∈ t∗ ✓
3. Given s ∈ t∗ , we take
s+t
r= .
2
Since we have s < t, we write
s<r<t
Ô⇒ r ∈ t∗ and r > s.✓
So this is in fact a Dedekind cut!
Example 4.5.4. Let α = {r ∈ Q ∣ r2 < 2} ∪ 0∗ This is a Dedekind cut (this will be proved
√
on HW). But, it does not equal t∗ for any rational number t! This is true since 2 is not
rational. This would be called an irrational Dedekind cut.
Example 4.5.5. The set {r ∈ Q ∣ r ≤ 1} is not a Dedekind cut. Why is this the case?
Property (III) fails for s = 1.
Definition 4.5.6. Given two cuts α and β, we define the ”sum”
α + β = {r + s ∣ r ∈ α, s ∈ β}
r+s≠α+β
49
If r ≠ α, then ∀ r′ ∈ α, we have r′ < r. This is true since if r ≤ r′ , then r ∈ α by property (2.).
Also, if s ∉ β, then ∀ s′ ∈ β, we have s′ < s. So, ∀ r′ ∈ α and s′ ∈ β, we have
r′ + s” < r + s
Ô⇒ r + s ∉ α + β
Ô⇒ α + β ≠ Q✓
2. Given r ∈ α + β, we have r = t + t′ , for t ∈ α, t′ ∈ β. Given that s < r, let t′′ = t′ + s − r < t′
Ô⇒ t′′ ∈ β
α < β ⇐⇒ α ⊊ β.
α > β ⇐⇒ α ⊋ β
α = β ⇐⇒ α and β are equal and subsets of Q.
50
Definition 4.5.7. The real number system, R, is defined to be the set of all Dedekind cuts,
with the operation “+” and the order “<” defined above.
We have the following inclusions:
Z⊂Q⊂R
n ∈ Z ↦ [(n, 1)] ∈ Q
r ∈ Q ↦ r∗ ∈ R
Proof. (A1)
α + β = {r + s ∣ r ∈ α, s ∈ β}
= {s + r ∣ s ∈ β, r ∈ α}
= β + α✓
(A2) Same
(A3) We need to show:
α + 0∗ = α
(⊂) Given that r ∈ α + 0∗ , we have that r = t + t′ for t ∈ α, t′ ∈ 0∗
Ô⇒ t′ < 0
Ô⇒ r < t
Ô⇒ r ∈ α (by (2.))✓
(⊃) Given that r ∈ α, by (3.), ∃E ∈ α with r < t. Then, r − t < 0
Ô⇒ r − t ∈ 0∗ .
−s − t > r
Ô⇒ 0 > r + s + t
51
Ô⇒ 0 > r + s
Ô⇒ r + s ∈ 0∗ ✓
(⊃) Given q > 0, we must show that
−q ∈ α + (−α)
n ⋅ t ∈ α but,
(n + 1) ⋅ t ∉ α
Next, let r = −(n + 2)t
Ô⇒ −r − t = (n + 2)t − t
= (n + 1)t ∉ α
Ô⇒ r ∈ −α.
But then, we see that
r + (n ⋅ t) = −(n + 2)t + nt
= −2t = −q
Ô⇒ Since r ∈ −α and nt ∈ α, we conclude that − q ∈ α + −(α)✓
The rest of the axioms can be proved similarly.
Note that
Q⊂R
r z→ r∗
(r + s)∗ = r∗ + s∗
r < s Ô⇒ r∗ < s∗ .
The real numbers fill the “holes” in the number system Q! In fact, we have:
Proof. Let E ⊂ R be a nonempty subset that is bounded above (i.e. ∃β ∈ R, ∀γ ∈ E, γ < β).
We need to construct the least upper bound of E. We write
α = ⋃ γ ⊂ Q.
γ∈E
52
We claim that α is a Dedekind cut, and is the least upper bound of E.
(1.) α ≠ 0 since γ ∈ E is a Dedekind cut, and then it is nonempty as a subset of Q. Since
γ ⊂ β, ∀γ ∈ E, we see that α ⊂ β ⊊ Q
Ô⇒ α ⊊ Q✓
Ô⇒ s ∈ α✓
Ô⇒ γ ⊂ α
Ô⇒ γ < α✓
-Let α′ be any other upper bound for E. We need to show that α ≤ α′ , meaning that α ⊂ α′
Let r ∈ α. Then, r ∈ γ for some γ ∈ E. Since α′ is an upper bound for E, γ ⊂ α!
Ô⇒ r ∈ α′
Theorem 4.6.1. (i) Given any α > 0∗ in R, and β ∈ R, there exists n ∈ N such that
n⋅α>β
α < r∗ < β
53
′
Pick r = pq′ ∉ β, and let n = q ⋅ p′ ∈ N.
Claim: n ⋅ s ∉ β
For,
p p′
n ⋅ s = (q ⋅ p′ ) ⋅ = pp′ > ′ = r.
q q
Since r ∉ β and n ⋅ s > r, n ⋅ s ∉ β (by contrapositive of (II)) but n ⋅ s ∈ n ⋅ α.
Ô⇒ n ⋅ α ⊃ β
Ô⇒ n ⋅ α > β
as real numbers.
(ii) If α < β, then α ⊊ β by definition. So ∃r ∈ β, r ∉ α, so α ⊂ r∗ (by contrapositive of
(II)). Also r∗ ⊊ β (because r ∈ β, but r ∉ r∗ )).
So α ⊊ r∗ ⊊ β i.e. α < r∗ < β as real numbers.
√
Also, for any α > 0, we can define n α = {t ∈ Q ∣ t > 0, tn ∈ α} ∪ 0∗ .
Question: How big is R? Is it countably infinite or uncountably infinite?
Recall that {0, 1, 2, ..., 9}N is the set of all sequences with digits 0 through 9. Given
a = (a1 , a2 , a3 , ...), we want to define
“.a1 a2 a3 a4 ...,′′
and
a′ = .a1 a2 ...an 0999,
or vice versa.
54
Theorem 4.6.2. The set R is uncountable.
a ↦ .a1 a2 a3 ...
Given y ∈ R, there exist at most two sequences, a and a′ , with f (a) = f (a′ ). Therefore
∣ f −1 ({y}) ∣≤ 2 ∀y ∈ R.
In particular, f −1 ({y}) is countable. But, by definition, we have {0, ..., 9}N = ⋃ f −1 ({y}).
y∈R
So if R were countable, this would be a countable union of countable sets Ô⇒ countable.
But this contradicts Cantor’s theorem that {0, 1, ..., 9}N is uncountable.
Example 4.7.6. sup Z = ∞, inf Z = −∞ (because Z is bounded neither above nor below.)
55
Theorem 4.7.7. For any set E ⊂ R such that E is bounded below, the infimum inf E ∈ R
exists (∞ ∉ R).
56
5 Sequences and limits
5.1 The definition of a limit (Mar 25)
Definition 5.1.1. A sequence is an infinite string of real numbers a = (a1 , a2 , a3 , ...). In
our earlier notation, this is just an element of RN = {functions from N to R}, where we write
f (n) = an .
Example 5.1.2. 1, 21 , 13 , 41 , 51 , ...
an = n1
Example 5.1.3. 1, 2, 3, 4, 5, 6, ...
an = n ∀n ∈ N
Example 5.1.4. 1, 0, 1, 0, 1, 0, 1, 0, ...
⎧
⎪1 n odd
⎪
an = ⎨
⎪0 n even
⎪
⎩
Example 5.1.5. 1, 1.4, 1.41, 1.414, 1.4142, 1.41425, ...
√
This is the decimal expansion of 2.
Example 5.1.6. 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, ...
Example 5.1.7. 3, 1, 4, 1, 5, 9, 2, 6, ...
This is the sequence of digits in the decimal expansion of π. (Essentially just a random
sequence of integers in {0, ..., 9}.)
Let L be a real number. Informally, a sequence a converges to L if an ”becomes arbitrarily
close to L as n becomes arbitrarily large.” In the above examples:
Example 5.1.2: 1, 21 , 13 , 41 , ... This converges to L = 0.
Example 5.1.3: 1, 2, 3, 4, 5, ... This diverges to infinity.
Example 5.1.4: 1, 0, 1, 0, 1, 0, ... This diverges (all of the points have to get close to the
same L).
√
Example 5.1.5: 1, 1.4, 1.41, 1.414, ... This converges to 2.
Example 5.1.6: 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, ... Diverges.
We now make the formal definition of a limit, as follows.
Definition 5.1.8. We write an → L, or
lim an = L
n→∞
∣an − L∣ <
57
Note: Order of quantifiers is essential.
1
Proposition 5.1.9. The sequence an = n converges to L = 0, i.e.
1
lim = 0.
n→∞ n
n
Proposition 5.1.10. The sequence an = 1 + (−1)
n converges to L = 1.
3 2 5 4 7 6
0, 2 , 3 , 4 , 5 , 6 , 7 , . . .
1
Ô⇒ ∣an − 1∣ = < ε,
n
which is the desired statement. Since ε > 0 was arbitrary, we’re done.
is divergent.
58
Proof. To prove that a diverges, we need to show that no possible N ∈ R can satisfy the
definition, let L ∈ R. We must show that an ↛ L, i.e. in ∃ε > 0 such that ∀N ∈ R, ∃n > N
with ∣ an − L ∣≥ ε. In this case, we let ε = 12 .
Case 1: L ≥ 12
For n even, we have an = 0 Ô⇒ ∣ an − L ∣ = ∣ 0 − L ∣ = ∣ L ∣≥ 12 = ε. So ∣ an − L ∣≮ ε
∀n even. Since, for any N, ∃n > N that are even, this shows that an ↛ L
Case 2: L < 12
For n odd, we have an = 1 Ô⇒ ∣ an − L ∣ = ∣ 1 − L ∣> 21 .
Since L < 12 Ô⇒ −L > 12 Ô⇒ 1 − L > 12 Ô⇒ ∣ an − L ∣≮ 12 = ε. Since ∀N, ∃n > N with n
odd, this shows that an ↛ L
This covers all possible L, so we’re done.
59
Definition 5.1.14. We say that a sequence is bounded above (and respectively below) if
the set {an ∣ n ∈ N} is bounded above.
Note: A sequence can be bounded above (and below) and still diverge.
Note: In other words, boundedness is a necessary, but not sufficient condition for con-
vergence.
Proof. Let L ∈ R such that an → L. Let = 1. Since an → L, there exists N such that ∀n > N ,
∣an − L∣ < 1. Since an − L + L = an , ∣an ∣ ≤ ∣an − L∣ + ∣L∣ by the triangle inequality for
n > N Ô⇒ ∣an ∣ < 1 + ∣L∣ Ô⇒ {∣an ∣ ∣ n > N } is bounded above.
But the set {∣an ∣ ∣ n ≤ N } is also bounded above, since this is a finite set.
So {∣an ∣ ∣ n ∈ N} = {∣an ∣ ∣ n ≤ N } ∪ {∣an ∣ ∣ n > N } is also bounded above.
If {∣an ∣ ∣ n ∈ N} is bounded above, then {an ∣ n ∈ N} is bounded.
and
n ≥ N2 ⇒ ∣bn − b∣ < ε/2.
Let N = max(N1 , N2 ).
Then for n ≥ N , we have
60
Proof of 2. Given ε > 0, choose N such that, ∣an − a∣ < ε/c, for n > N ,
∣c ∗ an − c ∗ a∣
= ∣c ∗ (an − a)∣
= ∣c∣∣an − a∣ < ∣c∣ ∗ ε/∣c∣
= ε.
Proof of 3.
an ∗ b n → a ∗ b
We first do the special case that a = 0. We need to show that
an ∗ b n → 0 ∗ b = 0
⇒
an ∗ bn → 0.
Let ε > 0. By last class, since bn is convergent, it is bounded by some number B > 0.
∣bn ∣ < B, ∀n ∈ N
Since an → 0 by assumption, Choose N such that
(an − a)bn .
(an − a) ∗ b → 0.
abn → ab
61
(because a is just a constant). Therefore, the sequence
0 ∗ ∣5 + 0 + 0∣ = 0.
Example 5.2.4.
1 + (−1)n 1
an = = (1 + (−1)n ) .
n n
We can show directly that limn→∞ an = 0 or use the Squeeze Theorem:
if 0 < an < n2 as 0 → 0
as n2 → 0
an → 0.
Theorem 5.3.2. Suppose that a sequence a is monotone and bounded, then a is convergent.
62
By definition, we have
an ≤ a∀n
since a is an upper bound for E. Let ε > 0. Since a is the least upper bound, there must exist
N such that
an > a − ε.
But since a is monotone, we have
aN ≤ an
∀n ≥ N.
a − ε ≤ aN ≤ an ≤ a
⇒ a − ε < an ≤ a
⇒ a − an < ε,
an − a ≤ 0 < ε
∣a − an ∣ < ε
Since ε > 0 was arbitrary, we are done.
1
an = (1 + )n
n
n+1 n
=( )
n
n+2 n
an + 1 = ( ) +1
n+1
So,
an + 1 (n + 2)n + 1 (n + 1)n
= ∗
an (n + 1)n + 1 nn
(n + 2)n + 1
=
(n + 1) ∗ nn
n+1 n n+2
=( ) ×
n n+1
n+2 n+2 n
>1⇒( ) >1
n n
63
n+2
>1
n+1
an+1
⇒ >1
an
Therefore, the sequence an is monotonically increasing. We will see later that an is bounded.
Therefore, the previous Theorem implies that
lim an
n→∞
exists!
This limit is just the number “e” (by definition).
L − ε < aN ≤ L.
(If not, L − ε is an upper bound; but then L is not the least upper bound!)
Since an is increasing, if n > N, then
L − ε < aN ≤ an ≤ L
⇒ ∣an − L∣ < ε.
What about a sequence that is bounded, but not necessarily monotone? We want to
compare such a sequence with a monotone sequence (in fact, two of them.)
Let
En = {an ∣ m ≥ n}.
Define
An = sup En = sup am .
m≥n
An ≥ An+1
as desired.
64
Similarly, one has,
Bn ≤ Bn + 1
⇒ Bn is an increasing sequence.
By the previous theorem, both sequences An , Bn are convergent! We can therefore make
the following definition:
Definition 5.4.3.
lim sup an = lim An
n→∞ n→∞
lim sup an = 1
n→∞
lim inf an = 0.
n→∞
Example 5.4.5. an = (−1)n ∗ (1 + 1/n)
lim sup an = 1
n→∞
An = sup am = ∞∀n,
m≥n
An = (∞, ∞, ...)
lim An = ∞
n→∞
lim sup an = ∞.
n→∞
lim inf an = 0.
n→∞
lim sup an = 0
n→∞
(−1)n
Example 5.4.8. Let an = n . Then
65
More generally, we have the following:
L̄ = lim sup an
n→∞
L = lim inf an .
n→∞
(⇒) Suppose that a is convergent, with limn→∞ an = L. Then, given ε > 0, ∃ N such that
∣an − L∣ < ε
(∀n > N )
⇒ an − L < ε
⇒ an < L + ε
(∀n > N )
⇒ sup an ≤ L + ε
n≥N +1
⇒ lim sup an ≤ L + ε
N →∞ n≥N +1
L̄ ≤ L + ε.
But also,
L − an < ε
⇒ L − ε < an
(∀n > N )
⇒ L − ε < inf an
n≥N +1
⇒ L − ε ≤ lim inf an
N →∞ n≥N +1
⇒ L − ε ≤ L.
Therefore,
L̄ ≤ L + ε = (L − ε) + 2ε
L̄ ≤ L + 2ε.
66
By homework, we always have
L ≤ L̄
⇒ L ≤ L̄ ≤ L + 2ε
⇒ ∣L̄ − L∣ ≤ 2ε.
Since ε > 0 is arbitrary, we conclude that L = L̄
(⇐) Suppose that
L = L̄.
Let L = L = L̄. We will show that
lim an = L.
n→∞
Let ε > 0. By definition of the limsup, ∃N1 such that
sup am < L̄ + ε.
m≥N1
But
L = L̄ = L
L − ε < an < L + ε ∀n > N
⇒ ∣an − L∣ < ε.
Since ε > 0 was arbitrary, we are done.
67
⎧
⎪0 n even
⎪
Example 5.5.2. an = ⎨ . This has two obvious subsequences:
⎪
⎪ 1 n odd
⎩
(a1 , a3 , a5 , . . .) = (1, 1, 1, . . .)
and
(a2 , a4 , a6 , . . .) = (0, 0, 0, . . .).
Note that while the original sequence is divergent, each of these subsequences is conver-
gent. In this way, passing to a subsequence can help you “fix” the divergence of a sequence.
In fact, for bounded sequences, this is always possible.
This is a very well-known theorem, and there are many different ways to prove it. Fortu-
nately, with the technology we have already developed, we can give a very fast proof. In fact,
we shall prove the following more precise theorem, which clearly implies Bolzano-Weierstrass
as a corollary.
Theorem 5.5.4. Given any bounded sequence an , there exists a subsequence ani such that
An = sup an
m≥n
converges to L.
Let ε = 2i1 . Since An → L, there exists N such that
1
∣AN − L∣ < .
2i
Since AN = supm≥N am , there must exist m ≥ N such that
1
∣am − AN ∣ < .
2i
Let ni = m. By the triangle inequality, we have
1 1
∣ani − L∣ < ∣ani − AN ∣ + ∣AN − L∣ < +
2i 2i
68
and
1
∣ani − L∣ < .
i
1
But i → 0 as i → ∞. Therefore (by HW), the sequence ani satisfies
lim ani → L.
i→∞
Note that the Bolzano-Weierstrass Theorem follows immediately from this theorem (since
the lim sup and lim inf of any bounded sequence exists as a real number). We can also make
the following corollary:
Corollary 5.5.5. A bounded sequence an is divergent if and only if there exist two (or more)
convergent subsequences, ani and amj , such that
Proof. This follows from Theorem 5.4.9 and the previous theorem.
Note: This corollary applies only to bounded sequences. If a sequence is unbounded, it may
not have any convergent subsequences (see HW).
Example 5.5.6. Consider the sequence of integers a = (3, 1, 4, 1, 5, 9, 2, 6, 2, 7, . . .). This is
the sequence of digits of π, so an lies in the finite set [0, 9] ∩ Z for each n. In particular, the
sequence is bounded, so we know from the Bolzano-Weierstrass Theorem that it must have
a convergent subsequence. In this case, however, this is obvious. Why? Because there are
only 10 digits, at least one of them (say d) must occur infinitely many times. Then
d, d, d, d, d, . . .
a1 = π = 3.141592 . . .
a2 = 1.415926 . . .
a3 = 4.1519262 . . .
a4 = 1.5192627 . . .
⋮.
69
This is a sequence of real number between 0 and 10. By the Bolzano-Weierstrass Theorem,
it must have a convergent subsequence. We discussed a somewhat more explicit way to
construct such a subsequence, by “freezing” one digit at a time:
d1 . ∗ ∗ ∗ ∗∗
d1 .d2 ∗ ∗ ∗ ∗∗
d1 .d2 d3 ∗ ∗ ∗ ∗
d1 .d2 d3 d4 ∗ ∗ ∗ .
This is Frank Morgan’s (very informal) proof of Bolzano-Weierstrass, on p. 38 of the text.
x − ε < r < x.
x = d1 d2 .d3 d4 d5 d6 . . .
Let
a1 = d1 0.0000 . . .
70
a2 = d1 d2 .0 . . .
a3 = d1 d2 .d3 0 . . .
a4 = d1 d2 .d3 d4 00 . . .
d3 d4 dn
⇒ an = 10.d1 + d2 + + + ⋯ + n−1
10 100 10
10n d1 + 10n−1 d2 + ⋯ + 10dn−1 + dn
=
10n−1
⇒ an ∈ Q for each n, ∣an − x∣ = 00.00000dn+1 dn+2 ⋯ < .000001
⇒ an → x!
Example 5.6.3 (From Homework). E = {r2 ∣ r ∈ Q}, E ′ = [0, ∞). Let x ≥ 0. How to
construct a sequence an ∈ Q s.t. a2n → x?
Proof. By the previous example, we know that there exists a sequence an ∈ Q, s.t. an →
√
x ∈ R!
√ √
By limit rules, a2n = an ⋅ an → x ⋅ x = x! ⇒ a2n is a sequence of element of E that tends to
x.
On the other hand, if x < 0, I claim there is no sequence an ∈ Q with a2n → x, a2n ≥ 0 = bn , ∀n.
By problem 3 of Homework 8,
E ′ = [0, ∞).
Proof. (⇒) If P ∈ E ′ , then there exists a sequence an ∈ E, such that an → p. Given ε > 0,
∣an − p∣ < ε, for n sufficiently large, i.e. ∃ N , such that true for n ≥ N , particularly, (p−ε, p+ε)
contains an . Since an ≠ p,
((p − ε, p + ε) ∖ p) ∋ an , but an ∈ E
⇒ E ∩ ((p − ε, p + ε) ∖ p) ≠ ∅.
(⇐) Let ε = n1 . By assumption, ∃ x ∈ E, such that
p − ε < x < p + ε, x ≠ p.
71
Let an = x. Do this for each n ∈ N,
1
⇒ 0 < ∣an − x∣ <
n
⇒ an → x.
Compare with ”Extra Credit” from this week’s homework, how to construct a sequence
with subsequences tending to any x ∈ R ?
Idea: Make a sequence out of Q !
{an ∣ n ∈ N} = Q.
Q′ = R.
72
6 Functions and limits
6.1 Limits of functions (Apr 13)
Let E ⊂ R be a subset and p ∈ E ′ (an accumulation point of E). Consider a function
f ∶ E → R with domain E.
Definition 6.1.1. We say lim f (x) = L, if for any ε > 0, there exists δ > 0, such that
x→p
∣f (x) − L∣ < ε, for all x ∈ E with 0 < ∣x − p∣ < δ.
Note: p may not be a point of E. This is why we put
0 < ∣x − p∣
in the definition. You only have to consider x ≠ p.
Example 6.1.2. f (x) = 2x. Claim: for all p ∈ R, lim f (x) = 2p = L.
x→p
Proof. Given ε > 0, let δ = 2ε , if ∣x − p∣ < δ = 2ε , then ∣f (x) − L∣ = ∣2x − 2p∣ = 2 ∣x − p∣ < 2δ = ε,
definition is satisfied.
Note: We could make an equivalent definition of Limits, where we only consider 0 < ε < 1.
1
”∀0 < ε < 1, ∃ δ...”, ∣f (x) − L∣ <
< 1 < ε, if ε > 1.
2
Or, we could have, at the beginning of the proof, said: ”Without loss of generality, we assume
that ε < 1.”
73
2
Example 6.1.4. f (x) = xx−2−4
, E = R ∖ {2}, p = 2 is accumulation point of R ∖ {2}(i.e. E),
1
an = 2 + n ⇒ It makes sense to write lim f (x) =?
x→2
Definition 6.1.5. Suppose that p ∈ E, we say that f (x) is continuous at p if either lim f (x) =
x→p
f (p); or p is not an accumulation point of E. E = domain of f ⇒ f is continuous on E.
Example 6.1.6. f (x) = xn is continuous everywhere, for all p ∈ R.
Example 6.1.7. sin(x), cos(x), ax (a > 0) are also continuous everywhere.
Example 6.1.8.
1 x∈Q
f (x) = {
0 x∉Q
E = R. But f (x) is discontinuous everywhere. (∀p ∈ R, f (x) is discontinuous at P ).
Recall from last time: Let E ⊂ R, and p ∈ E ′ (set of all accumulation points of E ). Given
a function f ∶ E → R, we say f (x) → L as x → p, or lim f (x) = L, if: ∀ ε > 0, ∃ δ > 0 such
x→p
that 0 < ∣x − p∣ < δ ⇒ ∣f (x) − L∣ < ε, we say f (x) is continuous at x = p ∈ E if either
Example 6.1.9. x, x2 , ⋯ are all continuous. sin(x), cos(x), ax (a > 0) are continuous ev-
erywhere (i.e. on E = R).
Example 6.1.10.
x x < 0.
f (x) = {
x + 1 x ≥ 0.
Claim 1: f (x) is continuous at any p ≠ 0.
Proof. Let p ≠ 0 and ε > 0, we may assume without loss of generality that ε ≤ ∣p∣. (If ε ≥ ∣p∣,
use the δ that works for ε = ∣p∣.)
Case 1: p > 0, we choose δ = ε. if ∣x − p∣ < δ = ε ≤ ∣p∣, i.e. ∣x − p∣ ≤ ∣p∣.
⇒x≥0
74
⇒ f (x) = x + 1
⇒ ∣f (x) − f (p)∣ = ∣x + 1 − (p + 1)∣ = ∣x − p∣ < δ = ε
⇒ ∣f (x) − f (p)∣ < ε.
Case 2: p < 0, choose δ = ε, if ∣x − p∣ < δ ≤ ∣p∣, then x < 0.
⇒ f (x) = x
Proof. We choose ε = 1, we must show ∄ δ > 0, s.t. ⋯, i.e. ∀δ > 0, 0 < ∣x − 0∣ < δ ⇏
∣f (x) − f (0)∣ < ε. i.e. ∀ δ > 0, ∃ x with 0 < ∣x∣ < δ such that ∣f (x) − 1∣ ≥ ε. Given δ > 0, let
x = − 2δ ,
δ δ δ
⇒ 0 < ∣x∣ < δ and f (x) = f (− ) = − because − < 0
2 2 2
δ δ δ
⇒ ∣f (x) − 1∣ = ∣− − 1∣ = ∣1 + ∣ = 1 + ≥ ε.
2 2 2
1 x∈Q
Proposition 6.1.11. The function f (x) = { is discontinuous everywhere. (Do-
0 x∉Q
main of f ∶ E = R!)
⇒ ∣f (x) − f (p)∣ = ∣0 − 1∣ = 1 ≥ ε.
75
6.2 Continuity of functions using sequences (Apr 15)
You can test for whether a function is continuous using sequences, in the following way:
Theorem 6.2.1. A function f: E → R is continuous at a point if and only if: for any
sequence an ∈ E with an → p as n → ∞, we have f (an ) → f (p) as n → ∞.
Proof. First note that if p ∉ E ′ , then there are no sequences an → p with an ∈ E. So the
Theorem is vacuously true. So we can assume without loss of generality (i.e. ”Wlog”) that
p ∈ E ′.
(⇒) Assume that f (x) is continuous at x = p. Given an → p as n → ∞, we need to show
that f (an ) → f (p). Let ε > 0, since lim f (x) = f (p), there exists δ > 0. such that
x→p
Since an → p as n → ∞, ∃ N such that ∣an − p∣ < δ for all n ≥ N. ⇒ ∣f (an ) − f (p)∣ < ε for all
n ≥ N . Since ε > 0 was arbitrary, we conclude that f (an ) → f (p) as n → ∞.
(⇐) We’ll show that if f (x) is discontinuous at x = p, then there exists a sequence an → p
with f (an ) ↛ f (p). Since f (x) is discontinuous at x = p, ∃ ε > 0, such that ∀ δ > 0.∃ x ∈ E
with 0 < ∣x − p∣ < δ but ∣f (x) − f (p)∣ ≥ ε. Let δ = n1 , choose an = x for this δ, so: 0 < ∣an − p∣ < n1 ,
but ∣f (an ) − f (p)∣ ≥ ε > 0. Then clearly an → p, but f (an ) ↛ f (p).
Proof. Just need to check an arbitrary sequence an → p. Since f and g are continuous,
f (an ) → f (p), g(an ) → g(p). By the limit rules for sequences, we have
Corollary 6.2.3. Let f, g, h be 3 functions with f (x) ≤ g(x) ≤ h(x), ∀x ∈ E, if lim f (x) =
x→p
L = lim h(x), then lim g(x) = L.
x→p x→p
76
Corollary 6.2.4. Let g ∶ E → R, f ∶ H → R with g(E) ⊂ H. (f ○ g ∶ E → R is a well-defined
function). Suppose that g(x) is continuous at x = p and f (u) is continuous at u = g(p).
Then f ○ g is continuous at x = p.
Proof.
√
Let g(x) = sin x f (u) = u
√
(f ○ g)(x) = sin x
sin(x) is continuous on [0, π]
sin([0, π]) = [0, 1]
Domain of f (u) = [0, ∞) and f (u) is continuous on [0, ∞). Since [0, 1] ⊂ [0, ∞), the previous
theorem applies.
√
⇒ sin x is continuous on E = [0, π).
Note: Yon can also use the above theorem to prove discontinuity! You just need to find
an → p, such that
f (an ) ↛ f (p),
prove that f (x) is discontinuous.
77
6.3 Extreme values (Apr 20)
Next topic: max’s and min’s of function.
Definition 6.3.1. Let f ∶ E → R.
(a) f (x) is bounded above if f (x) < M for some M ∈ R, and for all x ∈ E. (Bounded below
is similar).
If f (x) is bounded above, we write
where f (E) = {f (x) ∣ x ∈ E}. This is a real number! (Similarly, if f is bounded below,
inf x∈E f (x) = inf f (E).)
(b) Suppose that f (x) is bounded above. We say that f (x) attains its supremum if
∃ p ∈ E, s.t.f (p) = supx∈E f (x).
(Similarly, ”attains its infimum”.)
Example 6.3.2.
f (x) = 1 − x2 , E = [−1, 1]
Then supx∈E f (x) = 1. (Why? f (x) = 1 − x2 ≤ 1, ∀ x ∈ E and f (0) = 1)
inf x∈E f (x) = 0. (Why? If − 1 ≤ x ≤ 1, then
1 − x2 = (1 − x)(1 + x) ≥ 0
⇒ inf f (x) ≥ 0
x∈E
But f (−1) = f (1) = 0 ⇒ inf x∈E f (x) = 0 and is attained at x = −1 (and x = +1).)
Note: If E = R, then f (x) would not be bounded below!
⇒ inf f (x) = −∞
x∈E
⇒ inf can never be attained!
Example 6.3.3.
1
f (x) =
x2
E = (−∞, 0) ∪ (0, +∞) = R ∖ {0}.
supx∈E f (x) = +∞, f (x) is not bounded above! inf x∈E f (x) = 0.
(Why?
1
> 0, ∀x ∈ E
x2
⇒ inf f (x) ≥ 0
x∈E
78
In fact, inf x∈E f (x) = 0, because lim = 0!)
x→+/−∞
Given any N > 0, ∃x s.t. x12 < N
(E.g. x = √2N ⇒ x12 = N4 < N ).
Is the infimum attained on E?
1
No! inf f (x) = 0, x ∈ E, but f (x) = x2 > 0, ∀x ∈ E
Theorem 6.3.6. (Extreme Value Theorem). Let f (x) be a continuous function on a closed
interval E = [a, b]. Then f (x) is bounded both above and below, and attains both its sup and
its inf on E.
Note: In common language, supx∈[a,b] f (x) = ”absolute max” and inf x∈[a,b] f (x) = ”absolute min”.
Proof. Let
L = sup f (x) = sup{f (x) ∣ a ≤ x ≤ b}.
x∈[a,b]
79
If L = ∞, then for each n, choose an s.t.
f (an ) > n.
⇒ L = f (δ).
Therefore, f (x) is bounded above (L < ∞), and attains its supremum at x = p.
The argument for inf is similar.
More Examples:
Example 6.3.7.
√
f (x) = sin4 (x) + cos18 (x) + 16x4 on E = [−1000, 1000].
• Is f (x) continuous on E?
80
√
g(x) is on [0, ∞)
g(x) = sin4 (x) + cos18 (x) + 16x4 ≥ 0 (since sin4 (x) ≥ 0, cos18 (x) ≥ 0, and 16x4 ≥ 0).
⇒ g(x) is on R, and g([−1000, 1000]) ⊂ [0, ∞)
By Corollary 6.2.4, we conclude that
√
f (x) = g(x) is continuous on E!
By the Extreme Value Theorem, it must be bounded and attain its sup / inf somewhere on
E!
Example 6.3.8.
x x∈Q
f (x) = {
0 x∉Q
Claim 1: p = 0, use squeeze theorem!
x x∈R
Example 6.3.9. Consider f (x) = { , and E = [−π, π].
0 x∉R
(a) Is f (x) bounded?
(b) Does it attain inf / sup?
Can we apply the T heorem? ⇒ No! f (x) needs to be for all p ∈ [−π, π](E)! It is only at
p = 0!
Answer:
(a) −π ≤ f (x) ≤ π is bounded!
(b)
sup f (x) = π
x∈[−π,π]
inf f (x) = −π
x∈[−π,π]
81
Theorem 6.4.1 (Extreme Value Theorem). Let f (x) be a continuous function on a closed
interval E = [a, b] (i.e. “∀p ∈ [a, b], f (x) is continuous at x = p”). Then f (x) is bounded
and attains its supremum and infimum.
In other words,
∃p ∈ [a, b] s.t. f (p) = sup f (x),
x∈[a,b]
(x − p)(x + p)
= lim
x→p (x − p)
= lim(x + p) = p + p = 2p.
x→p
82
Note: Continuity is a necessary, but not sufficient condition for differentiability.
differentiability ⇒ continuity,
but
differentiability ⇍ continuity.
In other words, there exist continuous functions that are not differentiable.
Example 6.4.5.
f (x) = ∣x∣
Answer: This is continuous at x = 0.
x x≥0
f (x) = { .
−x x < 0
Then,
∣x∣ − 0
lim
x→0 x
∣x∣
= lim
x→0 x
Therefore, the limit in the definition of f ′ (0) does not exist! So the f (x) is not differentiable
at x = 0.
Question: How non-differentiable can a continuous function be?
More specifically, can f ′ (x) fail to exist for infinitely many points x ∈ [a, b]?
Example 6.4.6.
1
x ⋅ sin = f (x)
x
We have:
1 x 1
f ′ (x) = sin − 2 ⋅ cos
x x x
1
1 cos x
= sin −
x x
By imitating this example, it is possible to construct a function that fails to be differentiable
on a whole sequence an → 0!
f ′ (an ) = dne.
83
⇒ Can get a countably infinite set of x where
f ′ (x) = dne.
In fact, one can construct a function f (x) that is continuous everehere, but differentiable
nowhere. (Preview of Math 521.)
Let’s say that f (x) is differentiable at all points on E. How can we use this fact in
finding min’s and max’s?
Definition 6.4.7. We say that f (x) has a local maximum at p if ∃δ > 0 s.t. ∀x ∈ (p − δ, p +
δ), f (x) ≤ f (p). Local minimum: f (x) ≥ f (p).
local max ≠ absolute max
Theorem 6.4.8 (Fermat’s Theorem). Let f ∶ (a, b) → R. If f (x) has a local maximum/minimum
at p ∈ (a, b), and f (x) is differentiable at x = p, then f ′ (p) = 0.
Note: If the derivative at x = p does not exist, then the Theorem does not apply.
Corollary 6.4.9 (“Closed interval method”). If f (x) is a continuous function on [a, b],
then the absolute maximum and minimum can be found among the set of points a ≤ x ≤ b
where:
• x = a or x = b
• f (x) = 0
• f ′ (x) = DN E.
Point: we reduce from checking an infinity of points x ∈ [a, b] to (usually) a finite list!
84
⇒ f ′ (p) ≥ 0.
Next, let bn = p + nδ .
δ
bn − p = > 0, f (bn ) − f (p) ≤ 0
n
f (bn ) − f (p)
⇒ ≤0
bn − p
f (bn ) − f (p)
⇒ lim ≤0
n→∞ bn − p
⇒ f ′ (p) ≤ 0
Since,
0 ≤ f ′ (p) ≤ 0,
Thus,
f ′ (p) = 0
Corollary 6.4.10 (Rolle’s Theorem). If f (x) is on [a, b] and differentiable on (a, b), and
f (a) = f (b), then ∃x ∈ (a, b) s.t. f ′ (x) = 0.
⇒ f (x) = constant
Corollary 6.4.11 (Mean Value Theorem). Let f (x) be on [a, b] and differentiable on (a, b).
∃x ∈ (a, b) s.t.
f (b) − f (a)
f ′ (x) = .
b−a
Proof. Let
f (b) − f (a)
g(x) = f (x) − (x − a) ⋅ .
b−a
Then g(x) is differentiable on (a, b). And,
f (b) − f (a)
g(a) = f (a) − (a − a) = f (a) − 0 = f (a)
b−a
85
f (b) − f (a)
g(b) = f (b) − (b − a) ⋅ = f (b) − (f (b) − f (a)) = f (b) − f (b) + f (a) = f (a) = g(a)
b−a
⇒ g(a) = g(b)!
By Rolle′ s, ∃x ∈ (a, b) s.t. g ′ (x) = 0.
But
f (b) − f (a)
0 = g ′ (x) = f ′ (x) − .
b−a
Thus,
f (b) − f (a)
f ′ (x) = .
b−a
Corollary 6.4.12. Let f (x) be continuous on [a, b] and differentiable on (a, b). If f ′ (x) = 0
for all x ∈ [a, b], then f (x) is constant on [a, b].
f (x)−f (a)
Proof. If f (x) ≠ f (a) for some x ∈ [a, b], then ∃y ∈ (a, x) s.t. f ′ (y) = x−a ≠ 0.
⇒ f ′ (y) ≠ 0.
Note: This last result is used in an essential way during the proof of the Fundamental
Theorem of Calculus.
86