Understanding the power set calculator — concept and principle
This calculator lists the power set of a set: every subset, from the empty set to the whole set, grouped by size. It also counts the subsets, the proper subsets and the number of subsets of each size. Use it for discrete mathematics, set theory homework, probability (listing events) and programming tasks that test every combination.
How it is calculated
- Number of subsets = 2ⁿ for a set with n elements.
- Subsets with exactly k elements = C(n, k) = n! ÷ (k!(n − k)!).
- Proper subsets (all except S itself) = 2ⁿ − 1.
- Duplicates in the input are removed, because a set holds each element once.
Subsets are listed for up to 8 elements (256 subsets); counts work up to 20 elements. The listing keeps the order in which you typed the elements.
The principle
To build a subset you go through the elements one by one and decide, for each, "in" or "out". That is two choices made n times, giving 2 × 2 × … × 2 = 2ⁿ possible subsets. The empty set (all "out") and S itself (all "in") are included. Grouping by size counts how many ways to choose k elements from n, which is the binomial coefficient, so the counts by size form a row of Pascal's triangle and add up to 2ⁿ. This is also why the power set is sometimes written 2^S.
Worked example
Default input: S = {a, b, c}.
- n = 3, so there are 2³ = 8 subsets.
- Size 0: ∅.
- Size 1: {a}, {b}, {c}.
- Size 2: {a, b}, {a, c}, {b, c}. Size 3: {a, b, c}.
- Counts by size: 1, 3, 3, 1 (row 3 of Pascal's triangle). Proper subsets: 2³ − 1 = 7.
How to read the result
The total grows very fast: 10 elements give 1,024 subsets and 20 give over a million. The size counts tell you, for example, how many 2-element teams can be formed from 3 people (3). Note that some textbooks define proper subsets to exclude only S, as here, while others also exclude the empty set.
Common mistakes
- Forgetting the empty set or the set itself.
- Counting {a, b} and {b, a} as different subsets; order does not matter in a set.
- Confusing subsets with permutations or sequences.
- Typing duplicates and expecting them to count as extra elements.
Frequently asked questions
How many subsets does a set of 5 elements have?
2⁵ = 32, including the empty set and the set itself.
Is the empty set a subset of every set?
Yes. It contains no elements, so none of its elements are missing from any set.
What is the power set of the empty set?
{∅}, a set with one element, because 2⁰ = 1.
Sources: Wolfram MathWorld, "Power Set" · OpenStax, Contemporary Mathematics (2023), §1.2 Subsets