Let $(X,\tau)$ be a topological space. A *retraction* is a continuous map $r:X\to X$ such that $r$ is the identity on $\text{im}(r)$. We call $S\subseteq X$ a *retract* of $X$ if there is a retraction $r:X\to X$ such that $\text{im}(r) = S$.


We say that $(X,\tau)$ is rc if all retracts are closed. It turns out that all Hausdorff spaces have this property.


Is the class of rc-spaces closed under topological products?



Is the class of rc-spaces closed under products?
Take $X$ to be an [RC space which isn't $T\_2$](https://topology.pi-base.org/spaces?q=rc%2B%7E%24T_2%24) such as the [one-point compactification of the rationals](https://topology.pi-base.org/spaces/S000029). We will show $X^2$ is not RC. Note that it is not $T\_2$ as its factors are not $T\_2$.


First we will note that the diagonal $\{\langle x,x\rangle:x\in X\}\subseteq X^2$ is a retract: send $\langle x,y\rangle \mapsto\_f \langle x,x\rangle$. This is the composition of the (continuous) projection map onto the first coordinate and the (homeomorphic) map $x\mapsto \langle x,x\rangle$, and thus continuous. Since this map restricted to the diagonal is the identity, it is a retraction.


As noted in [this answer](https://mathoverflow.net/q/191020), a non-$T\_2$ space has a non-closed diagonal: choose $x\not=y$ for which no open neighborhoods are disjoint. Then any basic neighborhood $U\times V$ of $\langle x,y\rangle$ must have $z\in U\cap V$ and therefore $\langle z,z\rangle\in U\times V$, showing $\langle x,y\rangle$ is a limit point of the diagonal.


Thus the diagonal is a retract of $X^2$ which is not closed, showing $X^2$ is not $RC$.


