Let $X$ be a metric space with the distance-metric $d()$. Let $E\subset X$ and let $E'$ be the set of limit-points of $E$. Then the closure $\bar{E}$ of $E$ is defined as $\bar{E} = E\,\cup\,E'$.
Prove: $\bar{E}$ is closed.
Proof by contradiction: Let $\bar{E}$ is not closed, i.e. $\exists x\in X$ such that it's a limit-point of $\bar{E}$ but $x\notin\bar{E}$ Or more formally
$$
N_r(x)\,\cap\,\bar{E} \neq \phi\qquad\forall r > 0
$$
where, $N_r(x) = \{y\in X\,|\,d(x,y) < r\}$ is the neighborhood of $x$. Then,
\begin{align*}
(N_r(x)\,\cap\,\bar{E})\,\backslash\{x\} & = (N_r(x)\,\cap\,(E\,\cup\,E'))\backslash\{x\} \\
& = ((N_r(x)\,\cap\,E)\,\cup\,(N_r(x)\,\cap\,E'))\backslash\{x\} \\
& = \underbrace{((N_r(x)\,\cap\,E)\backslash\{x\})}_{\text{term-1}}\,\cup\,\underbrace{((N_r(x)\,\cap\,E')\backslash\{x\})}_{\text{term-2}} \neq \phi\qquad\forall r > 0
\end{align*}
The above equation implies that either term-1 or term-2 or both are non-empty.
Term-1: if $(N_r(x)\,\cap\,E)\backslash\{x\}\neq\phi\quad\forall r>0$, then it would mean that $x$ is a limit-point of $E$, i.e. $x\in E'$ and therefore, $x\in\bar{E}$.
Term-2: if $(N_r(x)\,\cap\,E')\backslash\{x\}\neq\phi\quad\forall r > 0$, then it would mean that $x$ is a limit-point of $E'$. Now, we need to show that any limit-point of $E'$ is also a limit-point of $E$.
- Let $x\in X$ be a point that is a limit-point of $E'$ but not a limit-point of $E$. Then,
$$
\exists q>0:(N_q(x)\,\cap\,E'\neq\phi)\wedge(N_q(x)\,\cap\,E=\phi)
$$
Let $y\in (N_q(x)\,\cap\,E')$, and $0 < d(x,y) = h < q$. Then, for any $0 < \epsilon < q - h$ we must have $N_{\epsilon}(y)\,\cap\,E = \phi$, since $N_{\epsilon}(y)\subset N_q(x)$. This, contradicts the fact that $y$ is a limit-point of $E$.
Therefore, any limit-point of $E'$ is also a limit-point of $E$, i.e. it also belongs to $E'$ and therefore belongs to $\bar{E}$.
QED: We have shown that every limit-point of $\bar{E}$ also belongs to $\bar{E}$, therefore $\bar{E}$ is closed!