# Set Theory/Cardinals

## Infinite Sets and Cardinality

The Size of a Finite Set

When deciding how large finite sets are, we generally count the number of elements in the set, and say two sets are the same size if they have the same number of elements. This approach doesn't work too well if the sets are infinite, however, because we can't count the number of elements in an infinite set.

However, there is another way to define when two sets have the same size that works equally well for finite and infinite sets. We say that two sets $A$ and $B$ have the same size if we can define a function $f: A\to B$ which satisfies the following properties:

• $f(a)$ is defined for every $a\in A$.
• $\forall b\in B$, $\exists a\in A$ such that $f(a)=b$. We say that f is onto or surjective.
• $\forall a_1, a_2\in A$, $f(a_1)=f(a_2) \implies a_1=a_2$. We say that f is one-to-one or injective.

Functions which satisfy these properties are called bijections.

Examples

The sets $\{1,2,3\}$ and $\{4,5,6\}$ both have three elements. We can define a bijection between them like this: $f(1)=6, f(2)=4, f(3)=5$.

The set of all positive integers, $\{1,2,3,...\}$ is the same size as the set of nonnegative integers, $\{0,1,2,...\}$. Let $f(1)=0, f(2)=1$, and more generally $f(n)=n-1$.

Exercise

Prove that the above function is a bijection.

Often it is difficult to construct an explicit bijection between two sets of the same cardinality, so the following theorem can come in handy:

Cantor-Schroeder-Bernstein Theorem

See proof at Cantor–Bernstein–Schroeder theorem

If $A$ and $B$ are two sets and there exist injective functions $f:A\to B$ and $g:B\to A$, then there exists a bijection between $A$ and $B$.