Transcript for:
Lineer Cebir: Matrisler ve Denklemler

welcome to linear algebra we are going to start with a review of systems of linear equations so hopefully everything in this first video is review for you so we are familiar with solving systems and you've solved a system like this before but it probably looked just a little bit different because it might have looked like X plus y equals 5 and 3x minus 2y equals 10 so this is a linear algebra class and so we're going to have quite a few variables and so instead of X Y Z and then now do I start over at a we're just going to use X with a subscript because then we can have just as many variables as we want so that will be the only real difference there are the two differences I guess is instead of x and y we're using only XS and we're going to have a bunch more variables than we're used to now we're going to be using matrices quite a bit and maybe this is the first time you've dealt with matrices and hopefully not but there are two matrices you need to be familiar with the first is the coefficient matrix so if I'm looking at the coefficient of x 1 and the coefficient of x 2 notice those are both ones and those are my entries here in the matrix and then of course 3 and don't forget the sign negative 2 and those are the 4 values in my coefficient matrix so notice in the coefficient matrix I use only the coefficients and I don't use these solutions of 5 and 10 an Augmented matrix has the coefficient matrix on the left side has some kind of divider here dotted or solid line though I will tell you in the textbook that we're using for this course they often don't have a divider I want you to use a divider and then on the right side of course this is the solution set of 5 & 10 now we hopefully are very familiar with being able to solve the existing system because I made it a nice and easy one and I only have two variables so I feel like I was being pretty easy so let's take a look at how we would solve this not using a matrix and then we'll talk about what that looks like with the matrix so if I were solving this remember that I'm going to solve by elimination and what that means is I want to be able to add these two equations together and for one of my variables to eliminate which means I need the same coefficient but the opposite sign so I'm going to choose to take this entire equation times 2 because that's going to give me in this column a positive 2 X 2 and a negative 2 X 2 so if I add these together I get 5 X 1 plus 0 X 2 equals 20 and of course you don't even have to write the 0 X 2 and then that by division I would know that X 1 is equal to 4 now before I solve for x 2 let's take a look at this augmented matrix of 1 1 5 3 negative 2 10 and I want to think about what we just did what we just did is we multiplied that first equation by 2 and then we combined the two equations so that's what I'm going to do here and I'm going to use some notation that I'm not really going to explain yet so in a future video I think the very next video we're going to talk about this notation but for now just know then I took 2 times Row 1 and I added Row 2 to it and I'm going to make this my new Row 1 and again don't get too caught up in the notation I'm going to go through that in very great detail in the next video but essentially what I'm doing as I'm doing exactly what I did over here but I'm doing this in a matrix so I'm taking two times this row I'm adding it to the second row and then I'm going to put that in Row one so what is that going to look like Row one is taking 2 times 1 plus 3 which is 5 and then 2 times 1 plus negative 2 which is 0 and 2 times 5 which is 10 plus 10 which is 20 and this nothing happened to so I want you to notice I have 5 X 1 and 20 and I have 5 X 1 and 20 so this is kind of how it's going to relate now what would I do next well what did I do here I divided by 5 and divided by 5 well that's what I'm going to do now again we're going to spend some time talking about what an OK row operation is but essentially what I'm going to do is I'm going to take a fifth of Row 1 to make that my new Row 1 so it's like dividing by 5 but multiplying by 1/5 so I get 1 and 0 and of course 20 divided by 5 is 4 and nothing has happened here yet so now what's going to happen is I want to solve for x2 now if I'm doing a system of equations I would probably take the x1 plus x2 equals 5 replace x1 with 4 and find that X 2 is equal to 1 so how am I going to do that in a matrix well let's take a look I want to before I do that I want to just note that what does this transfer back into this means X 1 X 1 plus 0 X 2 whoops forgot my X plus 0 X 2 is equal to 4 that's exactly what that translates back into and so really what I want is I want this guy to be a 1 and this guy to be a zero so how am I going to make that a zero so let's focus on the zero first and again if you're like what is she doing we're gonna spend a lot of time developing an algorithm for how best to go about doing something like this but just stick with me for now I'm going to take negative 3 times Row 1 I'm going to add Row 2 and that's going to be my new Row 2 so notice Row 1 is staying exactly the same and Row 2 is now negative 3 times 1 which is negative 3 plus 3 which is 0 and then negative 3 times 0 which is 0 plus negative 2 is negative 2 and then negative 3 times 4 which is negative 12 plus 10 which is negative 2 now what well now I need to get this guy to be a 1 so how would I do that I would take negative 1/2 of Row 2 to be my new Row 2 so basically I'm just saying divide it in half and change the sign so my first row remains unchanged my second row is 1/2 of 0 is 0 1/2 of negative 2 is negative 1 and then of course I change the sign and then again 1/2 of negative 2 is negative 1 and I change the sign and so this is my final matrix so what does that tell me again this guy ran sleights into 1 X 1 plus 0 X 2 is equal to 4 and 0 X 1 plus 1 X 2 is equal to 1 and of course we know that we don't need these so this is just X 1 is 4 and x2 is one which is exactly what I found over here probably a little bit easier but again we're not going to be solving these nice easy systems where I just have two variables I'm going to be solving for you know five six seven twelve fifteen variables and believe me using the matrix way is much much easier let's talk about some terminology together just so that when we are talking about something we're all talking about the same thing first is a linear equation a linear equation is simply an equation that can be written as a 1 X 1 plus a 2 X 2 plus a 3 X 3 etc we're obviously a 1 a 2 all of those values and B which is the solution are real or complex numbers and so that's just a fancy way of saying hey you've got a linear equation like we used to have with you know y equals MX plus B just a different form so it's basically a standard form equation where we have variables and coefficients equal to some value a system of linear equations would be two or more linear equations that use the same variables a solution is a list of numbers that makes each equation in the system true so that's important it's not just making one of the equations true or two of the equations however many equations we have we should be able to substitute those values back in for x1 x2 x3 etc and make the equation true and the solution set is the set of all possible solutions to a system so it could be that you have one solution or it could be that you have many solutions or it could be that you have no solution so let's take a look at what that might look like there are three types of systems or two if you're talking about just consistent versus inconsistent so if you have a system that is inconsistent essentially what that means is that you have no solution so I've tried to make this very easy this is obviously just using two Asians and that's not what we're normally going to do but it is it does help to have a visual essentially I'm saying hey look I've got two equations and they are never going to touch each other and therefore we have no solution if I have a consistent system then I'm going to have at least one solution so it might be that I have exactly one solution and that's going to be some ordered pair or ordered triple or however many values I have so if I had five variables then I'm going to have some value for x1 some value for X to some value for x3 some value for x4 and some value for x5 that when I replace those values into those five equations it makes each of those equations true or I could have infinitely many solutions and that happens quite often now again with two equations essentially what that means is we've got two lines and you can only see one of them because I'm not a magician but basically I've got two lines the other one is stacked directly on top of this one which means everywhere that line is is a solution to both equations so I generally like to put a practice question somewhere in each video or each couple of videos and typically I'll write them in blue and that just means to you that I'd like you to solve this you're on your own so I'm asking you to use elimination now if you are comfortable with matrices you can certainly use matrices to solve but I'm going to just use straight up elimination so what I would like you to do and notice I've cheated down here I've already provided you with a solution and that's just so when you get to the end if you get something other than 29 16 3 you know you've made an error somewhere don't you wish we always had a key like that but I'd like you to press pause and work through this entire equation using elimination because now this is obviously a little bit Geir if you don't feel ready for that because you haven't done this in a while it's okay to just pretend that you pressed pause but I'm going to go through it in just a moment but I would like you to press pause try the equation solve and hopefully get 29:16 three all right so let's take a look what I like to do what I'm solving with elimination is choose the variable that I want to eliminate now this decision was sort of made easy for me I'm going to use this equation because I already have only two variables 2x 2 oops not x squared 2 X 2 minus 8 X 3 equals 8 and what I'm going to do is I want to combine these two to also get rid of the X 1 variable so I'm going to take four times this equation and I'm going to combine it with this equation so I'm going to do this mentally just so that I don't take up all of the room here so if you're not so good at mental math go ahead and write out the 4 X 1 minus 8 X 2 plus 4 X 3 equals 0 and negative 4 X 1 plus 5 X 2 plus 9 X 3 equals negative 9 so it's totally fine to do that again we're not going to be using this method very often this is just to get us ready for all of the matrices that we will be using but essentially what I'm going to do is add these together and note that the X 1 is going to eliminate and then I'm going to end up with negative 8 plus 5 which is negative 3 X 2 and then 4 plus 9 which is 13 X 3 and 0 plus negative 9 which is negative 9 so again write those if you need to otherwise just do the mental math now what I want to do is eliminate again so I've eliminated X 1 now I need to eliminate either X 2 or X 3 I'm going to choose X 2 so I'm going to take this equation oh I don't like purple it's not bright enough I'm going to take this equation and multiply it by three and I chose 3 because 3 times 2 is going to give me 6 and that gives me 6x 2 minus 24x 3 equals 24 and I'm going to take this whole equation I multiply it by 2 because 2 times negative 3 is negative 6x 2 and then 2 times 13 is 26 X 3 and 2 times negative 9 is negative 18 and I'm going to combine those together to end up with 2x 3 equals 6 divide by 2 to get X 3 equals 3 and I'm feeling pretty good about myself because so far I'm right now what do I do with the X 3 well I have to plug it back into an equation to solve for another variable now I don't want to go all the way back here usually because usually I've got three equations with three variables so I'm going to choose one of these equations and it doesn't matter which one so I'll go ahead and choose the 2 X 2 minus 8 X 3 equals 8 and now I'm going to replace X 3 with 3 and so I get 2 X 2 minus 24 equals 8 I'm going to add 24 so 2 X 2 equals 32 divided by 2 I get X 2 is 16 and now I feel like a genius because again to correct and then I'm going to finish it out with taking both 3 and 16 and plugging it back in somewhere so I'm going to choose that first equation X 1 minus 2 X 2 plus X 3 equals 0 I'm going to replace x2 with 16 x3 with 3 I get x1 minus 32 plus 3 equals 0 minus 32 plus 3 is minus 29 add 29 to each side I get x1 is 29 and yay so again we're always going to write our final solution as an ordered pair or ordered triple in this case so 29 comma 16 comma 3 is my final solution