Lecture 5: cardinality and countability


For now, we will not use the symbol \(|X|\) by itself. It does not mean "the number of elements of the set", although our definitions will be consistent with this meaning. Until told otherwise, you may only use the symbol \(|X|\) as part of the phrases "\(|X| \leq |Y|\)", "\(|X| \geq |Y|\)", or "\(|X| = |Y|\)". This will prevent you from accidentally using reasoning that only applies to finite sets.

Definitions: Let \(X\) and \(Y\) be sets.

MCS uses the notation "X surj Y" (respectively "inj" or "bij"), but this can be confusing: surjectivity is a property of functions, not sets. For example, just because you find one non-injective function from \(X\) to \(Y\) does not mean that \(|X| \nleq |Y|\).

Properties of cardinality

It is not obvious that this use of \(\leq\) and \(\geq\) is justified. There are many things to prove, most of which are easy. We proved one of them:

Claim: (Cantor-Schroder-Bernstein) \(|X| \geq |Y|\) then \(|Y| \leq |X|\).

Proof: Suppose \(|X| \geq |Y|\). Then by definition, there exists a surjection \(f : X → Y\). We showed last time that \(f\) must have a right inverse \(g : Y → X\) (which means \(f \circ g = id\)). This means \(g\) has a left inverse (namely \(f\)), so \(g\) must be injective. Therefore there is an injection from \(Y\) to \(X\), so \(|Y| \leq |X|\) as required.

Other properties you could check for practice:

There is one property that is true, but the proof is very non-obvious:

Claim: if \(|X| \leq |Y|\) and \(|Y| \leq |X|\) then \(|Y| = |X|\).

The proof is beyond the scope of the course, but it is worth starting it to see why it is hard. If you are curious, here is a proof from a previous semester. You are not responsible for knowing this proof, but it only uses techniques that you should be comfortable with so you should be able to read it.

Note: You may use these properties without proof, unless we ask you to prove them.


Informally, a set \(X\) is countable if you can put it in a (potentially infinite) list. This can be formalized by saying that there is a "first element", a "second element", and so on, and each element is the "nth" element for some \(n\). In other words, there should exist a surjection \(f : \mathbb{N} → X\). Even more concisely:

Definition: \(X\) is countable if \(|\mathbb{N}| \geq |X|\).

Equivalently, \(X\) is countable if

If \(|X| = |\mathbb{N}|\) then we say \(X\) is countably infinite.