 Welcome back, we are now going to prove that the convergence for any real number theta are the best rational numbers giving the best approximations. So this is what we want to prove. Recall the theorem that we have proved the last theorem in our last lecture which says that if you have q to be between 0 and q n plus 1 it is a positive quantity which is between 0 and q n plus 1 then for any natural number p any integer p mod of q theta minus p is always going to be bigger than or equal to q n theta minus p n. This is the result that we have we are going to use this result to prove that if you have any rational number p by q satisfying this particular inequality that theta minus p by q is less than 1 upon 2 times q square then p by q has to be a convergent to theta. So it will have to be equal to some p n by q n. This says that of course we have noticed that convergence give you good approximations. We notice that certainly theta minus p by q is less than 1 upon q square and in fact one of the consecutive pairs of convergence will give you this inequality which is referred to in the statement of the corollary and one of the triple will give you even better and so on. But if there is any rational number somewhere out there which is trying to give you the approximation better than the convergence then it has no alternative but to be itself a convergent. This is a very important theorem and therefore we can say that the convergence to a real number theta give the best approximations to the real number theta. So of course we also know that q n go to infinity. So let n be defined by q n less than or equal to q less than q n plus 1. Since we know that the q n go to infinity we should have some q n which is less than or equal to q and some after all or q 1 is 1. Remember q 0 is 1 remember our p 0 upon q 0 is an integer a 0 therefore the q 0 is in fact 1. So we are starting the sequence q n with 1. Therefore there is always some q which is below our number q there is some q n which is going to be below the denominator q of the rational p by q and ultimately q n go to infinity. So there has to be an n such that q n is less than or equal to q but the next one q n plus 1 will be beyond q will be after q more than q bigger than q. So we are choosing n with that property. Remember we are not putting any condition on p other than the simple condition that theta minus p by q is less than 1 upon 2 q square and now we are going to prove that p has to be the p n and q has to be the q n. Remember we are given the real number theta. So we have the continued fraction expansion for theta. So we have p n and q n and that is how we have taken this n. We will prove that p upon q is p n upon q n. We are actually going to prove that p is p n and q is q n but that is equivalent to showing that p by q is p n by q n. So how does one prove this? We will consider the difference between these two. Now this difference we can insert a plus or minus theta in between and then this becomes less than or equal to theta minus p by q plus theta minus p n by q n and which is less than or equal to 1 upon q plus 1 upon q n into q theta minus p with a mod. This is because this term here is 1 upon q n mod q n theta minus p n and this is 1 by q into mod q theta minus p and the inequality that we have here that q is less than q n plus 1 will say that this quantity is less than or equal to mod of q theta minus p. So you have a mod q theta minus p coming from the second term as well as the first term and you have just 1 by q plus 1 by q n mod q theta minus p. Further we observe that since q n is less than or equal to q. So 1 upon q n is going to be bigger than or equal to 1 upon q. Therefore we have that this is less than or equal to therefore this 1 upon q can be replaced by 1 upon q n you have it coming from once and twice. So you have 2 times 1 upon q n and we have assumed that q theta minus p because of this inequality that you have assumed is less than 1 upon 2 q. So you have here 1 upon 2 q. So these two get cancelled further here you have a strict inequality which will mean that this inequality is also strict. So we get ultimately that this p by q minus p n by q n is strictly less than 1 upon q q n. But this is a contradiction because if p by q is not equal to p n by q n then you have that this quantity is not 0. The difference between those two is not 0 but the numerator will be p q n minus q p n upon q q n and therefore this is at least 1 upon q q n. So if you have that these two are not same then the difference has to be bigger than or equal to 1 upon q q n. But what we prove here is that the difference is strictly less than 1 upon q q n. Hence there is no other option but p by q has to be p n by q n. So very remarkable result which says that if you have a rational satisfying this slightly better inequality than the convergence. Convergence will all satisfy where you instead of 2 you have 1, theta minus p by q less than 1 upon q square all convergence will satisfy that. So if you have one rational trying to do something better than the convergence then it has no other option but itself to be a convergent. So in this way we can say that the convergence to a real number theta give the best approximations. There is nothing else that can give a better approximation to our real number theta. Now we are going to do some computations. We have not really except for computing the continued fraction expansion for the golden ratio. We have not computed the continued fraction expansions for any other number. So let us start with some of the simplest numbers. We start with theta equal to root 2 and let us compute its continued fraction expansion. So first of all we note that 1 is less than root 2 is less than 2 because 1 is less than 2 which is less than 4. So square root of 1 which is 1 is less than square root of 2 which is less than square root of 4 which is 2. Therefore we will write theta which is root 2 as a 0 plus 1 upon theta 1. Here theta 1 is 1 upon theta minus a 0. So what is a 0 for us? a 0 is the integral part of theta which is 1. 1 upon theta remember is root 2 and we have the a 0 to be 1. So we now want to solve this. We want to write this expression 1 upon root 2 minus 1 in a simpler form and the standard trick to do that is to multiply the numerator and denominator by the conjugate of this number. So we therefore get the root 2 plus 1 comes in the numerator. Here we have something like a minus b into a plus b which is a square minus b square. So we get root 2 square which is 2 minus 1 square which is 1. So this is just 1. We get it to be root 2 plus 1. So our theta 1 is now root 2 plus 1. The real the integral part of theta which is root 2 was 1. Therefore the integral part of theta 1 which is root 2 plus 1 is going to be 2. You have it to be 1 plus 1 upon 2 plus 1 upon theta 2. Here theta 2 is we just consider this part. So this is equal to theta 1 which is our number root 2 plus 1. So this is 1 upon root 2 plus 1 minus the integral part which is minus 2 and therefore this is root 2 minus 1. But that is what we had here for theta 1 as well. So theta 2 is nothing but theta 1. We are in a better situation than most of the other situations because what we obtained is that this is 1 plus 2 plus 1 upon theta 2 has now become theta 1. So we get this to be 2 plus 1 upon 2 plus next one after theta 1 would be theta 2 but that is same as theta 1 and so we are going to continue in this way. So the continued fraction expansion for root 2 is where you have 1 in the first place a0 is 1 but a1 onwards you just have them to be 2. Since these are repeating we write it in the way as given here. We put a bar on the head of 2 to denote that this single partial quotient gets repeated. Until infinity. So this is the expression that we have for root 2. If we have this expression for root 2 solving the continued fraction for 1 plus root 2 is not going to be difficult at all. The only change here would be in the integral part and so we are going to get 2 semicolon 2 continued or the periodic expression for 2 and therefore this can simply be written as 2 bar. The 2s get repeated periodically. This is the expression for theta equal to 1 plus root 2. Let us see what happens when we consider root 3. So once again 1 is less than root 3 is less than 2 therefore a0 is going to be 1. So we have theta which is root 3 this is 1 plus 1 upon theta 1 and theta 1 as previous calculation is 1 upon root 3 minus 1. We compute the simplified form of that by this expression we have root 3 plus 1 in the numerator but denominator will give you root 3 square minus 1 square 3 minus 1 that is 2. So this has become somewhat complicated than the computation for root 2 but let us see what we get. So initially we have 1 plus root 3, 1 is less than root 3 less than 2 therefore 1 plus 1 which is 2 is going to be less than root 3 plus 1 is going to be less than 4 you are less than 3. We are just adding 1 to this pair of inequalities and once you divide by 2 because 2 is a positive number the inequalities are respected and therefore the integral part of this number is 1. So we get that a1 has to be 1. So theta which is root 3 now becomes 1 plus 1 upon 1 plus 1 upon theta 2 and here theta 2 is 1 upon this quantity which we know is root 3 plus 1 by 2. So root 3 plus 1 by 2 minus 1 which is root 3 plus 1 minus 2 upon 2 so that 2 can be put in the numerator and we have root 3 minus 1 in the denominator and once again we solve this simplify this by multiplying by root 3 plus 1 and we obtain that this is 2 times root 3 plus 1 upon 3 square minus 1 square now which is simply 2. So we get this to be root 3 plus 1 and root 3 plus 1 because of these inequalities we tell you that its integral part has to be 2. So our a2 is 2 theta 1 theta 2 and now we have theta 3 where theta 3 satisfies 1 upon root 3 plus 1 minus 2. So this is 1 upon root 3 minus 1 but 1 upon root 3 minus 1 is something that we had already obtained here as theta 1. So this happens to be equal to theta 1. So theta 3 is theta 1 therefore we will have that theta which is root 3 we will have the expression 1 plus 1 upon 1 plus 1 upon 2 plus 1 upon once again we get theta 1 and these integers 1, 2, 1, 2 will continue to be repeated and therefore we get that the continued fraction expansion for root 3 has this particular form it will be 1 semicolon 1, 2, 1, 2, 1, 2 and so on. So that is how this is given. So we have noticed we have actually computed in a way we have computed 3 expressions for the 3 continued fraction expansions for real numbers. The earlier one was for the golden ratio 1 plus root 5 by 2 then we computed for root 2 and for root 3 the number 1 plus root 2 that was just simply obtained from root 2. So we have computed these 3 square roots of natural number and we see that the continued fraction expansions are repeating after some stage and this is actually one very nice result that these continued fraction expansions always are going to represent the real numbers which are quadratic in some sense and if you are taking these repeating ones that means the continued fraction expansions are never ending therefore what you get are not rational numbers because if you have a terminating continued fraction expansion if your expansion terminates you have a finite expansion that means it is a continued fraction which will be a rational number but if you are putting a bar on that which means that it simply continues then you are going to get what is called an irrational number the numbers are real numbers but they are not rational numbers. So they are the irrational numbers which are quadratic in some sense. So let us make this notion very precise and then we will prove the result about these repeating continued fractions. So let us see the definition of what are known as quadratic irrational. So these are the zeros of a polynomial like this. So or you may say that these are solutions to the equation ax square plus bx plus c equal to 0 these are solutions to this or these are also known as zeros of this particular polynomial that means when you put the value of this quadratic rational into this polynomial you are going to get 0. They are these solutions to these particular equations but we have some conditions that the abc should be integers they are not allowed to be any random numbers these are integers furthermore the discriminant b square minus 4 se should be positive and should be square free it should not should be a non-square it should not be a square these are the conditions which are going to give us the quadratic irrationals. Now from school level onwards we know how to find the solutions to this particular equation they are given by minus b plus or minus under root b square minus 4 ac upon 2a. These are the forms of the solutions to this quadratic equation and so if this guy is 0 then we have that we get the same root the 0 minus 2 upon 2a comes with multiplicity 2 then in fact this becomes a square. So whenever this quantity is 0 you get the same number that is why we call that number then you get the same root so whether this number is 0 or not we will discriminate the number of roots being 1 or 2. So this is called discriminant we assume that it is a natural number because after all we know that this is going to be an integer abc are integers so b square minus 4 ac is also an integer but if this is a negative integer then the square root will give you an imaginary number and we are looking at our continued fractions which concern only real numbers there may be study for complex numbers using some generalized forms of the continued fractions but we are not considering that yet we want our numbers to be real numbers we want these to be sitting inside r. So these numbers b square minus 4 ac will have to be positive this is why we are taking them to be natural numbers and further we do not want it to be a perfect square because if this is a perfect square then it is a square of m then you will have that your solution becomes minus b plus or minus m upon 2a which turns out to be a rational number in the end. We do not want that to happen so we want that this b square minus 4 ac should not be a perfect square. So this is the condition that we have on the quadratic irrationals furthermore these are always of the form x plus y root m where x and y are rational numbers y is non-zero and m is a natural number which is not a square. So these quadratic irrationals the solutions to these numbers as we have just found are in fact of the form x plus y root m. So we had minus b upon 2a plus or minus under root b square minus 4 ac upon 2a. So we have this minus b upon 2a and we have this particular thing this is not a square. So we have obtained that any solution to this which is a quadratic irrational has to be of this particular form with x plus y root m y not being 0 and x and y being rational numbers and m being a natural number which is not a square. In other words every such number x plus y root m of these particular conditions satisfying these particular conditions is a quadratic irrational because when you have y to be non-zero then you already get a number which is not a rational number. Remember x plus y root m if this was rational it would imply that y root m has to be rational because x is after all a rational number. If you have that x plus y root m is a rational then y root m is that rational minus x. So you have y root m to be rational and if you have y root m to be rational y is non-zero you can multiply a rational by another rational and still remain in rationals that would tell you that root m is a rational which is a contradiction. There is a very simple proof using the unique factorization of integers the fundamental theorem of arithmetic which will tell you that if your m is not a square then square root of m cannot be a rational number. So all these numbers x plus y root m are irrational and they will clearly satisfy some quadratic equation because you have to simply write alpha equal to x plus y root m and alpha bar is x minus y root m then you notice that alpha plus alpha bar is rational alpha alpha bar is also rational and using this you easily get a quadratic equation satisfied by alpha as well as alpha bar. In fact u minus alpha into u minus alpha bar will give you equal to 0 will give you a quadratic equation whose coefficients are rational numbers and then you clear out the denominators to get the coefficients to be integers. So these are the quadratic irrationals in the next lecture we are going to define what are called ultimately periodic continued fractions and then we will prove that the quadratic irrationals are nothing but the ultimately periodic continued fraction expansions. So see you in the next lecture thank you very much.