Every closed set in $\mathbb R^2$ is boundary of some other subset

Any subspace of $\mathbb{R}^2$ is second countable, and hence separable. So if $X$ is your closed subspace, then let $A$ be a countable subset of $X$ that is dense in $X$. Then the closure of $A$ (in $\mathbb{R}^2$) is $X$, while the interior of $A$ is empty (since any nontrivial open set in $\mathbb{R}^2$ is uncountable). Thus $X$ is the boundary of $A$.


There is an very elementary way to solve this, that is also much more widely applicable.

Let $Y$ be a topological space that can be partitioned into dense subsets $D$ and $E$. If $X \subset Y$ is closed, then there is a $V \subset X$ such that $\operatorname{Fr} V = X$.

Take $V = X \setminus (D \cap \operatorname{Int} X)$. Then since $V \subset X$ we have $\operatorname{Cl} V \subset \operatorname{Cl} X$, and $\operatorname{Fr} X \subset V$ and $E \cap \operatorname{Int} X$ dense in $\operatorname{Int} X$, therefore $\operatorname{Cl} V = X$. On the other hand $Y \setminus X$ is dense in $Y \setminus \operatorname{Int} X$ and $D \cap \operatorname{Int} X$ is dense in $\operatorname{Int} X$, therefore $\operatorname{Int} V = \emptyset$. It follows that $ \operatorname{Fr} V = X$.


Some additional information:

The question probably came from Willard's General topology, problem 3 B.

As Henno Brandsma pointed out in a comment, a space that can be partitioned into two dense subsets is called resolvable. For some examples of irresolvable spaces, see the answer to "Is a perfect set a boundary?".

A somewhat stronger result can be found in "Any two disjoint open sets are the interior and exterior of some set".