Cardinality Math Example 2

Follow the full solution, then compare it with the other examples linked below.

Example 2

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

Solution

  1. 1
    Compute: A=4|A| = 4, B=4|B| = 4.
  2. 2
    Find AB={3,4}A \cap B = \{3,4\}, so AB=2|A \cap B| = 2.
  3. 3
    By the formula: AB=4+42=6|A \cup B| = 4 + 4 - 2 = 6.
  4. 4
    Verify directly: AB={1,2,3,4,5,6}A \cup B = \{1,2,3,4,5,6\} which has 6 elements. Confirmed.

Answer

AB=6|A \cup B| = 6
The inclusion-exclusion formula corrects for double-counting elements in ABA \cap B. Verifying by direct count confirms the formula works.

About Cardinality

The cardinality of a finite set is the number of distinct elements it contains, written A|A| — it measures the size of the set without regard to element order or identity.

Learn more about Cardinality →

More Cardinality Examples