The cardinality of a set is a formalization of the "number of elements" in the set.
Set cardinality is an equivalence relation. Two sets have the same cardinality if (and only if) there exists a bijection between them.
A set has a cardinality of a natural number if there exists a bijection between and the set of natural numbers from to . For example, the set has a bijection with , which is simply mapping the th element in the first set to ; therefore it has a cardinality of .
We can see that this equivalence class is well-defined — if there exist two sets and , and there exist bijective functions and , then is a bijection between and , and so the two sets also have the same cardinality as each other, which is .
The cardinality of a finite set is always a natural number, never a fraction or decimal.
Assuming the axiom of choice, the cardinalities of infinite sets are represented by the Aleph_numbers. A set has a cardinality of if there exists a bijection between that set and the set of all natural numbers. This particular class of sets is also called the class of countably_infinite_sets.
Larger infinities (which are uncountable) are represented by higher Aleph numbers, which are and so on through the ordinals.
In the absence of the Axiom of Choice
Without the axiom of choice, not every set may be well-ordered, so not every set bijects with an ordinal, and so not every set bijects with an aleph. Instead, we may use the rather cunning Scott_trick.
Examples and exercises (possibly as lenses)
Split off a more accessible cardinality page that explains the difference between finite, countably infinite, and uncountably infinite cardinalities without mentioning alephs, ordinals, or the axiom of choice.