TITLE: Closure of the diagonal is an equivalence relation
QUESTION [5 upvotes]: Let $X$ be a topological space and $\overline{\Delta_X} \subseteq X \times X$ the closure of its diagonal.
Then $\overline{\Delta_X}$ is the graph of an equivalence relation on $X$.
This statement can be found in Borceux's Handbook of Categorical Algebra I, chapter 3, page 96, as he introduces adjoint functors.
I'm currently trying to prove this. Reflexivity is clear, and so is symmetry, for $(x,y) \mapsto (y,x)$ is an automorphism of $X \times X$. However, I'm not sure how to prove transitivity. Here's what I found.
Not belonging to $\overline{\Delta_X}$ is the same as being separable by open subsets of $X$ : indeed, $(a,b) \notin \overline{\Delta_X}$ iff there exists $U,V$ open subsets of $X$ such that $(a,b) \in U \times V \subseteq (X \times X) \setminus \overline{\Delta_X}$, that is iff there exists $U,V$ open subsets of $X$ such that $a \in U$,$ b \in V$ but $U \cap V = \varnothing$. Thus it seems to me that the statement is false : taking $X = \{x,y,z\}$ with basis $\{x\},\{z\}$, we have $(x,y),(y,z) \in \overline{\Delta_X}$ and yet $(x,z) \notin \overline{\Delta_X}$.
Thank you for clearing my mind.
Edit : It seems that this statement really is false, as Eric Wofsey suggests in this answer at math.SE.

REPLY [4 votes]: The set $\{1,2,3\}$ for which the open subsets are $\emptyset$, $\{1\}$, $\{3\}$, $\{1,3\}$, $\{1,2,3\}$, is a topological space for which the closure of the diagonal is $\{1,2,3\}^2\smallsetminus\{(1,3),(3,1)\}=\{1,2\}^2\cup\{2,3\}^2$, which is not an equivalence relation.
Possibly more intuitively it can be viewed as the quotient of $\mathbf{R}$ by the equivalence relation $x\simeq y$ if $\exists t>0$: $x=ty$.