[Math] Intersection of a dense set with an open set is dense in the open set

general-topologymetric-spaces

Let $A\subset M$ an open subset of the metric space M. If $X\subset M$ is dense in M, then $X\cap A$ is dense in A.

My approach:

If $X\subset M$ is a dense subset of $M$, and $A\subset M$ is an open subset. Let be $U (\neq \phi) \subset A$ be an open set in $A$. Then U is an open subset in M. Therefore $U\cap X\neq \emptyset$. And now, $U\cap X=(U\cap A)\cap X = U\cap(A\cap X)$, and then $A\cap X$ is dense. But I am not sure if this is okay. Any help. Regards

Best Answer

Your argument is basically correct. Here is a more careful and mostly equivalent argument.

To show $X \cap A$ is dense in $A$, we need to show that every nonempty open set in $A$ intersects $X \cap A$. So take $U \subset A$ open in $A$, and nonempty. Note that $\boldsymbol{U}$ is open in $\boldsymbol{A}$ iff it is open in $\boldsymbol{M}$, so $U$ is open in $M$. Therefore $U \cap X \neq \varnothing$, and therefore $U \cap (A \cap X) = U \cap X \neq \varnothing$.