Are rational points dense on every circle in the coordinate plane?

First thing first I know that rational points are dense on the unit circle. However, I am not so sure how to show that rational points are not dense on every circle.

How would one come about answering this. Any hits are appreciate it.

Matt Samuel
  • 56,018
  • 11
  • 66
  • 101
  • 871
  • 3
  • 14
  • 31
  • 1
    followup: what are the possible closures of the set of rational points on a circle in the coordinate plane? – Holden Lee Oct 23 '18 at 19:10
  • If the center of the circle is on a rational point it's all of the circle or nothing. Please ask a new question for a fuller answer. – Oscar Lanzi Oct 23 '18 at 20:06
  • 6
    @HoldenLee Once three points on the circle are rational, the centre is also rational, hence there is a rational affine transformation of the circle to the unit circle at the origin, hence rational points are dense on the circle. Thus, the only possibilities are: (1) the whole circle, (2) two rational points, (3) one rational point, (4) the empty set. – Emil Jeřábek Oct 24 '18 at 15:20

5 Answers5


They're not. No two different circles centered at the origin contain any of the same points. There are uncountably many circles (specifically, one for each real number, corresponding to the radius) , so most circles contain no rational points at all.

We can find some more specific examples. Specifically, any rational point $(a, b)$ on a circle of radius $r$ centered at the origin satisfies $a^2+b^2=r^2$. In particular, $r^2$ must be rational. There are also radii whose squares are rational where there are no rational points. Clearing denominators, say multiplying by some $c^2$ to do so, we have that $c^2r^2$ is a sum of two squares. If $r^2$ is an integer, then $r^2$ must be a sum of two squares, since an integer is a sum of two squares if and only if its prime factorization doesn't contain an odd power of a prime congruent to $3$ mod $4$. $r^2$ was arbitrary, so if we choose it not to be a sum of two squares we get circles with no rational points.

Matt Samuel
  • 56,018
  • 11
  • 66
  • 101
  • 9
    For example, the circle with center at the origin and radius $\pi$ has no rational points. Replace $\pi$ with any number whose square is irrational. – GEdgar Oct 23 '18 at 00:38
  • 5
    I had to read this six times before it hit me. Amazing. – Randall Oct 23 '18 at 00:42
  • 3
    @Randall For me it would have been slightly more obvious if the answer had pointed out that there are uncountably many different radii. – kasperd Oct 23 '18 at 11:47
  • @kasperd I didn't realize y that wasn't obvious. I can include it. – Matt Samuel Oct 23 '18 at 11:48
  • 3
    That first paragraph brought joy to my morning. Thank you. – John Hughes Oct 23 '18 at 12:29
  • 1
    Awesome argument. Thanks. –  Oct 23 '18 at 14:14
  • One of the nicest, most elegant answers I recall here, like a beatifully smithed sledgehammer driving it in with style. One thing: could you address the case of circles with *some* rationals on them that are not dense? If you could add that, it would round the answer up nicely for me. – AnoE Oct 24 '18 at 13:13
  • 4
    I can't follow your argument in the second paragraph. Suppose I claim I have a function that for each rational $r$ will give you a rational point on the circle with radius $\sqrt r$. You then clear the denominators of each of my rational points -- but this gives you _new_ $r$s, and it is not clear to me how you can assume that all integers would be represented in the set of new $r^2$s. – hmakholm left over Monica Oct 24 '18 at 13:32
  • @Henning I don't understand your concern or why it matters. Perhaps you could explain further. – Matt Samuel Oct 24 '18 at 16:45
  • 2
    @MattSamuel: I suppose it doesn't matter that much whether I, personally, understand your argument. I'm (arrogantly) assuming that if I can't understand it, then perhaps others won't understand it too, and _that_ might matter for you. – hmakholm left over Monica Oct 24 '18 at 16:49
  • 2
    @Henning You misunderstood. I didn't mean whether your concern matters, I'm happy to assist you in understanding. I meant how what I understood of what you said matters to the argument. – Matt Samuel Oct 24 '18 at 16:51
  • 2
    @MattSamuel: You say "Then $r^2$ must be a sum of two squares, which is not true of all integers". I don't see how it is a problem that it is not true of _all_ integers -- it could be that the new $r^2$ that remains after clearing denominators in among those that _happen to_ be a sum of two squares. – hmakholm left over Monica Oct 24 '18 at 16:52
  • 2
    In other words, who's to say that I cannot always chose my rational $a$ and $b$ cleverly enough that the denominator-cleared $r^2$ is always one of the integers that are sums of two squares? – hmakholm left over Monica Oct 24 '18 at 16:53
  • @Henning $r^2$ will be a sum of two squares no matter how you clear them, as long as you're scaling by a square (which you have to do to preserve the rationality of the square roots). I guess it may be clearer to say that $r^2$ must be a rational number that is a sum of two squares, and when you scale it by a square it always remains so. So you don't need to be clever in your choice, if $a$ and $b$ exist then when you clear denominators it's a sum of two squares. If it isn't there can be no such $a$ and $b$. – Matt Samuel Oct 24 '18 at 17:02
  • 3
    No, that still doesn't sound convincing me -- but it is very hard to speak clearly about because you're using the same letters $r,a,b$ to denote the quantities both before and after you clear denominators. – hmakholm left over Monica Oct 24 '18 at 17:07
  • Trivially, if $r$ is rational, then $r^2 = r^2 + 0^2$ gives a rational point on the circle. – Mees de Vries Oct 24 '18 at 17:10
  • 3
    You're saying you can give me an $r^2$ that is not a sum of two squares. I can't see how the argument you present shows that, because the $r^2$ you give me can become a different number if I pick $a$ and $b$ with large denominators, such that after clearing denominators you have to establish that a completely different $r^2$ (which I / the adversary can control through our picks of $a$ and $b$) is not a sum of two squares _either_. Just saying that "not all integers are the sum of two squares" doesn't say that we can't avoid those that aren't. – hmakholm left over Monica Oct 24 '18 at 17:10
  • 1
    It would make sense if you were relying on a theorem going something like "if the integer $n$ is not a sum of two (integer) squares, then $m^2n$ is not a sum of two squares either", but such a claim does not seem to be there in your argument. (And I'm not sure whether it is true). – hmakholm left over Monica Oct 24 '18 at 17:16
  • @Henning I see what you mean. It is true though, if you look up the characterization of sums of two squares. It's not trivial. I'll include it later. Thanks. – Matt Samuel Oct 24 '18 at 17:22
  • @Anoe If there is one rational point, then they are dense. I may add that later. – Matt Samuel Oct 24 '18 at 17:31
  • @AnoE The reason is that you can rotate by an angle representing a rational point on the unit circle. – Matt Samuel Oct 24 '18 at 17:34
  • 4
    @MattSamuel: That's for circles with rational centers. If we allow arbitrary centers, then a counting argument similar to your first paragraph shows that there are circles with exactly one rational point, as well as circles with exactly two. (But circles with at least three rational points necessarily have rational centers and therefore their rational points are dense). – hmakholm left over Monica Oct 24 '18 at 19:27
  • 1
    It seems the edited answer is still in conflict with the observation of @MeesdeVries above? – joriki Oct 25 '18 at 05:00
  • Not quite -- the post talks about $r^2$ rational, while my comment is about $r$ rational. If $r$ is rational, then $r^2$ -- with denominator cleared -- can always be written as the sum of two squares, and therefore the argument in the post does not apply. (Note however that it's still possible that $r$ is irrational, $r^2$ is rational and it can be written as the sum of two squares, e.g. $r^2 = 5$; so the answer in the post is more complete.) – Mees de Vries Oct 25 '18 at 08:19

In particular, $x^2+y^2=3$ cannot have any rational points. If it had any such points then there would be integers $a,b,c$ having no common factor such that $(a/c)^2+(b/c)^2=3$ therefore $a^2+b^2=3c^2$. But with no common factor at least one of $a,b,c$ must be odd and all possibilities conforming with this requirement fail $\bmod 4$.

Oscar Lanzi
  • 29,410
  • 2
  • 32
  • 75

For a little more detail to Oscar's answer, the reason we may require that $a,$ $b$, and $c$ are co-prime is that if $$\left(\frac{a}{b}\right)^2 + \left(\frac{c}{d}\right)^2 = 3,$$ we may write $$(ad)^2 + (bc)^2 = 3 (bd)^2.$$ Hence $(ad)^2 = b^2(3 d^2 - c^2),$ so $b^2$ divides $(ad)^2$ and $b$ divides $ad$.

With this, we may write $ad = bk$ and divide the $b^2$ from both sides, getting $$k^2 + c^2 = 3d^2,$$ at which point we may apply Oscar's $\mod 4$ argument.

Also, this example is necessary to flesh out Matt's answer: he ends with

Then $r^2$ must be a sum of two squares, which is not true of all integers.

However, in his setup, we require that $r$ satisfies "$r^2 \in \mathbb{N}$ but $r^2 k^2$ is not a sum of two squares for all $k \in \mathbb{N}$," and it's not clear that such an $r$ exists until you establish an example like $3$.

  • 136
  • 3
  • 1
    Thanks, that addition was really necessary for me. Without it, @OscarLanzi's answer didn't make sense to me. – Waggili Oct 24 '18 at 10:09

When will there be a dense subset of rational points in a circle?

If $x^2+y^2=r^2$ has any rational point, then the rational points in it are dense in it.

More generally, the following are equivalent about a (non-degenerate) circle in $\mathbb R^2:$

  1. The set of rational points on a circle are dense in the circle
  2. The circle has a rational center and a rational point
  3. The circle has three rational points.

I'll outline why $2\implies 1.$ We can assume that the center of your circle is $(0,0).$ Your circle has an equation like:


Since it has a rational point, it also means $r^2$ is rational.

Now, if $(x_1,y_1)$ is your rational point, take any line through that point with a rational slope, $m.$ Then the set of pairs $(x_1+t,y_1+mt)$ will (except when $m$ is the tangent of the circle at $(x_1,y_1)$) hit the circle again. But that yields a rational quadratic equation fo $t$ with a known rational root, $t=0.$ So the other root $t$ is also rational, and the other point is rational.

$3\implies 2$ is because finding the circumcenter of three points is a linear process.

And $1\implies 3$ because $(1)$ means there are infinitely many rational points on the circle, so at least $3.$

Thomas Andrews
  • 164,948
  • 17
  • 196
  • 376
  • Finding the circumcentre is nit a linear process, more like it conserves rationality. Great answer btw! – N.S.JOHN Jan 08 '21 at 04:54

First of all, I want to thank @Hidaw for having answered such an interesting question, which was swirling around in my head some days ago. After reading all the answers to this post with great pleasure, I discovered that Humke and Krajewski completely solved the problem in a very simple and beautiful article on the American Mathematical Monthly in 1979 (a few years before I was born!) called A Characterization of Circles Which Contain Rational Points.

In particular they establish the very relevant result that if the radius $r$ is irrational, but $r^2=p/q$, with $p, q \in \mathbb{Q}$, then the circle $C$ of equation $x^2+y^2=r^2$ contains no rational point if $pq$ is not the sum of two square integers, while $\mathbb{Q}$ is dense on $C$ if $pq$ is the sum of two square integers.

Maurizio Barbato
  • 3,339
  • 10
  • 30