# Coincidence set closed equivalent to diagonal closed

Prove

For any topological space $Y$ and any continuous maps $f, g : Y → X$, the set $\{y ∈ Y : f(y) = g(y)\}$ is closed in $Y$

is equivalent to

The diagonal $∆ = \{(x, x) : x ∈ X\}$ is a closed subset of $X × X$, in the product topology.

I've proved that the diagonal being closed is equivalent to $X$ being Hausdorff, and also proved that the diagonal closed implies the coincidence set is closed but can't do the reverse implication, any hints? Have tried to show the complement is open, ie there is an open neighbourhood about each point, but can't seem to find a useful way to use the coincidence set being closed. The functions $f, g$ seem to be mapping the 'wrong way' as it were, so not sure how their continuity can be used.

Note that $\Delta$ is the coincidence set of the two projections from $X\times X$ to $X$. The projections are $p_1 : X\times X\to X,\;(x,x')\mapsto x$ and $p_2 : X\times X\to X,\;(x,x')\mapsto x'$.

Indeed, it's the set of points $(x,x')$ s.t. $x=x'$...

Thus the diagonal is closed.

Consider the map $p_1:X\times X\rightarrow X$ given by $(x,y)\mapsto x$ and $p_2:X\times X\rightarrow X$ given by $(x,y)\mapsto y$.

$p_1$ and $p_2$ are continuous maps and $\Delta=\{(x,y)\in X\times X\mid p_1=p_2\}$.

Consider $\pi_1:X_1$x$X_2 \rightarrow X_1$ and $\pi_2:X_1$x$X_2 \rightarrow X_2$ where $X_1 = X = X_2$, $\forall i \in \left\{1, 2\right\}$, $\pi_i$ is the natural projection, i.e. $\pi_i(x_1, x_2) = x_i$.

We know that $\pi_i$ is continue $\forall i \in \left\{1, 2\right\}$, and $\Delta(X)$ is the coincidence set of $\pi_1$ and $\pi_2$.

Now we use the hypothesis and we have the thesis.