 Welcome back, we are studying continued fractions, I have introduced a continued fraction in our previous lecture and we also saw that every continued fraction is a rational number whereas a rational number is always a continued fraction and now we are going towards approximating every real number by means of continued fractions but we also want the approximation to be in some sense the best possible approximation. So, let us recall whatever we have been doing. We see this that a continued fraction theta is a rational number and every rational number is a continued fraction, this is something that we have seen. Moreover, every real number is a limit of rational numbers, there is always a sequence of rational numbers converging to any given real number, this is something that we have seen in our previous lectures. Therefore, clearly every real number is going to be a limit of continued fractions, you are going to have several continued fractions going towards a real number theta but we would like to construct this sequence in a natural way given the real number theta that is what we want to do. So, we will obtain a very natural sequence of continued fractions approximating a given real theta and we will also see that this approximation is going to be the best one approximating the real number theta. So, what do you mean by the best? I say here that it will be of good rational approximations. So, good in the sense that whenever there is a real number theta and you have any integer q bigger than 1, then Dirichlet proved for us that we get such an approximation that there are integers p and q with the property that 0 less than small q less than capital Q the capital Q that we have fixed and further mod of q theta minus p is less than or equal to 1 upon capital Q. This is the result that Dirichlet proved and we immediately observed its corollary that for every real theta there is a rational p by q with the property that theta minus p by q is less than 1 upon q square. So, any such rational number will be called a good approximation theta. So, what we are going to do is that the natural sequence that we are going to construct will of course be sequence of good rational approximations, but we will also actually prove that actually will be the best rational approximations. However, this remark will be explained a few lectures later. So, this is something that we are looking forward to in this course and this is something which is also going to be useful in the solution of the Brahmagupta equations. We will see this in our later lectures. So, first of all because we have this result saying that whenever we have a real number theta then there is always a rational p by q satisfying this property or which is the same as satisfying this inequality. If our real number theta happens to be an irrational number then we will prove that there is a sequence of these good rational approximations converging to theta. So, if theta is irrational then fix some q 0 bigger than 1 and integer then by Dirichlet's theorem we get p 0 q 0 integers. Of course, we have this inequality for the integer q 0 which is therefore going to be a positive integer and such that mod q 0 theta minus p 0 is going to be less than 1 upon q 0. So, this is the inequality that we are going to get. This is the construction that we have learnt in our previous lectures that there are these integers p 0 q 0 they are integers but q 0 is a positive integer with the property that this condition holds. But of course, theta is an irrational number since theta is not rational. This is the set capital Q with an extra line with a decoration is the symbol reserved for the set of rational numbers those which are quotients of integers and by the natural numbers. So, since theta is not a rational number we have that this always be bigger than 0 because this quantity can never be 0. If this quantity is 0 it would mean that theta is equal to p 0 upon q 0 but p 0 upon q 0 is a rational number and theta is not a rational number. So, we therefore get that we have this inequality. Now, given this inequality we then find an integer q 1 such that 0 less than 1 upon q 1 less than mod q 0 theta minus p 0. So, we have inserted this 1 upon q 1 between 0 and the modulus q 0 theta minus p 0. Now, this q 1 is an integer and we can apply Dirichlet's theorem once again to the real number theta and the integer q 1 and applying Dirichlet once again we get is pair of integers with of course small q 1 being a positive integer and mod q 1 theta minus p 1. Now, this is less than 1 upon q 1. So, we had seen earlier that our q 0 theta minus p 0 this was less than 1 upon q 0 and we have q 1 with this inequality. So, we are coming further down towards 0 continuing this way we get a sequence p n by q n of rational numbers approximating theta. This is because we have that mod theta minus p n upon q n. Remember this is going to be less than or equal to 1 upon q n capital Q n which is certainly less than 1 upon capital Q n or you may have equality here if you wish. But as q n are increasing we see that q 1 had the property that q 1 is bigger than q 0 because 1 upon q 1 is less than this which is further less than this. So, q 1 has to be bigger than q 0 q 2 will therefore be bigger than q 1 we are obtaining these q i in the same way. So, these 1 upon q n go to 0 and therefore this quantity goes to 0. So, thus p n by q n converge to theta and all these good approximations. So, therefore we have a sequence of good approximations converging to theta here we have of course used that our theta is an irrational number and not a rational number. Therefore, we get this result that there are infinitely many rational numbers giving good approximation to this irrational theta. There are infinitely many rational numbers giving good approximations for an irrational theta. This result however is not true for a rational number. Let us draw our usual square here box to denote that this theorem is complete. So, we note that this result is not true for rational numbers that means that there are not infinitely many rational numbers giving a good approximation to our fixed rational number. In other words, if we have a rational number theta which is a upon b then there are only infinitely many rational numbers p by q satisfying this particular inequality. So, there are only finitely many such rational numbers. Of course, you can get the sequence of these converging to your theta equal to a by b and ultimately the sequence is going to be constant. So, if you wanted to have the weaker statement that there is a sequence of good rational approximations to our theta then that statement obviously holds you will take the constant sequence if you wish. So, there is a sequence of good rational approximations to our theta which is a rational number but it is an ultimately constant sequence because only finitely many rational numbers are going to satisfy this particular inequality. Let us see a very quick proof of this. This is not a very difficult result to prove. So, this mod theta minus p by q this is nothing but a upon b minus p upon q and therefore this is mod a q minus p b upon mod b q and we can assume that when we write theta equal to a upon b we will if theta is negative then we take the sign with a. So, we have that b is a natural number and q is of course a natural number. So, here we have that this is a q minus b p upon b q we can forget the modulus sign in the denominator because we are assuming that b is natural q is always taken to be natural number. So, we have this and assume that this is not 0 because if this is 0 it would mean that theta is p by q and anyway that is just one rational number. So, we start by looking at all the other rational numbers satisfying this inequality if among the other ones there are only finitely many then adding this single one also the set will still remain finite. So, that is what we are going to look at. So, this since this number is not 0 the numerator has to be non-zero and it is now a positive integer because we are putting a mod on that. So, therefore we get that this quantity mod of theta minus p by q this is bigger than or equal to 1 upon b q. So, in any case whenever you have a theta minus p by q for any rational number and theta to be any rational number this quantity this inequality is always true provided that your b a by b is not equal to p by q. Once you take any distinct rational from theta then theta minus p by q is always going to be bigger than or equal to 1 upon b q and if you now also want the theta minus p by q to satisfy this inequality then you would want it to have this inequality 1 upon q square should be bigger than mod theta minus p by q which is anyway bigger than or equal to 1 upon b q. So, we forget the middle part and get the inequality 1 upon q square strictly bigger than 1 upon b q q is a natural number we can just cancel that which gives us that 1 by q is bigger than 1 by b and so q can at best be equal to b less than or equal to b. So, there are only finitely many choices and hence also for p by q because once you have fixed the denominator suppose the denominator is fixed to be big less than or equal to 5 then you are going to approximate your rational number by numbers p by q where q cannot be more than 5. So, q is not allowed to be 6 or more. So, when you have q equal to 1 you have only integers and clearly if you are looking for the distance between theta and p by 1 to be less than 1 upon 1 square because you are fixing q equal to 1 then you are looking at mod of theta minus p to be less than 1. So, at max one integer will be there and then similarly you will look at q equal to 2. So, you are going to look at theta minus p by 2 to be less than 1 by 4. So, again you will perhaps have only one integer in fact if you increase theta now if you put theta equal to 3 if you put q equal to 3 then theta minus p by 3 to be less than 1 by 9 you may perhaps not get any such rational. So, as you are putting a bound on q the denominator the numerators can have any quantity but the as you vary the numerators the distance between any two such successive is 1 by q and so you cannot have more than one such rational with a fixed denominator q giving you a good approximation for your theta. Therefore, once your q is bounded there are only finitely many p by q which are going to give good approximations to theta and hence for any rational number there are only finitely many rational good approximations for the theta. So, this is a dichotomy between rational numbers and irrational numbers and we will soon come to our continued fractions. So, we will now see that if your theta is irrational and we take the continued fraction expansion for theta then it gives a sequence of good rational approximations for theta. But I have not told you how to construct this continued fraction expansion I have not told you how to naturally construct this expansion. So, we are going to do that now we are going to construct a natural continued fraction expansion for our real number theta and once we prove this once we construct this approximation we will eventually have to show that it converges to our number theta. So, here we go we start with any real number theta we start with this real number theta a0 be the greatest integer which is less than or equal to theta. So, it is our floor function the continued fraction should start with an integer if you remember it is a0 plus 1 upon a1 plus 1 upon a2 plus 1 upon a3 and possibly dot dot dot. So, there should be an a0 and this is that a0. So, we are looking at theta we take its integral part call that a0 if theta is negative this integral part has to be negative if theta is positive this integral part can be 0 or positive. If we have that a0 is not equal to theta that would mean that our fractional part is strictly positive. Let me recall the notion of fractional part for you this is nothing but the difference of theta and its integral part and we have seen that this quantity is never equal to 1 or more it can be 0 or something which is less than 1. So, while we know that this is going to be between while we know that this is going to be between closed 0 open 1 but because a0 is not theta we actually have that this part is in the open 0 open 1 because the difference is not 0. So, you now have that theta is an integer plus something which is strictly between 0 and 1 theta is an integer plus 1 upon theta 1 where theta 1 is the reciprocal of our fractional part of theta and therefore now this is strictly bigger than 1. We have observed in the last slide that theta not the fractional part is less than 1 it cannot be in equal to 1. So, we have that this is less than 1 and it is also not 0 therefore 1 upon the fractional part does make sense and we get it to be some number which is bigger than 1. Again let a1 be the integral part of theta 1 and if a1 is not equal to theta 1 then theta 1 is a1 plus 1 upon theta 2 with theta 2 bigger than 1. So, this value of theta 1 can be plugged here to get theta equal to a0 plus 1 upon a1 plus 1 upon theta 2 and we continue this way. We continue this way unless some ai equals theta i. This would happen the case of a rational number thus for an irrational theta we get a sequence integers a0 which is in z a1 a2 and so on a0 a1 a2 and so on with a0 an integer and ai natural number i equal to 1 onwards. So, this way we are actually going to get so this gives a continued fraction expansion a0 plus 1 upon a1 plus 1 upon a2 plus and so on. So, given a real number theta we have been able to construct a sequence of continued fractions. So, if you cut the continued fraction expansion at any stage n we will get a continued fraction and this is a sequence of continued fractions which should converge to our theta because we have constructed this sequence using our good old theta. So, we should now prove that this sequence that we have constructed if you cut it at any finite stage it will give you a rational number then the as n increases these rational numbers converge to the theta and these are the good approximations that I was talking about we are up with the time for this lecture. So, we will continue with the proof that the continued fractions obtained by cutting this continued fraction expansion at any finite stage do indeed converge to the real number theta that we started with. So, see you in the next lecture. Thank you very much.