Ch1 Introduction
Ch1 Introduction
Introduction
Real analysis is the analysis of the real numbers, sequences and series of real numbers, and real valued
functions. This in particular includes the study of limits and continuity. Real analysis lays the theo-
retical foundation for the familiar operations from calculus, namely di↵erentiation and integration. The
mathematical area of real analysis is closely related to:
• Complex analysis, the study of the complex numbers, and complex valued functions.
• Functional analysis, the study of functions, and vector spaces of functions.
• Harmonic analysis, the study of harmonics or waves, and the Fourier transform.
Real analysis is a crucial prerequisite for these topics, which can be studied in detail in 3rd and 4th year
mathematics papers.
In your 1st year mathematics papers, you have already come across sequences and series of real numbers.
These topics were treated rather informally, for instance you may have come across statements like n1
tends to 0 as n be comes very large, or infinite series like
1 1 1 1
1+ + + + + · · · = 2.
2 4 8 16
In this course we aim to treat limits and series rigourously, and build a theory that gives a precise
understanding of when and how we can manipulate limits. An immediate natural question is then, why
do we care? Shouldn’t it be enough to have an intuitive understanding of limits? To address these
questions, consider the following examples:
1
There are many more possible examples we could consider. The key point is that, although in many
cases you can simply apply a set of rules to compute limits of sequences and series, in order to under-
stand precisely what is going on in the examples (1) and (2) above, we need to develop a rigourous
mathematical theory to guide us.
Although the main topic of this paper is real analysis, this paper is also about learning to do mathe-
matics rigorously. Needless to say this paper will have a di↵erent feel than earlier ones. In particular
a strong emphasis is placed on sound logic, and the idea of a mathematical proof. A valid proof is a
sequence of logical statements, with each statement a direct logical consequence of the preceding one.
The chain of implications must not break at any point. The statements in the chain can be given in words
or in symbols but each must be linked to the ones before and after it. The concept of a mathematical
proof goes back to the ancient Greek philosophers, and forms a fundamental part of modern mathematics.
The remainder of this chapter includes three sections. The first introduces notation to help us describe
and manipulate sets, while the second and third sections form a basic introduction to mathematical logic
and proof. It is important that you take some time to absorb the logic concepts introduced below, as
these are used frequently throughout these notes.
1. Sets
These notes frequently requires the use of sets. A set is, roughly speaking, a collection of objects (objects
contained in a set are also called elements or members). We can often describe sets in words, such as,
‘the set of rational numbers are all the numbers in the form m/n where m and n are integers’ but it helps
to have a condensed notation as well. To this end, we use the brackets { and } to enclose the elements
in the set, thus
elements in set .
If we have a finite set we can just list all elements between the brackets. Thus {1, 2, 3} is the set consisting
of the integers 1, 2, and 3. If we have an infinite number of elements we sometimes use ‘. . . ’ to mean
that the pattern continues. In this way we write the natural numbers as
N = {1, 2, 3, . . . }
and the integers as
Z = {. . . , 2, 1, 0, 1, 2, . . . }.
Another set which has special notation is the empty set
? = {},
this is the set with no elements. When we wish to talk about an element of a set we write x 2 X to
mean “x is an element of the set X” or “x belongs to X”. Similarly, we write x 62 X to mean x does not
belong to X. For instance
3 2 {1, 2, 3}, 4 62 {1, 2, 3}, x 62 ?.
Special Sets
N = {1, 2, 3, · · · }, the set of natural numbers;
N0 = {0, 1, 2, 3, · · · }, the set of whole numbers;
Z = {· · · , 2, 1, 0, 1, 2, · · · }, the set of integers;
Q = {a/b : a 2 Z, b 2 N}, the set of rational numbers;
R, the set of real numbers;
C = {a + bi : a, b 2 R}, the set of complex numbers;
? = {}, the empty set
2
To describe more complicated sets, we can place additional conditions on the elements. To do this we
use a bar or a colon inside the brackets {|} or {:}. The convention is that any conditions follow the bar
(or colon), thus
elements in set some condition on elements .
For instance
Sets can be combined to form new sets. For instance we can form the union A [ B of two sets A and B,
this is defined as
A [ B = {x | x 2 A or x 2 B}.
Thus the union A [ B contains all elements contained in either A or B (or both!). Similarly, we can form
the intersection A \ B by taking
A \ B = {x | x 2 A and x 2 B}.
Thus the intersection A \ B contains all elements that lie in both A and B. A quick example
We require one further way of combining sets called the Cartesian product A⇥B. The Cartesian product
is defined as
A ⇥ B = {(a, b) | a 2 A and b 2 B}.
Thus A ⇥ B is the collection of all pairs (a, b) with a 2 A and b 2 B (this notation should be familiar to
you in the special case of vectors of real numbers).
The final piece of notation that we introduce gives us a way to describe a set lying inside a larger set.
Given two sets A and B, we say that A is a subset of B, if every element of A is also an element of B.
Note that with this convention, A is always a subset of A. We write A ⇢ B if A is a subset of B. Thus
A ⇢ B if for every x 2 A we also have x 2 B. For instance,
3
2. Logic
The aim of this section is to give a quick introduction to mathematical logic. It is certainly not intended
to provide a comprehensive treatment. Nevertheless, it should provided you with sufficient tools to
understand and produce rigourous mathematical arguments. Thinking logically is a skill that requires
practise. However thankfully it is also intuitive, as we all make logical arguments in our day to day lives.
For instance given the statements
“It takes 20 minutes to travel from home to work”
“Work starts at 9am”
“I left home at 8:50am to travel to work”
we would all quickly come to the logical conclusion that “I will be late for work”. On the other hand,
some of the material described below may not be so immediately obvious. Thus it is important to take
some time to ensure that you fully understand and appreciate the logical principles that are at being
introduced.
We now turn to the basics of mathematical logic. Any valid mathematical argument is a logical sequence
of mathematical statements. A mathematical statement is a precise declarative sentence involving math-
ematical objects (numbers, vectors, functions, ...) which can be either true or false. For instance
p
2 + 2 = 4, 2 + 2 = 5, 2 is a rational number
are all valid mathematical statements that are either true or false (clearly the first is true, while the
second is false, while the third is also false, it is not as obvious). On the other hand the mathematical
expression 2 + 3 5 is not a statement, since it does not make any sense to ask if 2 + 3 5 is true or
false. It is a fundamental principle of mathematical logic that statements can be true or false, but not
both. In particular this means that a statement P is true if P is not false. Similarly P is false if P is
not true. This simple but far reaching principle forms the basis of proof by contradiction which will be
discussed in more detail below. Moreover the truth of a statement is intrinsic, it does not depend on the
opinion of the person reading the statement.
2.1. Compound Statements. Two statements can be combined to form a compound statement.
The common ways to form compound statements are as follows. Let P and Q denote two statements.
• (“and”) The conjunction “P and Q” is true precisely when P is true and Q is true, and is false
otherwise.
• (“or”) The disjunction “P or Q” is true if either P is true, or Q is true, or both are true.
Otherwise “P or Q” is false.
• (“not”) The negation “not P ” is true when P is false, and false otherwise.
• (“)”) The implication “P ) Q” is true, unless P is true and Q is false in which case the
implication is false.
• (“,”) We write “P , Q” if P and Q are logically equivalent, this means that P is true if and
only if Q is true. Equivalently, P is false, if and only if Q is false.
The above operations form part of what is known as propositional logic. Note that the negation not
transforms and into or. For instance it is not difficult to verify that
not (P and Q) , (not P ) or (not Q). (1.1)
This is reasonable, since, for example, the negation of the statement
“Today is Tuesday and it is raining”
is
“It is not Tuesday or it is not raining”.
4
It is important that you understand why this is true! Note that the ‘or’ used in mathematics is always
the inclusive ‘or’, thus the sentence “A or B is true” means that one of the three options holds: (1) A
is true, (2) B is true, (3) A and B are true.
The negation of an implication produces an and statement, in particular we have logical equivalence
not (P ) Q) , P and (not Q). (1.2)
Again it is important that you understand why this logical equivalence is true. It also worth remarking
that if P is false, then the implication P ) Q is always true but vacuous as it adds no new information.
In fact there does not need to be any link at all between P and Q. For example the implication
“2 + 2 = 4” ) “the capital of New Zealand is Wellington”
is true since both the hypothesis and conclusion are true. Similarly the implication
“1=0” ) “the earth is bigger than the sun”
is also true, since the hypothesis “1 = 0” is false.
A convenient way to analyse compound statements is via a truth table. The statements under consider-
ation are written along a column at the top of the table, and in the first two rows we write the possible
truth values for P and Q. The remaining entries are then completed using the rules above. So for
instance the basic compound statements above give the truth table
P Q P and Q P or Q not P P )Q P ,Q
true true true true false true true
true false false true false false false
false true false true true true false
false false false false true true true
Truth tables can also be used to show that two compound statements are logically equivalent. For
instance, in the case of (1.3) we have
Note that since the rows beneath “not (P and Q)” and “(not P ) or (not Q)” have the same truth
values, we easily read o↵ the logical equivalence stated in (1.1). A similar truth table can be used to
verify the negation 1.2. Another important logical equivalence is
(P ) Q) , ([not Q] ) [not P ]). (1.3)
As a simple example of the logical equivalence expressed in (1.3), consider the implications
“If it is Monday, then I am at work”
and
“If I am not at work, then it is not Monday”.
Again it is worth taking some time to ensure that you understand this example. The logical equivalence
in (1.3) can be verified using the following truth table
P Q P )Q (not Q) ) (not P )
true true true true
true false false false
false true true true
false false true true
5
2.2. Quantifiers. The above principles of proposition logic can be used to form complicated logical
arguments. However this level of logic does not suffice for mathematics, as is does not take into account
variables. A variable is a symbol, usually denoted by the familiar symbols x or n etc, that is used to
denote a mathematical object, for instance a number or a vector. A statement can depend on a variable,
for instance the statement
“x + 15 = 21”
depends on the variable x (which is number in this case). The statement is true if x = 6 and false oth-
erwise. Statements with variables are combined with quantifiers to get variable free statements. There
are two quantifiers, the universal quantifier and the existential quantifier. To define these quantifiers, let
⌦ be a set, and assume that for each x 2 ⌦, P (x) is a well-formed statement.
• (“for all” or “8”) The universal quantifier for all (also written as 8) acting on P (x) pro-
duces the statement
for all x 2 ⌦ : P (x) (1.4)
which is true if P (x) is true for all x 2 ⌦. It is false otherwise.
• (“there exists” or “9”) The existential quantifier there exists (also written as 9) acting
on P (x) produces the statement
which is true if there exists at least one x 2 ⌦ such that P (x) is true.
“P (x) is true for every x 2 ⌦”, “For every x 2 ⌦ we have P (x)”, or “If x 2 ⌦ then P (x)”.
It is important to emphasise that for the statement “for all x 2 ⌦: P (x)” to be true, we need P (x) to
be true for every x 2 ⌦. In particular the statement
“There is some x 2 ⌦ such that P (x)”, “There exists x 2 ⌦ such that P (x) holds true”
or
“P (x) for some x 2 ⌦”.
In contrast to for all statements, to verify that (1.5) is true, we just need to find one x 2 ⌦ such that
P (x) is true. So for instance both the statements
and
“There exists n 2 N such that n2 = 25”
are true (the fact that the former statement is true for every n 2 N means that in particular it is true
for at least one n 2 N).
6
2.3. Negating Quantifiers. We frequently have to form the negation of statement with a variable.
In other words, given a statement with a quantifier, so something like
“All people are over 3 meters tall”
we would like to understand what it would mean for this statement to fail. Well for this to fail, we would
simply have to find someone who is not 3 meters tall. Thus the negation should be
“There exists a person who is less than 3 meters tall”.
This suggests that negating a universal quantifier (“all” in the above example) should produce an ex-
istential quantifier (‘there exists’ in the above example). We take this as the definition of the negation
of the universal quantifier. Thus negating a for all quantifier produces a there exists quantifier. In
particular we have
“not for all x 2 ⌦: P (x) ” , “there exists x 2 ⌦: not P (x)”. (1.6)
In words, this logical equivalence is saying that the statement
“It is not true that for all x 2 ⌦ we have P (x)”
is equivalent to
“There is some x 2 ⌦ such that P (x) is false”.
Hopefully this is not too surprising, since clearly if P (x) is not true for every x 2 ⌦, then there must be at
least one x 2 ⌦ for which P (x) is false. It is very important to take a moment to absorb the equivalence
(1.6), as negating quantifiers incorrectly is a frequent source of error in undergraduate mathematics
papers! As a simple example of (1.6), consider the equivalent statements
“Not all people are good”
and
“There exists a person who is not good”.
Similarly, negating a there exists quantifier produces a for all quantifier. More precisely, we have
the logical equivalence
“not there exists x 2 ⌦: P (x) ” , “for all x 2 ⌦: not P (x)”. (1.7)
In words, this is saying that
“It is not true that there exists x 2 ⌦ such that P (x)”
is logically equivalent to
“For all x 2 ⌦, P (x) is false”.
Again you should take a moment to ensure that you understand the logical equivalence (1.7). To help
with this, consider the equivalent statements
“It is not true that there exists a good person”
and
“All people are not good”.
Occasionally you will have to deal with nested quantifiers. For instance, consider the statement
8x 2 ⌦ : 9y 2 ⌦˜ : P (x, y)
where P (x, y) is a statement involving two variables. To negate this, we proceed in stages. We first note
that negating the for all ‘8’ produces a ‘9’, thus moving the negation inside the outer brackets gives
⇣ ⌘
not 8x 2 ⌦ : 9y 2 ⌦ ˜ : P (x, y) , 9x 2 ⌦ : not 9y 2 ⌦ ˜ : P (x, y) .
We now have to negate the ‘9’ quantifier. Again following the above rules this should produce a ‘8’, and
so we conclude that
⇣ ⌘
not 8x 2 ⌦ : 9y 2 ⌦ ˜ : P (x, y) , 9x 2 ⌦ : not 9y 2 ⌦ ˜ : P (x, y)
, ˜ : not P (x, y) .
9x 2 ⌦ : 8y 2 ⌦
In other words (roughly speaking), whenever you want to form the negation of a long chain of quantifiers,
you start with the outer quantifier and swap 8 and 9, and then move the negation in one bracket.
7
3. Proof
This paper places a strong emphasise on proof. A proof is a sequence of logical steps which connect a
hypothesis to a conclusion, we will see plenty of examples in the chapters to follow. The key advan-
tage of a proof is that we can certain that, provided the hypothesis and sequence of logic steps was
sound, the conclusion holds. At first, it can be difficult to understand precisely what constitutes a valid
mathematical proof, or how to even start a mathematical proof. Thus in the following we give some stan-
dard examples of proof strategies that appear frequently throughout the following notes. It is perhaps
worth making one final comment before we turn to some examples. Although in the previous section
we introduced precise notation for formal logic arguments, in the rest of these notes, our mathemati-
cal proofs are written in natural language. This is due to the fact that, unless you are a computer, it
is much easier to understand a proof written in natural language than in formal logical notation (this
being said, in principle it should always be possible to rewrite a natural language proof into formal logic!).
When writing a proof, you should always start by clearly writing out the statement to be proved. The
body of the proof should then contain a sequence of clear logical steps or consequences leading to the
desired result. It is worth keeping in mind that you are trying to convince the reader (or marker!) of
the validity of your proof. Thus your presentation should be well organised, with a strong emphasise on
clarity and simplicity! The conclusion of your proof should be stated clearly and precisely. When you
are first learning how to write a proof, it is better not to skip steps. Moreover, you should treat a proof
as an exercise both in writing, and mathematical reasoning.
• (Direct proof) Start by assuming that P holds, and via a sequence of logical steps, show that
Q holds.
• (Proof by contradiction) Start by assuming that (1.8) fails (this means that P holds but Q
fails). Then by a sequence of logical steps, obtain a contradiction. We can then conclude that
since it is not possible for (1.8) to fail, it must in fact be true.
• (Proof by contrapositive) Observe that via (1.3), to prove (1.8) it suffices to prove that if Q
fails, then P also fails. Thus we assume that Q fails, and argue via a sequence of logical steps
that P must also fail.
8
On the other hand, a proof by contradiction may look like:
Note that in a proof by contradiction, we have to form the negation of a statement. Thus it is important
that you are familiar with the negation of the basic operations of mathematical logic expressed in (1.1),
(1.2), (1.6), and (1.7) as these are a frequent source of confusion.
In certain cases, some proof strategies may be easier than others. Unfortunately it is not always imme-
diately clear what the best approach should be, and some trial and error is usually involved. Moreover,
more complicated proofs may use a combination of all three strategies, particularly proofs which proceed
via a case by case analysis.
• (Proof by induction) Induction is often used to prove statements involving the natural numbers
N. The idea is that to prove that P (n) holds for all n 2 N, it is enough to prove the two
statements
9
(1) (base case) P (0) holds,
(2) (inductive step) if P (n) holds, then P (n + 1) also holds.
This style of proof should be familiar to you from MATH170!
• (Case by case analysis) To prove a statement like “For all x 2 ⌦ we have P (x)”, we break this
into a small number of cases. For instance if ⌦ = N, we may consider the two cases “x 2 N is
even” and “x 2 N is odd” separately.
The above list of techniques is not exhaustive. Thus, as we progress, it may be helpful to you to try and
identify the varies techniques that are being used in the chapters to follow.
Exercises
Exercise 1.1. Convert the following written description of sets into symbolic notation
(1) The set of all integers that divide 10234.
(2) The set of all rational numbers that are no bigger than 10.
Convert the following symbolic descriptions of sets into written descriptions
(1) {n 2 N | n4 + n2 + 2n 4 = 0}.
(2) {q 2 Q | 5 q < 7}.
Exercise 1.3. Let A = {1, 2, 4, 5}, B = {1, 2, 3, 5}, C = N, and D = {1, 2}. Which of these sets lie
inside each other?
10
Exercise 1.4. If A ⇢ B, show that B = A [ C for some set C.
Exercise 1.5. Verify the logical equivalence (1.2) by constructing a suitable truth table.
Exercise 1.6. By writing down a suitable truth table, verify the logical equivalence
“P ) Q” , “(not P ) or Q”.
Exercise 1.9. Give a direct proof that if m, n 2 N are odd, then m + n is even.
Exercise 1.10. Prove by contradiction that if n 2 N, then n and n + 1 cannot both be even. Can you
find a direct proof of this fact?
Exercise 1.11. Give a case by case proof that if n 2 N is not divisible by 3, then n2 = 1 + 3m for some
m 2 N.
Exercise 1.12. Prove via contrapositive, that if n 2 N and n2 is divisible by 3, then n is also divisible
by 3.
Exercise 1.13. Prove via induction that for every n 2 N, 32n+2 8n 9 is divisible by 64.
11