If $(X,\tau)$ is a topological space, we call $A\subseteq X$ a *retract* if there is a continous map $r:X\to A$ such that $r(a) = a$ for all $a\in A$ (we assume $A$ to be endowed with the subspace topology inherited from $X$). By $\text{Retr}(X)$ we denote the collection of retracts of $X$.


Is there a non-discrete, infinite $T\_2$-space $(X,\tau)$ such that $|\text{Retr}(X)| = 2^{|X|}$?



Non-discrete $T_2$-space $(X,\tau)$ with $2^{|X|}$ retracts
Yes.


The space of rational numbers $X=\mathbb{Q}$ is an instance. 


We can view $X$ as a countable union of countably many disjoint copies of $\mathbb{Q}$.


Any nonempty subset $A$ of those copies (that is, taking all or none of each
copy) is a retract of $X$, since we can map the unused copies to a
fixed copy, and this is continuous. And there are $2^{\aleph\_0}$ many such $A$, so we've got enough retracts.


A similar idea works with copies of other spaces, and one can make uncountable examples this way.


More examples:


* Every infinite ordinal $\lambda$, under the order topology. Any closed subset $A\subset\lambda$ is a retract, since you can map each $\alpha<\lambda$ to the next element of $A$, that is, the smallest $\beta\in A$ with $\alpha\leq\beta$. This is continuous. And there are $2^{|\lambda|}$ many closed subsets of $\lambda$.
* The long rational line, $\left([0,1)\cap\mathbb{Q}\right)\cdot\omega\_1$. This has size $\omega\_1$, and yet every closed subset of $\omega\_1$ gives rise to a retract (by taking the point $0$ in that interval). So there are $2^{\omega\_1}$ many retracts.


