Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Cardinality of a Set
The cardinality of a set S, denoted by |S|, is the number of elements in the set. This number is also referred to as the cardinal number. If a set has an infinite number of elements, its cardinality is ∞.
Examples of Cardinality
|{1, 4, 3, 5}| = 4 (finite set with 4 elements)
|{1, 2, 3, 4, 5, ...}| = ? (infinite set of natural numbers)
|{}| = 0 (empty set has cardinality 0)
Comparing Cardinalities of Two Sets
If there are two sets X and Y, their cardinalities can be compared as follows −
- |X| = |Y| − Sets X and Y have the same cardinality. This occurs when the number of elements in X is exactly equal to the number of elements in Y. In this case, there exists a bijective function f from X to Y (a one-to-one correspondence).
- |X| ≤ |Y| − Set X's cardinality is less than or equal to set Y's cardinality. This occurs when the number of elements in X is less than or equal to that of Y. Here, there exists an injective function f from X to Y.
- |X| < |Y| − Set X's cardinality is strictly less than set Y's cardinality. The function f from X to Y is injective but not bijective.
- If |X| ≤ |Y| and |X| ≥ |Y|, then |X| = |Y| − The sets X and Y are commonly referred to as equivalent sets. This is known as the Cantor–Bernstein theorem.
Example
Consider the following sets −
X = {a, b, c} |X| = 3
Y = {1, 2, 3} |Y| = 3
Z = {p, q, r, s} |Z| = 4
|X| = |Y| ? X and Y have the same cardinality (equivalent sets)
|X| < |Z| ? X has strictly fewer elements than Z
|X| ? |Z| ? X's cardinality is less than or equal to Z's
Since |X| = |Y| = 3, we can define a bijective function f: X → Y such as f(a) = 1, f(b) = 2, f(c) = 3. This confirms the two sets have equal cardinality.
Conclusion
Cardinality measures the size of a set by counting its elements. Two sets have equal cardinality when a bijective function exists between them, and cardinality comparisons are established through the existence of injective or bijective functions.
