A basis of a topology is a family of open sets such that every open set is a union of members of . Equivalently, whenever and is open, there is with . For a metric space, all open balls form a basis. For the product topology on , the rectangles with open in their respective factors form a basis; rectangles made from factor bases also suffice.
If and are countable dense subsets, then is countable. Every nonempty basic rectangle meets it, since and are nonempty. Every nonempty open set contains such a rectangle, proving that a product of two separable spaces is separable.
Suppose a metric space has a countable dense set . The balls with and positive rational form a countable basis. Indeed, given open, choose with , then choose with and rational satisfying
The triangle inequality gives . Conversely, from any countable basis select one point of each nonempty member. These points form a countable dense subset, because every nonempty open set contains a basis member. This direction holds for arbitrary topological spaces. Thus a metric space is separable exactly when it is a second-countable space. Intersecting a countable basis with a subspace gives a countable basis for its subspace topology; selecting points as above shows that every subspace of a separable metric space is separable.
For the Sorgenfrey line, meets every nonempty interval , so it is a countable dense subset. In the Sorgenfrey plane, however, for any and ,
Indeed, in that rectangle requires both and . Every singleton is therefore open in the subspace topology on , which is the discrete topology. A dense subset of a discrete space must contain every point. Since is in bijection with the uncountable set , it has no countable dense subset. Hence is separable and is not separable, illustrating why the metric assumption in the inheritance statement matters.