# Separability of a product metric space

I am trying to prove the following: 'If $(X_1,d_1)$ and $(X_2,d_2)$ are separable metric spaces (that is, they have a countable dense subset), then the product metric space $X_1 \times X_2$ is separable.' It seems pretty straightforward, but I would really appreciate it if someone could verify that my proof works.

Since $(X_1,d_1)$ and $(X_2,d_2)$ are separable, they each contain a countable dense subspace, say $D_1 \subset X_1$ and $D_2 \subset X_2$. We will show that $D_1 \times D_2 \subset X_1 \times X_2$ is dense and countable. First, $D_1 \times D_2$ is countable since both $D_1$ and $D_2$ are.

Now let $x=(x_1,x_2) \in X_1 \times X_2$ and let $d$ be the product metric on $X_1 \times X_2$ (given by $d(x,y)=(\displaystyle\sum_{i=1}^2 d_i(x_i,y_i)^2)^{1/2}$). We will show that every open ball $B_d(x,\varepsilon)$ containing $x=(x_1,x_2)$ also contains a distinct point of $D_1 \times D_2$. Let $a_1 \in B_{d_1}(x_1,\frac{\sqrt{2}}{2}\varepsilon)\cap D_1$ and let $a_2 \in B_{d_2}(x_2,\frac{\sqrt{2}}{2}\varepsilon)\cap D_2$ (such points exist because $D_1$ and $D_2$ are dense in $X_1$ and $X_2$, respectively.) Letting $a=(a_1,a_2)$, we then have $d(x,a)=(\displaystyle\sum_{i=1}^2 d_i(x_i,a_i)^2)^{1/2})=(d_1(x_1,a_1)^2 + d_2(x_2,a_2)^2)^{1/2} < ((\frac{\sqrt{2}}{2}\varepsilon)^2 + (\frac{\sqrt{2}}{2}\varepsilon)^2)^{1/2}=\varepsilon$, so we have that $a \in B_d(x,\varepsilon)$, so $D_1 \times D_2$ is dense in $X_1 \times X_2$. Then since $D_1 \times D_2 \subset X_1 \times X_2$ is a countable dense subspace of $X_1 \times X_2$, we have that $X_1 \times X_2$ is separable.

I can see how this would easily generalize to finite products, but does it also extend to countable products?

• How are you defining the metric in the infinite product? The sum no longer works, because it may diverge. – Arturo Magidin Jul 22 '12 at 1:53
• For countable products, what will you use for the dense set $D$? One might think to take $D = \prod_{i=1}^\infty D_i$; this will indeed be dense, but it will not be countable! – Nate Eldredge Jul 22 '12 at 14:03
• @Arturo: I was thinking of the product metric in the infinite product being in the same style, with the sum going to $\infty$. Of course such a sum could diverge, but since each factor space has a dense subset, can we choose points in each factor so that we know the sum converges? It's not clear to me how to do so, hence the question. Looks like Kevin has a suitable way below, though not what I was thinking. – Alex Petzke Jul 22 '12 at 14:52

1. Kevin in his answer gives you a metric that works for the countable product. But, you can actually use $\displaystyle{d(x,y)=\sum\frac{1}{2^i}d_i'(x,y)}$ where $d_i'$ is any metric that is compatible with $d_i$ and bounded by 1. So for example $d_i'(x,y)=\mbox{min}\{d_i(x,y),1\}$ would also work.

2. In the countable product space, the countable dense subset is no longer just the product of the dense subsets from each factor. Instead you have to fix a sequence of $\prod D_i$, say $\{x_i\}$ and take the subset of sequences that eventually agree with $\{x_i\}$. And this set is countable.

This set is dense because any basic open set in the product $\prod X_i$ looks like $U=\prod U_i$ where the $U_i$ are open in $X_i$ and are not all of $X_i$ for only finitely many $i$, say up through $U_n$. So we can pick a sequence $\{s_i\}$ from our eventually constant set so that the $s_i$ is in $U_i$ for the first $n$ terms of the sequence. From then on let it agree with the $\{x_i\}$ above, and we will have $\{s_i\}\in U$.

So for example in $\mathbb{R}^{\omega}$, the countable product of the reals, a dense countable subset is the set of all rational sequences that are eventually $0$.

• So cast in the light of your answer, what I want to know (if this makes sense) is: given $x\in \prod X_i$,can we find an element (sequence) $a$ in $\prod D_i$ such that $\displaystyle\sum_{i=1}^\infty d_i(x,a)$ converges? I understand now what we have to do to get a metric on the product space, and understand that the above will not be a metric, but out of curiosity I'd still like to know the answer to the above. – Alex Petzke Jul 23 '12 at 0:17
• So, we can't necessarily do that if we have to take one of the eventually constant guys I mentioned in the answer. But we can if we can choose from the whole space $\prod D_i$. For $\{x_i\}$ just define $\{a_i\}$ so $d_i(x_i,a_i)\leq 2^{-i}$, which we can do since each $D_i$ is dense in $X_i$. Then $\sum^{\infty}_{i=1}d_i(x_i,a_i)\leq \sum^{\infty}_{i=1}2^{-i}$ which converges. – Francis Adams Jul 23 '12 at 0:38
• Sorry, I should have asked if we can find a sequence so that $\sum_{i=1}^\infty d_i(x_i,a_i) < \varepsilon$ for some $\varepsilon > 0$. – Alex Petzke Jul 23 '12 at 4:57
• If we fix $\epsilon$, we can do the same thing by choosing $d_i(x_i,a_i)<2^{-i-1}\cdot\epsilon$. – Francis Adams Jul 23 '12 at 12:19
• Got it. Thanks for the help. – Alex Petzke Jul 23 '12 at 20:47

Your proof goes through. For countable products, make the analogous argument using the metric $$d(x,y)=\sum_{i=1}^\infty \frac{1}{2^i}\frac{d_i(x_i,y_i)}{1+d_i(x_i,y_i)}$$ The summands are now bounded by $\frac{1}{2^i}$, so the sum always converges, and defines a metric on the product space.

Incidentally, if you take an even larger cardinality in your product, you're no longer guaranteed first countability, in which case you don't get a metric space. The product space in the pure topological category might still be separable, but it's no longer guaranteed. Steen and Seebach, Counterexamples in Topology, is a good place to look for general topology tidbits like this.

• So the infinite product is separable with this metric (just to clarify)? Since each factor has a dense subset, is there a way to choose points so that the sum converges, without making the above modification? (I asked Arturo this above as well) – Alex Petzke Jul 22 '12 at 14:56
• Francis has answered this below, I think. I'm not sure what you mean by avoiding the modification, though I guess that's the bounded metric. Maybe you like Francis's metric better? – Kevin Carlson Jul 22 '12 at 22:06

I think it is not the answer for your question. It's better to see it as a comment after answering of Kevin Carlson. However I know there is a result from Pondiczery, Hewitt and Marczewski that (recently when I read a textbook I found):

If there are not more than $\mathfrak{c}$ ( which is the continuum), separable topological spaces, then their product is still separable.

• Certainly an interesting (and for me rather surprising) result, but it is infinitely more difficult to prove than the question that was asked. So: this might be an answer in the thread on Swatting flies with a sledgehammer... :) – t.b. Jul 22 '12 at 17:59
• Some references for this theorem can be found in this question: On the product of separable spaces. – Martin Sleziak Aug 9 '12 at 16:15
You can bypass a lot of details in proving that $Y=X_1\times X_2$ is separable by observing that for $z=(p_1,p_2) \in Y$ and for $r>0$, we have $I_1\times I_2 \subset B_d(z.r)$, where $I_1=B_{d_1}(p_1,r/2)$ and $I_2=B_{d_2}(p_2,r/2)$. So if $D_1$ is dense in $X_1$ and $D_2$ is dense in $X_2$ then $$\phi\ne (D_1 \cap I_1)\times (D_2 \cap I_2)=(D_1\times D_2)\cap (I_1\times I_2)\subset (D_1\times D_2)\cap B_d(z,r).$$
The answer to your question whether the countable product of seperable metric spaces is seperableis affirmative. However I thnik it's useful to prove a slight generalization of this, namely that the countable product of second countable topological spaces is countable. Indeed, suppose $$\{X_n\}_{n=1}^{\infty}$$ is a sequence of second countable topological spaces; for each $$n$$ let $$\mathcal{U}_n$$ be a countable basis for $$X_n$$ containing $$X_n$$. Defining $$\mathcal{U}:=\{\prod\limits_n U_n: U_n\in \mathcal{U}_n \text{ for each }n \text{ and }U_n=X_n \text{ for all but finitely many }n\}.$$ Then $$\mathcal{U}$$ is a countable collection of open sets of $$\prod\limits_n X_n$$ (there is an obvious bijection from $$\mathcal{U}$$ into the set of $$\mathbb{N}$$-valued functions on finite subsets of $$\mathbb{N}$$). It is easily checked that $$\mathcal{U}$$ is a basis for the product topology on $$\{X_n\}_{n=1}^{\infty}$$, hence this space is second countable. What you wanted to prove now follows from the fact that seperable metric spaces are second countable, and second countable spaces, in general, are seperable.