A question about retraction of the torus onto the cylinder. 
Prove that the cylinder $S^1 \times [0,1]$ is a retract of the torus $S^1 \times S^1.$

I know that $S^1 \times S^1$ is obtained from $S^1 \times I$ by identifying $(x,0) \sim (x,1),$ $x \in S^1.$ From here how do I embed $S^1 \times I$ inside $S^1 \times S^1.$ My idea is to reflect the torus through $xz$-plane and then the corresponding orbit space is the cylinder. So cylinder can be thought of as being embedded inside the torus if we identify it with one of the halves of the torus sitting in either side of the $xz$-plane. Let the half be $A$ with which the cylinder is being identified. Let $A'$ be the portion of the torus obtained by reflecting $A$ through the $xz$-plane. Then let us take the map $r$ which is identity on $A$ and reflect every point of $A'$ to the corresponding point of $A.$ Then will $r$ work as the required retraction? I think it will because $A$ and $A'$ are both closed subspaces of the torus $S^1 \times S^1$ and $r$ acts as identity on $A \cap A'.$ So by pasting lemma, $r$ is continuous and $r \big \rvert_A = \text {Id}_A,$ by the construction. So $r$ has to be a retraction from $S^1 \times S^1$ onto $S^1 \times [0,1].$
Any suggestion in this regard will be greatly appreciated. Thanks!
 A: Your argument is geometrically intuitive, and the use of the pasting lemma makes it rigorous and correct.
The only thing I could think to add is an explanation as to why the identification of $S^1 \times I$ as $S^1 \times A$, where $A$ is the closed top half of $S^1$, is an embedding. However, this can be deduced from the following:

*

*The mapping $\exp(\pi i x)$ is a continuous bijection from $I$ to $A$; and,

*Every continuous bijection from a compact space to a Hausdorff space is a homeomorphism.

Alternatively, we can explicitly say that the desired retract is that one that is identity on the first factor of $S^1$ and sends $(x, y)$ to $\big(x, |y|\big)$ in the second factor.
If you want to view this as taking place in $\mathbb{R}^3$, then the mapping $\big((2 + p_1) q_1, (2 + p_1) q_2, p_2\big)$ for $\big((p_1, p_2), (q_1, q_2)\big)$ in $S^1 \times S^1$ is an embedding for which the previous retraction is precisely the one that reflects those points with $y\leq 0$ onto those with $y\geq 0$.
