0% found this document useful (0 votes)
16 views10 pages

Cardinality

This chapter explores the notion of cardinality, which formalizes what it means for two sets to have the same "size", even if the sets are infinite. It introduces the concept of a bijection to define when two sets have the same cardinality. Finite sets are precisely defined as those having the same cardinality as the set [n] for some natural number n. Theorems are proved about operations on finite and infinite sets that preserve or change cardinality, such as taking unions, products, or subsets.

Uploaded by

mohammadali naim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views10 pages

Cardinality

This chapter explores the notion of cardinality, which formalizes what it means for two sets to have the same "size", even if the sets are infinite. It introduces the concept of a bijection to define when two sets have the same cardinality. Finite sets are precisely defined as those having the same cardinality as the set [n] for some natural number n. Theorems are proved about operations on finite and infinite sets that preserve or change cardinality, such as taking unions, products, or subsets.

Uploaded by

mohammadali naim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Chapter 8

Cardinality

In this chapter, we will explore the notion of cardinality, which formalizes what it means
for two sets to be the same “size”.

8.1 Introduction to Cardinality


What does it mean for two sets to have the same “size”? If the sets are finite, this is easy:
just count how many elements are in each set. Another approach would be to pair up the
elements in each set and see if there are any left over. In other words, check to see if there
is a one-to-one correspondence (i.e., bijection) between the two sets.
But what if the sets are infinite? For example, consider the set of natural numbers N
and the set of even natural numbers 2N := {2n | n 2 N}. Clearly, 2N is a proper subset of
N. Moreover, both sets are infinite. In this case, you might be thinking that N is “larger
than” 2N However, it turns out that there is a one-to-one correspondence between these
two sets. In particular, consider the function f : N ! 2N defined via f (n) = 2n. It is easily
verified that f is both one-to-one and onto. In this case, mathematics has determined
that the right viewpoint is that N and 2N do have the same “size”. However, it is clear
that “size” is a bit too imprecise when it comes to infinite sets. We need something more
rigorous.

Definition 8.1. Let A and B be sets. We say that A and B have the same cardinality i↵
there exists a one-to-one correspondence between A and B. If A and B have the same
cardinality, then we write card(A) = card(B) .

Problem 8.2. Prove each of the following. In each case, you should create a bijection
between the two sets. Briefly justify that your functions are in fact bijections.

(a) Let A = {a, b, c} and B = {x, y, z}. Then card(A) = card(B).

(b) Let O denote the set of odd natural numbers. Then card(N) = card(O).

(c) card(N) = card(Z).

59
CHAPTER 8. CARDINALITY

(d) Let a, b, c, d 2 R with a < b and c < d. Then card((a, b)) = card((c, d)).1

(e) Let R = { 21n | n 2 N}. Then card(N) = card(R).

(f) Let F be the set of functions from N to {0, 1}. Then card(F ) = card(P (N)).2

(g) Let A be any set. Then card(A) = card(A ⇥ {x}).

Theorem 8.3. Let A, B, and C be sets. Then we have the following:

(a) card(A) = card(A).

(b) If card(A) = card(B), then card(B) = card(A).

(c) If card(A) = card(B) and card(B) = card(C), then card(A) = card(C).

In light of the previous theorem, the next result should not be surprising.

Corollary 8.4. If X is a set, then “has the same cardinality as” is an equivalence relation
on P (X).

Theorem 8.5. Let A, B, C, and D be sets such that card(A) = card(C) and card(B) =
card(D).

(a) If A and B are disjoint and C and D are disjoint, then card(A [ B) = card(C [ D).

(b) card(A ⇥ B) = card(C ⇥ D).

Given two finite sets, it makes sense to say that one set is “larger than” another pro-
vided one set contains more elements than the other. We would like to generalize this
idea to handle both finite and infinite sets.

Definition 8.6. Let A and B be sets. If there is a one-to-one function (i.e., injection) from
A to B, then we say that the cardinality of A is less than or equal to the cardinality of B.
In this case, we write card(A)  card(B) .

Theorem 8.7. Let A, B, and C be sets. Then we have the following:

(a) If A ✓ B, then card(A)  card(B).

(b) If card(A)  card(B) and card(B)  card(C), then card(A)  card(C).

(c) If C ✓ A while card(B) = card(C), then card(B)  card(A).

It might be tempting to think that the existence of a one-to-one function from a set
A to a set B that is not onto would verify that card(A)  card(B) and card(A) , card(B).
While this is true for finite sets, it is not true for infinite sets as the next exercise asks you
to verify.
1 Hint: Try creating a linear function f : (a, b) ! (c, d). Drawing a picture should help.
2 Hint: Define : F ! P (N) so that (f ) outputs a subset of N determined by when f outputs a 1.
CHAPTER 8. CARDINALITY

Exercise 8.8. Provide an example of sets A and B such that card(A) = card(B) despite the
fact that there exists a one-to-one function from A to B that is not onto.

Definition 8.9. Let A and B be sets. We write card(A) < card(B) provided card(A) 
card(B) and card(A) , card(B).

It is important to point out that the statements card(A) = card(B) and card(A) 
card(B) are symbolic ways of asserting the existence of certain types of functions from
A to B. When we write card(A) < card(B), we are saying something much stronger than
“There exists a function f : A ! B that is one-to-one but not onto.” The statement card(A) <
card(B) is asserting that every one-to-one function from A to B is not onto. In general, it
is difficult to prove statements like card(A) , card(B) or card(A) < card(B).

8.2 Finite Sets


In the previous section, we used the phrase “finite set” without formally defining it. Let’s
be a bit more precise.

Definition 8.10. For each n 2 N, define [n] = {1, 2, . . . , n}.

For example, [5] = {1, 2, 3, 4, 5}. Notice that our notation looks just like that for the
set of relatives given a relation on some set (see Definition 6.33), which is an equivalence
class if the relation happens to be an equivalence relation. However, despite the similar
notation, these concepts are unrelated. We will have to rely on context to keep them
straight.
The next definition should coincide with your intuition about what it means for a set
to be finite.

Definition 8.11. A set A is finite i↵ A = ; or card(A) = card([n]) for some n 2 N. If A = ;,


then we say that A has cardinality 0 and if card(A) = card([n]), then we say that A has
cardinality n.

Let’s prove a few results about finite sets.

Theorem 8.12. If A is finite and card(A) = card(B), then B is finite.3

Theorem 8.13. If A has cardinality n 2 N [ {0} and x < A, then A [ {x} is finite and has
cardinality n + 1.

Theorem 8.14. For every n 2 N, every subset of [n] is finite.4

Theorem 8.13 shows that adding a single element to a finite set increases the cardi-
nality by 1. As you would expect, removing one element from a finite set decreases the
cardinality by 1.
3 Don’t forget to consider the case when A = ;.
4 Hint: Use induction.
CHAPTER 8. CARDINALITY

Theorem 8.15. If A has cardinality n 2 N, then for all x 2 A, A \ {x} is finite and has
cardinality n 1.

The next result will not come as a surprise. The proof is not complicated, but is not
immediate either. It is a consequence of Theorems 8.13 and 8.14.

Theorem 8.16. Every subset of a finite set is finite.


k
[
Theorem 8.17. If A1 , A2 , . . . , Ak is a finite collection of finite sets, then Ai is finite.5
i=1

The next theorem, called the Pigeonhole Principle, is surprisingly useful. It puts re-
strictions on when we may have a one-to-one function. The name of the theorem is in-
spired by the following idea: If n pigeons wish to roost in a house with k pigeonholes and
n > k, then it must be the case that at least one hole contains more than one pigeon.

Theorem 8.18 (Pigeonhole Principle). If n, k 2 N and f : [n] ! [k] with n > k, then f is not
one-to-one.6

The last theorem of this section tells us that the cardinality of a proper subset of a
finite set is never the same as the cardinality of the original set. It turns out that this
theorem does not hold for infinite sets.

Theorem 8.19. If A is a finite set, then card(B) < card(A) for all proper subsets B of A.

8.3 Infinite Sets


In the previous section, we explored finite sets. Now, let’s tinker with infinite sets.

Definition 8.20. A set A is infinite i↵ A is not finite.

Let’s see if we can utilize this definition to prove that the set of natural numbers is
infinite.

Theorem 8.21. The set N of natural numbers is infinite.7

The next theorem is analogous to Theorem 8.12, but for infinite sets. As we shall see
later, the converse of this theorem is not generally true.

Theorem 8.22. If A is infinite and card(A) = card(B), then B is infinite.8


5 Hint: Use induction.
6 Hint: Induct on the number of pigeons. The base case is n = 2.
7 Hint: For sake of a contradiction, assume otherwise. Then there exists n 2 N such that card([n]) =

card(N), which implies that there exists a bijection f : [n] ! N. What can you say about the number
m := max(f (1), f (2), . . . , f (n)) + 1?
8 Hint: Try a proof by contradiction. You should end up composing two bijections, say f : A ! B and

g : B ! [n] for some n 2 N.


CHAPTER 8. CARDINALITY

Exercise 8.23. Quickly verify that the following sets are infinite by appealing to Theo-
rem 8.21, Theorem 8.22, and Problem 8.2.
(a) The set of odd natural numbers.

(b) The set of even natural numbers.

(c) The integers.

(d) The set R = { 21n | n 2 N}.

(e) The set N ⇥ {x}.


Notice that Definition 8.20 tells what infinite sets are not, but it doesn’t really tell
us what they are. In light of Theorem 8.21, one way of thinking about infinite sets is as
follows. Suppose A is some nonempty set. Let’s select a random element from A and set it
aside. We will call this element the “first” element. Then we select one of the remaining
elements and set is aside, as well. This is the “second” element. Imagine we continue
this way, choosing a “third” element, and “fourth” element, etc. If the set is infinite, we
should never run out of elements to select. Otherwise, we would create a bijection with
[n] for some n 2 N.
The next problem, sometimes refereed to as the Hilbert Hotel9 , illustrates another way
to think about infinite sets.
Problem 8.24. The Infinite Hotel has rooms numbered 1, 2, 3, 4, . . .. Every room in the Infi-
nite Hotel is currently occupied. Is it possible to make room for one more guest (assuming
they want a room all to themselves)? An infinite number of new guests, say g1 , g2 , g3 , . . .,
show up in the lobby and each demands a room. Is it possible to make room for all the
new guests even in the hotel is already full?
The previous problem verifies that a proper subset of the natural numbers is in bijec-
tion with the natural numbers themselves. We also witnessed this in parts (a) and (b) of
Exercise 8.23. Notice that Theorem 8.19 forbids this type of behavior for finite sets. It
turns out that this phenomenon is true for all infinite sets. The next theorem verifies that
that the two viewpoints of infinite sets discussed above are valid.
Theorem 8.25. Let A be a set. Then the following statements are equivalent.10
(i) A is an infinite set.

(ii) There exists a one-to-one function f : N ! A.

(iii) A can be put in one-to-one correspondence with a proper subset of A (i.e., there
exists a proper subset B of A such that card(B) = card(A)).
9 The Hilbert Hotel is named after mathematician David Hilbert (1862–1942).
10 Hint: Prove (i) i↵ (ii) and (ii) i↵ (iii). For (i) implies (ii), construct f recursively. For (ii) implies (i), try
a proof by contradiction. For (ii) implies (iii), let B = A \ {f (1), f (2), . . .} and show that A can be put in
bijection with B [ {f (2), f (3), . . .}. Lastly, for (iii) implies (ii), suppose g : A ! C is a bijection for some
proper subset C of A. Let a 2 A \ C. Define f : N ! A via f (n) = g n (a), where g n means compose g with
itself n times.
CHAPTER 8. CARDINALITY

Corollary 8.26. A set is infinite i↵ it has an infinite subset.

Corollary 8.27. If A is an infinite set, then card(N)  card(A).

It is worth mentioning that for the previous theorem, (iii) implies (i) following imme-
diately from the contrapositive of Theorem 8.19.

Problem 8.28. Find a new proof of Theorem 8.21 that uses (iii) implies (i) from Theo-
rem 8.25.

Exercise 8.29. Quickly verify that the following sets are infinite by appealing to either
Theorem 8.25 (use (ii) implies (i)) or Corollary 8.26.

(a) The set of odd natural numbers.

(b) The set of even natural numbers.

(c) The integers.

(d) The set N ⇥ N.

(e) The set of rational numbers Q.

(f) The set of real numbers R.

(g) The set of perfect squares.

(h) The interval (0, 1).

(i) The set of complex numbers C := {a + bi | a, b 2 R}.

8.4 Countable Sets


Recall that if A = ;, then we say that A has cardinality 0. Also, if card(A) = card([n]) for
n 2 N, then we say that A has cardinality n. We have a special way of describing sets that
are in bijection with the natural numbers.

Definition 8.30. If A is a set such that card(A) = card(N), then we say that A is denumer-
able and has cardinality @0 (read “aleph naught”).

Notice if a set A has cardinality 1, 2, . . ., or @0 , we can label the elements in A as “first”,


“second”, and so on. That is, we can “count” the elements in these situations. Certainly, if
a set has cardinality 0, counting isn’t an issue. This idea leads to the following definition.

Definition 8.31. A set A is called countable i↵ A is finite or denumerable. A set is called


uncountable i↵ it is not countable.

Exercise 8.32. Quickly justify that each of the following sets is countable. Feel free to
appeal to previous problems.
CHAPTER 8. CARDINALITY

(a) The set A := {a, b, c}

(b) The set of odd natural numbers.

(c) The set of even natural numbers.

(d) The set R := { 21n | n 2 N}.

(e) The set of perfect squares.

(f) The integers.

(g) The set N ⇥ {x}, where x < N.


Theorem 8.33. Let A and B be sets such that A is countable. If f : A ! B is a bijection,
then B is countable.
Theorem 8.34. Every subset of a countable set is countable.11
Theorem 8.35. A set is countable i↵ it has the same cardinality of some subset of the
natural numbers.
Theorem 8.36. If f : N ! A is an onto function, then A is countable.
Loosely speaking, the next theorem tells us that we can arrange all of the rational
numbers then count them “first”, “second”, “third”, etc. Given the fact that between any
two distinct rational numbers on the number line, there are an infinite number of other
rational numbers (justified by taking repeated midpoints), this may seem counterintu-
itive.
Theorem 8.37. The set of rational numbers Q is countable.12
Theorem 8.38. If A and B are countable sets, then A [ B is countable.
We would like to prove a stronger result than the previous theorem. To do so, we need
a lemma.
Lemma 8.39. Let {An }1
n=1 be a (countable) collection of sets. Define B1 := A1 and for each
natural number n > 1, define
n 1
[
Bn := An \ Ai .
i=1
Then we we have the following:
11 Hint: Let A be a countable set. Consider the cases when A is finite versus infinite. The contrapositive of
Corollary 8.26 should be useful for the case when A is finite.
12 Hint: Make a table that column headings 0, 1, 1, 2, 2, . . . and row headings 1, 2, 3, 4, 5, . . .. If a column has

heading m and a row has heading n, then the corresponding entry in the table is given by the fraction
m/n. Find a way to zig-zag through the table making sure to hit every entry in the table (not including
column and row headings) exactly once. This justifies that there is a bijection between N and the entries
in the table. Do you see why? Now, we aren’t done yet because every rational number appears an infinite
number of times in the table. Appeal to Theorem 8.34.
CHAPTER 8. CARDINALITY

(a) The collection {Bn }1


n=1 is pairwise disjoint.
1
[ 1
[
(b) An = Bn .
n=1 n=1

Theorem 8.40. Every countable union of countable sets is countable.13

Theorem 8.41. If A and B are countable sets, then A ⇥ B is countable.

Theorem 8.42. The set of all finite sequences of 0’s and 1’s (e.g., 0110010 is a finite se-
quence of 0’s and 1’) is countable.

8.5 Uncountable Sets


Recall from Definition 8.31 that a set A is uncountable i↵ A is not countable. Since all
finite sets are countable, the only way a set could be uncountable is if it is infinite. It
follows that a set A is uncountable i↵ there is never a bijection between N and A. It’s not
clear that uncountable sets even exist! It turns out that uncountable sets do exist and in
this section, we will discover a few of them.
Our first task is to prove that the open interval (0, 1) is uncountable. By Exercise 8.23(h),
we know that (0, 1) is an infinite set, so it is at least plausible that (0, 1) is uncountable. The
following problem outlines the proof of Theorem 8.44. Our approach is often referred to
as Cantor’s Diagonalization Argument.
Before we get started, recall that every number in (0, 1) can be written in decimal form.
However, there may be more than one way to write a given number in decimal form. For
example, 0.2 equals 0.199. A number x = 0.a1 a2 a3 . . . is said to be in standard form i↵
there is no k such that for all i > k, ai = 9. That is, a decimal expansion is in standard
form i↵ the expansion doesn’t end with a repeating sequence of 9’s. For example, 0.2 is in
standard form while 0.199 is not, even though both represent the same number. It turns
out that every real number can be expressed uniquely in standard form.

Problem 8.43. For sake of a contradiction, assume the interval (0, 1) is countable. Then
there exists a bijection f : N ! (0, 1). For each n 2 N, its image under f is some number
in (0, 1). Let f (n) := 0.a1n a2n a3n . . ., where a1n is the first digit in the decimal form for the
image of n, a2n is the second digit, and so on. If f (n) terminates after k digits, then our
convention will be to continue the decimal form with 0’s. Now, define b = 0.b1 b2 b3 . . .,
where 8
>
<2, if aii , 2
>
bi = >
>
:3, if aii = 2.

(a) Prove that the decimal expansion that defines b above is in standard form.
13 Hint: A countable union is a union of countably many sets. Recall that a countable set may be finite or
infinite. Consider three cases: (1) finite union of countable sets (use induction with base case n = 2), (2)
countably infinite union of finite sets, (3) countably infinite union of countably infinite sets.
CHAPTER 8. CARDINALITY

(b) Prove that for all n 2 N, f (n) , b.

(c) Prove that f is not onto.

(d) Explain why we have a contradiction.

(e) Explain why it follows that the open interval (0, 1) cannot be countable.
The steps above prove the following theorem.
Theorem 8.44. The open interval (0, 1) is uncountable.
Loosely speaking, what Theorem 8.44 says is that the open interval (0, 1) is “bigger”
in terms of the number of elements it contains than the natural numbers and even the
rational numbers. This shows that there are infinite sets of di↵erent sizes!
One consequence of Theorem 8.44 is that we know there is at least one uncountable
set. The next three results are useful for finding other uncountable sets.
Theorem 8.45. If A and B are sets such that A ✓ B and A is uncountable, then B is un-
countable.14
Corollary 8.46. If A and B are sets such that A is uncountable and B is countable, then
A \ B is uncountable.
Theorem 8.47. If f : A ! B is a one-to-one function and A is uncountable, then B is
uncountable.
Theorem 8.48. The set R of real numbers is uncountable. Moreover, card((0, 1)) = card(R).15
Theorem 8.49. If a, b 2 R with a < b, then (a, b), [a, b], (a, b], and [a, b) are all uncountable.
Theorem 8.50. The set of irrational numbers is uncountable.
Theorem 8.51. The set C of complex numbers is uncountable.
Problem 8.52. Determine whether each of the following statements is true or false. If a
statement is true, prove it. If a statement is false, provide a counterexample.
(a) If A and B are sets such that A is uncountable, then A [ B is uncountable.

(b) If A and B are sets such that A is uncountable, then A \ B is uncountable.

(c) If A and B are sets such that A is uncountable, then A ⇥ B is uncountable.

(d) If A and B are sets such that A is uncountable, then A \ B is uncountable.


Problem 8.53. Let S be the set of infinite sequences of 0’s and 1’s. Determine whether S
is countable or uncountable and prove that your answer is correct.
14 Hint:Try a proof by contradiction. Take a look at Theorem 8.34.
15 Hint:To show that R is uncountable, appeal to Theorem 8.45. To show that card((0, 1)) = card(R), con-
sider the function f : (0, 1) ! R defined via f (x) = tan(⇡x ⇡2 ). It is worth pointing out that proving
card((0, 1)) = card(R) automatically proves that R is uncountable.
CHAPTER 8. CARDINALITY

It turns out that the two uncountable sets may or may not have the same cardinality.
Perhaps surprisingly, there are sets that are even “bigger” than the set of real numbers.
Given any set, we can always increase the cardinality by considering its power set.

Theorem 8.54. If A is a set, then card(A) < card(P (A)).16

Recall that cardinality provides a way for talking about “how big” a set is. The fact
that the natural numbers and the real numbers have di↵erent cardinality (one countable,
the other uncountable), tells us that there are at least two di↵erent “sizes of infinity”.
Theorem 8.54 tells us that there are infinitely many “sizes of infinity.”

Theorem 8.55. Consider the set S from Problem 8.53. Then card(P (N)) = card(S).

16 Hint: Mimic Cantor’s Diagonalization Argument for showing that the interval (0, 1) is uncountable.

You might also like