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.

If $X$ is not $T_1$ let $x,y\in X$ with $x\ne y\in \overline {\{x\}}$.
Let $F$ be any family of open subsets of $X^2$ such that $\cap F\supset \Delta.$ 
For each $f\in F$ there exists open $U_f$ and $V_f$ of $X$ such that $(y,y)\in U_f\times V_f\subset f.$ 
But $x\in U_f$ because $y\in U_f$ and $y\in \overline {\{x\}}$. Also $y\in V_f.\;$ So $(x,y)\in U_f\times V_f\subset f .$  As this holds for every $f\in F ,$ we have $(x,y)\in\cap F.$
But $(x,y)\not \in \Delta,$ so $\cap F \ne \Delta.$
