# Proof that boundary is closed using $\epsilon$-definition

I am a bit confused by what it means to show that $(\partial E)^c$ is open here. is the following argument correct?

Let $(X,d)$ be a metric space and $E \subset X$. I want to show $\partial E$ is closed. Let's show that $(\partial E)^c$ is open.

$x \in \partial E$ iff $\forall \epsilon > 0: B_\epsilon(x) \cap E \neq \emptyset \text{ and } B_\epsilon(x) \cap E^c \neq \emptyset$.

Therefore, let $x \in (\partial E)^c$ be arbitrary. Then $\exists \epsilon > 0$ such that either $B_\epsilon(x) \cap E = \emptyset \text{ or } B_\epsilon(x) \cap E^c = \emptyset$

If $B_\epsilon(x) \cap E = \emptyset$, this means that $B_\epsilon(x) \subset E^c$. As open balls are open, for any $z \in B_\epsilon(x)$ we can find $\delta_z>0$ such that $B_{\delta_z}(z) \subset B_\epsilon(x) \subset E^c$, hence $B_{\delta_z}(z) \cap E = \emptyset$, hence $z \in (\partial E)^c$. So $B_\epsilon(x) \subset (\partial E)^c$.

If $B_\epsilon(x) \cap E^c = \emptyset$, switch all $E^c$ and $E$ in the argument above.

Therefore, in either case, $B_\epsilon(x) \subset (\partial E)^c$, so $(\partial E)^c$ is open, so $\partial E$ is closed.

Any subset $E$ of a metric space $X$ makes the whole space as the disjoint union of the interior, the exterior and the boundary of $E$: $$X=\mathrm{int}(E) \cup\mathrm{int}(E^c) \cup\partial E$$ and the interiors are open.
Suppose $x\notin\partial E$. Then there exists an open neighborhood $U$ of $x$ such that either $U\cap E=\emptyset$ or $U\cap E^c=\emptyset$. In the first case, $U\subseteq E^c$, in the second case $U\subseteq E$.
In either case, $U$ doesn't intersect both $E$ and $E^c$. Hence it is a subset of $(\partial E)^c$, because it is a neighborhood of each of its points.