Understanding the definition of dense sets I am recently confused about the definition of dense sets. What I learned is as the following 

In topology and related areas of mathematics, a subset $A$ of a topological space $X$ is called dense (in $X$) if any point $x$ in $X$ belongs to $A$ or is a limit point of $A$.

The point is that when we say "a set $A$ is dense in a topological space $X$" we should first have the fact that $A$ is a subset of $X$. However, there is a notion that "a set $E$ is dense in a ball $X$" as I mentioned in this question. In this notion, $E$ is not necessarily a subset of $X$. 
[Edit: How should I understand the definition of dense sets?] Can anybody tell me a reference for the most general definition for the dense sets?
 A: It isn’t so much a matter of needing another definition as of getting the hang of how mathematical language evolves and is actually used ‘in the wild’. In the example in question, ‘$E$ is dense in the ball $B$’ can be thought of as verbal shorthand for ‘$E \cap B$ is a dense subset of the ball $B$’ $-$ which, when you think about it, is just about the only thing that it could reasonably mean.
How does such shorthand arise? Let’s say that you have the idea of a set $D$ in a topological space $X$ being dense in $X$ according to the definition that you gave. Any subset $Y$ of $X$ can be viewed as a space in its own right, with the subspace topology inherited from $X$, so you can certainly talk about a subset of $Y$ being dense in $Y$. But somewhere along the line you prove that $D$ is dense in $X$ iff $\operatorname{cl}D = X$; this characterization is far too useful to be omitted. What happens when you try to apply this definition to the subspace $Y$? It’s certainly true that a set $D \subseteq Y$ is dense in $Y$ iff $\operatorname{cl}_Y D = Y$, but if you’re thinking of $Y$ as a subset of $X$ rather than as a space in its own right, it’s more convenient to look at $\operatorname{cl}_X D$, which isn’t necessarily $Y$: it may be a proper superset of $Y$. (Take $X$ to be $E^1$, $Y$ to be $(0,1)$, and $D$ to be $\mathbb{Q} \cap (0,1)$.) 
Thus, if we don’t want to bother with different closures in different sets, it’s much more convenient to say simply that a subset $D$ of a set $Y$ is dense in $Y$ iff $\operatorname{cl}D \supseteq Y$, where the closure operator is $\operatorname{cl}_X$, the closure in the whole space $X$. And once you get to that point, it’s sometimes convenient to separate the notion of dense in $Y$ from the notion of subset of $Y$ altogther. That is, we might as well say that $D$ is dense in $Y$ iff $\operatorname{cl}D \supseteq Y$, irrespective of whether $D \subseteq Y$. Then, for instance, we can say simply that the rationals are dense in $(0,1)$; we don’t have to say explicitly ‘the rationals in $(0,1)$’.
Many textbooks, including some very good ones (Munkres, Dugundji, Willard) define dense subset of a space but (so far as I can quickly tell) silently leave it to the reader to make the generalization to dense subset of a set in a space and the further generalization to dense in a set in a space, or to pick them up from context. Of course, one can define dense more generally. For example, John Greever’s Theory and Examples of Point-Set Topology gives this definition:

(2.14) Definition. If $(X,\mathscr{T})$ is a topological space and $A,B \subset X$, then $A$ is dense in $B$ if and only if $\overline{A} \supset B$.

Notice that he doesn’t require $A$ to be a subset of $B$: right from the start he’s using the most general of the three forms that I considered above. Had you learned the concept from Greever, you’d not have had a problem with the dense in a ball language. But whether with this concept or with another, you’re eventually going to encounter standard usages that require a little interpretation of or extrapolation from the ones that you’ve been taught.
