I was reading some proofs that $X$ is a Hausdorff space $\iff$ the diagonal $\Delta = \{x\times x; x\in X\}$ is closed. I've found this one, that says:
Let X be Hausdorff, then if $x\ne y$ there are neighborhoods $V_x$ and $V_y$ such that $V_x \cap V_y = \emptyset$. Therefore $V_x\times V_y \cap D=\emptyset$ and the complement of $D$ is open. Now, assume that the latter is true. Then, for any point $(x,y)$, $x\ne y$, there is an open set around it that does not intersect $D$. Therefore, there are two sets $x\in V_x$ and $y\in V_y$ such that $V_x\times V_y$ doesn't intersect $D$, therefore $V_x \cap V_y = \emptyset$.
My first question is: in the second line, when he concludes that the complementar is open, why? For me, in order for a complement of $D$ to be open, I have to prove that $X-D$ is open. How to prove that? Also, is he considering $V_x\times V_y$ an open? Why? Because an open in the cartesian product is an union of $U\times V$, where $U$ is open in $X$ and $V$ is open in $X$.