 Welcome back, we are into the final leg of our course, only a few lectures remain now. What we have done in our last lecture is that we described all the real numbers which are expressed by a continued fraction which is ultimately periodic. We actually proved this very interesting result that these are nothing but quadratic irrationals. What are quadratic irrationals? Quadratic irrationals are these numbers which are solutions to ax square plus bx plus c equal to 0 or which are also called the zeros of this degree 2 polynomial. Here we have that abc are allowed to be any integers but there is a small condition that b square minus 4 ac has to be a natural number. This is because we want all these roots the zeros to be real numbers and further we also demand that this b square minus 4 ac b not a square because we are looking at the numbers which are irrational, the numbers which are not rational numbers. We have also noted that all these numbers can be written in the form x plus y root m where x and y are rational but y is non-zero because we are looking at the numbers which are not the rational numbers. If y is 0 then any such number equals x which will then be a rational number. So, we are looking at all these type of numbers and we proved that they are nothing but the ultimately periodic continued fractions where ultimately periodic is defined in this slide. It means that after a stage the partial quotients keep repeating periodically. That means after this capital N some there is some capital N such that after this capital N you have a capital N plus 1 a capital N plus 2 dot dot dot a capital N plus m and that a capital N plus m happens to be the same as a capital N and so on. So, the next ones keep repeating. So, this finite sequence of partial quotients is the sequence that keeps coming there periodically. This is what we mean by saying that it is an ultimately periodic continued fraction. So, there is this word ultimately that is because the periodicity has started after some stage. If you remember we did the continued fraction expansion for root 2 in the last lecture and we noticed that it was 1 comma 2222. So, the first integer a0 the first partial quotient that we had obtained was 1. So, we leave the a0 but from a1 onwards we had periodicity and that period was 1. So, every integer that you obtain after that every partial quotient was just equal to a1 which was 2. So, we had 1 22222. So, there the period the m is 1 and your capital N is also 1. The 0th one is not part of that periodically repeating state of partial quotients that is what we had. But it may happen sometimes that your periodicity starts on the nose. If you look at 1 plus root 2 remember root 2 was 1 comma 2 bar the 2 was getting repeated. Therefore, if you add 1 to root 2 now the integral part of 1 plus root 2 is going to be 2 and then you have 2222. So, you are you have the periodicity right from the word go you are you have the periodicity on the nose and then these are somewhat special periodic these are somewhat special periodic continued fractions and one may wonder whether you can describe these also in some certain way are these of some special form and indeed that is true. These are what are called purely periodic continued fraction expansions and there is this very nice result that a real theta has a purely periodic continued fraction expansion if and only if there are 2 conditions condition 1 says that your number has to be bigger than 1. So, the number theta has to be bigger than 1 if the theta has to have a purely periodic continued fraction expansion it should be bigger than 1 and minus 1 less than theta prime less than 0 where theta prime is the conjugate of theta. So, let us understand this result first we are saying that we have this theta whose continued fraction expansion is purely periodic that means it is starting from the word go from a 0 we have the periodicity. So, a 0 has to be equal to one of the a n's appearing later and therefore a 0 has to be a positive number a 0 cannot be negative and a 0 cannot be 0. So, a 0 has to be 1 or more. So, this condition that theta has to be bigger than 1 that is very easy to see the second condition is that the conjugate now what is a conjugate we have that our theta if it has a purely periodic continued fraction expansion it has an ultimately periodic continued fraction expansion it just happens that the periodicity starts from the word go. So, this theta satisfies the condition in the previous result and therefore this theta has to be a quadratic irrational at least that much we have beyond quadratic rational this theorem does not make sense. So, theta has to be a quadratic irrational therefore the theta should satisfy a degree to polynomial. So, if theta satisfies say a x square plus b x plus c equal to 0 then we have x minus theta into x minus theta prime equal to this a x square plus b x plus c for some theta prime. This is easy to see and I will not do this in this course. So, we can actually factorize this degree to polynomial over reals where one root is of course theta because theta does satisfy this when you put x equal to theta you are going to get 0. So, one root is theta and then there is one more root theta prime this theta prime is called the conjugate to the theta that we started with. So, if your theta has the form a plus b root d then theta prime is of the form a minus b root d. So, if you know how your theta is written in the form a plus b root d then computing this theta prime is not difficult. But the condition now says that your theta is bigger than 1 and then this theta prime has to be negative number but it cannot be a very large negative number it should be between 0 and minus 1 and it should not be equal to any of these two it is an irrational number. So, of course it will not be equal to any of these two so it should be between minus 1 and 0 this is the condition. So, the condition is that the quadratic irrational that you start with if it is bigger than 1 and it is conjugate theta prime is between minus 1 and 0 then the theta has a continued fraction expansion which is purely periodic and similarly in the converse would say that if you have a purely periodic continued fraction expansion for your theta then theta should satisfy these two conditions. We are not going to prove this theorem in this course but we will use it we would like to see that there are some certain real numbers which have purely periodic continued fraction expansions and whenever we want to have that we need to only check that these two conditions are satisfied. So, we give some examples of such real numbers the numbers root d plus integral part of root d and 1 upon root d minus integral part of root d these are some examples of such real numbers. So, in fact if your theta is root d plus integral part root d then of course theta has to be bigger than 1 here d is not a negative number we are looking at real numbers so we are looking at a plus b root d where d is positive. So, d is of course real therefore this is the when we talk about square root d note that square root actually may mean positive or negative for instance square root of 4 is the number 2 and also the number minus 2. So, let me just take a minute to explain this symbol for you whenever we have a symbol I may have told you initially that the number p by q that is an expression to write some certain number and that expression means that it is particular number which when multiplied by q gives you the number p. So, p by q is that number where when you multiplied by q you get p. So, 1 by 2 is one particular point one particular dot on the real line which lies exactly half way from 0 to 1 and we call that 1 by 2 we are giving the name 1 by 2 to this number because this number has the property that when you multiply that number by 2 you are going to get the answer to be 1. Now ideally whenever we want to write a number in this way there should be a unique number it should not happen that there are if you use some certain way to write denote a number but some another number is also possibly expressed in the same way we would like to try and avoid such situations because if there are such multiple possible numbers which can be written in the same way then it leads to confusion. So, if you talk about root of d then ideally it is the number whose square equals d that is what we mean by root d but there are two such numbers whenever your d is not 0 and let us say we are taking positive because we do not want to go into the realm of complex numbers whenever you take d to be positive let us say if your d is 4 then square root of 4 can be 2 and it can also be minus 2 because both plus and minus 2 have the property that their squares will give you 4. So, when you mean when you write square root of 4 you should actually tell what you mean by this and I am sorry for not having explained this earlier but luckily I realized it now and so I would like to emphasize here that whenever we put a root we always mean the positive number. Note again that d is positive so we are within the real numbers and therefore it is clear what is a positive root and what is a negative root. We do not talk about positivity and negativity when we have the d to be imaginary because that would lead to further complications let us not go into that. So, now our root d is positive by convention this is bigger than 0 and of course we have the integral part of root d since root d is bigger than 0 and if your d happens to be a non-square that would mean that anyway d is an integer and so root d will be 1 or bigger therefore the integral part is also 1 or bigger. So, both these quantities would certainly add up and give you that you have something which is bigger than 0 in fact you have something which is bigger than 1. So, this number theta which is root d plus integral part of root d that is bigger than 1. So, we are done with this now we consider theta prime. So, I told you that if your theta is of the form a plus b root d then the prime the conjugate is a minus b root d. So, here the conjugate would be integral part of root d which is simply an integer minus root d. Now, integral part of any number is less than or equal to that number and if you add 1 to the integral part then you would have gone beyond the number. So, when you remove the integral part from any number what you get is the fractional part and we have noticed that the fractional part can be 0 or it can be something which is less than 1. Here we are taking the negative of the fractional part because we are taking the integral part and remove the number from that root d is our number and we are looking at integral part of root d minus root d. So, here we get some number which is negative of the fractional part. So, it is going to be between minus 1 and 0 and being an irrational number it is not going to be equal to any of these 2. So, we have that your theta prime is negative and it lands between minus 1 to 0. So, the number theta equal to root d plus integral part of root d satisfies both these definitions. So, it has to be a purely periodic continued fraction expansion. We will remember this and we are going to use this that root d plus integral part of root d is always a purely periodic continued fraction expansion. So, we are done with these quadratic rationals and expressing them as continued fractions for the time being. Now, what we are going to do is to consider a little bit of very basic algebraic number theory. This is something that we are going to use in solving the Brahma Gupta equations. So, what we do here is the following we take a square free d square free means that there is no square which divides d earlier we were looking at non square d. So, for instance 8 is a non square d because 8 is not square of any natural number. But 8 is not square free because 4 divides 8. So, when we are writing the corresponding this is called q root d. When we are writing this q root d we will consider only the square free d. The reason being that if I have x plus y root 8 then this can also be written as x plus 2 y root 2. So, the number of elements which are in q root 8 the elements which are in q root 8 are contained in the elements which are in q root 2. And of course, we are allowing rational coefficients x and y are rational. So, if you have a plus b root 2 this is a plus b by 2 root 8. So, we have that this is also contained in q root 8. So, these are the same sets we have defined a set q root d by this way. So, this is our definition it is of the form x plus y root d where x and y are rational numbers. Then it is enough to take the corresponding d to be a square free d. So, we will stick with this particular convention that our d is always a square free d. What can we do with this set? If I take any x 1 plus y 1 root d and add it to another such x 2 plus y 2 root d we will get x 1 plus x 2 plus y 1 plus y 2 root d. So, this set q root d is actually closed with respect to addition if you take addition of any two such numbers in the set then the sum is again in the set. So, q root d is closed under addition there is the 0 which can be written as 0 plus 0 root d. Therefore, this q root d has the additive identity and it also has the additive inverse x plus y root d plus minus x plus minus y root d is going to give you 0 plus 0 root d. So, q root d is a group with respect to addition. You also have the multiplication defined on it. We can write x 1 plus y 1 root d into x 2 plus y 2 root d as we have x 1 x 2 plus y 1 y 2 d plus now the coefficient for root d that is x 1 y 2 plus x 2 y 1 root d because x i are rationals y i are rationals we see that these two numbers are rationals. So, the set is closed under multiplication also you have rational coefficients and you are taking the sum and product and you again have rational coefficients. There is the element 1 which is 1 plus 0 root d. So, you have that there is multiplicative identity. We of course, have the associativity for both addition and multiplication. So, to check whether we have group structure the question that we should ask is whether we can divide by every such x plus y root d and remain in x plus y root d. This is something which is very important. In the very first few lectures we have talked about divisibility in natural numbers and the important thing for us was that whenever you divide a natural by another natural we do not want to go outside the natural numbers we wanted to be in the same set. So, here also we are asking whether we have one particular element of q root d. Another such element and let us assume that the element that we are dividing by is non-zero because we know that we are not going to divide by 0 in and then if you divide by 0 you will not remain in this set you will get something called infinity let us not go into that. Let us remain in our finite world. So, we are dividing by a non-zero number and the question is can you divide by a non-zero number and that is true you can actually divide by a non-zero number and you can you will remain in the set q root d. This is something that we have already seen when we have computed the continued fraction expansion for root 2, root 3 and so on. There were instances when we had 1 by root 3 minus 1 for instance and we needed to multiply both sides by root 3 plus 1, root 3 plus 1 and we obtained some rational combination of 1 and root 3. So, this is indeed true that you can divide by a non-zero element in q root d. So, the set is first of all equipped with addition and multiplication and with respect to addition it is a group with respect to multiplication all the non-zero numbers form a group. There is another way to see this we have this norm map defined on q root d. What does the norm map do? Note that this is nothing but x plus y root d into x minus y root d. If you take the product x plus y root d into x minus y root d we get x square minus d y square which is what we have and the coefficient of root d happens to be x into minus y plus y into x. So, it is xy minus xy and that becomes 0. So, we have that this norm is always a rational number x square minus d y square and if you have x and y non-zero x y is not 0. If you have that the product is non-zero then norm of x plus y root d is also not 0. This is because if you have any rationales giving you zero solution for x square minus d y square that would mean that d is of the form x square by y square and we have taken d to be an integer which is not a square. In fact, we have taken d to be square free. It is not a square and it is not even divisible by any square other than one of course. So, this d cannot be square of some integer it also cannot be square of any rational number. I told you in some of the last lectures that this is going to use the fundamental theorem of arithmetic that if you have a non-square then its square root is not a rational number. So, you are not going to get solutions to x square minus d y square equal to 0 where one of the x and y is non-zero. Of course, if you have y to be 0 you get x square equal to 0 and so x is 0. If x is 0 you get d y square equal to 0 and then y is 0. So, if any one of them is 0 other is also 0 and you have no solutions when none of them is 0 that would mean that the norm x plus y root d is 0 would imply that x is 0 and y is 0 and in fact turning it in the other way if you have that if any of them is non-zero your norm cannot be 0. So, if your x plus y root d is a number where the product is not 0 then 1 upon x plus y root d is nothing but x minus y root d upon norm x plus y root d. We have noticed that this is a rational number of course x square minus d y square and it is not 0. So, you can divide by a rational number you can always divide by rational number and b in the set of rational numbers. So, you will divide by this rational to x you will get a rational you will divide by that to y and you get a rational. So, ultimately this number is again in q root b. So, this tells you that you can always divide by a non-zero element of q root d and remain in the set q root d. This is all encoded in this sentence that the set q root d is actually a field. Just like we have seen the notion of a group there is also the notion of a ring and here we have that there is a notion of a field. Whatever it means it just says that the you can divide by non-zero numbers and of course you can add and subtract and multiply by any number and you will remain in the set q root d. Now, we noticed that any number which is here in q root d suppose it is of the form m plus n root d which is here in q root d this satisfies a polynomial a x square plus b x plus c is satisfies means it is a 0 of or a root of this polynomial a x square plus b x plus c where a b c are integers. This a need not always be equal to 1 because you know for instance we have the element 1 by 2 which is there in the rational numbers. So, it is there in q root d also and the polynomial satisfied by 1 by 2 over integers if you want a b c in integers then the only polynomial satisfied by 1 by 2 is 2 x minus 1 you cannot have a polynomial of the form x minus alpha satisfied by 1 by 2 where alpha is also an integer. Similarly, if you have any higher degree polynomial satisfied by 1 by 2 over integers then the leading coefficient the coefficient of the highest possible degree that cannot be 1 this is something which uses slightly advanced mathematics but that was only for an example. So, what we have is that if you have a number in q root d this number a need not always be 1 but we would like to take numbers where this a is also equal to 1 we call such numbers to be algebraic integers. So, these are the elements plus n root d in q root d that satisfy x square plus b x plus c equal to 0 with b and c being integers. So, for instance if you are looking at rational numbers which satisfy such polynomials it will turn out that those are nothing but integers. So, these algebraic integers we are calling them integers, algebraic integers for the reason that when you consider the field of rational numbers the algebraic integers in rational numbers are the ordinary integers that explains the nomenclature. What happens later is that all these elements form a ring you can add such elements you can subtract 0 is there associativity of course holds in the whole complex numbers. So, we will not keep mentioning it again and again. So, the set of algebraic integers is a group under addition you can multiply by 2 algebraic integers and get an algebraic integer of course the element 1 is there but we have problem when we come to division. Of course 1 and 2 these are algebraic integers because these are ordinary integers but you cannot divide 1 by 2 and get an algebraic integer 1 by 2 is not an integer any algebraic integer which is a rational number has to be an integer. So, you cannot divide by them but you can definitely multiply by them and therefore it is an interesting question to determine all the elements by which you can divide within the set of algebraic integers. These elements are called units and we will see a very nice way using continued fractions to describe the set of all units in a given q root d and it will also lead us to what is known as the Brahmagupta equation. So, this is something that we are going to conclude our course with I hope to see that you will stick until then. Thank you very much.