MAT 338 Day 25

1147 days ago by pub

First up: X's presentation!

Next: questions about homework.  Were you able to find the Gaussian moats and zoos?

Now: The next two days we will continue looking at the notion of (integer) lattice points on a curve.  It is a question at the heart of modern number theory, so we should at least spend a little more time on it - plus, it has such nice pictures!  It turns out it will have a surprising connection to calculus and group theory too.

var('x,y') @interact def _(viewsize=15): plot1=plot3d(sqrt(x^2+y^2),(x,-viewsize,viewsize),(y,-viewsize,viewsize)) 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+coords[1]^2==coords[2]^2)] plot_lattice_pts = point3d(lattice_pts, rgbcolor = (1,0,0),pointsize=20) show(plot1+plot_lattice_pts) 
       

Click to the left again to hide and once more to show the dynamic interactive window

In the graphic above, the red dots are the integer lattice points (in 3-D!) on the surface generated by z=\sqrt{x^2+y^2}.  That is, every red dot which is not on x=0 or y=0 represents a Pythagorean triple x^2+y^2=z^2!  As you can see, there are not too many of them for z<15, which makes sense because we already have proved Theorem 11.3 on how to generate primitive triples!  In fact, the only ones are the variants on (3,4,5), (6,8,10), (9,12,15) (all the same in some sense) and (5,12,13), which you will notice is not on the same diagonal as the others.

We we are going to do is to try to make our way to finding integer solutions to some more difficult Diophantine equations, but slowly, using an idea which simplifies Pythagorean triple geometry.  Namely, let's divide the whole Pythagorean thing by z^2:  

\frac{x^2}{z^2}+\frac{y^2}{z^2}=1\Rightarrow \left(\frac{x}{z}\right)^2+\left(\frac{y}{z}\right)^2=1\, .
 Since we can always get any two rational numbers to get a common denominator, what that means is the Pythagorean problem is the same as finding all rational solutions to
a^2+b^2=1\, ,
which seems to be a very different problem.  Let's investigate this.

var('x,y') @interact 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) 
       

Click to the left again to hide and once more to show the dynamic interactive window

The blue line intersects the circle x^2+y^2=1 in the point (1,0) and has rational slope denoted by '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 (1,0) with a line with rational slope.

It is a little harder to show that intersecting such a line with the circle always gives a rational point, but this is also true!  It is also far more useful, as it gives us a technique to find all rational points and hence all Pythagorean triples.  Here are the details:

  • The line with slope t has formula y=t(x-1).
  • The intersections with the circle x^2+y^2=1 are gotten by plugging in y, so:
    x^2+(t(x-1))^2=1\Rightarrow x^2+t^2 x^2-2xt^2+t^2=1
  • This can be completely solved using the quadratic formula to get \frac{t^2\pm 1}{t^2+1} as the answers.
  • Since \frac{t^2+1}{t^2+1}=1 gives the point (1,0) which we already knew, the other point is \frac{t^2-1}{t^2+1}=x.
  • Then y=t\left(\frac{t^2-1}{t^2+1}-1\right)=\frac{-2t}{t^2+1}
  • So every rational slope t gives us the point \left(\frac{t^2-1}{t^2+1},\frac{-2t}{t^2+1}\right).

Even the inputs t=0 and t=\infty have an appropriate interpretation in this framework, believe it or not.  Such a description of the (rational) points of the circle is called a parametrization.  Plug in various t and see what you get!

Note that the book started with (-1,0), and also got a parametrization - in fact, a slightly different one.  Will this always work?  Here is an amazing fact we will not prove.

Fact: If you have a quadratic equation with rational coefficients with at least one rational point, then you can get all others by intersecting all lines with rational slope through that point on the curve.

var('x,y') @interact def _(slope=-1/2,f=x^2+3*y^2-1): f(x,y)=f plot1=implicit_plot(f,(x,-1.5,1.5),(y,-1.5,1.5),plot_points=100) plot2=plot(slope*(x-1),x,-1.5,1.5) show(plot1+plot2+point((1,0),rgbcolor=(0,0,0),pointsize=20),figsize=[-5,5],aspect_ratio=1) 
       

Click to the left again to hide and once more to show the dynamic interactive window

Once again, the line above goes through (1,0) and so has equation y=t(x-1).  The ellipse is x^2+3y^2=1, so that

x^2+3t^2(x-1)^2=1\Rightarrow x^2+3t^2x^2-6t^2x+3t^2-1=0
is the equation we must solve for x to find a parametrization of x in terms of t.  This seems daunting; however, we already know that there is a solution x=1, so that x-1 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 x=1.  Let's do that now!

At the end we should get x=\frac{3t^2-1}{3t^2+1},y=\frac{-2t}{3t^2+1}, which leads to very interesting solutions like \left(\frac{11}{13},\frac{-4}{13}\right).

var('x,y') 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=20) show(plot1+plot_lattice_pts) 
       

And such solutions lead us directly to INTEGER solutions of equations like x^2+3y^2=z^2!  Since x and y have a common denominator, we can just multiply through by the square of that denominator to get a solution to this.  E.g.

11^2+3(-4)^2=13^2
which is rather non-obvious solution, to say the least, and only one of many that this method can help us find.

However, this 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: x^2+y^2=15 has no rational points.

The way to prove this is to correspond this to integer points on x^2+y^2=15z^2.  Every rational point on the first curve looks like (p/q,r/q) for some p,r,q\in\mathbb{Z}, so multiplying through by the common denominator gives us integer points on the second surface.  But now consider the whole thing modulo 4 - what are the possibilities?

var('x,y') 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=20) show(plot1+plot_lattice_pts) 
       

So as we can see there are NO rational points on a circle of radius \sqrt{15} because there are no integer points on the corresponding surface other than ones with x,y=0 - and those correspond to z=0, which would give a zero denominator on the circle.  Here is a place where rational points are helped by integer points instead of vice versa. 

Another one to try is finding rational points on the ellipse 2x^2+3y^2=1, which would correspond to 2x^2+3y^2=z^2.  Here a different technique might help - look at it modulo 3!  In this case it reduces to

2\equiv (zx^{-1})^2\text{ mod }(3)
which is impossible since [0],[1],[2] all square to [0] or [1] in \mathbb{Z}_3.

In any case, our investigation of integer points has led us through rational points back to integer points!  Next time we will look at some remarkable properties that sets of integer points on certain curves have, and whether any such points even exist.  With that in view, let's take any remaining time by trying to find integer points on the following curves:

  • y^3=x^2+2 (sometimes called the Bachet equation)
  • x^2-2y^2=1 (studied by the Greeks, such as Theon of Smyrna, to shed light on \sqrt{2})
  • x^2+2y^2=9

The first one is one of a more general type called the Mordell equation (y^3=x^2+k) and the second is of a type often called Pell's equation.  In the event, Pell did not have anything to do with the latter case, but Mordell had a great deal to do with the former type.  Notice that Mordell's set of curves are not quadratic/conic but rather cubic, which makes them more mysterious (and, as it happens, more useful for cryptography, though we won't really get into that).

var('x,y') @interact def _(k=(2,[-10..10])): viewsize=abs(k)+5 g(x,y)=y^3-x^2 plot1 = implicit_plot(g-k,(x,-viewsize,viewsize),(y,-viewsize,viewsize),plot_points = 100) grid_pts = [[i,j] for i in [-viewsize..viewsize] for j in [-viewsize..viewsize]] plot_grid_pts = points(grid_pts,rgbcolor=(0,0,0),pointsize=2) lattice_pts = [coords for coords in grid_pts if (coords[1]^3-coords[0]^2==k)] if len(lattice_pts)>0: plot_lattice_pts = points(lattice_pts, rgbcolor = (0,0,1),pointsize=20) show(plot1+plot_grid_pts+plot_lattice_pts, figsize = [5,5], xmin = -viewsize, xmax = viewsize, ymin = -viewsize, ymax = viewsize, aspect_ratio=1) else: show(plot1+plot_grid_pts, figsize = [5,5], xmin = -viewsize, xmax = viewsize, ymin = -viewsize, ymax = viewsize, aspect_ratio=1) 
       

Click to the left again to hide and once more to show the dynamic interactive window

Above, a depiction of the Mordell equation; below, Pell's equation.

var('x,y') @interact def _(d=(2,[-10..10])): viewsize=8+abs(d) f=x^2-d*y^2 g(x,y)=f plot1 = implicit_plot(g-1,(-viewsize,viewsize),(-viewsize,viewsize),plot_points = 200) grid_pts = [[i,j] for i in [-viewsize..viewsize] for j in [-viewsize..viewsize]] 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)] if len(lattice_pts)>0: plot_lattice_pts = points(lattice_pts, rgbcolor = (0,0,1),pointsize=20) show(plot1+plot_grid_pts+plot_lattice_pts, figsize = [5,5], xmin = -viewsize, xmax = viewsize, ymin = -viewsize, ymax = viewsize, aspect_ratio=1) else: show(plot1+plot_grid_pts, figsize = [5,5], xmin = -viewsize, xmax = viewsize, ymin = -viewsize, ymax = viewsize, aspect_ratio=1) 
       

Click to the left again to hide and once more to show the dynamic interactive window

The homework, which is now approaching the hand-in homework for Friday:

  1. Read Section 10.3 in the book; the notation S_3 describes the set of integers writeable as a sum of three squares, as S_2 might indicate the set of things writeable as the sum of two squares.  Do Exercises 10.9-10.12.
  2. Find as many integers n as possible which are only writeable as a sum of squares via n=a^2+a^2=2a^2, i.e. n is not writeable as a sum of distinct squares but is writeable as a sum of squares (obviously these will be twice a square, but which ones?).
  3. Prove there are exactly four ways to write any power of two as a sum of squares.  We give this function the name r_2 (n), so for instance r_2(2)=4 because (-1,1),(-1,-1),(1,1),(1,-1) are the four pairs which work, and you are to prove r_2(2^n)=4 for all n.
  4. Pick four random (to you) three digit numbers and decide whether they are a sum of two squares.
  5. Show a positive integer k is the difference of two squares if and only if k\not \equiv 2 mod (4).  (Hint: Our Fermat stuff and why it ends...)
  6. Prove that if n\equiv 12 mod (16), show that n cannot be written as a sum of two squares.
  7. Is there any congruence condition modulo 6 for which a number cannot be written as a sum of two squares?
  8. Check from the Zagier proof that the set S is finite and if (x,y,z) goes to (x,y,z) then it turns out that (x,y,z)=(1,1,\frac{p-1}{4}).
  9. Look for a pattern, similar to the one we found for sums of squares, in primes of the form x^2+3y^2 (no longer a sum of squares, but a sum of a square and three times another square).
  10. Find the equation of the line through the rational points (1,0) and (p,q) on the circle.
  11. Find a parametrization (similar to the ones above) for rational points on the following curves:
    • The ellipse x^2+3y^2=1
    • The parabola x^2=y (note this one might be easier to do without my method!)
    • The hyperbola x^2-2y^2=1
  12. Prove that the Bachet equation cannot have any solutions with x or y even.
  13. Why can the Pell equation (x^2-dy^2=1) not have any solutions if d happens to be a perfect square?