Showing that a topological space is ${\rm T}_1$ Let $X$ be a topological space and let $\Delta = \{(x,x) : x\in X \}$ be the diagonal of $X\times X$ (with the product topology).

I was asked to prove that $X$ is ${\rm T}_1$ if and only if $\Delta$ can be written as intersection of open subsets of $X\times X$.

I think is better (maybe easier) to use the well-known result "$X$ is ${\rm T}_1$ if and only if $\{x\}$ is a closed set $\forall x\in X$".
What I've done:
Assuming that $X$ is ${\rm T}_1$, let $Y=(X\times X) \setminus\Delta$ and note that (trivially)
$$Y = \bigcup_{y\in Y} \{y\}.$$
Then
$$\Delta = (X\times X) \setminus Y = (X\times X) \setminus \left(\bigcup_{y\in Y} \{y\} \right) = \bigcap_{y\in Y} (X\times X)\setminus \{y\},$$
where $(X\times X)\setminus\{y\}$ is open since each $\{y\}$ is closed.
The other direction seems be a bit harder, I've tried unsuccessfully. Any ideas?
Thanks in advance.

Just an idea.
Suppose $\Delta=\bigcap O_\lambda$, where $(O_\lambda)_{\lambda\in\Lambda}$ is a family of open sets in $X\times X$. Let $(x,y)\in X\times X$ with $x\neq y$. Then $(x,y)\notin \Delta$ and therefore $(x,y)\notin\bigcap O_{\lambda}$. So choose $\mu\in\Lambda$ such that $(x,y)\notin\ O_\mu$; say $O_\mu=\pi_1^{-1}(U_\mu)\cap\pi_2^{-1}(V_\mu)$ where $U_\mu,V_\mu$ are open in $X$. Then $(x,y)\notin \pi_1^{-1}(U_\mu)$ or $(x,y)\notin \pi_2^{-1}(V_\mu)$. Assume $(x,y)\notin \pi_1^{-1}(U_\mu)=U_\mu\times X$. Then $x\notin U_\mu$ as $U_\mu$ is open. But $(x,x)\in\Delta\subseteq O_\mu\subseteq \pi_1^{-1}(U_\mu)=U_\mu\times X$; so $x\in U_\mu$. And if you assume the latter case then you'll get $y\notin V_\mu$ and $y\in V_\mu$. 
Is something wrong? 
