 Welcome back. In the last lecture we proved that every real number theta has the continued fraction expansion which we had constructed in a natural way. The proof depended on 4 lemmas which we were proving from the last lemma being proved first, then the second last lemma being proved next and so on. So this is the result that we proved that each real theta has the continued fraction expansion A0, A1, A2 where these were constructed in the last lecture but let me just remind it for you. So here we have that A0 is the integral part of theta. If A0 is not equal to theta then theta is A0 plus 1 upon theta 1 where theta 1 is now bigger than 1 and we defined A1 to be the integral part of theta and this is the way that we continued. So A0, A1, A2 and so on gives us a continued fraction expansion for the real number theta that we begin with. This theorem was proved using 4 lemmas which are here. So the fourth lemma that the sequence Qn goes to infinity this was proved first using the recurrence relation that we have in lemma 1, then we proved lemma 3 which is that theta is sandwiched between any two successive convergence with the even one being before theta and the odd one being after theta. So I had said this in the following way that the convergence or the machine which produces the continued fraction expansion will look at your number and start from the integral part of that number. Then it realizes that it has to travel in the positive direction to reach the number theta. So it starts traveling but by the time it reaches theta it does not is not able to apply the brakes. So it goes a bit further and that is where we get our first P1 upon Q1 the first convergent. The integral part that we had gotten that is the zeroth convergent P0 upon Q0 and then we get P1 upon Q1 which is after theta then the machine realizes that it should turn back. So it turns back and travels towards the negative side of the infinity and then it crosses theta once again and has to stop at some level that is P2 by Q2 and then it again continues traveling. So at each level it comes closer and closer to theta but it keeps jumping towards each of the sides of theta. This is what we have proved in lemma 3 that theta is sandwiched between any two successive convergence the odd one being after theta and the even one being before theta. So after that we should be proving this lemma lemma 2 we had proved lemma 4 and lemma 3 in the last lecture and now we are going to prove lemma 2 and we are going to use this recurrence. So the recurrence says that Pn and Qn are obtained from the previous two pairs Pn minus 1 Qn minus 1 Pn minus 2 Qn minus 2 with the relation being given that the nth one is An times the n minus 1th one plus n minus 2th one that is the convergence that is the recurrence formula that we are going to use. So we look at the LHS which is Pn Qn plus 1 minus Pn plus 1 Qn we write the n plus 1 in terms of n and n minus 1. So this is going to be An plus 1 Qn plus Qn minus 1 this is the formula for Qn and then we write the formula for Pn plus 1 then we observe that this term An plus 1 Qn into Pn is cancelled with An plus 1 Pn into Qn. So we are left with Pn Qn minus 1 minus Pn minus 1 Qn or if we put a negative sign to this then we get it to be we will have Pn minus 1 outside with a positive sign Qn and then Pn Qn minus 1 will have a negative sign. So now this formula is similar to the formula that we have here except that n and n plus 1 are replaced by n minus 1 and n. So we continue this way and we are going to get this to be minus 1 square and this n minus 1 will further become n minus 2 and continuing this way we will reach when we have minus 1 power n. So these dots say that we are going to continue in this way the subscript for P will be such that the subscript plus the power of minus 2 their sum is always n. So this is going to be 0 this one will be 1 added to the subscript of P and then we have P1 Q0. So P0 Q0 P1 and Q1 these are known to us and using that we should be able to compute this relation we have that the LHS is minus 1 power n P0 Q1 minus Q0 P1. Here A0 is P0 and Q0 is 1 remember that the first convergent is the integral part of theta which is an integer and then the denominator has to be 1. We are always writing any rational number in the form P comma Q where P is an integer it can be positive negative or 0. Q is always a rational Q is always a natural number and moreover P and Q have no common factor. We are writing the rational P by Q in the lowest form that is what we have. So Q0 has to be taken to be 1 and then P1 upon Q1 this is A0 plus 1 upon A1 which is A0 A1 plus 1 upon A1 and we observe that here A1 the denominator which is A1 and the numerator A0 A1 plus 1 are co-prime to each other the GCD of A0 A1 plus 1 and A1 this is really the GCD of 1 and A1 and therefore this is 1 whenever we have two numbers A and B if you add multiple of any of those two to the second one the GCD is not going to change. So we have that A0 A1 plus 1 comma A1 is 1 comma A1 which is 1 A1 is positive now because remember A1 was obtained by taking the integral part of theta 1 which was bigger than 1. A1 onwards all the integers are positive A0 can be positive negative or 0 but A1 onwards they are all positive. So A1 is Q1 P1 is A0 A1 plus 1 now we need to put the value here in this formula and obtain the answer P0 Q1 P0 is A0 Q1 is A1 Q0 which is 1 and then we simply subtract P1 P1 is this these two get cancelled you are left with on minus 1 and so ultimately you get it to be minus 1 power n plus 1 which completes the proof because we wanted to prove that this is Pn plus Pn Qn plus 1 minus Pn plus 1 Qn this is really minus 1 power n plus 1. So if your n is odd then minus 1 power n plus 1 will be 1 if n is even then minus 1 power n plus 1 is going to be and odd is going to be minus 1. So this is the proof of lemma 2 which was simply a computation using the recursion recursion that we have already seen in lemma 1. So lemma 1 is really the basis of this proof and lemma 1 is going to be the most delicate thing to be proved this is what we are now going to prove. So we have Pn by Qn to be this particular continued fraction what we do is that we take the continued fraction from A1 onwards. So we consider J prime upon Q J prime to be the rational which is obtained by taking the continued fraction A1 A2 so on up to A J plus 1. Remember when you have n plus 1 terms we should have the subscript n here. So here we need J plus 1 terms to have the subscript J. So here these are the convergence theta 1 and we are going to use induction I will leave the initial stage as an exercise to you but we are going to prove we are going to assume the induction hypothesis which means that we are going to assume that whenever you have instead of n plus 1 whenever you have n terms or less number of terms then the recursion holds. This is what we are going to assume and we prove the result that the recursion holds when there are n plus 1 terms. So we are going to apply it to J plus 1 equal to n that is where we are going to apply induction hypothesis we get P J prime equal to A J P and J minus 1 prime plus P J minus 2 prime and Q J prime equal to A J Q J minus 1 prime plus Q J minus 2 prime. Here we should note that A n was the last integer in the continued fraction expansion for J it is the J plus 1. So we should replace the A J by A J plus 1 in both the expressions for P prime J and Q prime J. This we have for J equal to 1 onwards up to n minus 1 because we are assuming the induction hypothesis so we have it up to n minus 1. Further the continued fraction expansion the continued fraction for P n upon Q n has A 0 and then you have the remaining continued fraction expansion for starting with A 1. So further P n upon Q n is A 0 plus 1 upon P n minus 1 prime upon Q n minus 1 prime which is really A 0 plus Q prime n minus 1 upon P prime n minus 1 and we write this as A 0 P prime n minus 1 plus Q prime n minus 1 upon P prime n minus 1. Here there is nothing specific about n we could have replaced n by any J and the result would still be true. In fact we are going to require the result for a general J later this is true for any J. Now we have this rational number P J upon Q J where P J Q J had ever that property that Q J is a natural number P J can be any integer and most importantly the GCD of P J and Q J is 1. We have written the rational number in this form do the denominator and numerator follow the same property. So P prime J plus 1 J minus 1. Now this P prime J minus 1 is coming from the continued fraction expansion of some number which is positive. Therefore when you write the convergent for the positive number P prime J minus 1 is also a positive number. So P prime J minus 1 here is positive let us note it on the next page. P prime J minus 1 is positive therefore it is natural number and the GCD of A 0 P prime J minus 1 plus Q prime J minus 1 with P prime J minus 1. This is using the property of GCD once again is same as the GCD of P prime J minus 1 and Q prime J minus 1 because this is simply a multiple of P prime J minus 1 and this is 1 because P prime J minus 1 Q prime J minus 1 have the property that their GCD is 1. So we have written this rational number in this form where the denominator is natural number and the GCD of the denominator and numerator is 1. Then we must have P J equal to A 0 P prime J minus 1 plus Q prime J minus 1 and that Q J is P prime J minus 1. So let us once again take a step back and see what we have obtained. We have obtained a formula for P J and Q J in terms of P prime J minus 1 and Q prime J minus 1 and we also know that these P primes and Q prime satisfy the recursion relation because we are now going to apply this for J equal to N and then we will see what happens. So we are now going to put the value for J equal to N in this formula. So we get that P N is A 0 P N minus 1 prime plus Q N minus 1 prime Q N is P N minus 1 prime. Let us look at this Q N more carefully this is going to be something which is very interesting. Once again note that P J and P J prime and Q J prime satisfy the recursion where the A comes with J plus 1. So when I look at the P prime N minus 1 I will have that it comes with A N and we will have N minus 2 prime plus P N minus 3 prime but using this formula once again we see that this is nothing but A N Q N minus 1 plus Q N minus 2. So the formula for Q N the recursion relation for Q N has just come out very easily that is because for Q J we had a very simpler expression in terms of the P prime and P prime by induction assumption satisfies the recursion relation which is here. So you have Q N which you write in terms of P prime which has this recursion relation and then you write these P primes back in terms of Q N and you get our recursion relation for Q N. So the only thing to be proved now is this formula and remember we will need to use this formula. So P N is A naught P N minus 1 prime plus Q N minus 1 prime this is coming from the P J's in terms of P primes and Q primes. So we get that P N is A naught P N minus 1 prime plus Q N minus 1 prime but these primes satisfy the recursion. So let us write it down for each of the P prime and Q prime. This is going to be A N P N minus 2 prime plus P N minus 3 prime plus Q N minus A N Q N minus 2 prime plus Q N minus 3 prime. I will take the multiples of A N on one side that gives me A 0 P N minus 2 prime plus Q N minus 2 prime and the remaining part which is A naught P N minus 3 prime plus Q N minus 3 prime. Now using the recursion that we have obtained here for P in terms of Q and putting so note that the jth P is obtained from j minus 1 P prime and Q prime with the A naught multiplied to P prime. So A naught multiplied to P prime N minus 2th terms will give us P N minus 1 and similarly here we are going to get P N minus 2 which is what we wanted to prove the recursion relation for P this completes the proof. So just to recall the all four lemmas for you once again lemma 1 gave you a recursion relation for P N and Q N in terms of the P N minus 1 P N minus 2 Q N minus 1 Q N minus 2 and the integer A N. Using this we proved that essentially these P N Q N P N plus 1 Q N plus 1 these are in some sense co-prime they if you write them in a 2 by 2 matrix P N Q N P N plus 1 Q N plus 1 you are going to get an invertible matrix because the determinant of this matrix is going to be plus or minus 1. Invertible in the sense the inverse will also have integer entries that was the sense of lemma 2. Lemma 3 told you that theta is sandwiched between any two successive convergence and lemma 4 told you that Q N go to infinity. So once you have that theta is sandwiched between any two successive convergence you will look at the distance between any two successive convergence using lemma 2 we see that the distance is less than or equal to 1 upon Q N Q N plus 1. Therefore, theta is at most 1 upon Q N Q N plus 1 from the nth convergent P N upon Q N and as Q N goes to 0 infinity the 1 upon Q N Q N plus 1 is going to go towards 0 and therefore P N upon Q N converge to the theta. This is how we had the whole proof but in this proof we have proved this very important thing that mod theta minus P N upon Q N is less than or equal to 1 upon Q N Q N plus 1. Let us see what this gives us. It gives us that the convergence satisfy this particular property theta minus P by Q is less than 1 upon Q square. Let us see a quick proof of this. We have already noticed that theta minus P N by Q N is less than or equal to 1 upon Q N Q N plus 1 but Q N is strictly less than Q N plus 1 and therefore this quantity is less than 1 upon Q N square. So, our convergence satisfy the property that there are good approximations to theta. So, we have proved that if you take a real theta you have a continued fraction expansion for this real theta. You take the expansion cut it at nth stage we get rational numbers we call them convergence. These convergence converge to theta they give you a sequence of rational numbers converging to theta but this result says that these convergence are good approximations to theta in the sense that the distance from theta to P by Q is not more than 1 upon Q square. So, these are good approximations to theta we will in fact later see that these are the best approximations to theta. We will have some small condition and say that if you have any rational satisfying such an inequality and I am saying such an inequality. So, I am not saying the exactly this inequality we are going to add something more to the denominator here. So, any rational satisfying such an inequality is in fact a convergent to theta. So, we are what we have proved once again to recall is that convergence give you good approximations to theta but we will prove that these are the best approximations to theta. So, this will be proved in the later lectures see you then thank you very much.