Cardinality Formula

The Formula

|A \cup B| = |A| + |B| - |A \cap B| (inclusion-exclusion principle)

When to use: Cardinality answers "how many?" โ€” count each distinct element once and you have the cardinality.

Quick Example

|\{a, b, c\}| = 3. |\emptyset| = 0. |\{\{1, 2\}, 3\}| = 2 โ€” there are two distinct elements.

Notation

|A| or n(A)

What This Formula Means

The cardinality of a set is the number of distinct elements it contains, written |A| or n(A).

Cardinality answers "how many?" โ€” count each distinct element once and you have the cardinality.

Formal View

|A \cup B| = |A| + |B| - |A \cap B| (inclusion-exclusion); |A| = n \Leftrightarrow \exists a bijection f : A \to \{1, 2, \ldots, n\}

Worked Examples

Example 1

easy
Find the cardinality of: (a) A = \{2, 4, 6, 8, 10\}, (b) B = \{x \in \mathbb{N} : x \le 0\}, (c) C = \{\{1,2\}, 3, \{4\}\}.

Solution

  1. 1
    (a) Count the distinct elements: 2, 4, 6, 8, 10 โ€” five elements, so |A| = 5.
  2. 2
    (b) The only natural number \le 0 is 0 (assuming 0 \in \mathbb{N}). So B = \{0\} and |B| = 1.
  3. 3
    (c) C has three elements: the set \{1,2\}, the number 3, and the set \{4\}. So |C| = 3.

Answer

|A|=5,\quad |B|=1,\quad |C|=3
Cardinality counts distinct top-level elements. When a set contains other sets as elements, each sub-set counts as one element regardless of its own size.

Example 2

medium
Let A = \{1,2,3,4\} and B = \{3,4,5,6\}. Verify the formula |A \cup B| = |A| + |B| - |A \cap B|.

Common Mistakes

  • Counting duplicate listings โ€” |\{1, 1, 2\}| = 2, not 3, because duplicates are collapsed in a set
  • Confusing cardinality with the set itself โ€” |\{a, b, c\}| = 3 is a number, not a set
  • Assuming all infinite sets have the same cardinality โ€” |\mathbb{N}| < |\mathbb{R}| (Cantor's theorem)

Why This Formula Matters

Cardinality is the foundation of counting, combinatorics, and the surprising mathematics of infinity.

Frequently Asked Questions

What is the Cardinality formula?

The cardinality of a set is the number of distinct elements it contains, written |A| or n(A).

How do you use the Cardinality formula?

Cardinality answers "how many?" โ€” count each distinct element once and you have the cardinality.

What do the symbols mean in the Cardinality formula?

|A| or n(A)

Why is the Cardinality formula important in Math?

Cardinality is the foundation of counting, combinatorics, and the surprising mathematics of infinity.

What do students get wrong about Cardinality?

Some infinities are bigger than others: |\text{integers}| < |\text{reals}|.

What should I learn before the Cardinality formula?

Before studying the Cardinality formula, you should understand: set, element.