I have a question from Hatcher's Algebraic topology Chapter 0, problem 6: "Let $X$ be the subspace of $\mathbb{R}^2$ consisting of the horizontal segment $[0,1]\times\{0\}$ together with the vertical segments $\{r\}\times[0,1-r]$ for $r$ a rational number in $[0,1].$ Show that $X$ deformation retracts to any point in the segment $[0,1]\times\{0\}$, but not to any other point."
I have a solution to the first part: First, $X$ deformation retracts onto $[0, 1] \times \{0\}$: Take the family of functions $$f_t(r, x) = (r, (1-t)x).$$ It's easy to see that this is a deformation retraction onto $[0, 1] \times \{0\}$. Likewise, the family $$ g_t(x, 0) = ((1-t)x + ta, 0) $$ is a deformation retraction onto the point $(a, 0)$. Hence, composing these, we have the family $$ h_t = \begin{cases} f_{2t} & \text{ for $0\leq t\leq \frac{1}{2}$} \\ g_{2t-1} & \text{ for $\frac{1}{2}\leq t\leq 1$}, \end{cases} $$ which is a deformation contraction onto $(a, 0)$.
But I don't see how these are the only points. For some $(r, x)$, can't we just deformation retract every vertical line $\{q\} \times [0, 1-q]$, $q\neq r$ down to $[0, 1] \times \{0\}$, then deformation retract $[0, 1] \times \{0\}$ to $(r, 0)$, and then deformation retract the rational line $\{r\} \times [0, 1-r]$ to $(r, x)$? What's wrong with this deformation retraction?
Thanks so much.