 This lecture is part of Berkeley Math 115, an introductory undergraduate course on number theory, and will be mostly about examples of indefinite binary quadratic forms, ax squared plus bxy plus cy squared. So the last couple of lectures we were looking at examples where the discriminant d, which is b squared minus 4ac, was less than zero, in which case the form is either positive definite or negative definite. This time we're going to be looking at the case when the discriminant d is at least zero, which are either indefinite or degenerate. And we start by recalling that we can make the form reduced. In other words, we make a as small as possible and then make b as small as possible, given a up to equivalence. And we remember that usually for reduced form, we can have b as absolute value less than or equal to a, which is absolute value less than or equal to that of c. This is provided a is not zero. So for positive definite forms in the previous lectures, this condition couldn't turn up, but it's going to turn up this lecture. So we just remind you if a is not zero, then if we've got to form ax squared plus bxy plus something, then we can change x to x plus ny for a suitable y. And this will change b by 2n a. So by doing this, we can make b between minus a and a as long as a is none zero. If a is zero, then doing this doesn't change the value of b. So you remember every form is equivalent to a reduced form, satisfying this condition as long as a is none zero. And so in the case of positive definite forms, we showed there were only a finite number of reduced forms, but we're going to show the same thing for this. So what we do is we notice that b squared is less than or equal to ac because b is less than a and c. That means for ac certainly is absolute value at least that of b squared. And since b squared minus 4ac is greater than or equal to zero, this implies that ac must actually be negative or less than or equal to zero. So this means that b squared plus 4ac is equal to d. So in particular, 4a squared must be less than or equal to d in absolute value. So so you remember for positive definite forms, we had the formula 3a squared is less than or equal to the absolute value of d. This for indefinite forms, we get this slightly stronger condition that 4a squared is less than or equal to d. In any case, this implies there are a finite number of possibilities for a. And this means there are finite number for b assuming a is none zero, as I mentioned before, which means they're only a finite number of reduced forms of given discriminant. So most of the time we have a finiteness theorem for forms. Although this this will actually break down if d is equal to zero, for example, because then a can be zero and other such weird things. So now we want to look at the forms. And you remember the discriminant d must be congruent to zero or one mod four. So for d at least zero, d can be zero, one, four, five, eight, nine and so on. We're going to look at a few of these cases. First of all, d equals zero is kind of degenerate. So if d is zero, this means that if we look at the equation, AX squared plus BX plus C equals zero, this means both roots are rational. And if we look at AX squared plus BXY plus CY squared, this means that factors as something times X plus something times Y or squared times some rational constant. So it's essentially so the form essentially becomes just the square of something linear in X and Y. For instance, if we take five times three X plus four Y or squared, this will have discriminant equal to zero. So there are an infinite number of forms of discriminant zero because I mean, you can just vary this constant here, for example, but somehow they're just not very interesting. You're just asking is some constant times a square equal to some number n, so everything is easy to do. Next, we look at the case d equals one, which isn't quite as degenerate as d equals zero, but is still not terribly interesting. So we had four A squared is going to be less than or equal to d, which is equal to one. So obviously, A must actually be zero. So since B squared minus four AC is now equal to one, this gives us B is equal to plus or minus one. So our form is going to be something like, well, plus or minus X Y plus CY squared. And now we notice we can just change X to X minus C and possibly changing X to minus X if necessary. We can say this is going to be equivalent to the form X, Y. And again, this is not terribly exciting. I mean, solving the equation X, Y equals n is kind of rather easy to do. We can just take X equals one, Y equals n and more generally the solutions will depend on factorization of n. So there's just nothing terribly interesting to say about this case. Incidentally, you've got to be a little bit careful here because this is one of the cases where A is equal to zero. So we don't find that B has absolute value less than that of A. So now let's look at the next case, which is D equals four. And again, this is actually not much better than the case D equals one. So we find four A squared is less than or equal to D, which is equal to four. So A must be zero or plus or minus one. And if we classify, then we get forms like if A is zero, then B is equal to plus or minus two. So we get plus or minus two X, Y plus C times Y squared. We also get A can be plus one in which case we get the form X squared minus Y squared. Or of course we could get minus X squared plus Y squared. And all of these forms kind of factorize. So this is equal to plus or minus Y times two X plus C Y. And this is equal to X minus Y times X plus Y. So like the case D equals one, these have a strong tendency to factorize as a product of two linear forms. In fact, this sort of thing happens whenever D is equal to a square, because then we find the roots of X squared, A X squared plus B X plus C Y are both rational. Because you know that the minus B plus or minus the square root of D over two A. And if D is a square, these are rational numbers. And this means that the form A X squared plus B X Y plus C Y squared is going to split as something times something times X plus something times Y times something else times X plus something else times Y. So it will split us two linear factors with rational or integral coefficients as we could see in these cases here. And again, solving this equation equals N is not terribly interesting. I mean, you just take the prime fact, you just factorize N into two factors and try and equate them with these two and so on. So there's not anything all that interesting you can say when the discriminant is a square. So now we move on to the some more interesting cases. So the two cases when D is not a square going to be D equals five and D equals eight. So we're going to look at these cases in a bit more detail. So let's try D equals five. Let's find the reduced forms A X squared plus B X Y plus C Y squared with D equals B squared minus four AC is equal to five. So we notice that B must be odd and it's reduced. So B is less than A is less than C in absolute value. And we have this equality for A squared is less than or equal to D which is equal to five. So this obviously gives A is equal to zero or plus or minus one. And if A is equal to zero, this doesn't work very well because then we would have B squared is equal to five. So A is equal to plus or minus one. And if we take A equals plus one, then we know B has absolute value at most that of A and must be plus or minus one. So we get forms like X squared plus X Y minus Y squared and X squared minus X Y minus Y squared. And then with with if A is minus one, we get minus X squared plus X Y plus Y squared. And we also get minus X squared minus X Y plus Y squared. And what you notice is that all these forms are actually equivalent. You can just sort of swap X and Y or change X to minus X or something. So that means any form of discriminant D equals five is equivalent to this unique form X squared plus X Y minus Y squared. And now we can work out which primes are represented by this. So we recall that N is represented by some form of discriminant D equals discriminant D. That's relatively represented. If and only if D is a square mod four N. So now let's take N to be a prime, as usual, just to make things a bit simpler. And we find this, the condition is that five is a square mod four P. Well, it's a square mod four. So the only condition we have is that five is a square mod P. And by quadratic reciprocity, this is equivalent to P equals five or P is equivalent to one or four mod five as we saw in previous lectures. So these are the forms which can be written as X squared plus X Y minus Y squared. And we can have a look at a few examples of this. For instance, 11 is of the form one mod five and we can write 11 as three squared plus three times one minus one squared and 19 is another. So 19 is four squared plus four times one minus one squared and so on. So we know exactly which primes can be written as X squared plus X Y minus Y squared. And let's do the case N equals D equals eight. So here again, we want to find the reduced forms. So our form is a X squared plus B X Y plus C Y squared. And we have B squared minus four AC is equal to eight. So we notice immediately that B must be even this time. And we have the equality for a squared is less than or equal to D. And this since D is equal to eight, this gives us a is equal to zero. But we can't have zero of the same reason as before or plus or minus one. So A can only be zero if B squared is equal to D. So this would be the degenerate case when D is a square, which we dismissed as being rather uninteresting. So A is plus or minus one and B is even and has absolute value less than or equal to A. So B must be equal to zero. And so we get X squared minus two Y squared or we get minus X squared plus two Y squared. Well, these forms are in fact equivalent. And if you think about it a moment, you'll see it's not at all obvious that they're equivalent. If you swap X and Y, they don't turn into each other. And if you change the sign of X or Y, they don't turn into each other either. So the equivalence between these two reduced forms is actually a little bit subtle. What you notice is that X squared minus two Y squared is in fact equal to minus X plus two Y squared plus two Y minus X squared. So minus something squared plus two times something squared is the same as something squared minus two times something squared. So this is not really obvious. It's sort of a slightly subtle fact that these two apparently distinct reduced forms turn out to be equivalent. So any form of discriminant D equals minus eight. So D plus eight is equivalent to this. And as before, we can work out which numbers are represented by form of which numbers are primitively represented. So this means that N is primitively represented by X squared minus two Y squared. If and only if eight is a square mod four N. And as usual, we just take N to be a prime. So we want eight to be a square mod P. So eight P is equal to plus one is assuming P is odd. The case P was two. Obviously eight is also a square module of four P. So so we want eight P is plus one. And we remember that this is equivalent to P is congruent to plus or minus one mod eight. So P equals X squared minus two Y squared is solvable for a prime P. If and only if P is equal to two or P is congruent to plus or minus one mod eight. And as usual, we can just look at a few examples of it. For instance, we see that seven is equal to three squared minus two times one squared. Well, we also notice this is also equivalent to minus X squared plus two Y squared. So we should be able to write seven as two times something squared minus something. And we can see we can write seven as two times two squared minus one squared. So that works. And we can do a few more cases like this. So 17 is one mod eight. So we can write this as, well, let me see. It's two times three squared minus one. So that's two times a square minus a square. And it's also five squared minus two times two squared. So it's five minus square minus twice a square and 23. Well, you can do that one for yourself. Should have a warning here. When we looked at numbers being at some of two squares. So if you wanted to solve P is equal to X squared plus Y squared. The solution was essentially unique. I mean, so that's so, for instance, five is equal to one squared plus two squared. We ought to write this as two squared plus one squared or minus two squared plus one squared and so on. But these are all really the same up to changes of sine and switching the order. However, if we're representing a number as an indefinite form, there can be many different ways of doing it. For example, seven is equal to two times two squared minus one squared. But we can also write this two times, let me see, two times four squared. That would be 32. And then we can subtract five squared or we can write it as so the next case is going to be if we add first with seven. If we take two times eight squared minus 11 squared, this will work as well. So there are lots and lots of different ways of writing seven as two times X squared minus Y squared. So we see that there are several complications that come when you do indefinite forms rather than definite forms. So for definite forms, it's easier to tell when two reduced forms are equivalent. So two reduced forms are equivalent only if A is equal to B or A is equal to C, in which case we can the only thing we can do is switch B to minus B. So it's very easy to tell whether two forms are equivalent for indefinite. We can have many non-equivalent reduced forms. It's quite complicated to tell whether reduced forms are the same. Well, actually it's not all that complicated, but it's sufficiently complicated that I'm not going to do it this lecture. There's a method for doing this worked out by Gauss where you sort of arrange the forms in nice cycles. And this allows you to tell when two reduced indefinite forms are equivalent. For definite forms, there are only a finite number of representations. If we want to solve N is equal to AX squared plus BXY plus CY squared. For a fixed value of N, there are only a finite number of values of X and Y. For instance, if we're trying to write N is equal to X squared plus Y squared, obviously X and Y must be at both most the square root of N. For indefinite forms, there are often an infinite number of representations. So we saw examples of this earlier when we were solving things like X squared minus 2Y squared is equal to 1 and we found there were infinitely many solutions of this. So you can ask the question, when are any two forms of the same discriminant equivalent? And for definite forms, as I mentioned last lecture, we've solved this. There are only a few cases of discriminant such that there's only one equivalence class of that form. So you remember the largest one we found was D equals minus 1, 6, 3. Although it's quite difficult to prove there are no more, we do actually know this. For indefinite forms, this is an open problem. So we can ask, are there an infinite number of discriminant D with all forms equivalent? A numerical evidence suggests that there may well be an infinite number. There's also some sort of theoretical evidence for this due to Cohen and Lenstra. So if you want to find out more about this, you can look up the Cohen-Lenstra heuristics on Google or Wikipedia or something. And that they actually have a sort of a conjecture that which actually estimates the number of positive discriminants of forms less than a given number such that any two forms are equivalent. So we suspect there are an infinite number of positive discriminants with a single class of forms, but we don't know how to prove this. So there are some basic open questions about indefinite forms. OK, so far we've been discussing when a prime can be written as a value of a form for simplicity. And you can ask more generally what happens if you try representing an arbitrary number that isn't a prime as such a form. Well, we're going to discuss this next lecture except for simplicity. We're just going to do the form x squared plus y squared in order to illustrate what goes on.