Problem:

Show that the set $\displaystyle S = \left\{ (x,y) \in \mathbb{R}^2 | x or y \in Q \right\} $ is pathwise connected.

=========================

I can only think of a generalized path.

Since $\displaystyle 0 \in Q $, then there is a parametric path consisting of two lines conneting the x-axis and y-axis. So the parametric path is $\displaystyle \gamma (t) = (0,0)$ and the parameteric path is dependent on the values of x, y.

If x > 0, y > 0, then $\displaystyle \gamma: [0, x] \rightarrow [0, y] $

If x < 0, y < 0, then $\displaystyle \gamma: [x, 0] \rightarrow [y, 0] $

and vice versa. However, I do not know how to prove this for all points.

Thank you for reading. Any help is greatly appreciated.