In a Hausdorff space, is the diagonal closed for an arbitrary product space? The question: "Prove that the topology on a space X is Hausdorff iff the diagonal $\Delta=\{ (x,x) \mid x\in X\}$ is closed in the topological product $X \times X$." is in Munkres Section 17.
I would assume that the proof for the product space $X \times X \times X$, and so on, would be very similar to the product space $X \times X$. But what if we are given an arbitrary product? Does the answer depend on what topology we give? (Box, product, uniform, little ell 2, etc.) Or is the diagonal always closed, no matter what topology we give?
 A: Let $I$ be any index set of size at least 2 (to avoid trivialities, or we have no real product), and consider the set $X^I$. A topology $\mathcal{T}$ on this set I will call "acceptable" if for all projection maps $p_i: X^I \to X$ defined by $\pi_i(f) = f(i)$ are continuous. We have lots of acceptable topologies among which the usual product topology and the box topology. (Also on powers of the reals the $\ell^2$ topology and the uniform metric topology).
Let $e:X \to X^I$ be the diagonal embedding that sends $x \in X$ to $e(x)$ where $e(x): I \to X$ is the constant map with value $x$.
Then if $X^I$ has an acceptable topology, and if $X$ is Hausdorff then $e[X]$ is closed in $X^I$:
If $X$ is Hausdorff, let $f \notin e[X]$, so $f$ is non-constant: there are two $i_1, i_2 \in I$ such that $f(i_1) \neq f(i_2)$. These two points have disjoint open neighbourhoods in $X$, say $f(i_1) \in U$, $f(i_2) \in V$ and $U \cap V = \emptyset$.  Define $O = \pi_{i_1}^{-1}[U] \cap \pi_{i_2}^{-1}[V]$, which is an open set in $X^I$, as we have an acceptable topology on $X^I$, i.e. projections are continuous. Clearly $f \in O$ as $\pi_{i_1}(f) = f(i_1) \in U$ etc.
And no function in $O$ can be constant as the values on $i_1$ and $i_2$ will always differ for any $g \in O$. So we have a neighbourhood of $f$ that misses $e[X]$ so $e[X]$ is closed.
Of course, is we take any topology on $X^I$, say the indiscrete one, then $e[X]$ will not be closed, but then the topology on $X^I$ has nothing to do with the topology of $X$ which seems to be unintuitive. 
To go back from $e[X]$ being closed to $X$ being Hausdorff needs some other idea, maybe. In the $X^2$ case, the basic open sets are explicitly used.
A: Let $I$ be any index set, and $X^I$ be the product of $X$ with itself $\vert I \vert$ times in the product, box topologies. If $x \in X^I$ but not in the diagonal then for some $i,j \in I$, $x_i \neq x_j$. $X$ is Hausdorff so there exist open $U,V$ around $x_i,x_j$ such that $U\cap V=\varnothing$. We can extend $U\times V$ to a neighbourhood of $x$ by multiplying it with neighbourhoods $W_k \ni x_k$ for all other $k\in I$ and choosing $W_k$ according to the topology of $X^I$ (arbitrary open sets for box topology, all but finitely many equal to $X$ for product topology). For every $x'$ in this neighbourhood of $x$, $U \ni x'_i\neq x'_j \in V$ so the neighbourhood doesn't intersect the diagonal, and therefore the diagonal is closed.
Similarly, if $X$ is such that $X^I$ can be given the uniform or little ell 2 topologies we can construct a neighbourhood of $x$ such that its projection on the $i$'th and $j$'th coordinates are contained in $U$ and $V$. So the diagonal will also be closed in these cases.
(In general, the diagonal being closed or not depends on the topology of $X^I$, for instance in the trivial topology on $X^I$ the only closed sets are $\varnothing$ and $X^I$ itself, but this is perhaps not in the spirit of the question)
A: You can equip $X$ with any topology. 
If that topology makes $X$ Hausdorff, then the diagonal is closed in the product topology.
Conversely, if you equip $X$ with any topology such that the diagonal is closed in the product topology, the space is Hausdorff.
