9 Countable and Uncountable Sets 237
Note that h :A →C. It is easy to check that h is one-to-one and onto, and this
is left as an exercise. This shows that A has the same cardinality as C, and we
are done.
Follows a mathematical definition of finiteness.
Finite sets
AsetA is said to be finite if it is the empty set or if there is a natural n such
that A has same cardinality as {1, 2,...,n}. A set which is not finite will be
said to be infinite.
A finite set A is such that there is a function f :{1, 2,...,n}→A which is
one-to-one and onto. In particular, for every a in A, there is a unique (why?) i in
{1, 2,...,n} such that f(i)= a. In other words, each element of A has a unique
label i.
Example 9.2 Show that {1, 2,...,n} has the same cardinality as {1, 2,...,k} if and
only if n =k.
If n = k, then it is easy to see that {1, 2,...,n} has the same cardinality as
{1, 2,...,k}: define f by f(i)=i for every i in {1, 2,...,n}. This is a one-to-one
and an onto function.
For the converse, assume that {1, 2,...,n} has the same cardinality as {1
, 2,...,
k}. B
y definition there is a function f :{1, 2,...,n}→{1, 2,...,k} which one-to-
one and onto. Since f is one-to-one, all the f(i) must be distinct. Otherwise, we
would have f(i)=f(j) for i =j , contradicting the one-to-one property. Thus, we
must have k ≥ n since we have n distinct f(i) in {1, 2,...,k}. On the other hand,
if k>n, then there is at least one element of {1, 2,...,k} which is not the image
of an element in {1, 2,...,n}. This is so because the set {f(1), f (2), . . . , f (n)} has
exactly n<k elements. Then f cannot be onto. This is a contradiction. Therefore,
k ≤n. This, together with k ≥n, implies that k =n, and we are done.
Countable sets
AsetA is said to be countable if it has the same cardinality as the set of
naturals N.
Example 9.3 In Example 9.1 we have shown that the set of odd integers has the same
cardinality as the set of the naturals. Thus, the set of odd integers is countable. Note
that the set of odd numbers is strictly included in the set of naturals, but according
to our definition, they have the same cardinality! No such monkey business may
happen for finite sets as will be shown in the exercises.
Example 9.4 We will now show that the set of integers Z is countable and therefore
has the same cardinality as N.