# 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 ${\displaystyle A}$ and ${\displaystyle B}$ have the same size if we can define a function ${\displaystyle f:A\to B}$ which satisfies the following properties:

• ${\displaystyle f(a)}$ is defined for every ${\displaystyle a\in A}$.
• ${\displaystyle \forall b\in B}$, ${\displaystyle \exists a\in A}$ such that ${\displaystyle f(a)=b}$. We say that f is onto or surjective.
• ${\displaystyle \forall a_{1},a_{2}\in A}$, ${\displaystyle 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 ${\displaystyle \{1,2,3\}}$ and ${\displaystyle \{4,5,6\}}$ both have three elements. We can define a bijection between them like this: ${\displaystyle f(1)=6,f(2)=4,f(3)=5}$.

The set of all positive integers, ${\displaystyle \{1,2,3,...\}}$ is the same size as the set of nonnegative integers, ${\displaystyle \{0,1,2,...\}}$. Let ${\displaystyle f(1)=0,f(2)=1}$, and more generally ${\displaystyle 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 ${\displaystyle A}$ and ${\displaystyle B}$ are two sets and there exist injective functions ${\displaystyle f:A\to B}$ and ${\displaystyle g:B\to A}$, then there exists a bijection between ${\displaystyle A}$ and ${\displaystyle B}$.

## Definition

There are many ways of defining cardinality, and one method is to use ordinals as a reference. The cardinality of a set can be defined to be the smallest ordinal in one-to-one correspondence with the set. However, when speaking of cardinality, it is common to compare with the set of real numbers etc. when speaking of cardinalities greater than the countable cardinal, so in practice cardinality is thought of as something simply compared between two sets. One reason for this is because the possible sizes of ordinals can generally depend on the axioms one is working with.