Math 127: Infinite Cardinality: 1 Definitions
Math 127: Infinite Cardinality: 1 Definitions
Math 127: Infinite Cardinality: 1 Definitions
Mary Radcliffe
1 Definitions
Recall that when we defined finiteness, we used the notion of bijection to define the size of a finite set. In
particular, we defined a finite set to be of size n if and only if it is in bijection with [n].
For infinite sets, this strategy doesn’t quite work. What set do we take to biject to in order to define
infinity? It’s not immediately clear that there is a “canonical” set we can use for the definition. So instead,
we use a definition for infinite sets based on what was a theorem in the world of finite sets.
Definition 1. Let X and Y be infinite sets. We say that |X| = |Y | if there exists a bijection f : X → Y .
We say a set X is countably infinite if |X| = |N|. If X is infinite, but it is not countably infinite, we
say that X is uncountably infinite, or just uncountable.
A set X is called countable if it is either finite or countably infinite.
It can be a bit confusing that the word countable does not imply countably infinite. In general, you
can think of countable as really meaning that a set is enumerable. We saw in lecture that when talking
about finite sets, we have the following:
Proposition 1. A set X is finite if and only if the elements of X can be enumerated in a terminating list
as X = {x1 , x2 , . . . , xn }.
The proof of this proposition is immediate from the definition: if X is countably infinite, then there
exists a bijection f : N → X, which immediately provides a way to enumerate the elements of X, taking
xi = f (i).
Hence, we can think of the word “countable” as really being about enumeration. A set is countable if
it can be enumerated, regardless of if the enumeration terminates.
Example 1. Z is countable.
Actually, you’ve already proven this, even though you may not have realized it. In Homework 6,
problem 15, you saw the following function f : N → Z
x
2 x is even
f (x) = x−1 .
− 2 x is odd
You proved in that homework exercise that f is a bijection. That means that we have a bijection
1
from N to Z, and therefore by definition Z is countably infinite.
Another way to approach this, of course, is to attempt to enumerate (aka, list) the elements of Z.
Certainly we can list the elements of Z; there are many ways to do so. Here is one:
The fact that Z is the same size as N may be a bit surprising. Indeed, N is a proper subset of Z, and
in fact there are infinitely many elements of Z that are not a part of N. Nevertheless, they are the same
size! We will find this happens a lot in the world of infinity.
2 Countable Infinity
Here, let’s consider how our favorite set operations and functions interact with countable sets. We begin
with a characterization of countability:
Theorem 1. Let X be a nonempty set. The following are equivalent:
1. X is countable.
Before we write the proof, a quick word on the phrasing “the following are equivalent,” which is
sometimes abbreviated as TFAE. This construction is a short hand for saying “there is an if and only
if between each of the following statements.” Here, if we think of the three statements as propositions
p1 , p2 , p3 , the theorem is stating p1 ⇔ p2 ⇔ p3 .
In proving TFAE type theorems, it’s common to prove a cycle of implications. That is, instead of
proving p1 ⇔ p2 , and also p2 ⇔ p3 , and also p1 ⇔ p3 , we would prove the shorter set of statements
p1 ⇒ p2 , and p2 ⇒ p3 , and p3 ⇒ p1 . These three implications are sufficient to get all parts of the if
and only ifs on the three propositions, since if we start from any one proposition we can follow a series of
implications to any other.
That being said, let’s prove Theorem 1.
(1 ⇒ 2) Suppose that X is countable. We wish to show that there exists a surjection f : N → X. We consider
two cases, according as whether X is finite.
Case 1: X is finite. Then for some n ∈ N, there exists a bijection h : [n] → X. Let x0 ∈ X be some
element of X. Define f : N → X by
h(k) 1 ≤ k ≤ n
f (k) = .
x0 k ≥n+1
(2 ⇒ 3) Suppose there exists a surjective function f : N → X. We wish to show that there exists an injection
g : X → N. This is proven in HW7 Problem 1.
2
(3 ⇒ 1) Suppose there exists an injective function g : X → N. We wish to show that X is countable. If X is
finite, we are done.
Suppose, then, that X is an infinite set and there exists an injective function g : X → N. Let S =
g(X) ⊆ N. Since g is injective, and X is infinite, we have that S is also infinite. Moreover, as S ⊆ N,
we can write S = {s1 , s2 , s3 , . . . } by taking s1 = min(S), s2 = min(S\{s1 }), s3 = min(S\{s1 , s2 }),
etc. Hence we have that S is a countably infinite set. Moreover, the function g 0 : X → S defined by
g 0 (x) = g(x)∀x ∈ X is a bijection, and hence |X| = |S|. Therefore, X is countably infinite.
This theorem will allow us to prove that sets are countable, even if we don’t know that the functions
we construct are exactly bijective, and also without actually knowing if the sets we consider are finite or
countably infinite. Let’s see an example of this in action.
Proof. Suppose that X and Y are countable. By Theorem 1, there exists surjective functions
f : N → X and g : N → Y .
Define a function h : N → (X ∪ Y ) by
f ( k2 )
k is even
h(k) = .
g( k+12 ) k is odd
Since f and g are surjective, we have that h(N) = f (N) ∪ g(N) = X ∪ Y , and thus h is a surjective
function. Hence, by Theorem 1, we have that X ∪ Y is countable.
In the above example, we are able to determine that the set we wish to consider is countable, even
without knowing whether or not X or Y is countably infinite or finite, and without knowing what their
intersection looks like.
Using the result of Theorem 1, we can also prove the following, which is assigned as a homework
exercise. This allows us to take advantage of the structure of Theorem 1 when it is more convenient to
use a different set from N.
Theorem 2. Let X be a nonempty set, and let Y be a countably infinite set. Then TFAE:
1. X is countable.
2. There exists a surjective function f : Y → X.
The following theorem will be quite useful in determining the countability of many sets we care about.
n
Y
Theorem 3. Let n ∈ N, and let X1 , X2 , . . . , Xn be nonempty countable sets. Then Xi = X1 × X2 ×
i=1
· · · × Xn is countable.
n
Y
Proof. We work by induction on n. The base case, that n = 1, is trivial, as Xi = X1 , which is
i=1
countable by hypothesis.
For the sake of illustration, we consider also the case that n = 2. The technique for this case will also
be used in the inductive step, so it is worth our time to consider it.
3
Let X1 , X2 be countable sets. Write X1 = {x1 , x2 , x3 , . . . }, and write X2 = {y1 , y2 , y3 , . . . }; we note
that these enumerations can be terminating, or not. Recall that X1 × X2 = {(x, y) | x ∈ X1 , y ∈ X2 }. We
can visualize the elements of X1 × X2 in a table, as follows:
x1 x2 x3 x4 ...
y1 (x1 , y1 ) (x2 , y1 ) (x3 , y1 ) (x4 , y1 ) ...
y2 (x1 , y2 ) (x2 , y2 ) (x3 , y2 ) (x4 , y2 ) ...
y3 (x1 , y3 ) (x2 , y3 ) (x3 , y3 ) (x4 , y3 ) . . .
y4 (x1 , y4 ) (x2 , y4 ) (x3 , y4 ) (x4 , y4 ) ...
.. .. .. .. .. ..
. . . . . .
Now, in order to show that X1 × X2 is countable, it suffices to show that X1 × X2 is enumerable. Using
the table, we cannot enumerate the set by tracing first the rows or the columns; if X2 is infinite, then
enumerating along the first row will never terminate, and we will never arrive at the second row! So, we
will have to be more clever.
Our clever idea will be as follows. While it’s true that the rows and columns of the matrix are
potentially infinite in length, the diagonals of the matrix are not. So we can try to enumerate by following
the diagonals:
x1 x2 x3 x4 ...
y1 (x1 , y1 ) (x2 , y1 ) (x3 , y1 ) (x4 , y1 ) ...
y2 (x1 , y2 ) (x2 , y2 ) (x3 , y2 ) (x4 , y2 ) ...
y3 (x1 , y3 ) (x2 , y3 ) (x3 , y3 ) (x4 , y3 ) . . .
y4 (x1 , y4 ) (x2 , y4 ) (x3 , y4 ) (x4 , y4 ) ...
.. .. .. .. .. ..
. . . . . .
Another way to think of this enumeration is as follows: we enumerate (xi , yj ) by first listing all the
elements with i + j = 2, then listing all the elements with i + j = 3, then listing all the elements with
i + j = 4, and so on. Each of these is a finite set, and hence this will yield a full enumeration of all of
X1 × X2 .
Now, for the inductive step, suppose that we know that the Cartesian product of any n countable sets
is itself countable. Consider the product X1 × X2 × · · · × Xn × Xn+1 , all of which are countable.
Thus, as the result is true for any n by induction, the theorem holds.
It is important to note that this theorem applies only to a finite length Cartesian product; if we wish
to take an infinite length Cartesian product, things can go very differently for us, which we shall see in
Section 3 below. However, this theorem has an immediate, delightful corollary:
4
Corollary 1. The set of rational numbers Q is countably infinite.
Proof. Recall from Example 1 that Z is countable. Since there is an injection f : Z\{0} → Z defined
by f (x) = x for all x, by Theorem 2, we also have that Z\{0} is countable. Therefore, by Theorem 3, we
have that Z × (Z\{0}) is countable.
Consider the function g : Z × (Z\{0}) → Q defined by g((a, b)) = ab . Note that this is well defined, as
b 6= 0. Moreover, since every element of Q can be expressed in at least one way as a ratio of integers with
a nonzero denominator, we have that g is surjective. But then by Theorem 2, we have that Q is countable.
Finally, Q is not finite, as N ⊆ Q, and any subset of a finite set must also be finite.
Therefore, Q is countably infinite.
Amazing! So we have then that three of our favorite number sets are all countably infinite. Indeed,
though N ⊂ Z ⊂ Q, all three sets have the exact same cardinality, and are in bijection with each other!
Finally, we note the following theorem, whose proof is left as a homework exercise.
∞
[
Theorem 4. Let X1 , X2 , X3 , . . . be a countable list of countable sets. Then Xi is countable.
i=1
The proof will look similar to that of Theorem 3: if we can write the elements of the union in a table,
we can then trace the diagonals of the table to enumerate the elements. A word on the proof: be careful
with notation! It gets, well, messy.
3 Uncountable Infinity
So, if N, Z, and Q are all the same size, what about R? Is that also countable?
Sadly, no. The real numbers are a whole new ballgame. What we will actually prove here is that the
real numbers between 0 and 1 are not countable; this will certainly imply that the set of all real numbers
is not countable.
To prove that, we’re gonna have to do a little work. This is a classic argument called Cantor’s Diago-
nalization, and in order to employ it, we need a Lemma first.
Lemma 1. Every real number between 0 and 1 can be represented uniquely in base 10 representation as
0.d1 d2 d3 . . . , where the di represent digits between 0 and 9, and the digits have the property that ∀n ∈ N,
∃m ≥ n, dm 6= 9.
Let’s think carefully about what this is saying. First, we want to represent our numbers in base 10; no
problem there, we already did that long ago in our notes on Understanding Number Sets. The last part of
the statement is saying that we do not want a representation that ends in just a bunch of 9s forever. As
we have seen before, 0.9999 · · · = 1, so a decimal that terminates in all 9s can be simplified. For example:
Hence, we’d like to forbid a decimal from going to all 9s. Moreover, the Lemma claims that if we are able
to do so, then the decimal representation of the number is unique.
Proof. [Proof of Lemma 1] That each number can be represented as a decimal in base 10 expansion is
already known; we need only prove uniqueness of the representation under the condition that no represen-
tation terminates in all 9s.
5
Suppose that x is a real number between 0 and 1, and that we have two decimal representations of
x that satisfy the given condition; that is, we can write x = 0.d1 d2 d3 · · · = 0.c1 c2 c3 . . . , neither of which
terminate with infinitely many 9s. We work by induction to show that dn = cn for all n.
For the base case, consider d1 , c1 . Suppose that d1 6= c1 ; wolog say that d1 < c1 . Note then that
x = 0.c1 c2 c3 · · · ≥ 0.c1 . On the other hand, since at least one dn , for n ≥ 2 is not a 9, we have that
x − 0.d1 = 0.0d2 d3 · · · < 0.1, and thus x < 0.(d1 + 1) ≤ 0.c1 . Hence, 0.c1 ≤ x < 0.c1 , which is impossible.
Therefore, d1 = c1 .
For induction, suppose that for some n ∈ N we know that dk = ck for all k ≤ n.
Consider y = 10n x − d1 d2 . . . dn = 0.dn+1 dn+2 dn+3 · · · = 0.cn+1 cn+2 cn+3 . . . . By repeating the above
argument, we obtain that dn+1 = cn+1 .
Therefore, by induction, we have that dn = cn for all n, and hence the desired decimal representation
of x is unique.
Theorem 5. The set of real numbers between 0 and 1 is uncountable.
Proof. We work by contradiction. Write X = {x ∈ R | 0 < x < 1}. Suppose that X is countable.
Clearly X is infinite, and hence by definition, there exists a bijection f : N → X.
(n) (n) (n)
For each n ∈ N, write f (n) = 0.d1 d2 d3 . . . to be the unique decimal representation of f (n)
guaranteed by Lemma 1.
Define y ∈ X with decimal representation y = 0.y1 y2 y3 . . . , where for each n ∈ N, we define
(n) (n)
dn − 1
if dn 6= 0, 1
(n)
yn = 1 if dn = 0
(n)
2 if dn = 1
Note that y satisfies the condition in Lemma 1, since in fact none of the digits of y are 9s. Moreover,
by definition 0 < y < 1, since none of the digits of y are 0s. Therefore, y ∈ X, and hence since f is a
bijection, y = f (n) for some n ∈ N.
(n) (n) (n)
Therefore, y = 0.y1 y2 y3 · · · = 0.d1 d2 d3 · · · = f (n). By Lemma 1, we must therefore have that
(n) (n)
yi = di for all i ∈ N. But by definition, yn 6= dn , and hence we have a contradiction.
Therefore, it must be the case that X is not countable. Since X is infinite, then, X is uncountable.
This theorem shows that a particular subset of R is uncountable, which of course implies that R itself
is uncountable. Moreover, we can form a bijection from X described in the Theorem to R, as follows.
2x−1
Proof. Define a function f : X → R by f (x) = x−x 2 . Note that as 0, 1 ∈
/ X, this is a well-defined
function. We claim it is a bijection. To demonstrate
√ this, we show an inverse.
y−2+ 4+y 2
Let g : R → X be defined by g(y) = 2y for y 6= 0, and g(0) = 12 . We first claim
that
p this is p well-defined; we need to show that g(y) ∈ X for all y. Note that for all y 6= 0,
4 + y 2 < 4 + 4y + y 2 = |2 + y|, and hence g(y) < y−2+|2+y|2y ≤ 1. Moreover, for all y 6= 0,
y−2+|y−2|
p p
2 2
4 + y > 4 − 4y + y = |y − 2|, and hence g(y) > ≥ 0.
2y
1
Therefore, g is well defined. Moreover, we have for x = 2 , by definition g ◦ f (x) = x. For x 6= 12 ,
6
2x − 1
g ◦ f (x) = g
x − x2
r 2
2x−1 2x−1
x−x2 −2+ 4+ x−x2
= 2x−1
2 x−x 2
q 2
2x2 −1 4x −4x+1+4(x−x2 )2
x−x2 + (x−x2 )2
= 4x−2
x−x2
√
2x2 − 1 + 4x2 − 4x + 1 + 4x2 − 8x3 + 4x4
=
4x − 2
2
√
2x − 1 + 4x − 8x3 + 8x2 − 4x + 1
4
=
4x − 2
2
p
2x − 1 + (2x2 − 2x + 1)2
=
4x − 2
4x2 − 2x
= =x
4x − 2
Thus g ◦ f ≡ ιX . Similarly, one can show that f ◦ g ≡ ιR . Therefore, g is an inverse to f , and in
particular, then, f is a bijection.
Hence, we have that since X is uncountable, and |X| = |R|, also we know that R is uncountable.
A similar type of argument as in the proof of Theorem 5 can be used (and will be, in homework!) to
prove the following.
Theorem 6. Let X be any set. Then |X| < |P(X)|.
We have already proven this theorem for finite sets in previous homework. For infinite sets, it is
equally true. Note what this implies: if we have one set of infinite size, then we can generate infinitely
many different sizes of infinity by repeatedly taking power sets. Indeed, the following sets
are all of different cardinality, increasing in size from left to right. Moreover, it is not too difficult to
show the following.
Theorem 7. The set R is in bijection with P(N).
To prove this theorem one can work with binary representations of elements in X, rather than decimal
representations as was done in Lemma 1 and Theorem 5. We have seen, in the finite counting notes, that
P(X) is in bijection with the strings of 0s and 1s; we can use this to construct a bijection with decimal
representations of numbers.
Ok, so we have a bunch of infinities. But every set we’ve actually looked at takes only one of two sizes.
In some cases, we like to give a name to the sizes of infinity; these are cardinal numbers, and in fact they
have a whole algebra of their own, which we here omit. But a fundamental question then arises:
7
To be really specific, let’s consider a question. We know that N and R have different cardinalities; we
proved that in the work above. So here is a question.
Is there any set S such that |N| < |S| < |R|?
That is to say, can we construct a set whose size is in between that of N and R? Or is there nothing
in between? Even more, what about the other sizes of infinity? We saw above that |P(X)| 6= |X| for any
X, so an even more general version of our question above could be phrased as follows:
Let X be an infinite set. Is there any set S such that |X| < |S| < |P(X)|?
I would love to answer this question for you, and I think a lot of mathematicians would. We have just
one problem here:
Now that sounds a little bit crazy, and it feels pretty bad. But this is the question that lead to a
famous, important theorem in mathematics known as Gödel’s Incompleteness Theorem. We’re not going
to get into the nitty gritty details here, but the broad strokes of the idea are like this. First we rephrase
our question as a proposition. This proposition is often referred to as the Continuum Hypothesis.
p: There does not exist any set S with |N| < |S| < |R|.
Then the “answer” to the question just becomes the truth value of the proposition: if the proposition is
True, then no such S exists, and if the proposition is False, then such a set does exist, and we have not
found all the infinities.
In the 1940s, a mathematician named Gödel proved something resembling the following statement:
In the 1960s, a mathematican named Cohen followed up with something resembling the following
statement:
Let’s be very clear about what is being said here. What Gödel and Cohen are doing is not a proof
that the statement is true or false, but a proof about proofs themselves. Specifically, what Gödel proved
is that there is no proof that the statement is false. This does not, of course, mean that there IS a proof
that the statement is true, as we see in Cohen’s follow up theorem. Indeed, the set of proofs that one can
write using the standard set of axioms about mathematics simply DO NOT INCLUDE a proof about this
statement. Its truth cannot be known, at all.
Well, fine. We could get around this, if we wanted, by simply adding a new axiom that asserts that p
is either true or false, depending upon your preference. Gödel and Cohen’s work actually shows that this
is a logically consistent thing to do; the Continuum Hypothesis can be taken as either true or false and
nothing about the existing axiomatic structure will break.
But even before this work, in the 1930s, Gödel proved a theorem that might make this solution less
than satisfying. This result is known as the Gödel Incompleteness Theorem.
Suppose you have an axiomatic system of mathematics. Then you can make statements that
are neither provable nor unprovable in that system.
8
That is to say, assuming the truth value of the Continuum Hypothesis does not end this conundrum.
At some point, mathematics will bump up into another proposition that cannot be proven true and cannot
be proven false. Gödel’s Incompleteness Theorem says that this is unavoidable: you will never be able to
create an axiom system for which every proposition has a knowable truth value.
This, of course, is very sad-making for mathematicians. Our whole schtick is caring about problems for
which proofs or disproofs are not known. We may never know, working on a problem, whether the truth
of that question is even knowable, let alone how to solve it ourselves.
Incidentally, both Gödel and Cantor, after successful careers studying the nature of infinity, ended their
lives completely crazy. Cantor died in a mental institution, after having moved in and out of sanatoria for
the last 34 years of his life. Gödel was paranoid that people were out to get him; he died of starvation
after refusing to eat for months, claiming all his food was being poisoned. (Cohen seemed to do just fine
for himself, giving lectures on mathematics and the continuum problem up until his death in 2007.)