If both factors are Hausdorff, two distinct product points differ in at least one coordinate. Disjoint open neighbourhoods in that coordinate, multiplied by the other whole factor, give disjoint open neighbourhoods of the product points. Thus the product is Hausdorff.
Conversely, assume the product is Hausdorff. Fix , using nonemptiness. For , choose disjoint open neighbourhoods of and and refine them to basis rectangles and . Since , their disjointness forces . These separate , proving that is Hausdorff. Fixing a point of proves the same for .The nonempty hypothesis is essential: a product with the empty set is empty regardless of the other factor. This is the Hausdorff property of a nonempty product.
The product topology on the Cartesian product has a basis of a topology consisting of all rectangles , where is open in and is open in . Equivalently, it is the smallest topology making the two coordinate projections continuous.
Take distinct points and . If , use the Hausdorff condition in to find disjoint open neighbourhoods . Then and are disjoint open neighbourhoods of the two points. If , then ; disjoint open neighbourhoods in give and . Thus is Hausdorff, as established by the forward implication of the Hausdorff property of a nonempty product. An empty Cartesian product is automatically Hausdorff.