How the Power Set of a Set Works
The power set of a set S, written P(S), is the set of every possible subset of S — including the empty set ∅ and S itself. If S has n elements, its power set always has exactly |P(S)| = 2ⁿ members. This calculator takes either a literal list of elements or just a count n, then reports the subset count and, when it's small enough to display, the full list of subsets.
Formula and method
The 2ⁿ formula comes directly from a simple counting argument: to build any one subset, you go through each of the n elements and make a binary decision — include it or leave it out. That's 2 choices per element, and the choices are independent, so by the multiplication principle the total number of distinct subsets is 2 × 2 × ⋯ × 2 (n factors) = 2ⁿ. For example, a 3-element set {a, b, c} yields 2³ = 8 subsets: ∅, {a}, {b}, {c}, {a,b}, {a,c}, {b,c}, and {a,b,c}. The number of proper subsets (every subset except S itself) is 2ⁿ − 1.
Common sources of error
- Forgetting the empty set: ∅ is a subset of every set and must be counted, even though it contains nothing.
- Forgetting S itself: a set is always a subset of itself, so S always appears in P(S) too.
- Confusing subsets with elements: a set with n elements has n elements but 2ⁿ subsets — these numbers only match when n = 1.
- Duplicate elements: a set by definition contains no duplicates; if your list has repeats, remove them before counting n.
Checking your result
A fast sanity check: |P(S)| should always be a power of 2 (1, 2, 4, 8, 16, 32, …), and it doubles every time you add exactly one element to S. If you list the subsets by hand for a small set (n ≤ 4) and count them, the total should match 2ⁿ exactly — if it doesn't, you likely missed ∅, missed S itself, or double-counted a subset.
Applications
Power sets show up throughout discrete math and computer science: enumerating all possible feature combinations, generating test cases that cover every subset of inputs, building truth tables in Boolean logic (each row corresponds to one subset of "true" variables), and representing the sample space of all possible event combinations in probability. Because |P(S)| grows exponentially, power sets are also the classic example used to illustrate why brute-force subset enumeration becomes computationally infeasible past a few dozen elements.