->
If X is Hausdorff, the diagonal \Delta is closed in X\times X.
Assume X is Hausdorff. Now, we have two distinct points x, y and disjoint open sets U, V containing x, y, respectively. The basis element U \times V containing (x,y) \in X \times X should not intersect \Delta by the assumption given to the Hausdorff property.
For every (x,y) \notin \Delta, we have a basis element in X \times X containing (x,y), which does not intersect \Delta.
Thus, X \times X \setminus \Delta is open and we conclude \Delta is a closed set in X \times X .
<-
If the diagonal \Delta is closed in X\times X, X is Haudorff.
Supppose \Delta is closed in X\times X. Then, X \times X \setminus \Delta is open. Let (x,y) \in X \times X and x \neq y. For (x,y) \notin \Delta, we have a basis element U \times V in X \times X containing (x, y).
We remain to show U and V are disjoint. Suppose on the contrary that U and V are not disjoint. Then, there is an element (z,z) \in X times X which belongs to both U and V. Contradicting the fact that x and y are distinct.
Thus, X is Hausdorff.