 Hi, I'm Zor. Welcome to the Unisr Education. Continuing the topic of systems of equation, and I would like to present today one particular method of solving the system of equations. Now, this is the method which is not really dependent too much on a particular properties of equations. It's a general kind of a method which you can try to apply to basically any kind of system of equations. It might or it might not work but in general you can always try it. It's something which definitely is relatively independent on what kind of a systems of equation you have. So, it's called substitution. Now, the method is actually quite simple and I will demonstrate it on one particular system of equations. Not a simple one. Then after this particular example I will try to generalize the method and explain it in the more abstract terms. A simple example where you can really relatively quickly come to a solution of the system of equations. Alright, so what is the example I would like to base my explanation of this method of substitution actually is. It's this one. x squared plus y is equal to 3x squared plus y squared plus z equals 8 x squared minus y plus 2z equals 5. Okay, so this is system of three equations with three unknowns, x, y and z. Basically it's a polynomial and the degree is 2 basically because we have x squared, y squared, etc. Now, what's the most important part of this method of substitution? In short, it can be explained in the following way. Pick one particular equation, let's say the first one. Pick one particular variable in that equation. Let's say I will pick y and express it in terms of other variables in the same equation. So y can be expressed in terms of basically x and the constant 3. Then use this value of y, expression actually, which expresses the value of y, and substitute it in all other equations of the system. Now, what it will accomplish here? Well, look at this. First, you do y is equal to 3 minus x squared. Now, I will substitute this y into this and into this. And what will I have? I will have only two equations, one less. Used to have 3, now it's 2. And the number of variables will also be one less because y will not be part of these two equations. It will be its expression through other variables, in this case x. So I will only have x and z. So, my system would be like this. That's this one. Instead of y, I substitute it. That's why the whole method is called substitution. I substitute it. It's value from the first equation. And the third one would look like x squared minus 3 minus x plus x squared plus 2z equals 5. Now, I have right now two equations with two variables. So, that's the most important part of it. You reduce the number of equations from 3 to 2 and you reduce the number of variables from 3 to 2. So this is the method of substitution. Now, what should I do now? Well, I will repeat exactly the same thing. Trying to convert the system of two equations with two unknowns into one equation with one unknown. So, I will express z from this. z is equal to 8 minus x squared minus 3 minus x squared squared. Okay, let me simplify. This is 9 minus 2x squared plus x to the fourth. So, the whole expression is z is equal to minus x to the fourth. Now, this is minus and this is minus. So, it's plus 2x squared minus x squared would be plus x squared. Now, this is minus 9 plus 8. So, it's minus 1. Of course, I'm wrong. It's not 2. It's 2 times 3. So, it's 6. Therefore, I have that right? Minus 6 minus x squared 5. Right. So, this is basically my expression of z in terms of x derived from the first equation. Now, I will substitute it into this z. I will substitute it in the second equation and I will have only one equation with only one variable x. Right. So, what will that be? It would be x squared minus this. So, 9 minus 6x squared plus x to the fourth. And plus 2z. And z now is this, which is minus x to the fourth plus 5x squared minus 1 equals 5. So, this is my final equation which I can solve for x. I have one equation with one unknown. Let me just simplify it. x to the fourth. It's minus x to the fourth and minus 2x to the fourth. So, it's minus 3x to the fourth. Now, x squared 1x squared and 6x squared minus and minus it's plus. So, it's 7x squared plus 10. So, it's 17x squared. Oh, squared. And now minus 9 minus 2 minus 11 equals 5. So, it can be minus 16. Right. Equals to 0. Is that right? Not so sure about this. Let me just check it again. Something is not right. Let me check it again. Oh, wait a moment. It's x squared minus y. x squared minus y. I put y squared. Oh, I'm sorry. I think it should be y is equal to 3 minus x squared. Yes, y is equal to 3 minus squared from the first equation. So, this is the z. So, that's how it's supposed to be. So, I'm sorry. So, it's 2x to the fourth. Now, x squared plus x squared is 2x squared plus 10. So, it's 12x squared. I see something was wrong. And minus 2 is minus 5. And 5 from that side is minus 10. Okay, now that looks correct. So, after these two substitutions, first I took y from here and substituted to the second one. And then I took z expressed as x, which depends on x and substituted to this one. And y also to this. So, here we get this. The only equation which I have after these two substitutions which contains only one variable, which is x. Well, let me reduce it by minus 2. I will have x to the fourth minus 6x squared plus 5 equals to 0. So, that's my equation which contains only x. This is a result of two substitutions. Now, how can it be solved? Well, very easily. First of all, you do another substitution. And with this it will be t squared minus 6t plus 5 which is a quadratic equation. The roots of this equation, it's very easy basically. It's 5 and 1. Because the sum is supposed to be equal to 6 and the product is supposed to be equal to 5. And I'm actually looking for integer roots because I designed this particular example with basically integer numbers in mind. So, these are two roots for t. So, for x I have since t is x squared and it's 5 or 1. So, x is plus or minus square root of 5 and plus or minus square root of 1, which is 1. So, I have four different solutions for x from this particular equation. And that's actually the goal. We found the first variable out of our three. Now, knowing these values for one of the variables and knowing how I derived others, now from this one, if you remember, I derived y is equal to 3 minus x square. So, I can find y square root of 5. So, if x is equal to square root of 5 then let me put it this way. Square root of 5 then y is equal to x square is 5. 3 minus 5 is minus 2. Now, what's the z? Well, z can be obtained from this one. z is 8 minus x square minus y square. So, it's 8 minus 5 minus 4 which is minus 9, so it's minus 1. So, that's one solution. A triplet x, y and z solution to this particular system of equations. Now, if x is equal to minus square root of 5 then this would be exactly the same because the square would be still 5 and this would be exactly the same. So, it should be still minus 2 and minus 1. If x is equal to 1 then y is equal to 2 and z is equal to minus 1 and minus 4 minus 5 so it's 3. And finally, if x is equal to minus 1, everything stays the same. It will be also 2 and this will also be 3. So, let me just summarize what I did. First, I expressed y in terms of x and substituted to 2 others, getting 2 equations with 2 variables. Then I found z from the first one and substituted into the second. And that's how I got one equation with one variable, albeit an equation of the fourth degree, but that was easy to solve because I can use this x square is equal to t, if you recall. So, I found the value of this x and then I basically reversed my steps. Since z was expressed in terms of x, then I've got z and y in terms of x I've got y. So, is that it? No, we have to do the checking. Now, in my notes to this lecture which is on unizor.com, and by the way I do suggest you to read the notes after you listen to the lecture. I do the checking. So, each one of these four solutions must be checked and you put x and y and z, x and y and z, x and y and z, etc. into all three and all three should be identities. That's basically what checking is all about. So, I do do it in the notes. I'm not going to do it here. I'm just telling you, trust me, that I did this checking and all these solutions are basically valid solutions. So, this was an illustration of what exactly the substitution method of solving system of equations actually is. Now, let me try to generalize it a little bit and use this more abstract approach, so to speak. Now, again, back to the definition of the systems of equations. What is the system of, let's say, n equations with n variables? This is number of conditions of this kind, another function of the same variables, etc. And the last one is function number m of the same set of variables. This is a generalized definition of the system of m equations with n variables. Now, what is the method of substitution in this particular case? Well, here is what can be done, basically. Let's consider that this particular function for definitiveness, I assume the first one, and I will use the x1 as basically the first variable to be used. Let's consider that from this particular equation, I can find x1 as some kind of a function of the rest of the arguments, from x2 to xn. Now, if you remember, in this particular case I took the y variable and expressed it in terms of other variables, which is only x in this case. In some way, in some form, like 3 minus y is equal to 3 minus x2. That's how I did it. Now, in this case, I assume that this is possible from this particular equation to find x1 as some kind of a function of x2, etc. xn. Some manipulation with this equation obviously must be done to transfer it into this particular form. Now, let's assume it can be done. If it can, then I can substitute this x1 into each of these expressions into equation number 2, number 3, etc. and what will I get? Well, I will get f2 of instead of x1, I substituted it with g1 of x2, etc. xn, x2, etc. xn. These remain and instead of x1 I use its expression, which I have just found from the first equation. Exactly the same thing for all others until the very last one, where I also substitute g1 of x2, etc. xn instead of xy and leave x2, g1, etc. xn as is. Now, what do I get now? I get m-1 equations from 2 to m and n-1 variables. So I reduce the number of equations and I reduce the number of variables by 1. And that's the purpose of substitution. The first step is to find one particular variable I just used x1 from the first equation and substitute it to all others, thus reducing the system of m equations with n variables to the system of m-1 equations with m-1 variables. Which is supposed to be better. Well, sometimes this substitution gives you such a complex system that it's even worse looking than the previous one. Well, then it's just not working. This methodology is good only when it works. And I'm not promising that it works always. It works in theory like if we can substitute x1 through others and we can put it here. And the resulting system yes indeed it does have a less number of equations by 1 variables by 1. So supposedly it's better. Now if it is better, then we do exactly the same thing with this system. Which means I express let's say x2 for instance or whatever through others and substitute it to all subsequent equations. So every new substitution which looks exactly like the one which I have just described, if you can repeat it on one step after another, thereby reducing the number of equations in every step by 1 and number of variables by 1, eventually you will simplify it to the very last equation. But you have only one equation. And if you have only one equation, if you have only one variable in this equation, then theoretically you can solve it. And then basically back step everything. So from that one let's say it's xn which you have found. You go back to xn minus first, then x minus second, etc. So this is a general description of the methodology. Now to conclude this lecture I would like to do exactly the same thing which I did the first, which is give you an example. But in this case I would like actually to do it very simple and very fast. And again it's just for user's creation purpose so you will kind of remember this better. So here is my very simple system of two equations with two variables and how I can quickly solve it using this particular methodology. Well here is how. Let's say I can express x from here as what? Minus 3 over 2y, right? So 3y divided by 2 and substitute it into this. What will I get? Minus 9 second y plus 2y plus 5 equals to 0 okay? Times 2 minus 9y plus 4y plus 10 equals to 0. Minus 5y plus 10 equals to 0. Y equals 2 and x equals to 2 times 2 minus 3. So first I reduce my system of two equations with two variables to one equation with one variable. I solve it and then I backstep basically back to the original whatever I did first. I express x through y. I am using it to get the x if I know the y. It's very quick and in case of linear system of equations this is called linear because it's basically everything is in the first power of one. x to the power of one. All variables power to the power of one and there are no other variables and only constants. So for these equations it always works. This methodology always works if you have a system of linear equations. And now you also understand that it's very important if you want to really get a single solution. It's very important that the number of equations should be equal to the number of variables. Because in every step substituting one variable through another we reduce the number of equations by one and reduce number of variables by one. So you would like to see at the very end one single equation with one single variable. That would give you a unique solution. So that's why in most of the cases, at least in those cases which we are usually dealing with is we have a system of n equations with n variables because this gives you definitely a hint that you might have a good solution. You might have more than one solution like in the previous case I had in the very beginning. I had four different solutions but it's still finite. If you have a number of variables exceeding the number of equations you basically most likely actually you will have an infinite number of solutions. Like for instance if you have one particular equation with two variables one equation with two variables gives you an infinite number of solutions one and minus one, two and minus two. And actually anything and minus that anything would be a solution. So it's not an interesting case. Now if the number of variables is great than the number of equations, you might have a case of infinite number of solutions. If number of variables is less than the number of equations, well, you might actually face the situation when equations basically contradict each other. And this is the case. Three equations with only two variables well, there is no pair of various x and y which would satisfy these three at the same time. Because the first two will give you a unique solution whatever that unique solution is. And it doesn't fit the third one which means it contradicts the third one. So there is no solution which satisfies this. So again, if you have more equations than the variables, you might have a situation of contradictory equations. If you have less equations than the variables, you might have infinite number of solutions. And only in case with the number of equations and number of variables are the same, you have a good chance to have a certain finite number of solutions. Alright. Again, try to repeat the same things in Unison.com on the website. Read the notes. It's very useful. They're quite detailed in this particular case. And as usually I do recommend to register as a student, have somebody like your parent or a teacher to supervise you, enroll into certain courses, etc. The functionality of Unison.com allows it. Thank you very much. This is for today.