# Countable and Uncountable Sets

## Definition and Properties of Countable Sets

We know from the previous topic that the sets \(\mathbb{N}\) and \(\mathbb{Z}\) have the same cardinality but the cardinalities of the sets \(\mathbb{N}\) and \(\mathbb{R}\) are different. Thus, we need to distinguish between two types of infinite sets.

Sets such as \(\mathbb{N}\) or \(\mathbb{Z}\) are called countable because we can list their elements:

- \(\mathbb{N} = \left\{ {1,2,3,4,5, \ldots } \right\}\)
- \(\mathbb{Z} = \left\{ {0, - 1,1, - 2,2, - 3,3, \ldots } \right\}\)

To define the concept more formally, consider a set \(A.\) The set \(A\) is called countably infinite if \(\left| A \right| = \left| \mathbb{N} \right|,\) that is, if there is a bijection \(\mathbb{N} \to A.\)

Respectively, the set \(A\) is called uncountable, if \(A\) is infinite but \(\left| A \right| \ne \left| \mathbb{N} \right|,\) that is, there exists no bijection between the set of natural numbers \(\mathbb{N}\) and the infinite set \(A.\)

A set is called countable, if it is finite or countably infinite.

Thus the sets \(\mathbb{Z},\) \(\mathbb{O},\) \(\left\{ {a,b,c,d} \right\}\) are countable, but the sets \(\mathbb{R},\) \(\left( {0,1} \right),\) \(\left( {1,\infty } \right)\) are uncountable.

The cardinality of the set of natural numbers is denoted \(\aleph_0\) (pronounced aleph null):

Hence, any countably infinite set has cardinality \(\aleph_0.\)

Any subset of a countable set is countable.

Any infinite subset of a countably infinite set is countably infinite.

Let \(A\) and \(B\) be countable sets. Then their union \(A \cup B\) is also countable.

## Cartesian Product of Countable Sets

If \(A\) and \(B\) are countable sets, then the Cartesian product \(A \times B\) is also countable.

Indeed, if the sets \(A\) and \(B\) are countable, they can be represented in list form:

To provide unique mapping between the ordered pairs \(\left( {{a_i},{b_j}} \right)\) and natural numbers \(n,\) we can traverse all elements \(\left( {{a_i},{b_j}} \right)\) as shown in Figure \(1,\) starting at the smallest arrow.

There are many other ways to construct a bijective mapping from \(A \times B\) and \(\mathbb{N}.\)

It follows from the above that the Cartesian product \(\mathbb{N} \times \mathbb{N}\) is countably infinite, that is,

This result can be generalized to the product of any finite number of countable sets.

## Rational Numbers

The set of rational numbers \(\mathbb{Q}\) is countable.

Indeed, any rational number \(r\) other than zero can be written in canonical form as

where \(p \in \mathbb{Z},\) \(q \in \mathbb{N}\) and \(p\) and \(q\) have no common divisors except \(1.\)

The number \(0\) can be represented, for example, as \(\frac{0}{1}.\)

We can arrange the rational numbers in ascending order of the sum \(\left|p\right| + q:\)

and so on.

As a result, we get a list of rational numbers that maps to natural numbers. This mapping is bijective. Thus the set of rational numbers \(\mathbb{Q}\) is countable, that is,

## Some Uncountable Sets

### Real Numbers

We already know that the sets \(\mathbb{N}\) and \(\mathbb{R}\) have unequal cardinalities. Therefore \(\left| \mathbb{R} \right| \ne {\aleph_0}\) and the set of real numbers is uncountable.

### Irrational Numbers

The set of irrational numbers \(\mathbb{I}\) is also uncountable. Indeed, \(\mathbb{R} = \mathbb{Q} \cup \mathbb{I}.\) The set \(\mathbb{Q}\) is countable. So if we suppose that \(\mathbb{I}\) is countable, then the union of two countable sets \(\mathbb{Q} \cup \mathbb{I} = \mathbb{R}\) would also be countable, which contradicts the above statement.

### Set of Infinite Sequences of \(0\text{s}\) and \(1\text{s}\)

Let \(S\) be the set of all infinite sequences consisting of \(0\text{s}\) and \(1\text{s}.\) This set is uncountable. The proof is based on Cantor's diagonal argument. By contradiction, suppose that \(S\) is countable. Then we can arrange all infinite sequences in a list like this

Each infinite sequence is represented as

where the elements of the matrix \(\left[ {{s_{nm}}} \right]\) take values \(0\) or \(1.\)

Now, using the diagonal elements \({s_{11}},\) \({s_{22}},\) \({s_{33}},\ldots,\) we construct a new infinite sequence \(t = {t_1}{t_2}{t_3}\cdots,\) where \(t_n\) is calculated as the binary difference \({t_n} = {s_{nn}} - 1,\) that is,

It is clear that \(t \ne s_n\) for any \(n \in \mathbb{N}.\) Hence, the set \(S\) is not countable.