Definition: A topological space $X$ is called Hausdorff space if for each $x_1,x_2 \in X$ (they are distinct) we can always find neighborhoods $U_1,U_2$ of $x_1,x_2$ such that $U_1 \cap U_2 = \varnothing $.
Is this definition equivalent to say that the following set
$$ \mathcal{D} = \{ (x,x) : x \in X \}$$
is closed in $X \times X $ ?? Im having difficulties seeing why this istrue. Any help would be greatly appreciated.