TITLE: Cartesian product of dense sets is dense?
QUESTION [6 upvotes]: If $Q_i$ is dense in $X_i$, where $X_i$ is a topological space and $i \in I$ being an arbitrary family of indices. Does this imply that $\prod Q_i$ is dense in $\prod X_i$?

REPLY [7 votes]: Recall that the product topology on $\prod X_i$ is generated by the sets of the form $\prod U_i$ where $U_i=X_i$ except for finitely many slots in which $U_i$ is open in $X_i$. Of course, the intersection of $\prod U_i$ and $\prod Q_i$ is nonempty because $U_i\cap Q_i\ne \varnothing$.

REPLY [3 votes]: Let $U$ be open in $\prod X_i$. For every $i$, we have that $\pi_i(U)$ is open in $X_i$ and hence contains an element, say $q_i$, of $Q_i$. The cartesian product of those $q_i$ will be in $U$.