A subset is a set in which all the elements are contained within another set. In other words, if set A is a subset of set B, then every element of A is also an element of B. This relationship is written as A⊆BA\subseteq BA⊆B and read as "A is a subset of B." There are two types of subsets:
- A proper subset is a subset that contains some but not all elements of the larger set (e.g., if set A has {12, 24} and set B has {12, 24, 36}, A is a proper subset of B).
- An improper subset is a subset that is equal to the original set, meaning it contains all the elements of the larger set itself.
Examples:
- If set A = {X, Y} and set B = {X, Y, Z}, then A is a subset of B.
- The empty set {} is a subset of every set.
The total number of subsets of a set with nnn elements is 2n2^n2n, and the number of proper subsets is 2n−12^n-12n−1. In summary, a subset is any set whose elements are all found in another set, including the empty set and the set itself. This concept is foundational in set theory and is commonly used in mathematics and related disciplines.