# Proof: Is there a line in the xy plane that goes through only rational coordinates?

Question: Is there a line in the XY plane that has all rational coordinates. Prove your answer.

Idea: There is most certainly not. I believe it can be shown that between any 2 rational points that there is at least one irrational coordinate. Therefore, there can not be a line that contains only rational points. The issue is that I am not sure how to show this. Any ideas? I am also open to any other ideas of how to do this. Thanks.

Note: this is for an intro to proofs study guide. So, I would prefer not to use advanced theorems.

• How do you define a line? – user223391 Dec 12 '15 at 18:53
• If you have covered cardinalities, then the following simple argument suggests itself. A line has uncountably many points, but there are only countably many points with rational coordinates on the entire plane! – Jyrki Lahtonen Dec 12 '15 at 18:56
• @JyrkiLahtonen We have. That is a very good argument. – Alex Dec 12 '15 at 18:59

## 4 Answers

Two proofs.

First one based on cardinality. A line has the cardinality of the continuum like $\mathbb R$, while $\mathbb Q$ is countable.

Second one. A line has an equation $ax+by+c=0$ with $(a,b) \neq (0,0)$. If $a \neq 0$ then $(-\frac{b \pi +c}{a},\pi)$ belongs to the line and the second coordinate of that point is not rational. While if $a=0$, $(\pi,-\frac{c}{b})$ belongs to the line (thanks to immibis comment).

• (and if $a = 0$ then ($\pi$, $-\frac cb$) belongs to the line) – user253751 Dec 13 '15 at 4:17
• So many good answers, but i think i like this one the best. – Alex Dec 13 '15 at 23:50
• What about only irrational coordinates? – Sigur May 21 at 17:05

Unless the line is vertical you could always pick an irrational $x$ (and consider the point $(x,y)$, on the line, which does not have all rational coordinates, regardless of whether $y$ happens to be rational or irrational). If the line is vertical, then you could pick any irrational $y$ and consider the point $(x,y)$. Assuming you work with straight lines. (Also, assuming you know that irrational numbers exist, e.g. $\sqrt{2}$, as from other comments and answers this seems to be part of your question. So, again, stated differently, if the line is not vertical then $(\sqrt{2},y)$ is on the line for some $y$ and $\sqrt{2}$ is irrational. If the line is vertical, then $(x,\sqrt{2})$ is on the line for some (unique) $x$, and this time the second coordinate is $\sqrt{2}$, irrational. It is also true that there are infinitely many points like that on the line, e.g. using $\frac pq\sqrt{2}$ or $\frac pq\pi$ and $\frac pq e$ in place of $\sqrt2$, they are all irrational whenever $\frac pq$ is rational, and many more, they form a dense set and you seem to make a comment related to that, but for the purposes of answering your question, just one point with (at least) one irrational coordinate suffices.)

• Indeed. Every line has all the coordinates. This is basically asking for a proof for the existence of real numbers which are not rational, just formulating the question in an obscure way. – Tgr Dec 12 '15 at 23:29
• @Tgr you are right, I sensed that in the discussion (in other comments and answers) eventually, though it seems hard to understand that someone would not immediately think of say $\sqrt{2}$ which is known to be irrational since at least the time of the Pythagoreans. As you note, just one irrational would suffice (even if the OP seems to also hint about the density of the irrationals). – Mirko Dec 12 '15 at 23:37

By a line, I take it to mean a the set of points satisfying $y=mx+b$.

If $b$ is irrational then let $x=0$. Assume $b$ is rational. If $m$ is irrational let $x=1$. Assume $m$ is rational. Let $x$ be your favorite irrational number.

Well no.

We can nitpick. Is it assumed your plane is the usual two dimension $\mathbb R \times \mathbb R$ plane? We can argue that if your "universe" is just the rational numbers then $\mathbb Q \times \mathbb Q$ is also a plane but this "universe" is defined to only have rationals so lines will only have rational coordinates.

But that's me being pedantic and trying to intimidate.

If your "universe" is the real numbers then:

In general a line has the formula $y = mx + b$ (there is one type of exception). And we know irrational numbers exists. So for an irrational $z$ the point $(z, mz + b)$ exist and this is not a rational coordinate as $z$ is not rational.

The exception is vertical lines. These are of the form $x = c$. But these lines pass through every value of $y$. (Actually, all non-horizontal lines pass through all values of $y$ too. Vertical lines pass through all $y$, horizontal lines pass through all $x$, and all other lines pass through all $x$ and all $y$). So this will have the point $(c, z)$ which is not a rational coordinate.

• hmm, does $\sqrt2$ exist? Yes, if you think of it as the length of the hypotenuse, no if you think of it as a Dedekind cut and are unwilling to work with infinite sets or rationals. Perhaps there are only rational numbers after all (and only those that are small enough to fit inside our computers :) – Mirko Dec 13 '15 at 0:59
• If irrationals do not exist than we are not in R x R and all bets are off. – fleablood Dec 13 '15 at 1:01
• the question does not specify $\mathbb R$, just says $XY$ plane, doesn't say what $X$ and $Y$ range over ... so it might be the rational plane after all :) – Mirko Dec 13 '15 at 1:04
• I did discuss that in my post. – fleablood Dec 13 '15 at 1:06