What is Cardinality?
Cardinality is just how many elements are in a set.
Notation: ∣A∣
This reads: “the cardinality of A” or “the size of A”
Examples
| Set | Cardinality |
|---|
| {1,2,3} | 3 |
| {a,b} | 2 |
| {apple} | 1 |
| ∅ | 0 |
The empty set has cardinality 0.
Cardinality of Union
∣A∪B∣=∣A∣+∣B∣−∣A∩B∣
Why subtract the intersection? Elements in both sets get counted twice if you just add.
Example:
A={1,2,3},B={2,3,4}
- ∣A∣=3
- ∣B∣=3
- A∩B={2,3}, so ∣A∩B∣=2
∣A∪B∣=3+3−2=4
Check: A∪B={1,2,3,4} — yes, 4 elements.
Disjoint Sets
If two sets have no overlap:
A∩B=∅
Then:
∣A∪B∣=∣A∣+∣B∣
No need to subtract — nothing is counted twice.
Cardinality of Cartesian Product
∣A×B∣=∣A∣×∣B∣
Multiply the sizes.
Example:
A={1,2},B={a,b,c}
∣A×B∣=2×3=6
Cardinality of Power Set
∣P(A)∣=2∣A∣
A set with n elements has 2n subsets.
Example:
A={1,2,3}
∣P(A)∣=23=8
Summary
| Operation | Cardinality |
|---|
| A∪B | ∥A∥+∥B∥−∥A∩B∥ |
| A∪B (disjoint) | ∥A∥+∥B∥ |
| A×B | ∥A∥×∥B∥ |
| P(A) | 2∥A∥ |
Cardinality = counting elements.