TITLE: Right adjoint of forgetful functor from Top
QUESTION [6 upvotes]: How to prove this?
The forgetful functor $U:\mathbf{Top}\to\mathbf{Set}$ has a right adjoint, namely the functor $\mathbf{Set}\to\mathbf{Top}$ which equips a set with the indiscrete topology and left adjoint which equips a set with the discrete topology.

REPLY [8 votes]: If $X$ is a topological space and $S$ a set, it should be quite clear that a map from $U(X)$ to $S$ is "the same" as a continuous map from $X$ to $S$ equipped with indiscrete topology, and that a map from $S$ to $U(X)$ is "the same" as a continuous map from $S$ with discrete topology to $X$.
Note that this uses essentially that all maps from a discrete or to an indiscrete space are continuous.