# How can I prove that set T is countably infinite? Countable and uncountable sets; rational numbers

Let S be the collection of all non-vertical lines in the 2-dimensional plane $$R^2$$ passing through the origin. We can index the collection $$S$$ using $$R$$ as the index set, as follows.

For each $$i∈R$$, define $$L_i={\{(x,y) ∈ R^2 | y = ix}\}$$ Note that $$i$$ is simply the slope of the line $$L_i$$. We can then write $$S={\{L_i | i∈R}\}$$

1. What is $$⋃_{i∈R} L_i$$ ?
2. Explain why $$S$$ is uncountable.
3. We shall call a line $$L_i∈_S$$ special if at least one point on the line $$L_i$$ other than the origin has rational numbers for both coordinates (i.e., there is at least one point $$(x,y)≠(0,0)$$ on $$L_i$$ such that $$x∈Q$$ and $$y∈Q$$). Let $$T=\{L_i\in S\ |\ L_i\text{ is special}\}$$. Prove that $$T$$ is countably infinite.

$$R$$ denotes set of real numbers and $$Q$$ denotes set of rational numbers.

1. $$⋃_{i∈R} L_i$$ is the union of all the lines with slope $$i \in R$$.
2. $$S$$ is uncountable because the set $$R$$ of real numbers is uncountable since $$S$$ is indexed using $$R$$ as the index set.
3. I am not sure how to prove this. What i have in mind is, since $$T$$ is a special set with a special line that has at least one point with rational numbers for both its coordinates, should I show that $$T$$ is countable because the set of rational numbers $$Q$$ is countable? Please help.

Also are my answers to 1 and 2 correct? I somewhat feel they are but would love to hear from you all.

• The rationals are countably infinite. So if we scatter a representation of rationals around a plane and then require lines to pass through them and the origin, there cannot be more lines than there are rationals.
– Kaz
May 17, 2021 at 15:50
• “$i$” is not a good letter to represent an arbitrary real number.  Did somebody tell you to use that notation? May 17, 2021 at 17:16

1. Your answer doesn't make sense. The set $$\bigcup_{i\in\Bbb R}L_i$$ is a subset of $$\Bbb R^2$$ and you should say which set this is. It's $$\Bbb R^2\setminus\{(0,y)\mid y\in\Bbb R\setminus\{0\}\}$$.
2. By that argument, if $$L_i=\{(0,0)\}$$, then the set $$\{L_i\mid i\in\Bbb R\}$$ would be uncountable too, but, it fact, it consists of a single element. Your set is uncountable because, for each $$i\in\Bbb R$$, $$(1,i)\in L_i$$, but $$(1,i)\notin L_j$$ when $$j\ne i$$. So, when $$i\ne j$$, $$L_i\ne L_j$$, and therefore the map $$i\mapsto L_i$$ is injective. So, since $$\Bbb R$$ is uncountable, the set os all $$L_i$$'s is uncountable too.
3. The set $$T$$ is countable because $$\Bbb Q^2\setminus\{(0,0)\}$$ is countable. So, only countably many lines can contain points of $$\Bbb Q^2\setminus\{(0,0)\}$$.

Yeah, your solutions are (almost) correct. However, the notion of being "indexed" using an index set is not clearly defined. It should be defined as follows:

A set is $$S$$ indexed by $$R$$ if there is a bijective mapping between the index set $$R$$ and the set $$S$$, i.e. for $$i\neq j\in R$$ we have $$L_i\neq L_j\in S$$. The important point is the condition of $$i\neq j$$ implying $$L_i\neq L_j$$ because otherwise, one can just take the set of one line $$\{L\}$$ and assign this line to all real numbers. In that case we have also a mapping $$\mathbb{R} \to \{L\}$$, but that is not bijective and certainly $$\{L\}$$ is not uncountable infinite.

1. It is clear that the union of those lines is the union of all lines, that's basically the definition. Therefore I would argue that $$\bigcup_{i\in\mathbb{R}} L_i = \mathbb{R}^2 \setminus (\{0\} \times \mathbb{R}\setminus \{0\}) = (\mathbb{R}\setminus\{0\} \times \mathbb{R}) \cup \{(0,0)\}$$ as the union of those lines cover almost full $$\mathbb{R}^2$$ and only the $$x$$-axis (without $$(0,0)$$) is not included in that union.
2. See above paragraph about the indexing of those lines.
3. You can answer the third question similar to the second. If there is at least one rational point on a line, that point has a rational slope. Therefore, $$T$$ can be indexed by $$\mathbb{Q}$$ and is indeed countably infinite.
• I disagree with "all fine" for 2. I'm not downvoting because you address this in your remark, but "for $i\ne j$ we have $L_i\ne L_j$" is a crucial piece of the argument and is missing in the OP. May 17, 2021 at 17:53
• Okay, I will make it more clear in the whole answer. For me the meaning of "indexes" is as I described it, so I didn't see any problems with that until José answered May 17, 2021 at 17:55
• I hope it's clearer now May 17, 2021 at 18:02

Regarding 3., you're also right. $$T$$ is infinite countable because $$\mathbb Q$$ is infinite countable and because when a line passing through the origin also passes through a point having both rational coordinates, then the slope of such a line is also rational.
1.Union of such lines gives $$R^2$$ -{Y axis} .(0,0) is included. Since Y- axis is vertical is not included in it. For any other point in $$R^2$$ We can find a line passing through it and origin.
3.A line having rational numbers for both coordinates other than origin say $$(r_1,r_2)$$ will have a rational slope $$\frac{r_1}{r_2}$$. Thus we can create a bijection between rationals and such lines. So they are countable.