Do retracts in topology coincide with categorical retracts?
Solution 1:
If $X, Y$ are spaces with $i: X \to Y$ and $r: Y \to X$ continuous so that $ri = 1_X$, then the map $i$ is a topological embedding, meaning that if one restricts the codomain to $i(X)$ with the subspace topology one obtains a homeomorphism $$\bar i: X \to i(X).$$ (Proof: restrict the domain of $r$ to get a continuous inverse to this continuous bijection.)
Now $i(X)$ carries a canonical inclusion map, $j: i(X) \hookrightarrow Y$, and one may set $r' = \bar i r: Y \to i(X)$ to be the composite of the retraction and the homeomorphism to $i(X)$.
Then $r'$ is a retraction of $Y$ onto the subspace $i(X)$.
Not only is $X$ homeomorphic to a topological retract of $Y$, in fact the retraction diagram $(X, Y, i, r)$ is isomorphic in $\mathsf{Top}$ to a retraction diagram $(i(X), Y, j, r')$ in the topological sense. Therefore I do agree with the contention that these are really the same ideas. (The apparent generalization in the categorical definition comes from the desire to forget the idea of 'subobject', which may not be a good notion in arbitrary categories.)