Showing that $A=\{a_1,...,a_r\}$ is a closed set Let $A=\{a_1,\dots,a_r\}, a_i \in \mathbb{R}, i=1,...,r$. Show that $A$ is a closed set. As a bit of a beginner, I have written down a proof and I wanted to see if it is good enough/well structured.
So I want to show that $\partial A\subseteq A$, where $\partial A=\{a \in A:D(a,\delta) \cap A\neq\emptyset, D(a,\delta)\cap(\mathbb{R}\setminus A)\neq\emptyset, \forall\delta>0\}$ is the set of boundary points of $A$. The neighbourhood of $A$ for any $\delta>0$ is denoted by $D(a,\delta)=(a-\delta,a+\delta)$.
Let $a \in A$. For all $\delta>0$, $D(a,\delta)\cap A\neq\emptyset$ (since $D(a,\delta)\cap A=\{a\}$ even for arbitrarily small $\delta$). Also, $D(a,\delta)\cap(\mathbb{R}\setminus A)\neq\emptyset$.  So $a \in \partial A$ for all $a \in A$.
Now let $B=\mathbb{R}\setminus A$ and $y\in B$. If $y<\min A$, then $D(y, \frac{\min A-y}{2})\subseteq B$, so $y$ is exterior to $A$. If $y>\max A$, then $D(y,\frac{y-\max A}{2})\subseteq B$, so $y$ is exterior to $A$. If $a_j<y<a_k$, where $a_j\in A$ and $a_k=\min(A\setminus\{a\in A: a\leq a_j\})$, and $\delta=\frac{1}{2}\min(y-a_j,a_k-y)$, then $D(y,\delta)\subseteq B$, so $y$ is exterior to $A$. Therefore every element in $B=\mathbb{R}\setminus A$ is exterior to $A$. 
So $\partial A=\{a_1,\dots,a_r\}=A$, or $\partial A\subseteq A$, so $A$ is a closed set.
1) Is my conclusion (and the way I arrived at it) correct? Is every element in $A$ a boundary point of $A$?
2) I think I've made my proof a bit more complicated than it should be, is there a simpler way?
3) Tips for formatting/notation?
 A: It seems to me the introduction of $\partial A$ into the discussion overly complicates things.  
I would argue it like this, which to my mind is somewhat simpler:
For each $a_k$, $1 \le k \le r$, the set $\Bbb R \setminus \{ a_k \}$ is open; this is easy to see, since if $p \in \Bbb R \setminus \{a_k\}$, the open interval
$(p - \delta, p + \delta) \subsetneq \Bbb R \setminus \{a_k\}, \tag 1$
where
$\delta = \dfrac{\vert p - a_k \vert}{2}, \tag 2$
contains $p$ and is fully contained in $\Bbb R \setminus \{a_k \}$; thus $\Bbb R \setminus \{ a_k \}$ is open, since it contains an open neighborhood $(p - \delta, p + \delta)$ of any its points $p$; thus the complement of $\Bbb R \setminus \{a_k\}$, which is the singleton $\{a_k\}$, is closed.
Now simply used the fact that a finite union of closed sets is closed, and
$A = \{ a_1, a_2, \ldots, a_r \} = \displaystyle \bigcup_{k = 1}^r \{ a_k \}. \tag 3$
A: *

*First of all, you claim
$$ D(a,\delta) \cap \mathbb{R} = \{a\} $$
but this is not per se true. You want to have 
$$ D(a,\delta) \cap \mathbb{R} \supset \{a\} $$
which also implies that the left-hand side is non-empty.  

*Next, you claim that
$$ D(a,\delta) \cap (\mathbb{R}\setminus A) \neq \varnothing $$
Can you give an argument, why this holds?

*The argument that $\mathbb{R}\setminus A$ is not part of the boundary can be done more direct. Moreover, you claim a lot of stuff. Can you also prove your claims. If you want your proof to be more direct (without splitting the argument up in three cases), you could, for example, consider
$$ \delta = \min_{i=1,\dots,r}|b - a_i|/2. $$
Can you prove now that $D(b,\delta)\subset \mathbb{R}\setminus A$. Make sure to not claim this as you need to prove it!


Of course, it is easier to do it in a different way, because now you actually showed $\partial A = A$ which is indeed enough but it is not necessary. For example, proving that $\mathbb{R}\setminus A$ is open which is essentially what you did in proving that it is part of the exterior is enough.
A: What you did is correct.
However, you can simplify the proof. A set is closed if and only if its  complement is open. So it is enough to prove that $B$ is open. Take $y \in B =\mathbb R \setminus A$. You can use the distance of a point $y$ to a set $S$ which is $d(y,S)= \inf\limits_{s \in S} d(y,s)$. As $A$ is finite, it is easy to prove that for $y \in B$, you have $d(y,A)>0$. Then the open interval $I=(y-d(y,A),y+d(y,A))$ is such that $I \subseteq B$, proving as desired that the complement of $A$ is open.
This proof highlights the role of the distance of a point to a set, which is an interesting topic to know.
A: Your definition of boundary points is problematic.
$$\partial A=\{a \in A:D(a,\delta) \cap A\neq\emptyset, D(a,\delta)\cap(\mathbb{R}\setminus A)\neq\emptyset, \forall\delta>0\}$$
Boundary points of a set are not necessarily  elements of the set.
That is what you wanted to prove.
About your proof, isn't it easier to prove the complement of your set which is a union of open intervals is open? 
A: My approach is to show that $\mathbb{R} \setminus A$ is open. If $x \in \mathbb{R}$, then the ball $B_x(\frac{1}{2}\min(|x-a_1|,...,|x-a_n|))$ does not touch any point in $A$, thus $B_x(\frac{1}{2}\min(|x-a_1|,...,|x-a_n|))\subset \mathbb{R} \setminus A$. This shows that $\mathbb{R} \setminus A$ is open, thus $A$ is closed.
A: Here is another way to prove: any set is closed if and only if its complementary is open. (I even think of that as the definition of a closed set).
So take a point $b\notin A$. For each $i$ define $t_i=|b-a_i|$. Then, using the fact that the set $A$ has a finite number of elements you can take $t=\min\{t_1,t_2,...,t_n\}$ and that's a positive number. And then you have $(b-\frac{t}{2}, b+\frac{t}{2})\subset \mathbb{R}\setminus A$. Hence we get that every point of $\mathbb{R} \setminus A$ is an interior point, so that set is open. (which leads to $A$ being closed) 
