Section 15.6 The Algebraic Story
¶Subsection 15.6.1 Computing the hyperbola
¶Now we can use our geometric intuition to reveal what is happening algebraically here. The algebra is not hard, but a little dense; follow this proof closely.Proposition 15.6.1.
Doubling integer points on the hyperbola x2−2y2=1 yields more integer points.
Proof.
Algebraically, if \(x^2-2y^2=1\text{,}\) then the tangent line at any point \((x_0,y_0)\) other than \((\pm 1,0)\) is given by implicit differentiation to be \(y'=\frac{x_0}{2y_0}\text{.}\) So we start there.
What is the line through \((1,0)\) with that same slope? It's
of course. Let's check where else this intersects the hyperbola, if at all.
Start off with plugging the line into the hyperbola:
This can be simplified and then solved, unbelievably (via the quadratic formula or factoring out \(x-1\)):
Finally, do a slick substitution of the original point:
To recap, given a point \((x_0,y_0)\) we have achieved a new point \((x_0^2+2y_0^2,2x_0 y_0)\text{.}\)
xxxxxxxxxx
def _(x_0=17,y_0=12):
x_1=x_0^2+2*y_0^2
y_1=2*x_0*y_0
pretty_print(html("Initial point was $(%s,%s)$; new point is $(%s,%s)$."%(x_0,y_0,x_1,y_1)))
pretty_print(html(r"And indeed $%s^2-2\cdot%s^2$ equals $%s$"%(x_1,y_1,x_1^2-2*y_1^2)))
xxxxxxxxxx
d=2
var('x,y')
def _(x_0=3,y_0=2,lattice=False,auto_update=False):
g(x,y)=x^2-d*y^2
x_1,y_1=x_0^2+2*y_0^2,2*x_0*y_0
plot1 = implicit_plot(g-1, (x_0-4,x_1+4), (x_0-4,x_1+4),plot_points = 200)
grid_pts = [[i,j] for i in [x_0-4..x_1+4] for j in [x_0-4..x_1+4]]
plot_grid_pts = points(grid_pts, rgbcolor=(0,0,0), pointsize=2)
lattice_pts = [coords for coords in grid_pts if (coords[0]^2-d*coords[1]^2==1)]
plot_lattice_pts = points(lattice_pts, rgbcolor = (0,0,1), pointsize=20)
line1 = plot((x_0/(2*y_0))*(x-x_0)+y_0,x_0-4,x_1+4, color='red')
line2 = plot((x_0/(2*y_0))*(x-1),x_0-4,x_1+4, color='red', linestyle='--')
if lattice:
show(plot1 + plot_grid_pts + plot_lattice_pts + line1 + line2, figsize = [5,5], xmin = x_0-4, xmax = x_1+4, ymin = y_0-4, ymax = y_1+4, aspect_ratio=1)
else:
show(plot1+plot_lattice_pts+line1+line2, figsize = [5,5], xmin = x_0-4, xmax = x_1+4, ymin = y_0-4, ymax = y_1+4, aspect_ratio=1)
pretty_print(html("The new points are $x_1=%s$ and $y_1=%s$"%(x_1,y_1)))
Subsection 15.6.2 Yet more number systems
¶Brahmagupta knew how to do this (see for example Wikipedia). Of course, he did it both without our geometric interpretation (which was only made possible by Descartes and Fermat's introduction of coordinate systems, though at least Fermat when he examined these was not thinking geometrically) and also without the benefit of symbolically representing √2, which provides this alternate description of what we did.Fact 15.6.2.
If (x0,y0) is a solution to x2−2y2=1, then so is (x1,y1) where
Example 15.6.3.
If both (x1,y1) and (x2,y2) are solutions of x2−2y2=1, then so is
If you apply this to two points opposite each other on the same branch of the hyperbola, such as (3,2) and (3,−2), you will get
In this sense, if we treat (1,0) as an identity element in the sense of group identity, then (3,−2) may be considered the additive inverse of (3,2).
xxxxxxxxxx
layout=[['x_0','y_0'],['x_1','y_1'], ['auto_update']]) (
def _(x_0=3,y_0=2,x_1=17,y_1=12,auto_update=False):
if x_0 != x_1:
x_3,y_3=x_1*x_0+2*y_1*y_0,x_1*y_0+y_1*x_0
pretty_print(html("Initial points were $(%s,%s)$ and $(%s,%s)$; new point is $(%s,%s)$."%(x_0,y_0,x_1,y_1,x_3,y_3)))
pretty_print(html(r"And indeed $%s^2-2\cdot%s^2$ equals $%s$"%(x_3,y_3,x_3^2-2*y_3^2)))
elif y_0==y_1:
x_3,y_3=x_0^2+2*y_0^2,2*x_0*y_0
pretty_print(html("Initial points were $(%s,%s)$ and $(%s,%s)$; new point is $(%s,%s)$."%(x_0,y_0,x_1,y_1,x_3,y_3)))
pretty_print(html(r"And indeed $%s^2-2\cdot%s^2$ equals $%s$"%(x_3,y_3,x_3^2-2*y_3^2)))
else:
print("Input correct numbers!")
xxxxxxxxxx
def _(x=2,y=1,auto_update=False):
x,y=x*x+3*y*y,x*y+y*x
pretty_print(html(r"$%s^2-3\cdot%s^2=%s$"%(x, y, x^2-3*y^2)))
pretty_print(html("New point is $(%s,%s)$"%(x, y)))
Subsection 15.6.3 The general solution (any n)
¶The general solution, given two points (x1,y1) and (x2,y2), would be, for n>0 and not a perfect square,Fact 15.6.4.
Proof.
See Exercise 15.7.17.
Question 15.6.5.
Find nontrivial solutions to these equations:
x2−61y2=1.
x2−109y2=1.
Fermat knew that the smallest solution to the second one is
which we can check below. The great mathematician André Weil [C.5.8, II.XIII] finds that Fermat's comment to his counterparts that the numbers \(61\) and \(109\) were ones selected to not give too much trouble was ‘mischievously’ said; do you agree?
xxxxxxxxxx
158070671986249^2-109*15140424455100^2