Equivalence between the "topological" definition of dense set and the one given for subsets of $\mathbb{R}$ I hope this is not a duplicate.
Let $E$ be a topological space and $T \subset E$. We say that $T$ is dense in $E$ if every point of $E$ is adherent to $T$, i.e. if $\overline{T} = E$, where $\overline{T}$ is the closure of $T$. In a metric space, precisely in $\mathbb{R}$, I have been given the following definition: $T \subset \mathbb{R}$ is dense in $\mathbb{R}$ if, given two reals $a$ and $b$, $a \lt b$, we can always find $x \in T$ such that $a \lt x \lt b$.
I thought that if $a \lt x \lt b$, then $x$ must be less than $(a+b)/2$ and so, for any $\rho > 0$, $$\frac{a+b}{2} - \rho \leq x \leq \frac{a+b}{2} + \rho$$ In some way I could build a ball centered at $(a+b)/2$, of radius $\rho$, and then conclude that given any real number of the form $(a+b)/2$, we can find a neighborhood (in this case, that ball) cantaining a point of $T$. Obviously, if $x \in \mathbb R$, we can find $b=x$ such that $(x+b)/2 = x$, but must be $a \neq b$.
I don't know if this makes sense. How can I prove it?
 A: When in a linear order $(X,<)$ we have that for some $D \subseteq X$: $$\forall x \in X: \forall y \in X: (x < y) \to (\exists z \in D: x < z < y)$$ $D$ is called order dense in $X$. This implies that $D$ is dense in the order topology induced by $<$, as then $D$ intersects every non-empty open interval (or half-open interval with boundary $\min(X)$ or $\max(X)$, if existent). 
But a set $D$ can be dense 
in a linearly ordered topological space (LOTS) without being order dense. An example is $D = [0,1] \times \{0,1\}$ (the so-called double arrow space) in the lexicographic order, so $(x,y) < (x',y')$ iff $x < x'$ or ($x=x'$ and $y=0, y'=1$). Then $Q:= \mathbb{Q} \times \{0,1\}$ is dense in the order topology but not order dense in the sense defined above, as $D$ has gaps: $(x,0) < (x,1)$ but there is no point inbetween, so $D$ isn't even order dense in itself. But if a LOTS $X$ has no gaps, a topologically dense set must be order dense, as is not hard to see.  
$\mathbb{R}$ has the order topology w.r.t. $<$, and it has no gaps. So there the notions order dense and topologically dense are equivalent. 
A: If $T$ is dense in the first sense, and $a < b$, then $$\overline T \cap (a,b) = \mathbb R \cap (a,b) = (a,b).$$ In particular $T \cap (a,b) \neq \emptyset$, because the above shows that any point in $(a,b)$ belongs to $\overline T$, and hence that every neighbourhood of any point in $(a,b)$ contains an element of $T$.
Conversely, if $x \in \mathbb R$ is arbitrary, $T$ being dense in the second sense implies that $$T \cap (x-\epsilon, x+\epsilon) \neq \emptyset$$
for any $\epsilon > 0$, whence $\overline T$ contains $x$. Hence $\overline T = \mathbb R$.
A: Let $T$ be dense in $\mathbb{R}$ with the definition you were given, and let $x \in \mathbb{R}$. For each $n \in \mathbb{N}$, by this definition of density, there exists $x_n \in T$ such that $x_n \in (x-\frac{1}{n}, x+ \frac{1}{n})$. Now, the sequence $\{x_n\}_{n \geq 1} \subseteq T$ converges to $x$ since $|x -x_n| < \frac{1}{n} \to 0$ and therefore $x\in \bar{T}$. Since $x$ was an arbitrary real, $\bar{T} = \mathbb{R}$. Thus in this case the two notions coincide.
A: For a general metric space, one way to define a dense subset is as follows: $T \subseteq E$ is dense in $E$ if given any point $p \in E$, and any real number $r > 0$, the open ball $B_r(p)$ intersects $T$. This is equivalent to the topological definition. 
Here's how. Let's assume that $T$ is dense in $E$ by the definition given above. $E \backslash\overline{T}$ is an open set that doesn't intersect $T$. But, if $q \in E \backslash \overline{T}$, we know that $q$ cannot be an interior point (by our definition of a dense set). It follows that $E \backslash \overline{T}$ is empty. So $\overline{T} = E$.
If we let $T$ be dense by the topological definition, for any $p \in E$, $p$ is either in $T$, or a limit point thereof. This gives you back the metric space definition.
For the case of $\mathbb{R}$, note that every interval $(a,b)$ is an open ball of the form $B_{\frac{b-a}{2}}(\frac{b+a}{2})$. This should let you see that the definition for $\mathbb R$ is the same as that for a metric space.  
