Lecture 3


Two sets AA and BB are equal if they have the same members.

A straightforward way of proving this is often to show that ABA\subset B and BAB\subset A. That is, in words, two sets AA and BB are equal if every element of AA is an element of BB and every element of BB is an element of AA.

Here’s an example of this proof strategy:


1 Let AA, BB and CC be three sets. We have A(BC)=(AB)(AC).A\cap(B\cup C) = (A\cap B)\cup(A\cap C).


We’ll show that each side is contained in the other: first we’ll prove that A(BC)(AB)(AC),A\cap(B\cup C) \subset (A\cap B)\cup(A\cap C), and then that (AB)(AC)A(BC).(A\cap B)\cup(A\cap C) \subset A\cap(B\cup C).

For the first one, suppose that xA(BC)x\in A\cap(B\cup C); we must prove that x(AB)(AC)x\in (A\cap B)\cup (A\cup C).

Since xA(BC)x\in A\cap(B\cup C), we have both xAx\in A and xBCx\in B\cup C, which in turn means that xBx\in B or xCx\in C. In either case, the desired result holds:

So we’ve proved that containment.

Now let’s prove the other containment: that (AB)(AC)A(BC)(A\cap B)\cup(A\cap C)\subset A\cap(B\cup C). We suppose that x(AB)(AC)x\in(A\cap B)\cup(A\cap C) and must prove that xA(BC)x\in A\cap(B\cup C).

Since x(AB)(AC)x\in (A\cap B)\cup(A\cap C), we have either xABx\in A\cap B or xACx\in A\cap C. In either case, we get what we want.

That was the first example of a formal proof in this course. You’ll have to write many proofs like this yourself, in assessed homework and in the exam. Though we’ll discuss it in depth later, it may be worth observing the style from the beginning. One big mistake that many beginner mathematicians make is not using words to explain the flow of the argument.

A warning

What we are practising here is called naı̈ve set theory. What’s so naı̈ve about it?

The Welsh mathematician Bertrand Russell realised in 1901 that there are serious problems with being allowed to form sets carelessly:


Suppose there is a set SS of all sets which are not elements of themselves: S={AAA}.S = \left\{A\mid A\notin A\right\}. This creates a contradiction.


Is SS a member of itself? If SSS\in S, then by the definition of SS, we have SSS\notin S. On the other hand, if SSS\notin S, then again by the definition of SS we have SSS\in S.

As a result of this paradox, modern set theorists impose strict rules on what sets can be formed, with the aim of banning this particular beast and everything like it.

However, you probably won’t need to worry about this, unless you take a course in set theory later in your mathematical careers.


A function is to be thought of as a machine that takes an element of one set and gives you an element of another. Here’s a formal definition:
Definition: Given sets AA and BB, a function (sometimes called a map) f:ABf:A\rightarrow B gives for each element aAa\in A a unique element f(a)Bf(a)\in B.

Examples include:

The set AA is called the domain of ff, and BB is called the codomain of ff. We call f(a)f(a) the value of ff at aa, or the image of aa under ff.

Consider the “age in years” function from the set of people watching this lecture to the natural numbers.

The domain of this function is the set of values you’re permitted to apply it to. This is the set of people watching the lecture, because I said so.

The codomain of this function is the set of values it is permitted to take. This is the set N\mathbb{N} of natural numbers, because I said so.

Some people like to talk about the image of this function, being the set of values it actually takes in practice. This might (perhaps) be the set {18,19,20,37}.\left\{18,19,20,{37}\right\}.

The range is not a phrase that’s used consistently:

When you’re trying to work out whether something’s a function, there are three bits of the definition where things can go wrong:

“each aAa\in A

A function must be defined for every single element of the domain. Why does α(x)=1/x\alpha(x) = 1/x not define a function α:QQ\alpha:\mathbb{Q}\rightarrow\mathbb{Q}?

α\alpha is not defined at zero

“unique element”

A function must have only one value at any given element of the domain. If we set β(n)\beta(n) to be the real number xx whose square is nn, why does that not define a function β:NR\beta:\mathbb{N}\rightarrow\mathbb{R}?

β(3)\beta(3) could be +3+\sqrt{3} or 3-\sqrt{3}.

f(a)Bf(a)\in B

A function must return values within its codomain. Why does γ(n)=n7\gamma(n) = n-7 not define a function γ:NN\gamma:\mathbb{N}\rightarrow\mathbb{N}?

γ(4)=3\gamma(4)=-3 does not lie inside N\mathbb{N}.

Two functions are equal if:

  1. In this course, we’ll be numbering results by lecture, so that Theorem 15.3 will be the third result in the 15th lecture.↩︎