Why does $\bigcup_{X \in \mathscr{P}(\mathbb{N})}X = \mathbb{N}$, instead of $\mathscr{P}(\mathbb{N})?$

This is a practice problem I just came across, $$\bigcup_{X \in \mathscr{P}(\mathbb{N})}X =$$ I came up with $\mathscr{P}(\mathbb{N})$, but the book lists $\mathbb{N}$ as the solution. I would've thought the solution set would look something like this, $$\{ \emptyset, \{1\},\{2\},\{309,12\},\{14,900,8,22\},\{6\},... \}$$ as opposed to this, $$\{ 1,2,3,...812,...973,... \}$$ We're "unionizing" every possible element of $\mathscr{P}(\mathbb{N})$, each of which is a subset of $\mathbb{N}$, not an element of $\mathbb{N}$. More generally, if for set $S$ you were to take the union of all it's elements, wouldn't your result be set $S$ itself? $$\bigcup_{x \in S}x=S$$ Not sure where I'm going wrong here. Any help most welcome :)

Update: I get it now. Thanks for you helpful explanations. My mistake was, as Brian put it,

When you take a union of sets, you’re collecting the elements of those sets into one bit set; you’re not collecting the sets themselves.

So my "general" example of taking the union of all the elements in a set is wrong because you can't take the union of elements, only the union of sets. I blame it all on the curly brackets :)


What does it mean to say that $$x\in\bigcup_{X\in\wp(\Bbb N)}X\;?$$ By definition it means that there is some $X\in\wp(\Bbb N)$ such that $x\in X$. In other words, there is some $X\subseteq\Bbb N$ such that $x\in X$. But then $x\in X\subseteq\Bbb N$, so $x\in\Bbb N$. In other words, every member of $\bigcup_{X\in\wp(\Bbb N)}X$ is a natural number, and

$$\bigcup_{X\in\wp(\Bbb N)}X\subseteq\Bbb N\;.$$

Note too that if $x\in X\in\wp(\Bbb N)$, then by definition $x\in\bigcup_{X\in\wp(\Bbb N)}X$, so for every $X\in\wp(\Bbb N)$ we have $X\subseteq\bigcup_{X\in\wp(\Bbb N)}X$. In particular, for any $n\in\Bbb N$ we have $\{n\}\in\wp(\Bbb N)$, so $n\in\{n\}\subseteq\bigcup_{X\in\wp(\Bbb N)}X$, and therefore $$\Bbb N\subseteq\bigcup_{X\in\wp(\Bbb N)}X\;.$$ It follows immediately that $$\bigcup_{X\in\wp(\Bbb N)}X=\Bbb N\;.$$

It may help to look at a finite example. What is $$\bigcup_{X\in\wp(S)}X\;,$$ where $S=\{0,1,2\}$? $\wp(S)=\big\{\varnothing,\{0\},\{1\}.\{2\},\{0,1\},\{0,2\},\{1,2\},\{0,1,2\}\big\}$, so $$\bigcup_{X\in\wp(S)}X=\varnothing\cup\{0\}\cup\{1\}\cup\{2\}\cup\{0,1\}\cup\{0,2\}\cup\{1,2\}\cup\{0,1,2\}=\{0,1,2\}=S\;.$$

When you take a union of sets, you’re collecting the elements of those sets into one big set; you’re not collecting the sets themselves.


If $X\in \mathcal{P}(\mathbb N) $, then $X \subseteq \mathbb N$. So the union of two $X,Y\in\mathcal P (\mathbb N)$ is a subset of $\mathbb N$.

Your second remark is (depending on notation) wrong. $\bigcup\limits_{x\in S} x$ is not defined if the element of S are not sets themselves. One way to circumvent this is to identify $x$ with $\{x\}$ in such a union, so the union becomes $$\bigcup\limits_{x\in S} x = \bigcup\limits_{\{x\}\subseteq S} \{x\}$$