TITLE: $X/{\sim}$ is Hausdorff if and only if $\sim$ is closed in $X \times X$
QUESTION [44 upvotes]: $X$ is a Hausdorff space and $\sim$ is an equivalence relation.
If the quotient map is open, then $X/{\sim}$ is a Hausdorff space if and only if $\sim$ is a closed subset of the product space $X \times X$.
Necessity is obvious, but I don't know how to prove the other side. That is, $\sim$ is a closed subset of the product space $X \times X$ $\Rightarrow$ $X/{\sim}$ is a Hausdorff space. Any advices and comments will be appreciated.

REPLY [5 votes]: Let $Y$ be the quotient. This is a question about the diagonal $D$ in $Y\times Y$.
Note that the product map $X\times X \to Y \times Y$ is also a quotient map (this is where open-ness is needed), and that your set $\sim$ is precisely $(\pi\times\pi)^{-1}(D)$. Thus $\sim$ is closed if and only if $D$ is closed.
Now, $D$ is closed if and only if $Y$ is Hausdorff, for any topological space $Y$. This follows by considering disjoint neighborhoods $U$ and $V$ of any two distinct points $p$ and $q$: $(p,q)\in U\times V$ which is open and disjoint from $D$, so $D^c$ is closed. Conversely, the closedness of $D$ implies the existence of some product open set $U\times V$ disjoint from $D$ and containing $(p,q)$, and thus $U$ and $V$ are open sets separating $p$ and $q$.