Section 3.2 Geometry of Equations
But just proving things are true and using them isnโt enough. Why is the theorem true, intuitively? I believe the right way to approach this is with geometry, as in the following figure. Then try out the interactive cell below to see how things change with different coefficients.
Solutions to with
xxxxxxxxxx
def _(a=slider(-10,10,1,6),b=slider(-10,10,1,4), c=slider(-20,20,1,2),viewsize=slider(3,20,1,5)):
p = plot(-(a/b)*x+c/b,-viewsize,viewsize, plot_points=200)
lattice_pts=[[i,j] for i in [-viewsize..viewsize] for j in [-viewsize..viewsize]]
plot_lattice_pts = points(lattice_pts,rgbcolor=(0,0,0), pointsize=2)
if mod(c,gcd(a,b))==0:
line_pts = [coords for coords in lattice_pts if a*coords[0]+b*coords[1]==c]
if line_pts==[]:
plot_line_pts = Graphics()
else:
plot_line_pts = points(line_pts,rgbcolor=(0,0,1), pointsize=20)
pretty_print(html("Showing solutions to $%sx+%sy=%s$ in this viewing window"%(str(a),str(b),str(c))))
show(p+plot_lattice_pts+plot_line_pts, figsize=[5,5], xmin=-viewsize,xmax=viewsize, ymin=-viewsize,ymax=viewsize)
else:
pretty_print(html("The gcd of $%s$ and $%s$ is $%s$, which does not divide $%s$,"%(str(a),str(b),str(gcd(a,b)),str(c))))
pretty_print(html("so no solutions to $%sx+%sy=%s$"%(str(a),str(b),str(c))))
show(p+plot_lattice_pts, figsize=[5,5],xmin=-viewsize,xmax=viewsize, ymin=-viewsize,ymax=viewsize)
The little gray dots in the graphic above are called the integer lattice; this is the collection of all the intersections of the lines for all integers There are many mathematical lattices (many quite intimately connected to number theory), but we will focus on this one in this text.
In the graphic, for instance is probably visible; on the other hand, the point should not have a little dot, because it doesnโt have integer values.
This is a good occasion to remind the reader of some familiar terms and notation.
Definition 3.2.3.
We consider any ratio of integers with to be a rational number, with equivalent ratios such as identified as in school mathematics. The set of all rationals is denoted If a (real, ) number is not writeable in these terms, it is called an irrational number.
โ3โ
That this is meaningful can be made rigorous using equivalence classes, as we will do with modular arithmetic in Proposition 4.3.2, but that is outside the scope of this course.
To return to the lattice, since may be thought of as a line (in fact, the line
with slope ), we now have a completely different interpretation of the most basic number theory question there is, the linear Diophantine equation. It is simply asking, โWhen (for what combinations) does the line hit this lattice? If it does, can you tell me all intersections?โ If you play around with the sliders you will quickly see that things work out just as promised in the theorems.
But letโs go a little deeper. There are three interesting insights we can get.
- First, Theorem 3.1.2 now expresses a very mysterious geometric idea, depending on whetherIf so, then this line hits lots of the lattice points; if not, the line somehow slides between every single one of them! You can check this by keeping
the same and varying in the interact above. -
Secondly, it makes the proof of why Theorem 3.1.2 gets all of the answers much clearer. If you have one answer (for instance,
) and go right by the run and down by the rise in (our example was ), you hit another solution (perhaps here ) since itโs still all integers and the slope was the lineโs slope.But wait, couldnโt there be points in between? Sure. So make into lowest terms (e.g. ), which would be And this is the โsmallestโ rise over run that works to keep you on the line and keep you on integer points. - Third, it can help clarify the role of the solution which the Bezout identity (extended Euclidean algorithm) gives for
Namely, as pointed out in in a 2013 American Mathematical Monthly article by S. A. Rankin [E.7.21], the โsolution provided โฆ lies nearest to the origin.โ Try the interactive cell at the beginning of this subsection to convince yourself of this!
Although we wonโt pursue it, there is a question which this formulation in an online text brings up. Namely, given that the โlineโs in question are themselves only pixellated approximations whose coordinates may not satisfy what is the connection between the computer graphics and the number theory? See How to Guard an Art Gallery [E.6.7], Chapter 4, for an accessible take on this from a number-theoretic viewpoint, as well as Exercise 3.6.23.
โ4โ
As well as several other topics in this text! But youโll have to read it to find out which ones.