Chap 2
Chap 2
In this chapter we will be studying some properties of the number sets we have encountered
so far. We start with the natural numbers and the well ordering property. Next we investigate
the Euclidean division algorithm, and move on to a discussion of some possible ways of defining
the natural numbers and the integers, so as to be able to prove things like a + b = b + a for all
integers a, b. We look at congruences - integers a and b are congruent ‘modulo n’ if they differ
by a multiple of n. We’ll develop a method for solving linear equations ‘modulo n’. We move
on to look at the rational and real numbers, and some of their properties.
Proof Suppose the well ordering property for N is true. Now let X be a non-empty subset
of Z+ . Then, because Z+ ⊆ N, X is a non-empty subset of N. Therefore, by the well ordering
property for N, X has a least element.
Suppose, on the other hand, that the well ordering property for Z+ is true. Let Y be a non-
empty subset of N. If 0 ∈ Y then clearly Y has a least element, namely 0. If 0 ∈ / Y then
Y ⊆ Z and Y is non-empty, so by the well ordering property for Z , Y has a least element.
+ +
Because of Theorem 2.1.1 we can simply refer to ‘the well ordering property’, whether we are
dealing with N or Z+ .
The well ordering property, often in conjunction with proof by contradiction, can be used to
prove results for which we would otherwise use the principle of induction, as the following
example illustrates.
32 Proof & Structure Chapter 2: Number Sets and their Properties
Example 2.1.2 Every integer greater than 1 can be expressed as a product of primes.
Suppose (for a contradiction) that S is not empty. Then, by the well ordering property, S has
some least element, s say. By the definition of S, s cannot be prime. Thus s is composite and
so there exist integers l and m with 1 < l < s and 1 < m < s such that s = lm. Since 1 < l < s
and 1 < m < s, it follows that m, l ∈ / S (because s is the least element of S) Thus l and m
can both be expressed as a product of primes. Consequently s can be expressed as a product
of primes. Hence s ∈ / S which is contrary to s being the least element of S. Thus S is empty
and so every integer greater than 1 can be expressed as a product of primes. □
The general method of proof is to take your statement P (n), let S be the set of positive integers
for which P (n) is false and assume for a contradiction that S is not empty. Then by the well
ordering property, S has a least element s – then you show that P (s) is true, which implies
s∈/ S, a contradiction.
∑
Exercise 2.1 Use the well∑ordering property to show that nr=1 r2 = 16 n(n + 1)(2n + 1).
(Hint: Let S = {n ∈ Z+ : nr=1 r2 ̸= 16 n(n + 1)(2n + 1)} and assume, for a contradiction, that
S is non-empty.)
In fact, the well ordering property can be used to prove that the principle of induction is valid.
Moreover you can go the other direction, assume induction is a valid method of proof and use
it to prove that the well ordering property is true. In other words, the well ordering property
is equivalent to the principle of induction. I have put the proof of this in Appendix 2 to the
notes (it can be downloaded from the module website).
The well ordering property can be used in a slightly different way to show the following theorem
which says that if we divide n by m it goes q times with remainder r, where 0 ≤ r < m. This
is an important result, and we shall use it throughout Section 2.2.
Theorem 2.1.3 (The Division Theorem) Let m and n be positive integers. Then there are
integers q and r, with 0 ≤ r < m such that n = qm + r. Furthermore, q and r are unique.
The idea is to take multiples of m away from n until you can’t take any more away. So you
get the set n, n − m, n − 2m, n − 3m and so on. The remainder is what you get when you can’t
subtract any more copies of m because you would get a negative number. So it’s the smallest
non-negative value of n − tm for any value of t. Here is the formal proof:
Proof Let T = {n − mt : t ∈ Z}. Since n > 0, then putting t = 0, we see that n ∈ T and so
T contains a non-negative number. So let S = {a ∈ T : a ≥ 0}. Then S is a non-empty subset
of N and so, by the well ordering property, S contains a least member, r, say. Since r ∈ S, r
is of the form n − mt for some t ∈ Z. Let q be this t. So r = n − mq or, rearranging, n = mq + r.
2.2 The Euclidean Division Algorithm Proof & Structure 33
Since r ∈ S, r ≥ 0 and so it remains to show that r < m. Suppose (for a contradiction) that
r ≥ m. Let t = q + 1. Then
n − mt = n − m(q + 1) = n − mq − m = r − m ≥ 0.
We have shown that q and r exist. It remains to show that they are unique. So suppose that q ′
and r′ satisfy n = mq ′ + r′ with 0 ≤ r′ < m. Since n = qm + r we get mq + r = mq ′ + r′ . Thus
′
m(q − q ′ ) = r′ − r, hence q − q ′ = r m−r . But −m < r′ − r < m, and hence −1 < (q − q ′ ) < 1.
Now q and q ′ are both integers, thus q − q ′ is an integer, and the only integer between -1 and
′
1 is 0. Therefore q − q ′ = 0, i.e. q = q ′ , and hence r m−r = 0, giving r = r′ . So we have shown
that q and r are unique. □
Example 2.1.4 Let n = 250 and m = 71. Using a calculator, or otherwise, 250/71 = 3.521 . . ..
Thus q = 3 and r = 250 − (3 × 71) = 37. Hence 250 = 3 × 71 + 37.
Exercise 2.2 If n = 475 and m = 56, find q and r with 0 ≤ r < m such that n = qm + r.
Exercise 2.3 Theorem 2.1.3 can be extended to include negative values of m. Adapt the proof
of the theorem to show that if n is a positive integer and m is a negative integer, then there
are unique integers q and r, with 0 ≤ r < |m| such that n = qm + r.
Let m and n be positive integers. If a positive integer d divides both m and n, then d is a
common divisor (or common factor) of m and n. The greatest common divisor of m
and n is an integer D such that
We denote the greatest common divisor (or gcd) of m and n by gcd(m, n) (or sometimes just
(m, n)). The positive integers m and n are said to be coprime (or relatively prime) if
gcd(m, n) = 1, in other words if m and n have no common factors except 1.
Example 2.2.1 If m = 36 and n = 132, then the common divisors of m and n are 1, 2, 3, 4,
6 and 12. Therefore gcd(m, n) = 12.
Example 2.2.2 If m = 36 and n = 65, then the only common divisor of m and n is 1.
Therefore gcd(m, n) = 1.
Exercise 2.4 Find all the common divisors of 350 and 2 940. What is gcd(350, 2 940)?
34 Proof & Structure Chapter 2: Number Sets and their Properties
Exercise 2.5 List all of the positive integers n such that n < 15 and n and 15 are coprime.
Let m and n be positive integers. In the last section we saw that we can divide n by m and by
Theorem 2.1.3, there are integers q1 and r1 with 0 ≤ r1 < m such that
n = q1 m + r 1 .
If r1 ̸= 0, then by Theorem 2.1.3 there are integers q2 and r2 with 0 ≤ r2 < r1 such that
m = q2 r1 + r2 .
If r2 ̸= 0, then by Theorem 2.1.3 there are integers q3 and r3 with 0 ≤ r3 < r2 such that
r1 = q3 r2 + r3 .
Continuing in this way we generate a sequence of non-negative integers m, r1 , r2 , . . . with
m > r 1 > r2 > r3 > . . .
and so for some integer k ≥ 1, rk = 0. We claim that gcd(m, n) = rk−1 . That is, gcd(m, n) is
the last non-zero remainder.
Before verifying this claim, we illustrate the procedure in the next example.
Example 2.2.3 Find gcd(3080, 14 994) using the Euclidean algorithm. Here m = 3 080 and
n = 14 994. Now:
14 994 = 4 × 3 080 + 2 674 (So q1 =4 and r1 = 2 674.)
3 080 = 1 × 2 674 + 406 (So q2 =1 and r2 = 406.)
2 674 = 6 × 406 + 238 (So q3 =6 and r3 = 238.)
406 = 1 × 238 + 168 (So q4 =1 and r4 = 168.)
238 = 1 × 168 + 70 (So q5 =1 and r5 = 70.)
168 = 2 × 70 + 28 (So q6 =2 and r6 = 28.)
70 = 2 × 28 + 14 (So q7 =2 and r7 = 14.)
28 = 2 × 14 + 0 (So q8 =2 and r8 = 0.)
Since r8 = 0, we have gcd(3 080, 14 994) = r7 = 14.
Exercise 2.7 Use the Euclidean division algorithm to show that 104 975 and 3 542 are coprime.
We now want to prove that the Euclidean division algorithm really does produce the gcd of
two positive integers. This relies upon the following technical result.
Lemma 2.2.4 Let m and n be positive integers and let q and r be integers such that n = mq+r.
Then gcd(m, n) = gcd(r, m).
Commentary To show that two numbers k and l are equal, which we are trying to do here,
there are three approaches. You can just start with k and try to produce l (it might be a
question of rearranging an algebraic expression or similar), or you can work with k − l and try
to show that k − l = 0, or, as we do here, you can show that both k ≤ l and l ≤ k.
2.2 The Euclidean Division Algorithm Proof & Structure 35
Proof Let u = gcd(r, m) and v = gcd(m, n). Since u divides both r and m, u must divide
qm + r = n. Therefore u is a common divisor of m and n, giving u ≤ gcd(m, n) = v.
On the other hand, since v divides both m and n, v must divide n − qm = r. Hence v is a
common divisor of m and r, so v ≤ gcd(r, m) = u.
Thus u ≤ v and v ≤ u. Therefore u = v. That is, gcd(r, m) = gcd(m, n). □
Theorem 2.2.5 Let m and n be positive integers. Then gcd(m, n) = m or n, or gcd(m, n) is
the last non-zero remainder resulting from the Euclidean division algorithm.
Proof If gcd(m, n) is neither m nor n, then r1 in the Euclidean algorithm is non-zero. From
the Euclidean division algorithm, if rk is the last non-zero remainder, we have
n = q1 m + r1 ,
m = q2 r1 + r2 ,
r1 = q3 r2 + r3 ,
..
.
rk−2 = qk rk−1 + rk ,
rk−1 = qk+1 rk .
Note that rk divides rk−1 , so gcd(rk , rk−1 ) = rk . Repeated application of Lemma 2.2.4 gives
gcd(m, n) = gcd(r1 , m)
= gcd(r2 , r1 )
..
.
= gcd(rk−1 , rk−2 )
= gcd(rk , rk−1 )
= rk .
That is, gcd(m, n) is the last non-zero remainder resulting from the Euclidean division algo-
rithm. □
Exercise 2.8 Let m and n be positive integers. Show that if d is a common divisor of m and
n, then d divides gcd(m, n) (you may wish to give a notation to gcd(m, n), for example let
D = gcd(m, n)).
Exercise 2.9 Let m and n be positive integers. Let D = gcd(m, n) and let m′ and n′ be the
integers such that m = Dm′ and n = Dn′ . Prove that gcd(m′ , n′ ) = 1. (Hint: use Exercise
2.8.)
Reversing the Euclidean division algorithm
Consider Example 2.2.3 again. In this example we had the equations:
14 994 = 4 × 3 080 + 2 674 (1)
3 080 = 1 × 2 674 + 406 (2)
2 674 = 6 × 406 + 238 (3)
406 = 1 × 238 + 168 (4)
238 = 1 × 168 + 70 (5)
168 = 2 × 70 + 28 (6)
70 = 2 × 28 + 14 (7)
28 = 2 × 14 + 0. (8)
36 Proof & Structure Chapter 2: Number Sets and their Properties
Rearranging all but the last of these equations so that the latest remainder is on the left hand
side, and reversing the order, gives
14 = 70 − 2 × 28 (7′ )
28 = 168 − 2 × 70 (6′ )
70 = 238 − 1 × 168 (5′ )
168 = 406 − 1 × 238 (4′ )
238 = 2 674 − 6 × 406 (3′ )
406 = 3 080 − 1 × 2 674 (2′ )
2 674 = 14 994 − 4 × 3 080. (1′ )
Starting with (7′ ), and successively use the next equation down to substitute for the latest
remainder we get:
14 = 70 − 2 × 28
= 70 − 2(168 − 2 × 70) (using (6′ ))
= −2 × 168 + 5 × 70
= −2 × 168 + 5(238 − 1 × 168) (using (5′ ))
= 5 × 238 − 7 × 168
= 5 × 238 − 7(406 − 1 × 238) (using (4′ ))
= −7 × 406 + 12 × 238
= −7 × 406 + 12(2 674 − 6 × 406) (using (3′ ))
= 12 × 2 647 − 79 × 406
= 12 × 2 647 − 79(3 080 − 1 × 2 674) (using (2′ ))
= −79 × 3 080 + 91 × 2 674
= −79 × 3 080 + 91(14 994 − 4 × 3 080) (using (1′ ))
= 91 × 14 994 − 443 × 3 080.
So by reversing the Euclidean algorithm we have found integers a and b such that
(Here a = −443 and b = 91.) There is nothing special about this example. Thus, from Theorem
2.2.5, we can deduce the following result.
Theorem 2.2.6 Let m and n be positive integers. Then there are integers a and b such that
am + bn = gcd(m, n).
Exercise 2.10 Let m and n be positive integers, and let D = gcd(m, n). Show that, for all
integers a and b, D divides am + bn. Deduce that
Exercise 2.11 Find integers a and b such that 13 680a + 212 175b = gcd(13 680, 212 175).
Exercise 2.12 Find integers a and b such that 3 542a + 104 975b = 1.
The next exercise will show that the integers a and b in Theorem 2.2.6 are not unique.
Exercise 2.13 Let m and n be positive integers and let a and b be integers such that am+bn =
gcd(m, n). Show that for all integers c, if a′ = a+cn and b′ = b−cm, then a′ m+b′ n = gcd(m, n).
2.2 The Euclidean Division Algorithm Proof & Structure 37
Lemma 2.2.7 Let m, n and p be positive integers with p prime. If p divides mn, then either
p divides m or p divides n.
Commentary Note that this lemma is of the form a ⇒ (b ∨ c). We prove this by assuming
a, then supposing that b is false and deducing that c is true. Why is this valid? Well we could
use truth tables, or de Morgan’s laws, to show that a ⇒ (b ∨ c) is equivalent to (a ∧ ¬b) ⇒ c.
So if we assume a and ¬b, and manage to prove c, we will have proved (a ∧ ¬b) ⇒ c, and hence
a ⇒ (b ∨ c). Or, less formally, we can simply say that to prove the statement, we have to show
that if a holds, then at least one of b and c must hold. So if we know that b doesn’t hold, our
only option is to prove that c holds. This is a useful general observation. We can therefore
prove our lemma by proving the statement: if p divides mn and p does not divide m, then p
divides n.
Proof Suppose p does not divide m. Then, since p is prime, gcd(p, m) = 1. Thus, by Theorem
2.2.6, there are integers a and b such that ap + bm = 1. Multiplying both sides by n gives
apn + bmn = n. Now p clearly divides apn and p divides mn by the hypothesis. Therefore p
divides apn + bmn = n. □
Corollary 2.2.8 Let p be a prime number and let n1 , n2 , . . . , nr be positive integers. If p divides
n1 n2 · · · nr , then p divides at least one of n1 , n2 , . . . , nr .
Proof We shall prove this result by induction on r. Let P (r) be the statement: if p divides
n1 n2 · · · nr , then p divides at least one of n1 , n2 , . . . , nr .
Suppose p divides n1 n2 · · · nk+1 . Now let m = n1 · · · nk and n = nk+1 . Then p divides mn,
so by Lemma 2.2.7 either p divides m or p divides n = nk+1 . If p divides m, then by the
induction hypothesis, p divides one of n1 , . . . , nk . Hence p divides at least one of n1 , . . . , nk or
nk+1 , therefore P (k + 1) is true.
Thus P (k) implies P (k + 1) and so, by the principle of induction, P (r) is true for all positive
integers r. □
Proof The existence part of the proof is given in Example 1.12.2. For the uniqueness of the
prime factorisation we use (strong) induction on n.
Suppose P (2), P (3), . . . , P (k) are true. If k + 1 is prime, then, as for the case n = 2, there is
nothing to prove. So we assume that k + 1 is composite. Suppose that k + 1 = p1 · · · pr and
k + 1 = q1 · · · qs where p1 , . . . , pr , q1 , . . . , qs are prime. Now pr divides k + 1 = q1 · · · qs , so by
Corollary 2.2.8, pr divides at least one of q1 , q2 , . . . , qs , say qi . Since both pr and qi are prime,
it follows that pr = qi . If i ̸= s, then reorder q1 , . . . , qs so that pr = qs . Thus
k+1
= p1 · · · pr−1 = q1 · · · qs−1 .
pr
( )
Now k+1 pr
< k + 1 and so P k+1
pr
is true. Hence r − 1 = s − 1 and q1 , . . . , qs−1 can be reordered
so that pi = qi for 1 ≤ i ≤ r − 1. Hence r = s and q1 , . . . , qs−1 , qs can be reordered so that
pi = qi for 1 ≤ i ≤ r, and so P (k + 1) is true.
It is not very difficult to express small positive integers as a product of primes, as the next
example shows. However, it is an open problem as to whether there is an efficient (that is,
computationally fast) method for factorising a positive integer into its prime factors. If it turns
out that there is, it will create a lot of problems, because many encryption systems are based
on the assumption that there is no fast way to factorise large (100 digit or more) numbers.
Example 2.2.10 Consider 212 175. To express this integer as a product of primes we check
each prime in turn: 2, 3, 5, 7, . . . to see whether it is a factor. If it is not, then we move onto
the next prime; if it is a factor then we divide by the prime as many times as possible, and
then look for prime factors of the quotient, starting with the next highest prime. As soon as
we reach the stage where the prime under consideration is greater than the square root of the
current quotient, the quotient must be prime, by Exercise 1.33, and so is the final factor. In
the case of 212 175 we get
212 175 = 3 × 70 725
= 32 × 23 575
= 32 × 5 × 4 715
= 32 × 52 × 943
= 32 × 52 × 23 × 41.
At this
√ last stage we are trying to factorise 41 and we are up to the prime 23. Note that
23 > 41, and so 41 must be prime, and we can stop.
Exercise 2.14 Express 579 768 as a product of primes.
Exercise 2.15 Let p be prime. Use the Fundamental Theorem√of Arithmetic to show that
√
p is irrational. (Hint: Follow the proof for the irrationality of 2, but express the integers
involved as products of primes.)
2.3 Algebraic Properties of N and Z Proof & Structure 39
We will concentrate on the natural numbers N, and look at one set of axioms for N. These are
known as Peano’s axioms, after the Italian mathematician Peano, who introduced them. He
also invented the notation ∈ for set membership.
This looks very odd. But the idea is to define 0 = 0, 1 = 0+ , 2 = (0+ )+ = 1+ , 3 = 2+ and
so on. So really the successor n+ is n + 1. So the first four properties say that 0 is a natural
number, that if you add 1 to any natural number you get another number, that 0 is the least
natural number, and that if m + 1 = n + 1, then m = n. The last property is giving us the
principle of induction for N. To see this, suppose P (n) is a statement concerning the natural
numbers N. Suppose that we can prove:
I1 P (0) is true;
I2 for each natural number k, P (k) ⇒ P (k + 1).
Now let S = {n ∈ N : P (n) is true}. We know that 0 ∈ S by I1. And by I2, if k ∈ S then
k + 1 = k + ∈ S. Therefore, by P5, S = N. Therefore P (n) is true for all natural numbers n.
This is all very well, but how do we get the operations +, × and so on? We will define them
both, but we need a lemma first.
Remember to prove this we are only allowing ourselves the five Peano axioms.
40 Proof & Structure Chapter 2: Number Sets and their Properties
Proof Let S = {0}∪{n ∈ N : n = m+ for some m ∈ N}. We will show that S = N, using P5.
For this, suppose that n = m+1 and n = m2 , for m1 , m2 ∈ N. Then m1 = m2 . Thus by P4,
+ + +
Properties of N
Let m, n ∈ N. We can add and multiply m and n, and also compare the magnitude of m and
n. (Formally, we say that m < n if there exists some k ∈ N with k ̸= 0 such that m + k = n.)
These operations can be proved, from the axioms and their definitions, to have all the proper-
ties listed below.
Addition
For all m, n, r ∈ N:
A1 m + n ∈ N (N is closed under addition);
A2 m + n = n + m (addition is commutative);
A3 m + (n + r) = (m + n) + r (addition is associative);
A4 0 + m = m + 0 = m (0 is an additive identity).
A5 if m + n = m + r, then n = r.
2.4 Congruences Proof & Structure 41
Multiplication
For all m, n, r ∈ N:
M1 mn ∈ N (N is closed under multiplication);
M2 mn = nm (multiplication is commutative);
M3 m(nr) = (mn)r (multiplication is associative);
M4 1m = m1 = m (1 is a multiplicative identity);
M5 if m ̸= 0 and mn = mr, then n = r.
The Distributive Laws
For all m, n, r ∈ N:
D1 m(n + r) = mn + mr;
D2 (n + r)m = nm + rm.
Order Properties
For all m, n, r ∈ N:
O1 exactly one of m < n or m = n or n < m holds (the law of trichotomy);
O2 if m < n and n < r, then m < r (< is transitive);
O3 if m < n, then m + r < n + r;
O4 if m < n and r > 0, then mr < nr.
Properties of Z
The integers can be defined in terms of natural numbers, but we won’t go into the details here.
They have +, × and < defined in a similar way to N. All the properties are carried over, so we
get A1 – A5, M1 – M5, D1 and D2, and O1 – O4. But there is one additional property of
addition. For all m ∈ Z, we have
A5′ (−m) + m = 0.
Here −m is known as the additive inverse of m. Addition is called a binary operation because
it is a way of combining two numbers to produce another number. In fact, any set/binary
operation combination which satisfies laws A1, A3, A4 and A5′ is known as a group. So Z
is a ‘group under addition’ but N is not because it doesn’t have inverses. For the same reason,
Z and N are not ‘groups under multiplication’. (Note: I called the additional property A5′
because it implies A5; starting with A1 – A4 and A5′ you can prove A5.)
2.4 Congruences
Let a, b, n be integers, with n > 0. Then a is congruent to b modulo n, written a ≡
b (mod n), if n divides a − b. This is the same as saying that a and b differ by a multiple of n.
So, for example, any two positive integers with the same units digit [written in the usual way,
in base 10] are congruent modulo 10. Hence 12 ≡ 22 ≡ 4352 (mod 10).
Example 2.4.1 139 ≡ 67 (mod 12), since 139 − 67 = 72 = 6 × 12. Similarly −388 ≡
250 (mod 29), since −388 − 250 = −638 = −22 × 29.
Exercise 2.17 Verify that 293 ≡ 85 (mod 13). Find the first four positive integers which are
congruent to 293 modulo 13. (Hint: divide 293 by 13.)
Exercise 2.18 Let a, b, n ∈ Z with n > 0. Prove that a ≡ b (mod n) if and only if a and b
have the same remainder when divided by n.
42 Proof & Structure Chapter 2: Number Sets and their Properties
Exercise 2.19 Let a, n ∈ Z with n > 0. Show that a ≡ 0 (mod n) if and only if n divides a.
We now give two results which establish some of the basic properties of the relation of congru-
ence modulo n. The first result establishes that congruence modulo n is an equivalence relation
on Z. The second result shows how certain arithmetical operations can be applied to integers
which are congruent modulo n.
Proof We shall verify C3. The other two properties are left as an exercise. Suppose a ≡
b (mod n) and b ≡ c (mod n). Then n divides a − b and n divides b − c. Thus n divides
(a − b) + (b − c) = a − c. That is, a ≡ c (mod n). □
Proof Note that if a ≡ b (mod n) and c ≡ d (mod n), then n divides a − b and n divides
c − d. Thus there are integers u and v such that a = nu + b and c = nv + d.
1. From the above note, n divides (a−b)+(c−d) = (a+c)−(b+d), and so a+c ≡ b+d (mod n).
2. From the above note, n divides (a−b)−(c−d) = (a−c)−(b−d), and so a−c ≡ b−d (mod n).
3. From the above note, ac = (nu + b)(nv + d) = n2 uv + nud + nvb + bd and so
ac − bd = n(nuv + ud + vb).
Exercise 2.22 Use the properties of congruence modulo n given in Theorem 2.4.3 to show
that, for all positive integers t, 7t − 4t is divisible by 3. (Compare with Exercise 1.38.)
2.4 Congruences Proof & Structure 43
Modular arithmetic
Let a, n ∈ Z with n > 0. By the generalisation of the Division Theorem (Theorem 2.1.3) to
cover all of Z, not just Z+ , there are unique integers q and r with 0 ≤ r < n such that a = qn+r.
Hence a − r is divisible by n and so a ≡ r (mod n). Thus every integer is congruent to exactly
one of 0, 1, 2 . . . , n − 1 modulo n.
The elements of Zn are called the congruence class representatives. This is because every
integer is congruent to exactly one of the elements of Zn , so these elements form a set of rep-
resentatives of the different congruence possibilities modulo n. We will meet Zn later when we
talk about group theory.
Exercise 2.23 Consider the algebraic properties of Z given earlier. Which of A1 – A5, A5′ ,
M1 –M5 and D1 and D2 are satisfied if we replace Z with Zn , addition with ⊕ and multipli-
cation with ⊗?
Exercise 2.24 Show that it is not possible to define an order < on Zn which satisfies all of
O1 – O4. (Hint: Use a contradiction proof. If < can be defined, then either 0 < 1 or 1 < 0.
Show that either assumption leads to a contradiction.)
Divisibility Tests
We will now use the idea of congruence modulo n to verify some well known divisibility tests.
Let n be a positive integer. Then, writing n in decimal (base 10) form, we can find integers
a0 , a1 , . . . , ar with 0 ≤ ai ≤ 9 (0 ≤ i ≤ r) and ar ̸= 0 such that
Example 2.4.5 Divisibility by 2 Since 10 ≡ 0 (mod 2), by Theorem 2.4.3(3) and (4), for
1 ≤ i ≤ r we have ai 10i ≡ 0 (mod 2). Thus, by Theorem 2.4.3(1), n ≡ a0 (mod 2). Thus n
is divisible by 2 if and only if the units digit of n (that is a0 ) is divisible by 2.
Example 2.4.6 Divisibility by 3 Since 10 ≡ 1 (mod 3), by Theorem 2.4.3(3) and (4), we
have, for 0 ≤ i ≤ r, that ai 10i ≡ ai · 1 ≡ ai (mod 3). Now Theorem 2.4.3(1) gives us that
n ≡ a0 + a1 + · · · + ar (mod 3). Thus n is divisible by 3 if and only if the sum of the digits of
n is divisible by 3.
44 Proof & Structure Chapter 2: Number Sets and their Properties
Example 2.4.7 Consider n = 25 763 498 218. Here a0 = 8 and so n is divisible by 2 and the
sum of the digits of n is 2 + 5 + 7 + 6 + 3 + 4 + 9 + 8 + 2 + 1 + 8 = 55 and so n is not divisible
by 3.
Exercise 2.26 Let n1 = 634 872 197 672, n2 = 784 255 716 750 and n3 = 237 418 107 551.
Which, if any, of n1 , n2 and n3 is divisible by 2,3 or 5?
Exercise 2.27 Find simple tests to determine when a positive integer (expressed in base 10)
is divisible by 4, 9, 10 or 11. (Hint: For the last case, note that 10 ≡ −1 (mod 11).)
We can use divisibility tests to narrow down possibilities for numbers, as the following example
shows.
Example 2.4.8 Suppose an integer M is divisible by 15 and when expressed in base 10 has
the form 25XY . The task is to find all possible values for M . Now we don’t have a specific test
for divisibility by 15, but 15 = 3 × 5, so an integer is divisible by 15 if and only if it is divisible
by both 3 and 5. Using the test for divisibility by 3, we know 2 + 5 + X + Y is divisible by 3,
that is, 7 + X + Y ≡ 0 (mod 3). In other words, X + Y ≡ −7 ≡ 2 (mod 3). Given that
both X and Y lie between 0 and 9, 0 ≤ X + Y ≤ 18. Hence
We can now use the fact that M is divisible by 5. This means that Y is either 0 or 5. Suppose
Y = 0. Then X + Y = X + 0 = X. So X = 2, 5 or 8. If Y = 5, then X + 5 = 2, 5, 8, 11, 14 or
17 implies X = 0, 3, 6 or 9. So the possibilities for M are: 2520, 2550, 2580, 2505, 2535, 2565
and 2595.
Linear Congruences
Let a, c, d, n ∈ Z with a ̸= 0 and n > 0. When is it possible to find an integer such that
ax + d ≡ c (mod n)?
First note that, since d ≡ d (mod n), if such an integer x exists, then by Theorem 2.4.3(2),
ax + d − d ≡ c − d (mod n). Thus we may consider the simpler problem of trying to find an
integer x such that ax ≡ b (mod n) (just set b = c − d).
We may also suppose that 0 ≤ b < n, since we know there exists some integer b̂ with 0 ≤ b̂ < n
such that b ≡ b̂ (mod n). By transitivity of congruence therefore, ax ≡ b (mod n) if and
only if ax ≡ b̂ (mod n).
We now give three results which enable us to find a procedure for solving the linear congruence
ax ≡ b (mod n). For each of the three propositions we assume throughout that we are
referring to the congruence ax ≡ b (mod n), where a, n > 0 and b ≥ 0. The first result gives
a condition for when there are no solutions.
Proposition 2.4.9 Let D = gcd(a, n). If D does not divide b, then the congruence has no
solutions.
2.4 Congruences Proof & Structure 45
Proof ( ax) ≡ b b (mod( nn)) if and only if there exists q ∈ Z such that ax − b = qn, which is if and
a
only if D x − D = q D , that is a x − b′ = qn′ . This is true if and only if a′ x ≡ b′ (mod n′ ).
′
□
Example 2.4.12 Consider the congruence 30x ≡ 20 (mod 55). Since gcd(30, 55) = 5 and
5 divides 20, by Proposition 2.4.11 the congruence has the same solutions as the congruence
6x ≡ 4 (mod 11).
Proposition 2.4.13 Suppose gcd(a, n) = 1. Then the congruence has a solution. Moreover,
if x is a solution, then y ∈ Z is a solution if and only if x ≡ y (mod n).
Proof Since gcd(a, n) = 1 then, by Theorem 2.2.6, there are integers u, v such that ua + vn =
1. Thus ua ≡ 1 (mod n). So, if X = ub, then aX ≡ aub ≡ (au)b ≡ 1b ≡ b (mod n) (here
we have used three applications of Theorem 2.4.3(3)). Hence, X = ub is a solution and the
congruence has a solution.
For the second part, if x is a solution, then, by Theorem 2.4.3(3), ax ≡ b (mod n) implies that
aux ≡ ub (mod n) and hence, by another application of Theorem 2.4.3(3), (au)x ≡ 1 · x ≡
ub (mod n). Therefore if x is a solution to the congruence then x ≡ ub (mod n). So any
other solution y must satisfy y ≡ ub (mod n) and hence, by the transitivity of congruence,
x ≡ y (mod n). On the other hand, if y is any integer such that x ≡ y (mod n), then by
Theorem 2.4.3(3), ay ≡ ax ≡ b (mod n), so y is a solution of the congruence. This completes
the proof of the result. □
Notice that this says (in the language of the proof of Proposition 2.4.13) when gcd(a, n) = 1,
X is a solution to ax ≡ b (mod n) if and only if X ≡ ub (mod n).
Example 2.4.14 In example 2.4.12 it was shown that the congruence 30x ≡ 20 (mod 55)
has the same solutions as the congruence 6x ≡ 4 (mod 11). Here a = 6 and b = 4. Now
gcd(6, 11) = 1 and, by inspection, 2 × 6 − 1 × 11 = 1. [So, in the notation of Proposition 2.4.13,
u = 2.] Thus, the solutions are all integers x satisfying x ≡ ub = 2 × 4 = 8 (mod 11).
This is fine, but you might observe that the original congruence is modulo 55 whereas the
final solution is modulo 11. Is it possible to give solutions modulo 55? Fortunately this is not
very difficult to achieve. Since x ≡ 8 (mod 11), there is an integer q such that x = 8 + 11q.
Now 55 11
= 5, so if q1 ≡ q2 (mod 5), then 11q1 ≡ 11q2 (mod 55). Thus we only need to
consider possibilities for q that are distinct modulo 5, namely q = 0, 1, 2, 3 or 4. That is,
x ≡ 8, 19, 30, 41, 52 (mod 55).
Step 1 Subtract B from each side to obtain a congruence of the form ax ≡ b (mod n).
Proceed to Step 2.
Step 2 If a < 0, multiply both sides of the congruence by -1.
Proceed to Step 3.
Step 3 If b < 0, replace b with b + nq, where q is the smallest integer such that
b + nq ≥ 0. Proceed to Step 4.
Step 4 Find D = gcd(a, n). Proceed to Step 5.
Step 5 If D does not divide b, then the congruence has no solutions, so stop. Otherwise
proceed to Step 6.
Step 6 D divides b. Let a′ = Da , b′ = Db and n′ = Dn . (Solutions to ax ≡ b (mod n)
are then the same as solutions to a′ x ≡ b′ (mod n′ ).) Proceed to Step 7.
Step 7 Find u, v ∈ Z such that ua′ + vn′ = 1. Proceed to Step 8.
Step 8 Let ub′ be the unique element of Zn′ which is congruent to ub′ modulo n′ . Then
the solution to the congruence is x ≡ ub′ (mod n′ ). If you want the solutions
modulo n, then proceed to Step 9. Otherwise stop.
Step 9 The solution of the congruence is
We illustrate this procedure in the following example. To make reference to the procedure
easier we give each step in turn. In general it is not necessary to do this explicitly.
Example 2.4.15 Consider the linear congruence −438x + 527 ≡ 7481 (mod 1806).
Step 1 Subtracting 527 from each side gives the equivalent congruence
Step 2 Here a < 0, so we multiply both sides of the congruence by -1, giving the equivalent
congruence 438x ≡ −6954 (mod 1806).
Step 3 Adding 4 × 1806 = 7224 to the right hand side gives the equivalent congruence
438x ≡ 270 (mod 1806).
1806 = 4 × 438 + 54
438 = 8 × 54 + 6
54 = 9 × 6 + 0.
Step 5 Since 6 divides 270 (270 = 6 × 45) the congruence has a solution.
Step 6 Dividing through by 6 we get the equivalent congruence 73x ≡ 45 (mod 301).
2.4 Congruences Proof & Structure 47
Quadratic Congruences
We have concentrated on linear congruences. However if n is prime, we can sometimes use
factorization to solve quadratic congruences as the following example shows.
This means that the product (x + 4)(x − 1) is divisible by 7. Because 7 is prime, this means
that at least one of (x + 4) and (x − 1) is divisible by 7. That is, either x + 4 ≡ 0 (mod 7)
or x − 1 ≡ 0 (mod 7). In other words x ≡ −4 (mod 7) (and since we like to finish with a
non-negative solution, we say equivalently that x ≡ 3 (mod 7)) or x ≡ 1 (mod 7). Therefore
the solutions are x ≡ 1, 3 (mod 7).
This property results in quite different algebraic properties from Z. For instance, if a, b, c ∈ Q
with a ̸= 0, then the equation ax + b = c has a unique solution in Q.
Exercise 2.29 Give examples of two equations of the form ax + b = c with a, b, c ∈ Z such
that the first has an integer solution, but the second has no integer solution.
Theorem 2.5.1 Between any two distinct rational numbers there are infinitely many rational
numbers. That is, if a, b ∈ Q with a ̸= b, then there are infinitely many c ∈ Q such that
a < c < b.
Commentary The idea behind this proof is that if you take any two numbers, one number
that definitely lies between them is the (mean) average of the numbers. So, for example, we
3
+ 12
would expect that 4 2 7 = 6956
would lie between 34 and 12
7
, and indeed it does. We could then
repeat the procedure to construct a second rational between 6956
and 12
7
and so on. First we need
to prove that the mean of two rationals a and b lies between a and b.
a+b
a< < b.
2
2.6 The Real Numbers Proof & Structure 49
Proof Adding a to both sides of a < b gives 2a < a + b, and adding b to both sides of a < b
gives a + b < 2b. Thus 2a < a + b < 2b. Dividing this inequality by 2 throughout gives the
result. □
a+b
For r = 1, P (1) is the statement a < 2
< b, which is true by Lemma 2.5.2.
Suppose P (k) is true. That is, a < qk < b. Now, by Lemma 2.5.2 again, we have qk < qk2+b < b.
That is, qk < qk+1 < b. But we know, by the inductive hypothesis, that a < qk . Combining we
get a < qk+1 < b. By induction therefore, P (r) is true for all r ≥ 1.
To complete the proof we need to show that q1 , q2 , . . . are all distinct. We do this by showing
that qr > qr−1 for each r ≥ 2. We have
qr−1 + b b − qr−1
qr − qr−1 = − qr−1 = >0
2 2
since b > qr−1 , and so qr > qr−1 .
Thus q1 , q2 , . . . are infinitely many rationals between a and b. □
Exercise 2.30 Let a = 53 and b = 17 4
. Find the rational numbers q1 , q2 , q3 , q4 and q5 as
constructed in the proof of Theorem 2.5.1.
Exercise 2.31 (A different proof of Theorem 2.5.1.) Let a, b ∈ Q with a > b and let n ∈ Z
with n ≥ 2. Use the fact that 0 < 1 < n to show that 0 < n1 < 1. By multiplying 0 < n1 < 1
throughout by b − a and then adding a, deduce that there are infinitely many rationals between
a and b.
Exercise 2.32 Prove Theorem 2.5.1 using a contradiction proof.
The decimal part of the real number is 0.r1 r2 . . .. The decimal part terminates if for some
i ∈ Z+ , rj = 0 for all j ≥ i. The decimal part recurs, with period P , if there exists i ∈ Z+
such that for all integers j ∈ {i, i + 1, . . . , i + P − 1}, and for all n ∈ N, we have rj+nP = rj . A
recurring decimal is written r0 .r1 . . . ri−1 ri ri+1 . . . ri+P −1 .
50 Proof & Structure Chapter 2: Number Sets and their Properties
Example 2.6.2 Sometimes noticing powers of 2 or 5, and removing factors of 10 can help. For
101
example, calculating 31250000 . If you put this on your calculator you will see 0.000003232 · · · .
Is it recurring? We’d rather avoid long division by 31250000. So notice that 3125 = 55 . If we
multiply top and bottom by 25 then on the bottom we will just have powers of 10. That is:
101 101 × 25 3232
= 5 5
= 5 = 3232 × 10−9 = 0.000003232.
31250000 2 × 5 × 10000 10 × 104
So the fraction is terminating.
7 21 5 401 4111
Exercise 2.33 Express each of the rationals , , ,
15 32 13 625
and 33300
in decimal form. Which,
if any, terminate, and which, if any, recur?
Exercise 2.34 Explain why the decimal part of every rational number either terminates or
recurs. (Hint: how many possible remainders are there at each stage of the division?)
It is relatively easy to find the rational represented by a recurring decimal as the following
example illustrates.
Example 2.6.3 Let x = 0.426. Then x = 0.4 + 0.026 and 100x = 42.626 = 42.6 + 0.026 and
so 100x − x = 42.6 − 0.4 = 42.2. Thus 99x = 42.2, and so
42.2 422 211
x= = = .
99 990 495
Note in this example that x recurred with period 2 and we calculated 102 x−x. This observation
may help you with the next exercise.
m
Exercise 2.35 Express each of x = 0.3863, y = 0.518 and z = 0.68250 in the form n
, where
m, n ∈ Z+ and gcd(m, n) = 1.
Boundedness
Let X ⊆ R with X ̸= ∅. We say that X is bounded above if there is a real number u such
that x ≤ u for all x ∈ X. Similarly X is bounded below if there is a real number l such
that l ≤ x for all x ∈ X. The set X is unbounded above if it is not bounded above, and
unbounded below if it is not bounded below.
Exercise 2.36 Write out the definition of a set being bounded above using the symbols ∀, ∃, R
and ∈. By negating the definition, write out what it means for a set to be unbounded above.
Note that if u is an upper bound of X then, for all r ∈ R+ , u + r is also an upper bound of X.
Thus, if X is bounded above, then there are infinitely many upper bounds of X. Similarly if
X is bounded below, then there are infinitely many lower bounds of X.
We will see later that the rational numbers do not share this property.
Proposition 2.6.4 Let X ⊆ R, with X ̸= ∅. If X is bounded above, then X has a unique least
upper bound.
Proof By the completeness axiom, X has a least upper bound, u say. Suppose that v is also
a least upper bound. Then v is an upper bound by UB1 applied to v. But since u is a least
upper bound, we have u ≤ v by UB2 applied to u. On the other hand, u is an upper bound,
but v is a least upper bound, so v ≤ u. Hence u = v. □
Example 2.6.5 Let X = {1 − n1 : n ∈ Z+ }. Then X is bounded above and below. Possible
upper bounds of X are 5, π, 32 , and possible lower bounds are −200, −2.365, −1. But lubX = 1
and glbX = 0.
Note that if u is an upper bound for a set X and u ∈ X, then u = lubX. This is because for
any upper bound v, a ≤ v for all a ∈ X. In particular, u ≤ v. Hence UB1 and UB2 both hold
for u. So lubX = u. A similar statement is true for greatest lower bounds.
Example 2.6.6 Let X = {3 − 2x − x2 : x ∈ R}. Then X is bounded above but not bounded
below. This is because 3 − 2x − x2 = 3 − (x2 + 2x) = 4 − (x2 + 2x + 1) = 4 − (x + 1)2 ≤ 4.
Possible upper bounds are 312, 40, 7 but lubX = 4.
Example 2.6.7 Let X = N. Then X is not bounded above, but is bounded below. Possible
lower bounds are −53 245, 0, − 12 , but glbX = 0.
Example 2.6.8 Let X = {3 + (−e)n : n ∈ N}. Then X is neither bounded above nor bounded
below. Suppose, for example, that X is bounded above by u. Then u ≥ 3 + (−e)n for all n ∈ N.
Let v = ln u and let n be any even integer greater than v. Then
3 + (−e)n = 3 + en since n is even
> 3 + ev since f (x) = ex is an increasing function
= 3 + eln u
= 3+u
> u.
Hence, for the chosen n, u < 3 + (−e)n ≤ u, a contradiction. Hence u is not bounded above.
52 Proof & Structure Chapter 2: Number Sets and their Properties
Example 2.6.9 Let X = {1 − 4 sin θ : θ ∈ R}. To decide whether X is bounded above and/or
below, we first notice that for all θ ∈ R, −1 ≤ sin θ ≤ 1. [If you aren’t already comfortable with
the graphs of sin, cos and tan, you need to become that way!] Therefore −4 ≤ 4 sin θ ≤ 4. Now
we multiply through by −1 which changes the order of the inequality to give 4 ≥ −4 sin θ ≥ −4.
Finally add 1 throughout and we obtain 5 ≥ 1 − 4 sin θ ≥ −3. This means X is certainly
bounded above (by 5) and bounded below (by -3). These are the least upper and greatest lower ( )
bounds, respectively,
( πbecause
) they are elements of X. To show this, note that 5 = 1 − 4 sin 3π
2
and −3 = 1 − 4 sin 2 . Thus lubX = 5 and glbX = −3.
Exercise 2.38 For each of the following subsets of R, decide whether they are (a) bounded
above; (b) bounded below.
X1 = { 4+3n
n
: n ∈ Z+ },
2
X2 = { q100
+q
: q ∈ Q},
X3 = { 2n : n ∈ N},
1
X4 = {3 + cos 2θ : θ ∈ R},
X5 = {27 + 36x2 + 4x3 − 3x4 : x ∈ R}.
Where they exist, give the least upper bound and the greatest lower bound of the subset
concerned.
Proof We cannot just take the mean here, because we need a rational number and we don’t
know whether a and b are rational or not. So we use a different approach. Let a = r0 .r1 r2 . . .
and b = s0 .s1 s2 . . . be the decimal expansions of a and b. Let i be the first place where the
expansions differ. So r0 = s0 , r1 = s1 , . . . , ri−1 = si−1 but ri < si . Now, because of our earlier
insistence that no decimal can end with recurring 9’s, we know that there exists some j > i
with rj ̸= 9. Let c be the terminating decimal given by c = r0 .r1 r2 . . . rj−1 tj , where tj = rj + 1.
Then a < c < b, and c ∈ Q. □
355
As an example of this, let a = π and b = 113
. Then the decimal expansions of a and b begin
a = 3.14159265358979323846264338327 . . .
b = 3.14159292035398230088495575221 . . .
We can see that r7 < s7 . The first j > 7 with rj < 9 is r8 = 5. So the proof tells us that
π < 3.14159266 < 355113
. Of course this process could be repeated indefinitely to produce in-
finitely many rationals between two real numbers.
√ √
Commentary What irrationals do we know? One candidate is 2. Now since 0 < 2 < 2,
it follows that there is an irrational between 0 and 2. So we just have to ‘scale’ appropriately,
rather like in Exercise 2.31.
√
Proof We know that 0 < 2 < 2. Since b − a > 0, multiplying this inequality throughout by
b − a gives
√
0< 2(b − a) < 2(b − a).
Corollary 2.6.12 Let a, b ∈ Q with a < b. There there are infinitely many irrationals r such
that a < r < b.
Theorem 2.6.13 Let a, b ∈ R with a < b. Then there exist infinitely many irrationals r such
that a < r < b.
Proof By Proposition 2.6.10, there exists c ∈ Q such that a < c < b. Another application
of Proposition 2.6.10 gives d ∈ Q such that c < d < b. Then by Corollary 2.6.12, there are
infinitely many irrationals r such that c < r < d. And by construction, for each of these r, we
have a < c < r < d < b, hence a < r < b. □
We are now in a position to show that the completeness axiom does not hold for Q. Let
A = {q ∈ Q : q 2 < 2}. Then A is√bounded above
√ by 2. √But suppose that A has a least upper
bound in Q, u say. Either u √ < 2 or u > 2. If u < 2 then, by Proposition 2.6.10, there
exists v ∈ Q with u < v < 2. But then v 2 < 2 and so v√ ∈ A. This contradicts the fact
that
√ u is an upper bound √ for A. On the other hand, if u > 2, then there exists w ∈ Q with
2 < w < u. Since w > 2, w is an upper bound for A, but w < u, contradicting the fact
that u is the least upper bound. Therefore A does not have a least upper bound in Q. So we
have found a non-empty subset of Q which is bounded above and has no least upper bound in
Q. Therefore the completeness axiom for Q does not hold. √ (If we consider A as a subset of R,
then of course A does have a least upper bound, namely 2.)
54 Proof & Structure Chapter 2: Number Sets and their Properties
Given any set A, we define the cardinality of A, written |A|, to be the number of members
of A. Then two sets A and B will have the same cardinality if there is some way of pairing off
the elements of A and B so that no member of A or B is left unpaired.
We say that a set A is countable if A has the same cardinality as N. In other words there is
a bijective function f : N → A. (Or equivalently there is a bijective function g : A → N.)
Therefore Z is countable. □
Another way to look at this is that we can think of a set S being countable if we can write
out a list s0 , s1 , s2 , . . . which contains all the elements of S. The bijection could be defined
f (0) = s0 , f (1) = s1 and so on. The above bijection arises from the list
What about Q? Surely there are more fractional numbers than whole numbers?
Proof It is enough to prove that the positive rational numbers are countable. We can then use
a similar method to Lemma 2.7.1 to deduce that the entire set of rational numbers is countable.
We will construct a list by using the following array:
2.7 How Big is Infinity? Proof & Structure 55
1 1 1 1 1 ···
1
�
2 �3
� � 4
�5
� � �
2 � 2 � 2 � 2 �
1
�
2 �
�
3
� 4
� �
3 � 3 � 3 �
1
�
2 �3
�
�
4 � 4 �
1 2
�
�
5 �
1
Note that if we just wrote down the complete list we would get the same numbers appearing
more than once - for example 12 = 24 = 36 . . .. So the procedure is to write down the list working
methodically along the lines, but omitting any fraction which is not reduced to its lowest form.
We get the following listing of Q+ :
1 1 2 3 1 1 2 3 4 5
, , , , , , , , , ,....
1 2 1 1 3 4 3 2 1 1
Thus Q+ is countable. □
By this time you may be thinking that all infinite sets must be countable. But this is not so.
The following result shows that there is an uncountable (not countable) subset of R.
Theorem 2.7.3 The open interval (0, 1) is uncountable.
Proof (Cantor) For a contradiction, suppose that (0, 1) is countable. Then there is a bijection
f : N → (0, 1). Let
f (0) = 0.a1 a2 a3 a4 a5 . . .
f (1) = 0.b1 b2 b3 b4 b5 . . .
f (2) = 0.c1 c2 c3 c4 c5 . . .
f (3) = 0.d1 d2 d3 d4 d5 . . .
..
.
Construct x = 0.x1 x2 x3 x4 x5 . . . as follows:
• Choose x1 such that x1 ̸= a1 and x1 ̸= 9;
• choose x2 such that x2 ̸= b2 and x2 ̸= 9;
• choose x3 such that x3 ̸= c3 and x3 ̸= 9;
and in general:
• choose xi such that xi doesn’t equal the ith decimal place of the ith number on the list
(which is f (i − 1)).
Then x ∈ (0, 1) but for all n ∈ N, f (n) ̸= x, which is contrary to the assumption that (0, 1) is
countable. Thus (0, 1) is uncountable. □
Corollary 2.7.4 The set R of real numbers is uncountable.
Note that since Q is countable and R is uncountable, the set of irrational numbers must be
uncountable.
56 Proof & Structure Chapter 2: Number Sets and their Properties
Exam-Style Questions
Section A
Exercise 2.41(a) Express 5 161 860 as a product of primes. [1]
m
(b) Express 0.2714 in the form n
where m and n are positive integers and gcd(m, n) = 1. [2]
7 1 000 001
(c) Express 22
and 510
as decimals (exact answers must be given). [2]
Exercise 2.42 Use the Euclidean division algorithm to find gcd(3014, 1672). Hence, or other-
wise, find integers a and b such that
3014a + 1672b = gcd(3014, 1672). [5]
Exercise 2.43 An integer N is divisible by 12 and, when expressed in base 10, has the form
4A7B. Find all possible values for N . (You may quote, without proof, any divisibility tests
that you require.) [5]
(a) Show that A is bounded above and give the least upper bound of A. [3]
(b) Show that A is not bounded below. [2]
Section B
Exercise 2.45(a) Determine all solutions, where they exist, of the following linear
congruences.
(iv) Use part (iii) to deduce that there are infinitely many irrational numbers between any two
distinct rational numbers. [2]
Note: Exam questions, particularly Section B questions, often combine elements from different
chapters.
2.7 How Big is Infinity? Proof & Structure 57
Historical Notes
‘The beginnings of Algebra I found far more difficult, perhaps as a result of bad teaching. I
was made to learn by heart: ‘The square of the sum of two numbers is equal to the sum of
their squares increased by twice their product’. I had not the vaguest idea what this meant,
and when I could not remember the words, my tutor threw the book at my head, which did
not stimulate my intellect in any way.’
I can’t promise my notes will last 2000 years, but I do promise not to throw things at you.
Learning Outcomes
After studying this chapter, and the related exercises, you should be able to
• state the well ordering property and understand its use in the proof of the Division
Theorem;
• state and prove the Fundamental Theorem of Arithmetic;
• define common multiples and the greatest common divisor of two positive integers;
• describe the Euclidean division algorithm, and use it to find the greatest common divisor
of two positive integers;
• reverse the Euclidean division algorithm to express the greatest common divisor of two
positive integers as an integer linear combination of the two integers;
• express a positive integer as a product of primes;
• appreciate the difficulty in formally defining the natural numbers, the integers and their
arithmetical operations;
• be aware of the algebraic properties of the integers under addition and multiplication;
• define what it means for two integers to be congruent modulo a positive integer n;
• verify standard properties of congruence modulo n;
• use the properties of congruence modulo n to verify simple divisibility tests;
• determine all of the solutions, if any, of a linear congruence ax + b ≡ c (mod n), and
prove why the method of solution is valid;
• prove that there are infinitely many rational numbers between any two distinct rational
numbers;
• express a rational number in decimal form;
• re-express a rational given in decimal form as the ratio of two integers;
• define what it means for a subset of R to be bounded above and bounded below;
• determine whether a given subset of R is bounded above or below using algebraic methods
and/or curve sketching;
• determine, when they exist, the least upper bound and the greatest lower bound of a
given subset of R;
• state the completeness axiom for R;
• understand that the completeness axiom does not hold for Q, and be able to illustrate
this with examples;
• prove that there is an irrational number between any two distinct rational numbers;
• define what it means for a set to be countable, and show that Z and Q are countable, but
R is uncountable.