Q:

How to define the density on a subspace of a topological one

Assume $X$ is a topological space and $A\subseteq X$.
Then $A$ is dense in $X$ iff $\overline{A}=X$.
Now, suppose $A\subseteq B\subseteq X$.

How can I define the density of $A$ in $B$? 

As I understand it, a reasonable way to overcome this difficulty is to require $\overline{A}\cap B=B$ or $\overline{A\cap B}=B$, where we are using the closure operator of $X$.
I guess the second one is more adeguate, but it is only a feeling. 

A:

By definition, $A$ is dense in $B$ if for any $b\in B$ and any open $U$ with $b\in U$ you can find $a\in A$ such that $a\in U\cap B$, i.e., $a\in A\cap U$.
Assume that $\overline A\cap B = B$ and let $b\in B$, $U$ open with $b\in U$. Then, since $b\in \overline A$, there exists $a\in A\cap U$.
Assume that $A$ is dense in $B$ and let $b\in B$. Then for any open $U$ with $b\in U$ we find $a\in A\cap U$. This implies $b\in \overline A$.  Hence, we have $\overline A\cap B = B$.

