Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Cardinality of Sets






Measuring the Size of Sets


Cardinality measures the size of a set — how many elements it contains. For finite sets, cardinality is simply a count. For infinite sets, the situation becomes more subtle: different infinite sets can have different sizes, and comparing them requires the concept of one-to-one correspondence. This leads to the distinction between countable and uncountable infinities.



Definition of Cardinality


The cardinality of a set AA, denoted A|A|, measures the number of elements in AA.

For finite sets, cardinality is determined by counting. If A={a,b,c}A = \{a, b, c\}, then A=3|A| = 3. If B={1,2,3,4,5}B = \{1, 2, 3, 4, 5\}, then B=5|B| = 5.

The empty set contains no elements:

=0|\emptyset| = 0


Two sets have the same cardinality when a bijection (one-to-one correspondence) exists between them. For finite sets, this simply means they have the same count. For infinite sets, this definition becomes the primary tool for comparing sizes.

Finite Sets


    A set is finite if its elements can be counted with a natural number. Formally, a set AA is finite if there exists some nNn \in \mathbb{N} such that:

    A=n|A| = n


    This means a bijection exists between AA and the set {1,2,3,,n}\{1, 2, 3, \ldots, n\}.

    Examples of finite sets:

  • 2626

  • 2020 is {2,3,5,7,11,13,17,19}\{2, 3, 5, 7, 11, 13, 17, 19\} with cardinality 88

  • subset of a finite set is finite

  • The cardinality of a finite set satisfies:

    AB=A+BAB|A \cup B| = |A| + |B| - |A \cap B|


    This inclusion-exclusion principle accounts for elements counted twice when sets overlap.

Infinite Sets


    A set is infinite if it is not finite — no natural number can express its size.

    The standard number sets are all infinite:

  • N={0,1,2,3,}\mathbb{N} = \{0, 1, 2, 3, \ldots\} — the natural numbers

  • Z={,2,1,0,1,2,}\mathbb{Z} = \{\ldots, -2, -1, 0, 1, 2, \ldots\} — the integers

  • Q\mathbb{Q} — the rational numbers

  • R\mathbb{R} — the real numbers

  • A defining property of infinite sets: an infinite set can be put into one-to-one correspondence with a proper subset of itself. For example, the function f(n)=2nf(n) = 2n maps N\mathbb{N} bijectively onto the even numbers, which form a proper subset of N\mathbb{N}.

    Not all infinite sets have the same cardinality. The integers and rationals turn out to be the same size as the natural numbers, but the real numbers form a strictly larger infinity.

Countable Sets


A set is countably infinite if its elements can be put in one-to-one correspondence with the natural numbers N\mathbb{N}. Such a set can be listed as a sequence:

a1,a2,a3,a_1, a_2, a_3, \ldots


where every element appears exactly once.

The integers Z\mathbb{Z} are countable. The listing:

0,1,1,2,2,3,3,0, 1, -1, 2, -2, 3, -3, \ldots


establishes a bijection with N\mathbb{N}.

The rationals Q\mathbb{Q} are countable despite appearing denser than Z\mathbb{Z}. By arranging positive rationals in a grid and traversing diagonally, every rational is eventually listed.

A set is called countable if it is either finite or countably infinite. Some authors reserve "countable" for countably infinite sets only — context determines the convention.

The union of countably many countable sets remains countable. This is why Q\mathbb{Q} is countable: it is a countable union of countable sets (rationals with each fixed denominator).

Uncountable Sets


A set is uncountable if it is infinite but not countable — its elements cannot be listed in a sequence that covers them all.

The real numbers R\mathbb{R} are uncountable. Cantor's diagonal argument proves this: assume a listing of all real numbers between 00 and 11 exists. Construct a new number by making its nn-th decimal digit different from the nn-th digit of the nn-th number in the list. This new number differs from every listed number, contradicting the assumption that the list was complete.

Any interval (a,b)(a, b) with a<ba < b is uncountable. In fact, every such interval has the same cardinality as R\mathbb{R} itself — a bijection exists between them.

The cardinality of R\mathbb{R} is denoted c\mathfrak{c} (for continuum) or 202^{\aleph_0}, indicating it equals the cardinality of the power set of N\mathbb{N}.

Comparing Cardinalities


    Cardinalities are compared using functions between sets:

  • A=B|A| = |B| when a bijection exists between AA and BB

  • AB|A| \leq |B| when an injection (one-to-one function) exists from AA to BB

  • A<B|A| < |B| when AB|A| \leq |B| and AB|A| \neq |B|

  • The Cantor-Schröder-Bernstein theorem states: if AB|A| \leq |B| and BA|B| \leq |A|, then A=B|A| = |B|.

    Cantor's theorem establishes a fundamental inequality for any set AA:

    A<P(A)|A| < |\mathcal{P}(A)|


    The power set always has strictly greater cardinality than the original set. For finite sets, this is immediate: 2n>n2^n > n. For infinite sets, the proof uses a diagonal argument similar to the uncountability of R\mathbb{R}.

    This theorem implies there is no largest cardinality — given any set, its power set is strictly larger, producing an endless hierarchy of infinite sizes.