Cardinality of a Set — Definition, Symbol, Examples
Cardinality of a Set — Definition, Symbol, Examples
What Is Cardinality?
The cardinality of a set is the number of distinct elements in it. For the set A={2, 3, 4, 6, 8}, the cardinality is 5, because there are five elements. It is the most basic measurement you can make about a set — its size.
Cardinality only counts distinct elements, and order does not matter. The set {1, 2, 2, 3} has cardinality 3, not 4, because the repeated 2 is a single element. The empty set ∅ has cardinality 0. This counting idea is the foundation under everything else you do with sets — comparing them, combining them, and listing their subsets.
What Is the Symbol for Cardinality?
The cardinality of a set A is written with vertical bars on each side: |A|. So for A={a, e, i, o, u}, we write |A|=5. An older but still common notation is n(A), read "n of A," which means exactly the same thing.
For infinite sets, a special symbol enters — the Hebrew letter aleph with a zero subscript, ℵ0. The vertical-bar notation is the same symbol used for absolute value of a number, but in set context the bars always mean "the size of."
What Is the Difference Between Finite and Infinite Cardinality?
A set is finite if its elements can be counted and the counting ends. A finite set's cardinality is always a whole number — 0, 1, 2, 3,… The set of letters in "MATH" has cardinality 4; the set of days in a week has cardinality 7.
A set is infinite if the counting never ends. The natural numbers {1, 2, 3,…} are infinite, so their cardinality is not an ordinary number. Here mathematics splits infinity into two kinds:
- Countably infinite — a set whose elements can be matched one-to-one with the natural numbers, like the integers or the rationals. Its cardinality is written ℵ0, the smallest infinity.
- Uncountably infinite — a set too large to match with the naturals, like the real numbers. Its cardinality is strictly greater than ℵ0.
Two sets have the same cardinality when their elements can be paired off perfectly — a bijection, a one-to-one matching that uses every element of both sets.
What Is the Cardinality of a Power Set?
The power set P(A) is the set of all subsets of A, including the empty set and A itself. Its cardinality follows a clean rule. If a finite set has n elements, then:
|P(A)|=2^n.
The reasoning: building a subset means making a yes/no choice for each of the n elements — in or out. That is n independent two-way choices, giving 2^n possible subsets. For A={1, 2, 3} with |A|=3, the power set has |P(A)|=2^3=8 subsets.
Examples of Cardinality
Example 1
Find the cardinality of A={3, 6, 9, 12, 15}.
Count the distinct elements: {3, 6, 9, 12, 15} — five of them.
|A|=5.
Final answer: |A|=5.
Example 2
Find the cardinality of B={1, 2, 2, 3, 3, 3}.
Correct. A set holds only distinct elements; repeats collapse into one. So B={1, 2, 3} is really the set {1, 2, 3}.
|B|=3.
Final answer: |B|=3.
Example 3
A set A has |A|=6. Find the cardinality of its power set.
Apply the power-set rule |P(A)|=2^n with n=6:
|P(A)|=2^6=64.
Final answer: |P(A)|=64.
Example 4
Two sets have |A|=12, |B|=9, and |A∩B|=4. Find |A∪B|.
Use the inclusion–exclusion formula:
|A∪B|=|A|+|B|−|A∩B|=12+9−4=17.
Final answer: |A∪B|=17.
Example 5
Show that the set of even natural numbers has the same cardinality as ℕ.
Pair each natural number n with the even number 2n:
1↔2, 2↔4, 3↔6 …
Every natural number is matched to exactly one even number, and every even number is hit. This bijection means both sets have cardinality ℵ0.
Final answer: the evens and the naturals share the cardinality ℵ0.
Example 6
Find the cardinality of the empty set and of its power set.
The empty set ∅ has no elements, so |∅|=0. Its power set contains exactly one subset — the empty set itself — so |P(∅)|=2^0=1.
Final answer: |∅|=0 and |P(∅)|=1.
Why Cardinality Reshaped Mathematics
"Are all infinities the same size?"
For most of mathematical history the answer was assumed to be yes — infinity was infinity. Cardinality is the tool that proved otherwise, and the consequences run deep.
- Different sizes of infinity. Cantor's diagonal argument shows the real numbers cannot be matched one-to-one with the naturals — there are strictly more reals than counting numbers.
- The limits of computation. There are only countably many possible computer programs (ℵ0 of them) but uncountably many real numbers.
- Database and data design. Outside pure theory, "cardinality" names how many distinct values a column holds.
Where Students Trip Up on Cardinality
Mistake 1: Counting repeated elements
Don't do this: Read {1, 2, 2, 3} as cardinality 4.
The correct way: Collapse repeats first — {1, 2, 2, 3}={1, 2, 3}, so the cardinality is 3.
Mistake 2: Confusing the cardinality of a set with the cardinality of its power set
Don't do this: Say a 4-element set has a power set of size 8.
The correct way: The power-set rule is 2^n, not 2n. A 4-element set has |P(A)|=2^4=16 subsets.
Mistake 3: Assuming all infinite sets have the same cardinality
Don't do this: Claim |ℝ|=|ℕ| because both are infinite.
The correct way: The naturals are countably infinite (ℵ0); the reals are uncountably infinite, strictly larger.
Key Takeaways
- The cardinality of a set is its number of distinct elements, written |A| or n(A).
- A finite set's cardinality is a whole number; an infinite set's is ℵ0 (countable) or larger (uncountable).
- The power set of an n-element set has cardinality 2^n, and the union formula is |A∪B|=|A|+|B|−|A∩B|.
- Cantor's work on cardinality proved that some infinities are strictly bigger than others — the foundation of modern set theory.
Practice These Before Moving On
- Find the cardinality of A={5, 10, 10, 15, 20, 20, 20}.
- A set B has |B|=5. Find |P(B)|.
- Given |A|=8, |B|=6, and |A∪B|=11, find |A∩B|.