 Hi, I'm Zor. Welcome to Unizor Education. We will talk today about systems of linear equations. As usual, we have to start with definition. Well, first of all, system of linear equations is a system of equations. And you know the generalized form of the system of certain number of unknown variables. In this case, n unknown variables. And this is the system of m equations. This is a generalized form. So we have m conditions, m functions actually of unknown variables and I equalize them to zero. Now, so what is a system of linear equations? Well, obviously each one of these should be a linear function of the unknowns. Now, what is a linear function of unknowns? Again, generalized format is the following. So that's the first equation. So the indices and the coefficients are first index is equation number and the second index is basically the variable number. In addition, I put index zero for just a constant. Now, the second equation would be a two zero constant plus two one x one plus two two x two plus, etc. Plus two n x n equals to zero, etc. And the nth equation looks like this. X n equals to zero. So this is a system of m equations with n variables x one, etc. X n and every equation is a linear function. Linear means every variable is basically just by itself without any kind of additional manipulation with it. Just multiply by some constant and there is one free constant. Now, alternatively, and actually in many more frequently occurring cases, the constant is actually shifted to the right of the equation. So it will look like this. This would be b zero, sorry, b one, b two, b n. Well, this is just alternative form exactly the same thing. These are constants, each a is a constant as well. Now, can we consider any system of n equations with n variables that look like this a good and meaningful system of linear equations? Well, the answer is no. First of all, think about these coefficients. A very important quality for each of these equations is that at least some of these, at least one actually, of these coefficients should not be equal to zero. Because if everything is equal to zero and all coefficients in one particular equation are equal to zero, then let's think about it. In the right part is also zero and you have zero x one plus zero x two, etc. plus zero x n equals zero. Now, what is this? This is basically identity and any combination of x one, x two, etc. x n would fit this particular equation. So, there is absolutely no meaning in including this particular equation into the system. It doesn't add anything, it doesn't subtract anything. Whatever other equations produce would definitely fit this one. So, we always assume that among these equations which consider, which constitute a system of equations, we do not have this case. So, in each equation, at least one coefficient is not equal to zero. And by the way, if the right part of this zero equation is not equal to zero, then it basically a meaningless combination because no variables multiplied by zero and summed together would give a non-zero number. So, basically it would constitute an absence of any solution, which is not an interesting case as well. Okay, so the first requirement is that for every equation there is some coefficient which is not equal to zero. Okay, that's number one. Number two, and it's also very, very important, I would like to talk about linear independence between these two, between these equations. Here is what I mean. Consider the following system. Now, think about this. If we subtract from the second equation, the first one, x and x, x and minus x would notify each other, z minus c, z would notify each other, two i and y would result in y on the left side and two minus one would result in two. So, basically this equation doesn't really bring any new information. It's derived, it's dependent, it's linearly dependent in this case on the two other equations, which means basically it's exactly the same thing as if I don't have this equation at all. And I have only two equations with three unknowns, which as I mentioned many times in the previous lecture about the systems of equations in general, this is usually the case when we have an unlimited infinite number of solutions. And basically, indeed, you can have the solution like this. x is equal to one minus two, this is y, which is two, and minus z. y is equal to two and z is any. So, if z is equal to one, you will have minus one, minus one, minus two. If z is equal to a hundred, you will get minus one and minus a hundred, so it's minus one hundred and one. So, basically infinite number of solutions with z taking any real value and x calculated based on z and y is equal to two. Any triplet of these numbers which correspond to this will be a solution, not interesting. So, basically, we would like to exclude this case when one of the equations is a combination, a linear combination in this case of the other. Now, I will spend a little bit more time later on in this lecture about what's the criteria of the dependency. But sufficient to say that we would like to have the system of equations linearly independent. Now, linearly independent in more strict sense of this world means that I should not have a linear combination of some equations to be equal to some other equation. Basically, that's what it means. Now, the last requirement which I would like to put on my system of linear equations. So, the first one is at least one non-zero coefficient is in any equation. Number two requirement is linear independence and number three, I would like to have the case when m is equal to n. So, number of equations should correspond to the number of variables. Now, obviously, if m is less than n, as we saw many times before, we will have infinite number of solutions. Not interesting. Now, if m is greater than n and system is independent, then most likely we will have a situation of no solutions at all, not interesting either. So, this is a typical requirement for a system of n linear equations with n variables. So, coefficients at least one non-zero in each one of them, linear independence and the equality between the number of equations and the number of variables. So, if our system of equations satisfies these requirements, then we will consider it as a meaningful, a valid system of n linear equations with n variables. And we can attempt to solve it, obviously. Now, it brings us to the concept of solution. How can we solve this particular system of equations? Now, I did briefly touch the method of substitution when I was talking in general about system of equations. In case of linear equations, and again, we are talking only about good, meaningful system of linear equations. Now, in this particular case, we can always use the method of substitution, always. And it always works fine. Now, here is basically the simple example. x plus y plus z is equal to 6, x plus 2y plus z equals to 8, and 2x plus y is equal to 4. Now, what I would like to do is, I would like to solve this particular equation, system of equations, using the method of substitution, which is basically a straightforward method which does not require any ingenuity. You just know the algorithm, you know the methodology, just use it and you will get the solution. Now, how to get the solution to this particular equation? Now, again, the method is extremely simple. First, we use one equation, let's say the first one, and we express one of the variables in terms of the other variables. So, in this particular case, we can derive that x is equal to 6 minus y minus z. Right? So, by adding minus y and minus z to both parts, left and right, we get this. On the left, we will have only x and on the right, we will have this. And now, we can substitute it instead of x to here and to here. Now, what do we have in this case? Well, 6 minus y minus z plus 2y plus z equals 8, and 2x, which is 2 times 6 minus y minus z plus y equals 8. And 2x, which is 2 times 6 minus y minus z plus y equals 2, 4. Now, as we know is supposed to happen, the method of substitution in one step reduces the number of equations by one and reduces the number of variables by one. So, now we have only y and z and only two equations. Alright, now let's simplify this. y minus y and y is one single y minus z plus z, well, that actually nullifies each other. And the constant 6 and 8, so it's 2. Okay, the first equation, after simplification, gives immediately the value for y, that's good. Now, the second equation, minus y plus y, minus 2y, sorry, plus y, that's minus y, minus 2z equals to, this is 12, this is 4, so it's minus 8. Okay, now, obviously we can substitute this two here and we will have minus 2 minus 2z equals minus 8, or 2z goes there, 8 goes there, it's 6, z equals to 3. Okay, so we have y equals to 2, z equals to 3 and now, using this original substitution, we can say that x is equal to 6 minus 2 minus 3 is equal to 1, so x is equal to 1. So, my solution to this system of three equations with three unknowns is x equals to 1, y is equal to 2 and z is equal to 3. If you check against this system, these three values, and I don't want to do it, but you have to do it basically, you will see that this is the correct solution. So, let me summarize. What I did here, I have solved this particular system of equations using the method of substitution. I took one particular variable from first equation, expressed it in terms of the other two, substituted into the other two equations, getting only two equations with two variables, which turned to be a very simple one. And basically, even if it's more complex, I can do exactly the same thing again and again and again. On each step, I'm reducing the number of equations by one, number of variables by one. So, if I initially have a system of n equations with n variables, after n steps of substitution, we can actually get to the solution. Straightforward, no ingenuity, lots of calculations, granted. Now, let me try to use exactly the same method in the general case of two equations with two variables. Now, what is the general case of two equations with two variables? Here it is. AX plus BY is equal to P, CX plus DY is equal to Q. This is a general form of a system of two equations with two variables. Now, how can I solve it? Do exactly the same thing. Now, I know that at least some coefficient in every equation is not equal to zero. Well, let's assume for the definitiveness that this is X, coefficient at X, which is A, which means I can find that value of X in terms of Y. It would be X equals P minus BY divided by A. Now, I substitute it into this, and I am getting only one equation with one variable Y, which is C P minus BY divided by A plus DY equals Q. Multiply by A, open the parenthesis, C P minus BCY plus A DY equals AQ, from which we can say that Y times AG minus BC equals AQ minus CP, from which Y is equal to AQ minus CP divided by AG minus BC. So, this is the answer for Y, and using this, we can find the X. Y can be substituted to this, X is equal to A P minus DY, and DY is this. So, it's AG minus BC and B times Y would be ABQ minus BCP. Alright, equals. Alright, common denominator above. So, it will be AG minus BC. P times AB, so it's ADP minus BCP minus ABQ and minus BCP plus, sorry, plus BCP, minus and minus would be plus. So, BCP is out, so I will have, and A, I can factor out here. A, DP minus BQ divided by A, AG minus BC. I combine these divisions. A is also out, and this is my answer, basically. This is X. Now, what's interesting about this? Denominator. You see, I'm dividing with this, so it must be not equal to zero, right? So, this is a very interesting condition. So, if you have an equation like this, AG minus BC must not be equal to zero for this particular solution to work. Alright, just remember this particular property of the system of two equations with two variables. But anyway, the method of substitution gives you the solution in case when AG minus BC is not equal to zero. Okay, this is good. Now, but why and when AG minus BC is equal to zero? Well, you remember that in the definition of the good system of N equations with N variables, I suggested that it should be linearly independent. So, my statement right now is that this particular denominator, being or not being equal to zero, actually means that this system is or is not linearly independent. So, if this is not equal to zero, this is linearly independent. And if this is linearly dependent, then this is equal to zero. I can actually very easily prove it. Now, what does it mean that the system is linearly dependent? Well, it means that there exist some numbers u and v. So, if I will combine my left parts with these u and v, I will get zero. That what it means being linearly dependent in case of two different equations. Because, as you understand, if one is linearly dependent on another, this actually is exactly the same thing. Now, so let's assume that our system of equations is linearly dependent. It means that there exist u and v such that the combination of the left part will give me zero with these coefficients. Now, what does it mean? Now, by the way, it should be equal to zero with any value of x and y. That's what it means dependent as functions of x and y. So, basically I have u a plus v c x plus u b plus v d y is equal to zero. Now, this is supposed to be equal to zero as I just said for any x and any y. What does it mean? How is it possible that under any circumstances, whatever x and y take value, this is always equal to zero? Only one case when this coefficient is equal to zero and this coefficient is equal to zero. So, basically we have this interesting system again, a system of two equations with two variables. Now, variables are u and v. So, my question is when is it possible? When is it possible? It's possible only in this case. Now, what does it mean? Sorry, this is d. Okay, so, I know that there is this particular condition. Now, I claim that I can actually find u and v from this particular equation. How can I do it? Well, we can do the substitution method again. We assume in the beginning that a is not equal to zero. So, u is equal to minus v c divided by a. Substitute to this and we will have minus v c v divided by a. That's what u b means. Plus v g is equal to zero. We know a is not equal to zero. So, let's do the common denominator and what do we have? We will have minus b c plus a plus a g v equals to zero. This particular thing. Again, a g minus b c is equal to zero. Then we can find any value of v will actually fit. And then you can be calculated from this. Now, if, however, a g minus b c is not equal to zero, then v must be equal to zero. And if v must be equal to zero, then u must be equal to zero. And obviously, this is not a linear dependency because, yes, of course, I know that zero times this plus zero times this would be zero. This is not a linear dependency. Linear dependency means that u and v are not together equal to zero. But, again, if a g minus b c not equal to zero, then v must be and u must be equal to zero. So, system would be independent. And if it is equal to zero, then we can find any number of values for u and v to actually make the system dependent. Well, that's actually the proof that this particular expression a d minus b c is a characteristic property of the system of two equations with two unknowns, which basically determines whether the system has or it doesn't have one and only meaningful solution. Okay, so the method of substitution works not only for the system of two, as I was just explaining equations in the general form, but if you really want to exercise, you can do it with three equations of three variables and basically any n equations. The system works always. The method works always. You just have to be very, very careful and do all these steps sequentially. That's fine, no problem. Now, there is another method to solve system of equations. Now, this other method is called elimination. And it does require a little bit of ingenuity. It does require certain, like, observance, if you wish. Like, look at my system. There is some peculiarity in the system which I can use to get faster into the solution. Here is an example. I think that would be actually a very good example. x plus y plus z, same example as before, actually. x plus 2y plus z equals 8 and 2x plus y is equal to 4. Now, here is something which I observe and notice. Subtract the first equation from the second. You see, x and x will eliminate each other, z and z eliminate each other. y minus y plus 2y would give you y is equal to 8 minus 6, which is 2, immediately. Right? So, I didn't do all these manipulations. x expressed as 6 minus y minus z substituted into others, etc. I immediately subtracted these two things, one from another, and got the solution. I just noticed it. Call it ingenuity. Now, if you substitute it here, you will immediately get that 2x is equal to 2 and x is equal to 1. So, this is solution, this is solution. 1 and 2, 1 and 2, so this must be 3. Right? So, z is equal to 3. This is a faster method. So, sometimes you can notice that this particular elimination thing really gives you a significant saving in the time you have to spend relative to substitution method. But, again, it does require certain observance, and obviously not every system of two equations can be, you know, solved this way. But some of them can, and it's actually very interesting if you notice that there are certain systems which you will try to solve, and they do possess certain peculiarities which you can use and use the elimination method to simplify your test. That's the problem which is a little bit more, I would say, interesting. What's good about this system? It's kind of symmetrical, you see, minus z, minus y, minus x. So, it looks nice. I don't know if people feel certain aesthetical feelings about systems of equations, but if I would consider that there is some aesthetics, this definitely is part of it. It has certain cyclical symmetry feelings. How can I solve this particular equation just based on, again, some peculiarity of this system? Here is something which I can suggest immediately. Summarize all three of them. You will have x plus x minus x, so you have 1x, y plus y minus y, 1y, and z plus z minus z, 1z. So, if I will summarize all three together, I will get x plus y plus z equals 2, 4, 9. Does it make my life easier? Yes, of course, because what we can do right now is the following. Look at the difference between this and let's say this. If I will subtract from this, I will subtract this, so I will have x and y both eliminating each other, and only z and minus z would be, so it will be z minus minus z equals 9 minus 1. So, it's 2z equals to 8, and z is equal to 4. Right? If from this I subtract this one, the second equation, my x and z would eliminate each other, and I will have only 2y. I would have y minus minus y is equal to 9 minus 3, which is 9 minus 3, which is 6 to y, so y is equal to 3. Now, finally, if I subtract from this the third equation, my y and z would eliminate each other, and I will have only x minus minus x equals to 9 minus 5, which is 4 to x, x is equal to 2. So, again, this is a simpler solution, which is based on this particular method of elimination. I have noticed something peculiar about this particular system. Now, what's interesting is I would like to solve my original system of two equations, which the generalized one was ABC and deco-efficient. Can I solve it using this method of elimination? Now, I did tell you that there are certain peculiarities which you have to look for, and it's very interesting and important actually with system of many equations with many variables. But in case of 2, it's actually quite easy to do this particular method of elimination. Now, how can I do it? Well, look, this is a times x. This is c times x. So, what we can do is we can multiply the first one by c, the second one by a, and we will have exactly the same coefficient at x, which means we can then subtract it, right? So, instead of this, we will get this. a c x plus b c y is equal to b c, and this one by a. So, it's a c x plus a g. y is equal to a q. Now, if I subtract them, I will have only y, and the coefficient at y would be a g minus b c. y is equal to a q minus c p, from which y is equal to a q minus c p divided by a g minus b c. And if you will compare it with my method of substitution, it's exactly the same thing, but faster as you see. So, again, I have basically shortened my solution. Now, if instead of this, I will aim for elimination of y, I would have to multiply this by g and this by b and then subtract. So, it will be a g x plus b g y equals b b, and this by b will be b c x plus b g y equals b q. Now, I subtract them, my y will be notifying each other. So, I will have a g minus b c x equals b p minus b q, and x is equal to this divided by this. The same exactly answers before. So, in case of the system of two equations, the method of elimination actually can work even in the generalized form. In case of a bigger systems, it's slightly more difficult, but you can imagine that there are certain cases when it can be really done. Alright, that's basically it about algebraic solutions. I would like to spend a couple of words about graphical solutions and only in case of two variables. So, if I have again generalized system of two equations with two variables, I can always think about the graphical representation of this and this. So, if x and y are co-ordinates, then what is the representation of this and what is the representation of this? These are straight lines. Now, we were talking about graphs of the functions. These are straight lines. So, any linear dependency between x and y constitutes a straight line. Now, two straight lines can either be parallel to each other, or they can coincide with each other, or they can intercept each other. Only in case of interception, solution is one and only a unique solution to this system of two equations. Because on the first line, you have all the pairs of x and y which satisfy this particular equation. On the second line, you have all the x and y pairs which satisfy the second equation. And only in case these lines intersect each other in one and only one point, you can say that this point of intersection is co-ordinates of x and y, co-ordinates of the point, with co-ordinates satisfying both equations. This one and this one because this intersection point belongs to both lines. Okay. Well, the question is under what circumstances you have these two lines parallel to each other or intersecting each other or coinciding with each other. Well, coinciding is simple when these two equations are exactly the same. So, if you have something like, well, the same or they can be actually factored. So, basically, if this is the first equation, if the second equation is kA plus kB, kAx, I meant, plus kBy is equal to kP. So, if c is equal to kA with k some number, g is equal to kB and q is equal to kP, but k is exactly the same factor. Obviously, k can be basically reduced and you will have exactly the same equation twice. So, these two lines in this case completely coincide with each other. Now, if they are not like this, but like this, where q is not the same k multiplied by p. So, these are proportionate left and right, but the right sides are not proportional to each other. So, these have certain proportionality and the right part is not. Then you will have two parallel lines. And only in case the left parts are completely linearly independent, then you will have one and only one intersection. Well, basically that's it. That's all I wanted to talk about, systems of linear equations. I would recommend you to reread the notes for this particular lecture. They are on Unisor.com in the corresponding section of Algebra. And well, basically, good luck. Thank you.