Doubt in Chapter 1 – Topology: A Categorical Approach

general-topology

Notice that endowing a subset $Y \subseteq X$ with the subspace topology provides meaning to the question “Is a function $Z \to Y$ continuous?”
Simply put, the subspace topology determined continuous maps to $Y$.
The converse holds as well:
continuous maps to $Y$ determine the topology on $Y$.
This is yet another illustration of the philosophy that objects in a category are determined by morphisms to and from them.
It’s also the heart of the second characterization of the subspace topology.

(Screenshot from the source)

In the above quote from Topology: A Categorical Approach (Chapter 1), I am not sure how “continuous maps to $Y$ determine the topology on $Y$”. If we have a mystery topology on $Y$ and the family of sets $\{f \mid f \in \mathsf{Top}(Z,Y) \}_{Z \in \mathrm{Obj}(\mathsf{Top})}$ (i.e., we know every continuous function into $Y$), how can we recover the topology on $Y$? I imagine all we can say is what isn’t a topology – more precisely, a topology on $Y$ would not work if we can find a function in the above family such that, in accordance with this topology, the function isn’t continuous (a contradiction). Is that what is meant here?

The context is that the author is talking about the subspace topology for injective maps $f \colon Y \rightarrow X$, where the topology in the codomain is known and we wish to recover the coarsest topology on the domain making $f$ continuous. When $Y \subseteq X$, we can consider the natural inclusion map and define the subspace topology as coarsest topology making $i$ continuous.

Best Answer

Suppose you've chosen a mystery topology $\mathcal M$ on $Y$, you don't tell me $\mathcal M$, but you do tell me, for all topological spaces $Z$, which functions $Z\to (Y,\mathcal M)$ are continuous. Then I can determine $\mathcal M$ as the smallest topology $\mathcal T$ on $Y$ such that the identity map from $(Y,\mathcal T)$ to $(Y,\mathcal M)$ is continuous.

(This may seem a cheap trick, but it's essentially the same trick as Yoneda's Lemma.)