TITLE: When we have the power set $2^S$, does the 2 actually mean anything?
QUESTION [5 upvotes]: I have seen that most math books refer to the power set as $2^S$, usually in a cursory manner and without much detail. I was wondering if the 2 meant anything, because I normally just interpret it as a cardinality thing, like if S has two elements, then the power set has $2^2 = 4$ elements. Thanks!

REPLY [4 votes]: Here’s a (hopefully) intuitive way to think about it. This is a longwinded version of Ben’s answer.
tl;dr: enumerating all subsets of $X$ is like enumerating all functions from $X$ to $\{0, 1\}$. $\{0, 1\}$ contains two elements, so the power set is $\{0, 1\}^X$, or $2^X$.
But where is $\{0, 1\}$ coming from?..

Suppose you have a set of $X = \{a, b\}$.
Its power set is a set of all its subsets. If you were to write it down, you would end up with $\mathcal{P}(X) = \{\emptyset, \{a\}, \{b\}, \{a, b\}\}$. But how did you arrive at this? For each subset, you’d open the curly braces, decide for each element whether you want to include it this time or not, and repeat until you’ve found all combinations. Visually, you could represent this process like this:

However, you can also think of this process as a sort of a mapping.
Whenever you construct a subset, you make a bunch of decisions. For each element, you decide whether to include it or not. Let’s draw a decision as an arrow that goes from each original element in $X$ either to $0$ (“omit”) or to $1$ (“include”).
For example, an empty set (subset of $X$) omits both elements:

The $\{a\}$ subset of $X$ includes $a$ but omits $b$:

The $\{b\}$ subset of $X$ includes $b$ but omits $a$:

So each subset of $X$ can be represented as a bunch of arrows from elements of $X$ to a “decision” between $\{0, 1\}$. But this is also how you can represent a function. A function, loosely speaking, is a bunch of arrows from the input to the output. So, you could think of these colored arrows in two ways:

You could think of each color as a distinct subset of $X$.
Or you could think of each color as a function from $X$ to $\{0, 1\}$.


It turns out that we’ve done something interesting here. We were trying to enumerate all subsets of $X$. While doing so, we have enumerated all possible functions from $X$ to $\{0, 1\}$.
Now here’s the key part. We know separately that if you try to enumerate all possible functions from $A$ to $B$, you end up with a set denoted as $B^A$. As you might guess, its size is $|B|^{|A|}$.
Our set on the left is $X$, and our set on the right is $\{0, 1\}$. Thus, the set of all functions from $X$ to $\{0, 1\}$ is $\{0, 1\}^{X}$. The exact $0$ and $1$ values don’t matter (it only matters that we have two of them — “omit” and “include”), so we'll write it as $2^{X}$. And indeed, its number of elements is $2^{|X|}$.
To sum up, enumerating all subsets of $X$ is like enumerating all functions from $X$ to $\{0, 1\}$. $\{0, 1\}$ contains two elements ($0$ is “omit”, $1$ is “include”), so the power set is $\{0, 1\}^X$, or $2^X$.

Finally, here is an intuitive way to see where exactly the $2$ comes up in practice.
Suppose we add $c$ to our original set $\{a, b\}$. How much will the power set grow? We’re gonna need two versions of all the subsets we had previously: one version where $c$ is included, and one version where $c$ is omitted. So adding $c$ alone to the original set has doubled the power set. Adding $d$ to the original set will double the power set again. Again, this happens before there are two things that can happen with each new element: either it’s omitted, or it’s included. Hence, $2^{|X|}$ subsets.