Power Set Calculator

Creates a power set of any given set

The following articles will be of use to have a fuller understanding of this tool:

  • Sets
  • Set operations (especially section about subsets)
  • Set builder notation
  • First order logic

The power set of any set S is denoted as P(S) and describes a set containing all of the subsets of S. As a reminder, a subset can be described simply as a set which contains 0 or more elements in S. A power set is also sometimes written as 𝒫(S).

One thing you may notice is that {} is an element of every power set. This element, referred to as the empty set and often written as ∅ is an element of every power set because the empty set is a subset of every set (see article on set operations to see why).

The cardinality (size) of P(S), denoted as | P(S) |, directly depends on the cardinality of S, denoted as | S |. If S has N elements, then | S | = N and | P(S) | =2N.

Example 1

When S = {a, b}, P(S) = {{}, {a}, {b}, {a, b}}

It can be verified that every element in P(S) is a subset of S :

  • {} {a, b}
  • {a} {a, b}
  • {b} {a, b}
  • {a, b} {a, b}
Example 2

When S = {a, {}}, P(S) = {{}, {a}, {{}}, {a, {}}}

Note that the empty set is treated like any other value, with the power set looking like Example 1 except b is replaced with {}.

It can be verified that every element in P(S) is a subset of S :

  • {} {a, {}}
  • {a} {a, {}}
  • {{}} {a, {}}
  • {a, {}} {a, {}}
Example 3

When S = {a, {a}}, P(S) = {{}, {a}, {{a}}, {a, {a}}}

Note that the set containing a is treated differently from the element a. The power set again looks like Example 1 except b is replaced with {a}.

It can be verified that every element in P(S) is a subset of S :

  • {} {a, {}}
  • {a} {a, {}}
  • {{}} {a, {}}
  • {a, {}} {a, {}}
Summary

Please enter any number of elements that are comma (,) delimited.

Warning

This tool does not yet support elements that are comma delimited sets. For example, an input like

1, {1,2}

will be parsed incorrectly. A workaround can be to have elements that are sets space delimited like this:

1, {1 2}

Examples of valid input

1 ,2

1, 2

1,2

a,b,c

{a b}, c

1, 2, 2 <-- duplicates are ignored

Examples of invalid input

1 2 3 <-- not comma delimited, will be interpreted as a single element

1, {1,2} <-- parsed incorrectly because of comma

{1, 2, 3} <-- no need to put in set brackets!

Set:{ }

{{}}