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.
$$A = {a, e, i, o, u} \implies |A| = 5 \quad \text{or} \quad n(A) = 5.$$
Both notations appear in textbooks, so it is worth recognising each. For infinite sets, a special symbol enters — the Hebrew letter aleph with a zero subscript, $\aleph_0$ — which the infinite-set section below explains. 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, \dots$ 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, \dots}$ 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 $\aleph_0$ ("aleph-null"), the smallest infinity.
Uncountably infinite — a set too large to match with the naturals, like the real numbers. Its cardinality is strictly greater than $\aleph_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. This is the definition that lets cardinality work for infinite sets, and it leads to the result that the even numbers have the same cardinality as all the naturals, even though the evens look like "half" of them.
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. This formula is one of the most-used results that builds on set-builder notation and subset listing.
Examples of Cardinality
The set runs from a plain finite count, through the distinct-element trap, into the power-set rule, the union formula, a one-to-one infinite matching, and an empty-set edge case.
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
A common slip — find the cardinality of $B = {1, 2, 2, 3, 3, 3}$.
Wrong attempt. A student counts every entry as written: $1, 2, 2, 3, 3, 3$ — six symbols — and answers $|B| = 6$. The count feels right because there are six things listed.
Correct. A set holds only distinct elements; repeats collapse into one. So $B = {1, 2, 2, 3, 3, 3}$ is really the set ${1, 2, 3}$.
$$|B| = 3.$$
Final answer: $|B| = 3$. Cardinality counts distinct elements, never repeated listings.
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$. There are 64 subsets of a 6-element set, from the empty set up to the whole set.
Example 4
Two sets have $|A| = 12$, $|B| = 9$, and $|A \cap B| = 4$. Find $|A \cup B|$.
Use the inclusion–exclusion formula, which avoids double-counting the shared elements:
$$|A \cup B| = |A| + |B| - |A \cap B| = 12 + 9 - 4 = 17.$$
Final answer: $|A \cup B| = 17$. Subtracting the intersection corrects for counting the overlap twice.
Example 5
Show that the set of even natural numbers has the same cardinality as $\mathbb{N}$.
Pair each natural number $n$ with the even number $2n$:
$$1 \leftrightarrow 2, \quad 2 \leftrightarrow 4, \quad 3 \leftrightarrow 6, \quad 4 \leftrightarrow 8, \dots$$
Every natural number is matched to exactly one even number, and every even number is hit. This bijection means both sets have cardinality $\aleph_0$.
Final answer: the evens and the naturals share the cardinality $\aleph_0$ — a proper subset can be the same size as the whole, the hallmark of infinite sets.
Example 6
Find the cardinality of the empty set and of its power set.
The empty set $\varnothing$ has no elements, so $|\varnothing| = 0$. Its power set contains exactly one subset — the empty set itself — so $|P(\varnothing)| = 2^0 = 1$.
Final answer: $|\varnothing| = 0$ and $|P(\varnothing)| = 1$. Even "nothing" has exactly one subset.
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. This single result split infinity into a whole hierarchy of sizes, each bigger than the last.
The limits of computation. There are only countably many possible computer programs ($\aleph_0$ of them) but uncountably many real numbers. So most real numbers can never be computed by any program — a cardinality argument that sets a hard ceiling on what machines can ever calculate.
Database and data design. Outside pure theory, "cardinality" names how many distinct values a column holds. A high-cardinality column (like a user ID) and a low-cardinality one (like a yes/no flag) are indexed and stored completely differently — the same counting idea, applied to billions of rows.
Where Students Trip Up on Cardinality
Mistake 1: Counting repeated elements
Where it slips in: A set is written with a repeated value and the student counts the listing instead of the distinct 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$. In
Mistake 2: Confusing the cardinality of a set with the cardinality of its power set
Where it slips in: Asked for $|P(A)|$, the student reports $|A|$ instead, or computes $2 \times n$ rather than $2^n$.
Don't do this: Say a 4-element set has a power set of size $8$ (that is $2 \times 4$, not $2^4$).
The correct way: The power-set rule is $2^n$, not $2n$. A 4-element set has $|P(A)| = 2^4 = 16$ subsets. The memorizer who recalls "double it" instead of "two to the power" is the usual culprit — the yes/no-per-element reasoning is what keeps it straight.
Mistake 3: Assuming all infinite sets have the same cardinality
Where it slips in: A student treats "infinite" as a single size and says the reals and the naturals are "equally infinite."
Don't do this: Claim $|\mathbb{R}| = |\mathbb{N}|$ because both are infinite.
The correct way: The naturals are countably infinite ($\aleph_0$); the reals are uncountably infinite, strictly larger. The second-guesser who has just learned the evens-equal-naturals result often overcorrects and assumes all infinities match — the diagonal argument is what separates them.
Key Takeaways
The cardinality of a set is its number of distinct elements, written $|A|$ or $n(A)$.
Cardinality counts each element once — repeats and order never change it, and the empty set has cardinality $0$.
A finite set's cardinality is a whole number; an infinite set's is $\aleph_0$ (countable) or larger (uncountable).
The power set of an $n$-element set has cardinality $2^n$, and the union formula is $|A \cup B| = |A| + |B| - |A \cap 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 \cup B| = 11$, find $|A \cap B|$.
Answer to Question 1: distinct elements are ${5, 10, 15, 20}$, so $|A| = 4$. Answer to Question 2: $|P(B)| = 2^5 = 32$. Answer to Question 3: rearranging the union formula, $|A \cap B| = 8 + 6 - 11 = 3$. If Question 1 gave you $7$, return to Mistake 1 on counting distinct elements.
Want a live Bhanzu trainer to walk through more cardinality problems? Book a free demo class — online globally.
Was this article helpful?
Your feedback helps us write better content
