Finding connected components of two given spaces

Suppose that in the Cartesian plane $\mathbb{R}^2$ we let $X$ denote the union of all lines through the origin with rational slope. Would that make $X$ connected, since all such lines are connected and only intersect at the origin, i.e. $(0,0)$? Would this then mean that $X- \{(0,0)\}$ is not connected? Would it even have any connected components, and if so, what could they be and why?

For my second question, again in the Cartesian plane, suppose we let $X$ be the union of horizontal lines defined in the following manner: First, this space includes the closed unit interval, or perhaps even any such interval like $[p,q]$. Next, we have a line $L_1$ of the same length as $[p,q]$, i.e. $q-p$, whose vertical distance (height) from $[p,q]$ is $1$. Then, we have a second line $L_2$ again of length $q-p$, but this time with height $1/2$ from $[p,q]$. Continuing this countable collection, we have line $L_i$ of length $q-p$ with height $1/i$ from $[p,q]$. Note that all these lines are parallel to $[p,q]$. What would be the connected components in this case, and how come?

For the first question, since connected components are closed and connected, my guess would be that the only connected component would be $\mathbb{R}^2 - \{(0,0)\}$, but I might be wrong. For the second, again I'm not sure of this, but I think since all of the $L_i$ are disjoint, the only connected component would be that closed interval that lies on the $x$-axis. I would really appreciate some help here.

-

I’ll deal with (2) first, since it’s a bit simpler.

(2) If I understand you correctly, $$X=[p,q]\times\left(\{0\}\cup\left\{\frac1n:n\in\Bbb Z^+\right\}\right)\;.$$ In your notation $L_n=[p,q]\times\left\{\frac1n\right\}$ for $n\in\Bbb Z^+$, and we might as well set $L_0=[p,q]\times\{0\}$, so that $X=\bigcup_{n\in\Bbb N}L_n$. (In my usage $\Bbb N$ includes $0$.)

The components of $X$ are the sets $L_n$ for $n\in\Bbb N$: each is certainly connected, being a homeomorphic copy of the connected set $[p,q]$ in $\Bbb R$, and any two of them can be separated by disjoint open sets in $X$.

If $1\le m<n$, let $U=\bigcup_{k\le m}L_k$ and $V=L_0\cup\bigcup_{k>m}L_k$; clearly $L_m\subseteq U$, $L_n\subseteq V$, and $U\cap V=\varnothing$. To see that $U$ and $V$ are open in $X$, let $a$ be any real number between $\frac1m$ and $\frac1{m+1}$; then

$$U=X\cap\big\{\langle x,y\rangle\in\Bbb R^2:y>a\big\}$$ and $$V=X\cap\big\{\langle x,y\rangle\in\Bbb R^2:y<a\big\}\;,$$ which are clearly open in the subspace topology on $X$.

To separate $L_0$ from some $L_n$ with $n>0$, let $U=\bigcup_{k\le n}L_k$ and $V=L_0\cup\bigcup_{k>n}L_k$; these are clearly disjoint supersets of $L_n$ and $L_0$, respectively, and they are open in $X$ because if $\frac1{n+1}<a<\frac1n$, then

$$U=X\cap\big\{\langle x,y\rangle\in\Bbb R^2:y>a\big\}$$

and $$V=X\cap\big\{\langle x,y\rangle\in\Bbb R^2:y<a\big\}\;.$$

(1) Yes, $X$ is connected; it’s even path-connected, since you can get from a point on one line to a point on another by a path through the origin. It’s also true that $X\setminus\{\langle 0,0\rangle\}$ is not connected; its components are the open rays from the origin with rational slopes. That is, for each $q\in\Bbb Q$, the rays $\{\langle x,qx\rangle:x>0\}$ and $\{\langle x,qx\rangle:x<0\}$ are components of $X\setminus\{\langle 0,0\rangle\}$. Each is clearly connected, and even path-connected, but any two of them can be separated by disjoint open sets in $X\setminus\{\langle 0,0\rangle\}$.

Writing down the separation takes a little more work than in (2), but it’s not too hard. Any two rays can be separated by a straight line through the origin with irrational slope, and such a line divides $X\setminus\{\langle 0,0\rangle\}$ into two non-empty open subsets, one on each side of the line. You should take a crack at writing out the details, much as I did for (2).

-

In the first example $X$ is connected (even path-connected), and $X \setminus \{0\}$ is not connected, the connected components being the half-rays from $0$ with rational slope. (If a subset of $X$ contains two points from different half-rays, you can disconnect them with a line through $0$ of irrational slope. On the other hand, each half-ray is obviously connected, so these are the connected components.)

In your second example, it is even easier to see that the connected components will be the intervals, again because they are connected, and you can separate each pair of intervals by a horizontal line.

Also note, that connected components are only relatively closed, i.e., in the first example each open half-ray is closed in $X \setminus \{0\}$, because this set does not contain the origin.

-