Section 15.1 Rational Points on Conics
Subsection 15.1.1 Rational points on the circle
Remember that in Section 3.4 we thought of Pythagorean triples as solutions toxxxxxxxxxx
var('x,y')
def _(slope=-2/3):
plot1=implicit_plot(x^2+y^2-1, (x,-1.5,1.5), (y,-1.5,1.5), plot_points=100)
plot2=plot(slope*(x-1),x,-1.5,1.5)
plot3=point(((slope^2-1)/(slope^2+1), -2*slope/(slope^2+1)), rgbcolor=(1,0,1), pointsize=20)
show(plot1+plot2+plot3 + point((1,0), rgbcolor=(0,0,0), pointsize=20), figsize=[5,5], aspect_ratio=1)
slope
. If you change the variable slope
, then the line will change.
It is not a hard exercise to see that the line through two rational points on a curve will have rational slope, nor what its formula is, so that every rational point on the circle is gotten by intersecting 
Fact 15.1.2.
All lines with rational slope through
Proof.
In fact, we can do even better than prove this; we can get a formula for the points.
First, any line with slope \(t\) has formula \(y=t(x-1)\text{.}\) We can then obtain all intersections with the circle \(x^2+y^2=1\) by plugging in \(y\text{,}\) so:
We will skip the algebra (see Exercise 15.7.1) showing that the quadratic formula yields the two answers \(\frac{t^2\pm 1}{t^2+1}\text{.}\)
Note that \(\frac{t^2+1}{t^2+1}=1\) gives the point \((1,0)\) which we already knew. The other, new, point is \(\frac{t^2-1}{t^2+1}=x\text{;}\) plugging this in gives \(y=t\left(\frac{t^2-1}{t^2+1}-1\right)=\frac{-2t}{t^2+1}\text{.}\) In summary, every rational slope \(t\) gives us the point \(\left(\frac{t^2-1}{t^2+1},\frac{-2t}{t^2+1}\right)\text{.}\)
Remark 15.1.3.
You could start the whole process with
Subsection 15.1.2 Parametrization in general
But will this always work? Certainly not every curve gets rational points by intersecting rational slope lines with it.Example 15.1.4.
Consider the curve given by
which clearly will have irrational
Fact 15.1.5.
Suppose you have a curve given by a quadratic equation with rational coefficients which contains at least one rational point. Then all lines with rational slope (including vertical 1 lines) through that point on the curve intersect the curve in only rational points, and all rational points on the curve are generated in this way.
Example 15.1.6.
Here's an example with
As in the proof of Fact 15.1.2, the line going through
for

Solving this equation seems daunting. Here are two strategies (see Exercise 15.7.2 to try them).
We already know that there is a solution
so that must be a factor of the expression! So we could factor it out if we wished.Alternately, we could use the quadratic formula and discard the solution
In either case you should get
Now you can find all kinds of interesting solutions like
xxxxxxxxxx
var('x,y')
def _(viewsize=15):
plot1=plot3d(sqrt(x^2+3*y^2), (x,-viewsize,viewsize), (y,-viewsize/2,viewsize/2))
grid_pts = [[i,j,k] for i in [-viewsize..viewsize] for j in [-viewsize..viewsize] for k in [0..viewsize]]
lattice_pts = [coords for coords in grid_pts if (coords[0]^2+3*coords[1]^2==coords[2]^2)]
plot_lattice_pts = point3d(lattice_pts, rgbcolor = (1,0,0),pointsize=40)
show(plot1+plot_lattice_pts)
Subsection 15.1.3 When curves don't have rational points
However, the rational slope method does not always work. Namely, you need at least one rational point to start off with! And what if there isn't one that exists? It turns out that Diophantus already knew of some such curves.Fact 15.1.8.
The circle
Proof.
First, note this is a much stronger statement than what we already know, which is that this curve has no integer points (see Fact 13.1.1). The way to prove this is to correspond this to integer points on the surface \(x^2+y^2=15z^2\text{.}\)
Every rational point on the circle can be written using a common denominator as \((p/q,r/q)\) for some \(p,r,q\in\mathbb{Z}\text{,}\) where \(\gcd(p,q)=1=\gcd(r,q)\text{.}\) Then simply multiplying through by \(q\) gives integer points \((x,y,z)=(p,r,q)\) on the surface. (This isn't a one-to-one correspondence, as the surface point \((0,0,0)\) shows.)
But now consider the whole equation \(p^2+r^2=15q^2\) modulo \(4\text{.}\) The reader should definitely check that there are no legitimate possibilities! (See Exercise 15.7.5; don't forget that the rational points are written in lowest terms.)
xxxxxxxxxx
var('x,y')
def _(viewsize=15):
plot1=plot3d(sqrt(x^2+y^2)/sqrt(15), (x,0,viewsize), (y,0,viewsize))
grid_pts = [[i,j,k] for i in [0..viewsize] for j in [0..viewsize] for k in [0..3*viewsize]]
lattice_pts = [coords for coords in grid_pts if (coords[0]^2+coords[1]^2==15*coords[2]^2)]
plot_lattice_pts = point3d(lattice_pts, rgbcolor = (1,0,0),pointsize=40)
show(plot1+plot_lattice_pts)
Example 15.1.9.
Try to find rational points on the ellipse
A rational point would correspond to integer points on \(2x^2+3y^2=z^2\text{.}\) You can try looking at it modulo four, but that goes nowhere. Instead, given the three as a coefficient, look at it modulo 3!
In this case it reduces to
This is impossible since \([0],[1],[2]\) all square to \([0]\) or \([1]\) in \(\mathbb{Z}_3\text{.}\)