 So, last class we have discussed regarding the basic variables and non-basic variables in context with the solution of algebraic what is called equation linear equation. Let us call our algebraic linear equation A x is equal to B and x is the number of variables whose dimension is n cross 1 and variables are there B is the right hand side of the equation which is m cross 1. So, immediately we can find out what is the dimension of A this indicates that we have a m sets of linear equation agree and n unknowns are there. So, if there are m equations m equations are there and n variables are there out of n variables we can this n variables we can split up into 2 parts m plus n minus m variables. If we assign that n minus m variable variables value assign arbitrarily then easily we can find out the m variables that x m variables we can find out. So, we have a infinite number of solution of this one for arbitrary choice of n minus m variables which in turn we can get it m x variables. So, now question is if that n minus m variables say last n minus m variables of x we are assigned to a 0 then first m variables of x we can find out and in that situation when we have assigned n minus m of x of last n minus m variables of x assigned to 0 and in turn which we have we have found out the first m variables of x then that solution is called basic solution. And number of basic solution in turn we will get it n c m that is equal to factorial n divided by factorial m and the factorial n minus m that we have seen it this and the variable associate with the non basic variable we have assigned 0 agree. And variable with what is called the variable which is not equal to 0 agree non 0 that we call is the basic solution basic variables of this solution of this equation. So, we have a now basic variables at basic variables and non basic variables when we solve this equation we will get a what is called a set of variables in the basic solution a set of variables in the basic solution. And in the basic a set of variables which is non 0 we will call the basic variables and which variables are 0 then we will call it is a non basic variables. So, we have discussed up to this one then what is what mean by the basic feasible solution the basic feasible solution a basic solution which is feasible a basic solution solution which is feasible is said to be is said to be basic feasible solution. That means basic solution which satisfy all the constant associate with the optimization problem all the constant associate with the optimization problem if it is satisfied. Then that solution is called basic feasible solution a solution may be basic solution, but it does not satisfy the all constant associate with the optimization problem. Then this solution is called basic non feasible solution and that solution is not acceptable. So, next is your optimal solution a basic feasible solution a basic feasible solution is said to be is said to be optimal if it optimizes that objective function optimizes the objective function. That means suppose we got the basic feasible solution multiple of basic feasible solution would get out of this all basic feasible solution I will tell if basic feasible solution which basic feasible solution will give you the optimal value of this objective function will call that is the optimal solution of the problem that mean linear programming problem. So, next is non degenerative non degenerative g basic feasible solution. Suppose if you got the basic solution of this what is called a linear programming problem if you got the basic if the all basic variables all the basic variables are positive agree then it is called the non degenerative basic solution. All basic variables values are positive then it is called non degenerative basic solution and let us see that how we can introduce the solution of this one solution of what is called linear programming problem by using matrix method. So, let us take one example minimize f of x plus x 2 plus 5 x 3 minus x 4 subject to the constraint x 1 plus twice x 3 plus twice x 4 is equal to 6 and x 2 and x 2 plus x 3 minus twice x 4 is equal to 3. So, let us call this is the equation 1 and with x 1 and x 2 greater than equal to 0 agree. So, our problem is our objective function is linear and our constraint here in this problem is all are equality constraint are also linear. So, it is a linear programming problem and how to solve this one in matrix form that is in other words finally, we will say simplex method basic background involved in this one we will just discuss now see this one how many unknown variables are there x 1, x 2, x 3 and then x 4. So, n is equal to 4 and how many equations are there that m is equal to our equation is 2. So, naturally there are 4 variables are there 2 equations are there. So, n minus 2 is the number of non basic variables the variables which we will assign if you will assign to 0 corresponding other variables we can find out and that solution is called basic solution. And we already know the number of basic solution involved is n c n c m in this case in this problem we have a factorial 4 factorial 2 m then factorial n minus m is a 4 minus 2. So, this is equal to 4 into 3 into 2 into 1 then 2 into 2. So, we have a 6 basic solution we will get it agree. So, now here if you see the our basic variables are there at this point I can assign the our basic variables that this and this x is involved in this equation, but x does not involved in this equation. Similarly, x 2 involved in this equation only second equation, but it does not involved in first equation. So, this is already in canonical form that what we have discussed earlier. So, we can write it that our x 1 and x 2 are the basic variables and x 3 and x 4 are the non basic variables. Now, you see if you assign x 3 x 4 is 0 in this equation immediately you can find out x 1 x 2 and corresponding objective function value we can find out. Now, we will look for this is the one basic solution. Now, we will see which of the which one of the basic variables will move out of this two will move to some other point agree and which of the basic variable will move to some other point. That means that either of x 3 or x 4 which is now 0 one of them will be non 0 and in this case x 3 x 1 x 2 which is non 0 values will be shift will go to the 0 values. That means one of the basic variable will act as a non basic variable and one of the non basic variable will act as a basic variable. In turn whether we are getting the function value is reduced from the previous case or not. So, let us call in this case if you see our corresponding to this one I can write it that our solution assign non basic variables values is equal to x 3 is equal to 0 x 4 is equal to 0. Then from this equation from equation 1 one can easily find out x 3 0 x 4 0. So, x 1 is equal to 6. So, x 1 is equal to 6 and x 2 similarly x 2 is equal to 3. So, our solution now coming x is equal to x 1 is 6 x 3 is 2 x 3 is 0 x 4 is 0. So, this is our solution and see what is the corresponding objective function value. So, corresponding function value objective function value what is this objective function if you see this our x 1 plus x 2 plus 5 x 3 minus x 4 and this is equal to 0 this is equal to this is these are the non basic variables and so we will get it 6 plus 3 is equal to 9. Now, our problem is that some of the basic variables will enter as a non basic variable and some non basic variable will enter as a basic variable. So, which one will enter among x 3 and x 4 which will enter as a basic variable similarly x 1 and x 2 which will enter as a non basic variable. Let us investigate or see this situation case first situation if let us call x 3 to increase because previously x 3 value was 0 you see this one x 3 value is 0. Now, I want to increase x 3 keeping x 4 same if x 3 is increase and x 4 remains same keeping same then from 1 from equation 1 what you can write it x 1 plus 2 x 3 plus x 4 is equal to 6 and our x 4 is equal to but x 3 is not 0 because we are increase this value this value was 0 now we have increase from 0 some value. So, that we can write it that x 1 expression is 6 minus 2 x 3 this is one equation similarly from equation 2 from equation 1 sorry x 2 is equal to 3 minus x 3. So, what I did it whatever the coordinates was there x 1 x 2 x 3 x 4 now I put up x 3 to some positive value and see whether the function value is going to decrease or not if it is decrease we will accept that one. But simultaneously we have to see which basic variables we have to change it to a non basic variables. So, let us see the objective function is what now objective or cost function is what x 1 plus x 2 plus 5 x 3 minus x 4, but we have not change is value x 4 is 0. So, what is coming x 1 value we write in terms of x 3. So, minus 6 twice x 3 this is x 1 x 2 is say x 2 value I am writing x 2 is 3 minus x 3 plus as it is 5 x 3 which will come if you see I manipulate this one 6 plus 3 9 then minus 2 x 3 minus x 3 3 x 3 plus 5 x 3. So, it is a plus 2 x 3 now look at this expression this is the important point you see the function value now previously function value was 9 with this that our non basic variable was x 3 and x 4 and basic variable which value is 6 3 correspondingly we got it 9. Now, we are getting 9 no doubt plus some other quantity 2 plus x 3. So, 2 is positive and x 3 value is greater than 0 we are increasing this value greater than 0. So, now this value is increasing function value is now increasing. So, that x 3 we cannot select as a basic variables. So, this coefficient is called this coefficient associate with this variables which is converted into a non basic to basic variable this coefficient is called reduced cost. Now, look at this expression this is not reducing the cost when it will reduce if the coefficient associated that constant term associated with the variable if it is a negative quantity then it will reduce the cost. In that sense it is called reduced the coefficient associated with this one it is called reduced cost. So, our conclusion if we consider x 3 from non basic variable to basic variable will not able to reduce the function value we are not able to reduce the function value from the previous value. So, this cannot be a choice for basic variables. So, what is the option we will have x 4 next is our x 4 case 2. If x 4 is increased keeping x 3 is equal to 0 then from similarly from 1 putting the value of that x 1 x 2 x 3 x 2 now I have increased that means x 4 x 4 now I am increased x 4 now entering as a basic variables. So, from equation 2 one can write x 1 is equal to 6 minus x 2 x 4 see this one here from equation 1 from this case. So, our x 4 is non 0 x this is 0. So, x 1 is equal to 6 minus 2 x 0 6 minus 2 x 0 similarly here you see x 4 is non 0 x 3 0. So, x 2 will be 3 plus x 2 x 4. So, x 2 will be 3 plus 2 x 4 then what is our cost function is f of x is equal to x 1 plus x 2 plus 5 x 3 minus x 4 now you see our basic variable x 3 we have not changed only the x 4 we have increased that x 4 that what is called non basic variable it is not changed that x 4 is the non basic variable we are now changing means it values is increasing it is now entering as a basic variable non basic variable entering as a basic variable. So, this what is this value you will see x I will express in terms of this x minus 2 x 4 then x 2 is 3 minus 3 plus 2 x 4 then minus x 4. So, what is this this is 9 minus x 4 and the coefficient associate the constant term associate with this one is negative this quantity is negative reduced cost is minus 1 reduced negative that reduced cost the coefficient is minus 1 again negative minus 1. So, what is this possibility that if you previously x 4 is 0 now if you increase it then this objective function value will decrease. So, when x 4 enters when x 4 enters either x 1 or x 2 must have 0 value that means must either x 1 and x 2 either x 1 or x 2 not n or x 2 must be treated as a non basic variables agree must be treated as non basic variables. We have mentioned earlier if you remember that we if you have a n variables are there m equations are there that n minus m is the non basic variables and m is the basic variables. So, there are 2 basic variables that we have considered and that value is becoming objective function value is reducing which are the 2 we have considered till now x 3 is entering as a basic variable. So, one basic variable earlier that x 1 and x 2 out of this 2 one will enter as a non basic variable that is when we have to investigate which one will enter as a non basic variables. So, this is decided by looking again what is your you see this expression x 1 is this expression you look at this expression agree which out of this see it is clear from this expression x 1 and x 2 out of this x 1 and x 2 which variable I can make it previously it was non 0. Now, I can make it 0 which variable it is clearly that this variable I can make it that x 1 I can make it 0 because x 2 is positive if I put x 2 value x 4 value is 2 3 then this is very but this is not possible. So, our basic variable which one is x act as a non basic variable. So, that is I am writing this is decided by looking again at this expression at x 1 is equal to 6 minus 2 x 4 and x 2 is equal to 3 plus 2 x 4 and look at this expression if x is increase if x we increase and 2 3 x 4 is equal to increase to 3 then this will be 0, but there is no chance x 4 is becoming 0. So, our new vertex ultimately our vertex is coming our new vertex previously if you remember we have started with a vertex x 1 is equal to I think we got it x 1 is equal to 6 x 2 is equal to 3 x 3 is equal to 0 x 4 is equal to 0. Now, our new vertex is x 4 is entering as a basic variable and so our new vertex is now coming x 1 is 0 because I it is possible to make it this is 0 then x 3 is 0 and immediately this non basic variables are assigned then we can find out with x 4 is equal to 3 and x 2 is equal to 9. So, our new vertex is 0039 that means our x is equal to 0030909030 this is our new vertex and now what is our function value just see new that objective cost function value cost function value f of x is equal to your x 1 plus x 2 plus 5 x 3 minus x 4. See our new vertex is coming x 1 is 0 0 x 3 is 9 9 x 3 is 0 x 2 is 9 x 3 is 0 then 0 then this is minus 3. So, our value is 6 coming So, previously at this our function value was 9 if you see our function value that previous vertex or point our 9. So, 9 that 9 value now as we can cost function is see the function value is reduced. So, this function value next step that our now you see this and this are the non basic variables and these are the basic variables. So, our basic variables are which one x 2 and x 4 are basic variables now and x 1 and x 3 is non basic variables. So, now we have to see which non basic variable will act as a basic variable following the similar procedure which non basic variable out of x 1 and x 3 will act as a basic variable and which one of x 2 and x 4 will act as a non basic variable in next iterative process. So, let us see next you can see this 6 is smaller than 9 what we got it is smaller than smaller than 9. So, we can further check that what we can proceed you know now this whole process I can do with a matrix operation if you see this one whole process I can do matrix operation. So, far I did it up to this what will do it is see the our basic equation our A matrix if you see our A matrix is what in the beginning I have written possibly I have not written. So, let us call this equation that this equation I can write into matrix vector form. So, if you write it matrix and vector form you see this one that our equation one equation one can be written as A is 1 0 2 2 then your 0 see I am just writing from this equation matrix and vector form equation 1 0 1 1 minus 2 into x 1 x 2 x 3 x 4 is equal to b 1 or our that matrix you can write it b 1 b 2 and what is this b 1 b 2 b 1 is our case is 6 this is our case is 3 6 and 3. So, this is our A matrix is if you rewrite our m g 1 0 2 2 0 1 1 minus 2. So, first situation this coefficient corresponding to your x 1 this coefficient corresponding to x 2 this coefficient corresponding to x 3 this coefficient corresponding to the x 4 and our b is what 6 3. Now, you see this one what we can write it for this one for first we have this is already you see if I represent whatever we have done it that if you want to represent into matrix and vector form in other words elementary row operations we can do it like this way see this one what I am writing x 1 plus twice x 2 plus twice x 4 is equal to 6. So, clearly you see first column and your second column corresponding to the our basic variables first column coefficient x 1 x 2 basically because this is already in i n t matrix form and x column third and fourth columns are the non-basic variables. So, now what you have to do this one that operation you have to do it if you want to do that operation that what you did that x 4 we have seen that x 4 this x 4 is entering as a the x 4 is entering as a basic variables and x what we have seen it that x 1 x 1 is entering as a non-basic variables. So, there is a interchange between x 4 is going as a basic variables and x 1 is going as a non-basic variables. So, corresponding matrix is what b 1 you see b 1 I am writing is 2 minus 2 0 1 and corresponding to 2 you see 0 1 and corresponding to 4 it is 2 2. So, this now you do the what is called elementary operation of this one how you will do it you see this equation I have written it and another equation I can write it here that x 2 plus x 3 minus x 4 is equal to 3 just see this one. So, what you have to do this I have to consider as a basic variable that means x 4 will be in one equation that x 4 now it is 2 involved in this equation let us call this is equation number 2 and this is equation number 3. So, x 2 x 4 which is going as a basic variable now involved in 2 and 3. So, x 4 should be involved into one of this equation and our next basic variable is what x 2 x 2 is not there, but it is here. So, this will not disturb x 2 only x 4 will remove from this place then how will you remove from this place you have to do some elementary operations what is the operation you have to do it if you see this one that is 2 x 4 sorry this is x 2 x 3 that is 2 x 4 2 x 4. Now, if you do elementary way you add you add equation 2 to equation 3 then this variable is eliminated. So, you can write it add 3 with 2 equation 3 equation 2 is added with equation 3 because add 2 with equation 3 then if you add it what is this you are getting if you add with this one then you see this one that will coming equation number this is 2 add 3 sorry it is a 3 add 3 equation number 2 just a minute this add 2 with equation number 3 that with this equation you add that one if you add this one you will get x 1 plus x 2 plus 3 x 3 is equal to 9 let us call this equation number 4. So, what I did it this this equation added with this one. So, ultimately it has come x 1 plus x 3 plus 3 x 3 is equal to 9 and this equation I rewrite here this is equation number this is 2 and this equation I rewrite here if I rewrite here what will get it x 1 plus 2 x 3 plus 2 x 4 is equal to 6 let us call this is equation number 5. So, still you see it is not converted into canonical form because x 1 coefficient x 2 coefficient 1, but x 4 is x 2 is not in this equation x 4 is not in this equation, but it is coefficient is 2. So, I have to divide both side by 2 if I divide both side by 2 then equation will come half x 1 plus x 3 plus x 4 is equal to this is will be divided by 2 that means 3. So, let us call this equation number 3 now equation 3 and 4 if you see equation not the 4 and 6 equation 4 and 6 are now canonical form. So, this now you see if this equation 4 and 6 are in canonical form that coefficient of x 4 is 1 and coefficient of x 2 is also 1. So, now if you assign the what is our non basic variables here straight away you will get it the x 4 value and your x 2 values, what we want to do in matrix form that one. So, our if you see now our equation that equation now canonical form and written as written in matrix form. So, if you write a matrix form this will be a 0.5011 then it is a 1 equation 4 you see equation 4 I am writing 1130. So, 1130 this and this is x 1, x 2, x 3 and x 4 is equal to you are getting 3 and 9. Now you see this and this it is a canonical form this. So, this we can get directly from the original matrix A this expression we can get directly from original matrix A by using that row operation that what row operation is that there we are now telling in terms of matrix. So, just see this one that this equation that what we got it from this equation basic this equation and this equation what I did it here we did elementary row operation basically elementary row operation in order to get equation number 4 and 6. See the operation you what this is nothing but a matrix 1 2 2 0 1 1 A what I did it here I add equation number this equation number 6 equation number that 2 I just divided by ultimately I divided by if you see the equation number 2 that this one equation number 2 which is rewritten here like this I divided by 2. So, there is a first you divided by 2 and means 0.5 that whole equation I divided by 5 ultimately I am doing it here that a matrix I multiplied by first row you divided by 0.5 means 0.5 0 and other elements are remain same and second element what you did it second operation I did it this and this I added the equation number 2 and equation number 3 I added. So, what is this added 1 and 1. So, this A is equal to the both side you have to multiply of that equation A is equal to 0.5011 and this is equal to your B. Now, I will write our A matrix you will see 0.5011 our A matrix is what see our A matrix is if you see the our A matrix 1 0 2 2 0 1 1 1 1 1 1 1 1 1 1 minus 2 is equal to that our B matrix is 6 3. If you see our B matrix that is our 6 3 mind it what I did it here the elementary row operation that is translated into matrix that of operation. First what is the equation this equation I divided by 2 this equation I divided by 2 which is coming that one is divided by 2 and then I add this equation with that that equation. So, now if you see this equation if you multiply this and this. So, this into this. So, this element is multiplied by 0.5 this into this 0 this into this 0.5 multiplied this into this 0.5 it is multiplied. So, ultimately we are getting this after multiplication this matrix is coming 0.5011 then this and this part I completed this into this this are I am adding you see this row is added with this one with this operation this into this plus this into this I am writing. So, this is one next is this into this plus this into this that means this 2 rows are adding this one then this operation means this matrix multiplication multiplied by this row means this 2 row are adding because that both are in 1 1. So, this is this and this 3 that this is 3 and this and this is 0 and this and this is what this I am multiplied by this is equal to this whole side because it is a x is there here x is here that I missed it this x is here. So, ultimately this is coming that 1 and this case you see this into this 3. So, this is coming 3 this into this this are added means 9 and exactly you see what I got it here that is I can do with matrix operation now I do I can do it matrix operation now in this way. So, after doing this one as if this is our now matrix is change a 1 this is b 1. So, now I assign assign a 1 is equal to a 1 is equal to a and b is equal to b 1 as if this is the equation is constants are given you minimize our objective functions. So, now what you what you to do next you know at this point this is our x 1 this is x 2 this column corresponding this column x 3 and this column x 4. So, x 1 x 2 and your x 4 are the your basic variables x 1 and x 4 are the non basic variable. Now, I will change similar to our earlier method I will change one of the non basic variable will live as a basic variables and one of the basic variables will live as a non basic variable will proceed in the similar manner. So, the way I explain this one the same thing you can do it next iteration next iteration. So, current corner point is what current vertex or current corner point our non basic variable is x 1 and x 3. So, it will be x is equal to 0 then we got x 2 value is what just now you have calculated x 2 value after we have seen that value you got it what is the x 2 value you got it 9 if you see then x 3 non basic variable 0 and x 4 value we got it 3 this is our current corner point. Now, we will check it this one now if x 1 is introduced as a basic variable is introduced as a basic variables keeping x 3 is 0 then from this equation what will get it this is our now a in this equation you will get a state way x 4 is equal to this is x 3 0 this into this 0.5 x 1 this is 0 this is 0. So, x 4 is equal to you will get 3 minus 0.5 x 1 similarly, second equation from this equation you are getting that one and from this equation you will get this one and this will be a x 2 is your 9 minus x 1. Now, see our objective function f of x objective function this is f of x a objective function is what x 1 plus x 2 5 x 3 minus x 4 our basic variables you have seen it that we have changed now this is x 1 is the this is the non basic variable we have now changed to basic variable x 3 value is 0. So, I will put it x 4 value x 4 value is x 1 value is what x 1 value is 0 then x 2 value is your 9. So, you will write x 2 value in terms of this. So, 9 minus x 1 then your x 4 value is x 4 value you see 3 minus 0.5 x 1. So, ultimately it is coming 6 minus 6 minus minus x this. So, minus 0.5 x 1. So, now see x 1 is now introduced as a basic variables that means that value previously was x 1 is 0. Now, you are increasing this value if you increase this value our reduction cost reduction value is negative that coefficient is negative. So, x 1 value is if you increase it that value will what this is what just see this is x 1 and this is x 1 value is what this is x 1 this is x 1 sorry this x 1 is missed it this x 1 this x 1 is that x 1 because x 1 value is now is not equal to 0 it is a basic variable other than 0. So, x 1 x 2 value is written 9 minus x 3 value is 0 x 4 value is this. So, it will be a plus now you see this one since x 1 value is from 0 to x 1 value is positive. If you add if you use that x 4 as a if you use that x 1 as a basic variables then this will increase the function value. So, x 1 cannot be the x 1 cannot be the basic variable. So, then what is choice is left x 4 sorry x 3 you try with x 3 if you try with x 3 similar logic if you try with if x 3 is entering as basic variable keeping x 1 is equal to 0 then what will get it x 4 from this equation x 4 is equal to 3 minus x 3 and x 2 is equal to 9 minus 3 x 3 and what is the corresponding objective function x 1 plus x 3 x 2 plus 5 x 3 minus 5 x 4. So, x 3 is now entering as a basic variable that value is not equal to 0 and x 1 value is now 0 because x was is keeping this one. So, if you put it now x 2 is 9 minus 3 x 3 plus 5 x 3 minus 3 minus x 4 value I am writing x 3. So, if you simplify this one 6 plus that 5 and this is like a 1 6 minus 3 the plus x 3. So, this coefficient is positive reduction coefficient is positive. So, x 3 value from non basic variable value 0 to some positive value if you go it the function value is increasing. So, what is your conclusion we cannot change whatever the non basic variables are there agree and what are the basic variables are there. These are the previous iteration these are the our actual solution of the optimal point and it will give the minimum value of the function. For this problem we are getting minimum value of the function is f minimum is 6 see this example. So, next class we will show the how to use the matrix matrix form all these things. So, I will stop it here today.