 I'm 24 of Math 1050 College Algebra. I'm Dennis Allison. You know, this episode is called the Algebra of Matrices, but there are actually a number of things we'll talk about in this episode in addition to the Algebra of Matrices. If you look at the objectives for this episode, first we do matrix arithmetic, or what you might call the Algebra of Matrices, but then we'll also look at the inverse of a matrix and we'll look at solutions of what we call matrix equations. So all of these topics will be covered today and they're all somewhat related. So let's begin with matrix arithmetic. Now, if you look on the green screen here, I have three matrices written down, matrix A, matrix B, and matrix C. This first matrix we say is a two by three matrix because it has two rows, three columns. The second matrix is a two by three matrix and the last one is a two by two, two by two matrix. Now, we can add matrices only if they have exactly the same dimensions. So for example, I can add A and B, but I couldn't add, say A and C. And if I wanna add A plus B together, then I would be adding the matrix four to negative five and one zero three. I would be adding that to the matrix four, seven, one, negative one, negative three, six. Now, the way the addition is carried out is really pretty straightforward. What I do is I add the corresponding coordinates. So for example, in the first row, first column, I have fours, so what I do is I add those together and I get the entry in the first row, first column of the sum. So these are referred to as the one, one entries, row one, column one, the one, one entry and this is the one, one entry of the sum. To get the next entry, what I'll do is add the corresponding entries from the other matrices. So two plus seven is nine, so a nine goes here. And for the last position, negative five plus one is negative four. So you can see why they have to have the same dimensions so that I don't run out of information for each entry. What number would go in the two one position right here? Zero. That'd be zero, exactly. And what number would go in the two, two position, second row, second column? Negative three. Negative three, yeah, very good. And what number goes in the two, three position? Nine. Nine, right. So that would be the sum. Do you think the answer would be different if I had been adding b plus a? Would I have gotten a different answer? No. No, we wouldn't because the additions can be, we can write the additions in either order and we'll get the same answer. So a plus b and b plus a are the same thing. What if I wanted to add a plus c? Well of course these matrices are not of the same dimensions so what I would just write here is not defined. So there's just no way that we could add those together. What if I were to take b minus a? b minus a, well let's see, if I put b first, that would be four, seven, one, negative one, negative three, six, and now I'll subtract off a, four, two, negative five, one, zero, three. I think as you would probably imagine, if you add matrices by adding corresponding coordinates then you subtract matrices by subtracting corresponding coordinates. So the first entry of the difference, which will also be a two by three matrix, the first entry will be four minus four, zero. Who can tell me the rest of that row? Five and? Five. Negative four. No, not negative four, be careful. Six. Six, yeah, because we're subtracting a negative five so that'll be a six there. And who can tell me the last row, the second row? Negative two. Negative two, yep. Negative three. Negative three, yep. Three. And three, exactly. Okay, now there is another way that you can combine matrices or at least change matrices, this is to multiply by a constant. So for example, what if I wanted to multiply matrix A by four? Now sometimes when you put a constant in front of a matrix in some textbooks, you'll see this called a scalar, a S-C-A-L-A-R, a scalar. So we're multiplying by a scalar and this means four times matrix A, four, two, negative five, one, zero, three. And when you multiply by a scalar, what you do is you multiply every entry by that number. So I get 16, eight, negative 20, four, zero, and 12. This is just how scalar multiplication of matrices is defined in algebra. Okay, so it's very easy to multiply by a scalar, you just multiply every entry by that amount. Okay, let's go to the next graphic and you'll see these same matrices displayed here, A, B, and C. We have just found A plus B, B minus A and four A. The next thing I wanna do is look at the product of matrices and I have three products listed here, A, B, C, A, and A, C. Let me pick C, A first of all, that's the middle one there. Let's come to the green screen and I'll show how we multiply two matrices. So if I write C, A, I mean this is the product of C times A. So matrix C is two, one, three, negative two. And matrix A is four, two, negative five, one, zero, three. Now it's only under certain conditions that I can multiply matrices together. You notice this first one is a two by two and the second one is a two by three. And if I multiply these matrices, the number of columns of the first matrix has to equal the number of rows in the second matrix. In other words, these two numbers must be alike. And my answer is going to have dimensions and I take the two outer numbers, two by three. So my answer is gonna be a two by three matrix, two rows, three columns. So it's gonna look like this. Now if these two numbers had not been alike in the middle of the two columns of C and the two rows of A, then this multiplication is undefined, sort of like that addition a while ago where that subtraction was undefined. Okay, now here's how the multiplication works. To get the entry in the first row, first column, right here, first row, first column, I'm gonna multiply the first row of C times the first column of A and I do it entry-wise. So I take two times eight plus one times one. Let me just write that down below. It's gonna be two times four plus one times one. I take the first numbers and multiply and I take the second numbers and multiply but I'm using a row and a column and I get a total of nine. Now to come to the next entry, this entry is in the first row, second column right here. And so I'm gonna multiply the first row times the second column and let's see what we get here. Two times two plus one times zero. Two times two plus one times zero is four. So I get a four there and to get the entry, to get the number that goes in this position, I'll put a question mark on it. This is in the first row and the third column. I multiply the first row times the third column. I realize this sounds really peculiar. You probably think I'm making this up as I go along but there's actually good reasons for multiplying matrices in this way. Well let's see, the first row times the third column. Can anyone tell me what that answer will be? It'll be negative 10 plus three is negative seven. That's exactly right. Okay, does anybody here have a question about that? Okay, now to get the second row, let's go to the entry right here and this is in the second row first column. So as you might guess, I'm gonna multiply the second row times the first column and that will be 12 plus negative two is 10. Okay, now I'm wondering who can tell me what entry goes in the second row, second column? What number goes there? Six. Six, very good, six. Because we're multiplying second row, second column. That's gonna be six plus zero is six. And the last entry will be what? Negative 15 minus six is negative 21. Yeah, here's a negative 15 and here's a negative six and I add those together and I get negative 21. Okay, now what if I had reversed the order of that multiplication and written A times C? Well let's see now, A would be four, two, negative five, one, zero, three, and C would be two, one, three, negative two. And you notice this matrix is two by three and this matrix is two by two and when I compare the columns of A and the rows of C, those don't match, those don't match. So therefore this multiplication is undefined, undefined. There is no product A times C. Now you might say, well Dennis, is there anything like that in ordinary arithmetic that would correspond to this? The only thing I can think of is that you can't divide by zero in ordinary arithmetic and in this case you can't multiply a two by three and a two by two matrix in that order. So C times A is defined but A times C is not defined so we can't expect that when you commute the order that you get the same answer. In fact, not only will you not get the same answer, most likely, you may not even get an answer at all in one of these orders. What if I were to multiply two new matrices together? Let me say, let me erase this example up above. And what if I were gonna multiply a two, three by three matrices? Let's say for my first matrix it's one, one, zero, two, one, negative two, three, zero, five. And I'm gonna multiply it times another matrix. Let's say it's a two, five, negative three, zero, negative one, one, one, one, four. Okay, the first matrix, I think I'll call this one D and call this one E since we have an A, B and a C already up there. The first matrix is three by three, the second matrix is three by three. So is this multiplication defined? It is because I have a three, three, those match up. And what will be the dimensions of my answer? It'll be three by three, it's the two remaining numbers. So when I finish, I expect to see a three by three product. And that's because I'm taking the two outer numbers down here. Okay, now to get the entry in the one, one position, first row, first column. I multiply the first row times the first column and I get two plus zero, plus zero is two. I can make that a little bit larger, I think. You know, I think you can see now why the number of columns, the number of columns of the first matrix has to equal the number of rows of the second matrix because I have to get these things to match up exactly with no numbers left over. So I need to have three columns here if I have three rows of the next one. So by matching these numbers, it just merely means that when I multiply, these will end together. Okay, to get the entry in the first row, second column, I multiply the first row times the second column. That'll be five minus one plus zero is four. Okay, let me let each of you and the people at home think about what's the value of the entry in the one, three position before we say it out loud. And what do you think? Negative two. Negative two, does everybody agree with that? Yeah, that's negative two. Okay, let's look at the entry right here. What do you think this one would be? Zero. Two. I get two. Yeah, let's just check that. Now I'm multiplying the second row times the first column. Second row, first column. That's gonna be four plus zero minus two is two. Yeah. Okay, let's go ahead and wind this one on up. What number goes in the middle, the two, two position? Second row, second column. What I get is 10 minus one minus two is seven. And then in the two, three position, second row, third column. I get negative six plus one, that's negative five. Minus eight is negative 13. And then on the bottom row, I get six plus zero plus five is 11. And then I get 15 plus zero plus five is 20. And finally, I get negative nine plus zero plus 20 is 11, is 11 there. Okay, so this is the product D, E. I'll just write that above it, this is D times E. Now, you know, if I reverse the order of this one and if I compute ED, I would have to reverse my matrices and generally, I'll get a different answer. Now, this is important to know for some of the work that lies ahead is to know that we cannot generally commute the order of matrices, we multiply. But if we're adding, we can commute the order. We saw that a moment ago. A plus B and B plus A were the same. Okay, let's see what we get here for this new three by three matrix. If you're wondering why is it three by three, we'll see once again, this is a three by three, this is a three by three, these numbers match. So the multiplication is defined and the outer numbers tell me this will be a three by three. Okay, the first entry here will be, will be what? Let's see here, two plus 10 is 12, 12 minus nine is three, you're right. See what's, it's already different, we got a two before. In the next position, in the one, two position, I get two plus five plus zero is seven. Two plus five, yeah, seven. And what number's gonna go here? Zero. Let's see, not zero. We get zero minus 10 minus 15. Minus 25. Minus 25, are they, does everybody agree with that? Okay, for the second row, in the first position, they'll see that's a second row, first column, second row, first column, zero minus two plus three is one. And the next entry is zero minus one plus zero is minus one. And then zero plus two plus five is seven. Okay, and on the last row, let's see, the first position, that's third row, first column. Third row, first column. So I get one plus two plus 12 is 15. And then I get one plus one plus zero is two. And the last entry is, who wants to take a wild stab at that one? Is it 18? 18 is 18, yeah. Now, you know, when you compare these, it doesn't look like not only are the matrices not alike, they don't have anything alike. Sometimes we might get a few entries to be alike, but in this case, they're just totally different. We say that two matrices are equal, if and only if, they have the same dimensions, three by three, three by three, so yeah, these have the same dimensions. And corresponding entries are identical. Well here, the corresponding entries are not identical. In fact, none of them are like the corresponding entries of the other. Okay, this is how you multiply matrices. Now, there is a special matrix for multiplication, a special group of matrices known as the identity matrices. Let me give an example. So what we're describing here is something referred to the identity matrix. Actually, there are quite a few identity matrices, but this one I'm gonna call the two by two identity matrix, the two by two identity matrix. It's abbreviated as I sub two, and here's what it looks like. It's a square matrix, it's always a square matrix, and if I put a subscript two, it means it's a two by two, not a three by three. And you put ones down the main diagonal, and you put zeros everywhere else. Now, let me show you why it's called the identity matrix. That's sort of a mysterious name. Look what happens if I go up here and take matrix C and multiply it times I two. C times I two. Well, now, matrix C is two, one, three, negative two. And I sub two is one, zero, zero, one. Now, look what happens when I multiply here. Let's see, first of all, this is a two by two matrix. This is a two by two matrix. These numbers match up, so that multiplication is defined, and the answer will be two by two. Okay, so two by two right here. And the first entry, let's see, that's first row, first column. I get two plus zero is two. The entry in the first row, second column, is zero plus one is one. And the entry in the second row, first column, second row, first column is three plus zero is three, and the last entry is zero plus negative two is negative two. What do you notice about that answer? It's identical to the first one. It's the same as the original matrix C. So I is called the identity matrix, because actually it's sort of like an arithmetic when you multiply four times one, you get four. Well, in this case, if you multiply C times I two, you get C. So this behaves sort of like the number one in arithmetic, it allows C to keep its identity. You know, actually, this makes me so mad because I doesn't keep its identity, it's called the identity matrix, but actually I sacrifices itself and it lets C remain the same. You know, I really kind of feel sorry for ISM too. What happens if we multiply it in the other order? Let's just try it in this order. This would be one, zero, zero, one, and two, one, three, negative two. And I tell you what, without going through all the multiplication steps, I think you'll be able to verify on your own that when you multiply, you still get two, one, three, and negative two. So you still get C. So the identity matrix has this property, whether you put it on the left or the right. Here's one of the rare cases where when you can multiply these two matrices in either order and you do get the same answer. So these two matrices commute. Generally the multiplication doesn't commute. If we were to see a reference to ISM three, that would be the three by three identity matrix. And it has ones down the main diagonal and it has zeros everywhere else. And you see if you were to multiply A times I three, you remember matrix A up here? If you were to multiply A times I three, that multiplication would be defined because this is a two by three matrix. This is a three by three matrix. And I don't think you'd be surprised to find out that the answer will be an A. But if you reverse the order, the multiplication isn't defined because this is three by three, three by three, and this is two by three, the multiplication isn't defined. But if I put ISM two here, ISM two is a two by two. Now the multiplication is defined. I'll get a two by three answer and the two by three answer that I get will be A again. So there is an identity you can put on the right of A to get A, but there's a different identity that you put on the left in the second product to get A because A isn't a square matrix. Okay, we'll have to hold this thought now about the identity matrix because it's gonna become very important in just a few minutes. But first let's go to the next graphic. And I wanna insert another piece of information that's gonna become important later in this episode. This has to do with matrix equations. Now this problem says to write the matrix, to write the system of equations, 5x plus 3y equals four and 2x minus y is 17. Write this as a matrix equation. Now let me show you what I mean by this. This is gonna be an equation, so I'll need an equal sign. But I'm gonna be putting matrices in the equations rather than constants and variables, just the constants and variables. Here's how I do it. I'm first of all gonna make a two by two matrix out of the coefficients. They are five, three, two and negative one. So five, three, two and negative one. And then I'm gonna put another matrix right beside it that is made up of the variables and I'm gonna write them in a column. Now you notice the first matrix is two by two. The second matrix is two rows, one column. That's called a two by one. And so this multiplication is defined. And when I finish, I'm gonna get a two by one answer. So over here, I'll write another two by one matrix. But in this matrix, I'm gonna put the constants that I see at the ends of the linear equations four and 17. Now here I have an equation, but the entries are matrices rather than numbers. And so this is referred to as a matrix equation there. And look what happens when I multiply. If I take the first row times the first column, I get five x plus three y. And that should give me the first entry over here, four. Cause this is in the first row, first column. The first row times the first column gives me the one one entry. Five x plus three y is four. And that's exactly what my equation said by first equation set up above. And if I take the second product, the second row times the first column, I get the entry on the second row first column. I get two x plus negative one y is 17. Or in other words, two x minus y is 17. So my point is the system of equations that I've written up here can be represented as a matrix equation in this form. And I'll come back to this again in a moment. We're just sort of setting up some of the information later in this episode. So this is the matrix equation represented. Let's see, let me do one more of these. And I'll just do this one on the green screen. Okay class, I'm gonna need your help here. I need a linear equation with three unknowns in it. Let's say A, B, and C. So can somebody tell me a linear equation with three unknowns? Just whatever, what's your favorite linear equation, Steven? Three x. Okay, let's use A, B, and C. Oh, A, B, and C. Yeah. Three A. Okay. Plus seven B minus 13 Z. Minus 13 C. Z. Okay. Equals. 20. Equals 20, okay. You're not gonna believe this. That's my favorite linear equation as well. I didn't think you would think of it, but you must be reading my mind. Okay, Sam, can you give us another linear equation with three unknowns? Sure. Negative two A. Negative two A, okay. Minus five B. Minus five B. Plus 13 C. Plus 13 C. Okay, and what's it gonna equal? 28. 28, 28, okay. And now I need one more. I'll tell you what, on the next one, just to make it different, leave out one of the variables. Only put two of the variables in there. Jenny, what would you say? Two A plus C. Two A plus C. Equals zero. Equals zero. Wow, she really got right down to the basics there. Okay, this is a three by three system of equations. System of linear equations. I wanna write this as a matrix equation. So what I do, first of all, is I write the coefficient matrix. So only the coefficients go in here. Three, seven, negative 13. Negative two, negative five, 13. Two, zero, and one. The reason I ask you to leave out a variable is just so I have a chance to put a zero in here to hold that place open. I'm gonna multiply it by what I'll call the unknown matrix, the unknowns. That'll be A, B, and C. And I'm gonna set it equal to what I'll call the constant matrix. And those will be the constants listed over here. 20, 28, and zero. Now, this looks like it's something totally different from what's above, but it's actually equivalent to it. Because look, if I multiply the first row times the first column, I should get the entry in the one-one position. That would say three A plus seven B minus 13 C is 20. And that's exactly what our first equation is that up above. If I take the second row times that column, negative two A minus five B plus 13 C, that should give me 28. Yep, that's exactly right. And if you multiply the bottom row times this column, that's the third row, first column. I should get the entry in the third row, first column, zero. And that will be this entry right here. So my point is that a matrix equation can be used to represent a system of linear equations, and we'll come back to this again in just a moment, too. So hold these ideas in mind. We've talked about sums, differences, products of matrices. We've talked about scalar multiples of matrices. Then we talked about identity matrices, the i sub two, i sub three. And now we've talked about matrix equations. So you might say, well, Dennis, where is all this leading us? Well, it leads us to the next graphic, actually. And this is the beginning of the revelation of what this is all about. The inverse of a matrix. Now, the problem here is says to find the inverse of a two by two matrix A, whose entries are two, one, five, three, if it exists. Now, you might say, well, wait a minute, hold on. What is the inverse of a matrix? Well, let me explain. Suppose I have a matrix of the form A, B, C, D. And I'll call this matrix capital A for a moment. Now, suppose there is another matrix, I'll call it capital B, whose entries are x, y, z, w. And suppose these two matrices have the property that if you take A times B, you get the two by two identity matrix. I'm saying that two by two because these guys are two by twos. And by the way, if you do this in the reverse order, B times A is also the identity matrix. Then if this is the case that these two matrices have a product that's the identity in either order, then B is said to be the inverse of A. And another way of writing B is to call it A with a little negative 1 in the air. Now, that's not an exponent, it's a symbol. This doesn't mean 1 over matrix A because there's no such thing as 1 over a matrix. But this just means this matrix is the inverse of matrix A. Let me just give you an example. Suppose matrix A is the matrix that was just in that graphic. Let me just write this one down for you. Matrix A was 2, 1, 5, 3. And I'm trying to figure out if it has an inverse. If it has an inverse. Now, you might say, well, I'm not quite sure what you mean by an inverse. Well, what I'm saying is, is it possible that there is a matrix of the form x, y, z, w so that the product of these two matrices, A times A inverse, is the identity matrix. I'll put a question mark because I don't know if that's possible yet or not. Well, if this were going to be the case, then A, which has these entries, and A inverse, which we don't really know what its entries would be, would equal the identity matrix 1, 0, 0, 1. Yeah, that's the i sub 2 we were talking about. OK, but again, I'm not sure if this is possible or not. Well, if it were possible, then the first row times the first column would have to equal 1. So 2x plus z would be 1. Let me just write that down here. 2x plus z would have to be 1. Does everybody agree with that? You'd have to get a 1 there. By the way, the second row times the first column should be 0. 5x plus 3z should be 0. 5x plus 3z should be 0. Well, now I'm thinking here's a system of equations, a 2 by 2 system of equations. I should be able to solve that by any number of methods. Most recently, we've talked about Gaussian elimination with back substitution. We've talked about Gauss-Jordan as a method for solving this. And of course, you've learned methods in intermediate algebra for solving 2 by 2 systems. But let's go further. Look at the entry over here, the 0. If I take the first row times the second column, I should get 0. Now that says 2y plus w is 0. 2y plus w should be 0. And if I take the second row times the second column, what should I get? 5y plus 3w equals 1. Should be 1. Yeah, because that's the one I have right here. So if I could just solve these, I would know what the entries of the inverse is if there's a solution. See, if there's no solution, then there's no inverse. But if there is a solution, I could fill in those entries and I would know the so-called inverse matrix. Now let me just remove this middle part. And I'm going to come back and fill in something, of course, in just a second here. But what I'm thinking is I have two systems of equations and they have the same coefficients. Look, 2 and 5 and 1 and 3. So why don't we solve a simultaneous system of linear equations like we did at the end of the previous episode? You remember the way we said we would do that is I would put my coefficients in front, 2, 1, 5, 3. And I would put these constants in the first column. But then here's another system that has the same coefficients, 2, 5, 1, 3. But different constants on the end. So I'll just put those in the second column. And this way I'll be solving both of these at the same time. When I solve to get answers here, I'll be getting answers for x and z. And when I get the numbers here, I'll be getting answers for y and w. And I'll know x and z and y and w. OK. And let me just move that up here. We said that was x, y, z, w. OK. So what I'm going to do now is solve these simultaneously using this extended matrix right here. Now by the way, just for future reference, look at this first 2 by 2 matrix here. What matrix is that? That's matrix A. So if I want to do this again in the future, I can save time and just put matrix A in front there. And what matrix is this over here on the right? It's the identity matrix. Yeah, I said 2. I'll just put an i there. But basically, you put matrix A on the left, you put the identity on the right, and you start reducing it. OK. Now when I solve this, if I use Gauss-Jordan elimination, here's what I would like to see at the end. I'd like to see a 1, a 0, a 1, and a 0. And that way, I know that I've solved for my variables x and y or z and w. And I could read off my answers. Now the answers that I get here would be the answers for x and z, and the answers that I get here would be my answers for y and w. So if I can somehow make this become the identity, where it was originally A, then what I will get will be x, z, y, w. You know, this will be A inverse, and all the entries will be displayed exactly in the form that I would see them in A inverse. So here's what I'll do in the future. If I want to find the inverse of A, I'll put matrix A on the left, I'll put the identity on the right. I'm going to reduce this. I'll do this in just a second. I'm going to reduce this, and so that I get the identity on the left, and A inverse will be on the right. And the answer here, that'll be x. The answer here will be z. The answer here will be y, and the answer here will be w. And the numbers will be displayed exactly as they are in A inverse, so that is matrix A inverse. OK, so let's solve this simultaneous system. I'd like to get a 1 in this position. I'd like to get a 1 in this position. Anybody have an idea how I could get a 1 in that position? There are many ways to do it, but what would you do? Divide by 2. Yeah, let's go ahead and just face the music. Why don't we just divide by 2? It's only a 2 by 2 system. So I'm going to take 1 half of row 1, and that's going to be 1, 1 half, 1 half, and 0. That's a 1 half there. We've been avoiding fractions all along, because we generally make more mistakes with fractions than we do with integers. But for a 2 by 2, I don't think this should get too complicated. I'm going to rewrite the second row, 5, 3, 0, 1, and continue. Now, in the Gauss-Jordan elimination procedure, after I get a 1, I get a 0 below it. So I want to get a 0 here. I think it's pretty obvious that I'll want to take row 2 plus negative 5 times row 1. 1, 1 half, 1 half, 0. And then I'll get 0. Negative 5 times this plus 5 is 0. Now, negative 5 times a half plus 3 is 1 half. And then negative 5 times a half plus 0 is negative 5 halves. And negative 5 times 0 plus 1 is 1. Now, you see how when you let a fraction get its foot in the door, it begins to accumulate pretty rapidly. Now I have four fractions, not just two. OK, well, we'll continue. I want to get a 1 here. What do you recommend? Multiply by 2? Sure. 2 times row 2 is 0, 1, negative 5, 2. I haven't changed the top row, so that's going to be a 1 and a 1 half and a 1 half and a 0. Well, you know we're almost there. I've got my 1 here. I want to get a 0 up above. So I think what I should do is multiply the second row times negative 1 half and add it to the top row. So this is going to be row 1 plus negative 1 half of row 2. I think we just have enough room here to do this. So negative 1 half times 0 plus 1 is 1. Negative 1 half plus 1 half is 0. Negative 1 half of 5 plus 1 half is 3. Yeah, you're right, 3. Sorry, but I had to wait so long on that. OK, and finally, what number is going to go in place of the 0? Negative 1. Negative 1, yeah. And I'll rewrite the bottom row. 0, 1, negative 5, 2. OK, now I have my identity matrix on the left. Now, if I'm looking at the first system of equations, this says x equals 3, z equals negative 5. x equals 3, z equals negative 5. If I'm looking at the second system of equations, this says that y is negative 5 and w is 2. y is negative 5, w is 2. Well, if you just fill those in, that's exactly the way you see the numbers distributed here. 3, negative 1, negative 5, and 2. That is the inverse matrix of A. Now, if A did not have an inverse matrix and a lot of matrices don't have inverse matrices, what would happen is I would get no solution. I would have gotten something like this. And once I get 2 zeros, there's no way I can ever get a 1 there. And I'd have to stop and say no solution. And what that would tell me is this matrix didn't have an inverse, but our matrix A does. Now, let's just check and see if this is the true inverse. Can anyone suggest a way to find to show that this is the inverse without just going through that same process all over again? Yeah, and I should be able to multiply them in either order. And what should I get when I multiply them? The identity matrix. We should get the identity matrix. Let's just check that and see. OK, I have A times A inverse. I'm thinking I should get the identity matrix. I assume 2. Well, let's just check it out. Here's matrix A. 2, 1, 5, 3. Here's matrix A inverse. 3, negative 1, negative 5, 2. And when I multiply them together, let's see. This is a 2 by 2. This is a 2 by 2. So my answer will be a 2 by 2. OK, so four entries. What's the first entry going to be? Well, let's see. That'll be 6 minus 5 is a 1. That's encouraging. The entry in the first row, second column, first row, second column, would be negative 2 plus 2 is 0. That's even more encouraging. The entry right here in the first row, second column, first row, second column is negative 15. Excuse me, 15 plus negative 15 is 0. And in the last entry, it's negative 5 plus 6 is 1. Yes, yes, we're excited at this point. Oh, man, be still my heart. And you know what, without taking the time to do it, if you multiply these in the reverse order, you would get the identity matrix once again. But I think our time is probably better spent on how we compute this inverse matrix than just verifying that it's the inverse by multiplication. So I tell you what, let's go to the next graphic. Before I leave the screen, let me just mention one thing. I'm going to be using this inverse in a moment. So there's a later graphic that's going to come up. And I'm going to have this matrix A. And I'm just going to steal this inverse because we've just computed it. So at that point, this is where I got it from. OK, let's go to the next graphic. This is a bigger problem, and I'm going to have to go over here to the marker board to work at. This says, find the inverse of this matrix B, whose entries are 1, negative 2, negative 4, 2, negative 3, negative 6, negative 3, 6, 15, if it exists. Now, the portion about if it exists means that when I go to reduce this matrix, if I can't get the identity on the left-hand side, that means there is no inverse. OK, so my matrix B, I better copy that up here. My matrix B is 1, negative 2, negative 4, 2, negative 3, negative 6, and negative 3, 6, and 15. OK, I want to find out if this matrix has an inverse. And the way I do it is I make a matrix with B on the left and I sub 3 on the right. Now, that's actually going to be a 3 by 6 matrix. It's going to have three rows, but six columns. And I'm going to reduce it so that I get the identity on the left, at least I hope I can get the identity on the left. And something's going to come up on the right, and that will be B inverse. If I can get the identity here, then this will be the inverse of B over there. So the only question is, can we do it? Is that possible? Well, let's try it and see. First of all, I'll enter matrix B on the left-hand side. Just like we said, I'll put matrix B on the left-hand side. And on the right-hand side, I'm going to put the identity matrix 1, 0, 0, 0, 1, 0, 0, 0, 1. OK, and now I start my quest to make this the identity matrix. Now, there are basically three rules I can use. I can interchange two rows. I can multiply a row by a non-zero scalar, non-zero constant. And I can take a multiple of one row and add it to another row. Those are the three elementary row operations we've been seeing now for a couple episodes. If you do anything else, you'll destroy the solution. But if you stick with those things, the solution remains intact. Well, I've got a 1 there, so we're on a good start. Let's get a 0 here and a 0 here. Let's take row 2 plus negative 2 times row 1. And let's take row 3 plus 3 times row 1. By the way, you don't have to make all this little notation in front of your steps like I do. But I fill that in so that if you look at this later and if you're wondering now, what did he do next? Well, this is supposed to be sort of a guide to help you follow the footprints. Now, the top row isn't changing, so I'll just rewrite that. But the second row changes. It's going to be 0 and 1 and 2 and negative 2 and 1 and 0. OK. And the next row is going to be 0, 0, 3. 0, 0, 3. And the rest of the row is going to be 3, 0, 1. I'm going kind of fast now, so you may want to go back and check these steps later. But just in the interest of time, I'm trying to move this on through this. OK, so I've now finished the first column. It's OK. And the second column is well underway. I have a 1 and I have a 0. I need a 0 up above. So what let's do here is take row 1 plus 2 times row 2. So we're not going to change row 3. And we're not going to change row 2. But we are going to change row 1. Let's see, we're doubling row 2 and adding. So I'm going to get 1, 0, 0. 1, 0, 0. And then I'm going to get double and add negative 3, 2, 0. Negative 3, 2, 0. OK, so now I need to get a 1 right here. You notice we always get the 1s and we get the 0s afterwards. And I think the only way to do this is to multiply by a 3rd. So let's continue back here. 1, 3rd times row 3. So we have 1, 0, 0, negative 3, 2, 0. 0, 1, 2. And now 0, 0, 1. 1, 0, 1, 3rd. OK, we're almost there. We just have to get a 0 in this spot. And I'll have the identity matrix here. So it looks like we will be able to get the i sub 3 matrix here. And so we will get an inverse. So I think we can see already this matrix does have an inverse. I'm going to take row 2 and add on negative 2 times row 3. Yeah, negative 2 times row 3. That'll cancel out that too. Row 1 will remain the same. Row 3 will remain the same. But row 2 is going to be different. Let's see. 0, 1. Now we're doubling and subtracting there. That'll be a 0. So 0, 1, 0. And this is going to be negative 4 and 1 and negative 2 thirds. Negative 2 thirds. So this tells me several things. First of all, this matrix has an inverse. And secondly, that is what the inverse is. So let's just write that up above. B inverse is the matrix negative 3, 2, 0. Negative 4, 1, negative 2 thirds, 1, 0, and 1 3rd. That's B inverse. What would be a way I could check that independently to see if that really is the inverse? Multiply B and B inverse together. Multiply them together. Yeah, let's see. I think we have time to multiply it in one order and just check it and see. And the reason I'm pointing out the check is because you see, it's so easy to make a careless error in this arithmetic that if you're doing this on a test and you come up with this answer, how do you know you didn't make any careless errors? If you have the time on an exam, you can go back and check it by multiplication and you'll know if you have the right answer or not. So let's find out. And just to be different, I'm going to put B inverse on the left because I should be able to multiply these in either order. So I have negative 3, 2, 0. Negative 4, 1. Negative 2 thirds, 1, 0, 1 3rd. And I multiply it times B. 1, negative 2, negative 4. 2, negative 3, negative 6. Negative 3, 6, 15. Equals. Now, we're keeping our fingers crossed. We should get I sub 3, the identity matrix with 1's on the main diagonal, 0's everywhere else. Let's see if that happens. The first entry, the first entry, that's the first row times the first column. That's negative 3 plus 4 is 1 plus 0 is 1. Yep. And the next entry over here, first row, second column. First row, second column. That's 6 minus 6 plus 0 is 0. Well, it's looking good. Now, if I go to the first row, third column, that's going to be 12 minus 12 plus 0 is 0. Yeah, it looks like it's working out fine. So I tell you what, if you finish checking these numbers, you should get these values for the other entries. And that's a check to see if this product or if this matrix is your inverse matrix. Of course, there's really an underlying question here, and that is why would you want to find the inverse of a matrix anyway? And that's what our next problem will be about. But let me just fill in a little bit of information here before we go on. If a matrix has an inverse, like B has an inverse, then the matrix A, a matrix B is said to be invertible. B is invertible. You will see that term used in a lot of textbooks. A matrix is invertible means it has an inverse. Now, that doesn't mean you can flip it over. We're not talking about a reciprocal. It means that this matrix has another matrix that goes with it whose product, together, will make the identity matrix. And the inverse is written with a negative 1 on there, but that does not mean 1 over B. That's merely a symbol to represent the inverse. There's another name for a matrix that has an inverse. B is said to be non-singular. B is non-singular. In other words, it isn't alone, but it has sort of a mate. It comes in a couple, you might say. And this is its mate over here, the inverse. So it isn't alone, but it's non-singular. Now, if a matrix doesn't have an inverse, and I would know that when I reduce my matrix because I would not have been able to get the identity matrix on the left, in that case, let's say we call that matrix C. Matrix C is not invertible if it has no inverse. And another term is to say that C is singular. So because it doesn't have a mate or an inverse matrix, so we say it's singular. You know what this reminds me of is when I was in high school, we had high school dances, and you'd go to the dance, either stag or drag. And stag meant you went alone, so you were like a buck at the dance season. So you didn't have a date at the dance, so you went stag. If you went drag, has different connotations these days. If you go drag, that means it's sort of a drag. You've got a date, so you can't flirt with other girls and so forth, so it's sort of a drag if you have a date. So you'd say you go stag or drag. Well, in this case, a matrix B is either singular or non-singular, or not invertible or invertible. It's sort of the same thing. Okay, let's go back to the green board, and I wanna look at the next graphic that we have here, and this has to do with the solution of a matrix equation. Now, suppose I have a system of equations, and I write it in matrix form, so that, let's see, my marker is getting a little weak here. Matrix A, suppose this is the coefficient matrix. Matrix X is the unknown matrix, and matrix B is the constant matrix. In other words, it'd be something like this. Two, five, six, three, that would be matrix A. Matrix X might be X, Y, and matrix B might be 10, 14. Now, you see, this is a matrix equation that represents a system of equations, and the system of equations says two X plus five Y equals 10, and six X plus three Y equals 14. Yeah, we talked about this just a little while ago. Now, if you have a coefficient matrix that is invertible or nonsingular, if it has an inverse, what we would do would be to multiply on the left by the inverse, and if I multiply on the left by the inverse, then if I shift the parentheses over A inverse times A, what's that product gonna be A inverse times A? I. That's the identity matrix, I, and over here I have A inverse B. But now, what is the identity matrix times X? X. Is X. So I can solve the matrix equation up here. I can solve for my unknown matrix by taking A inverse times B. Let's go to the next graphic and we'll see a system of equations where we'll use this inverse matrix to solve it. You see, there we have two X plus Y is 12, five X plus three Y is 28. Let me just write that on the board here. Two X plus Y is 12, and five X plus three Y is 28. Now, you see, if I write this in matrix form, this would say two one five three times X, Y equals 12, 28. Now, if I wanna solve for X for the matrix X with entries X, Y, then what I do is I multiply the inverse of this matrix times 12, 28. Now, if I remember correctly, the entries of this matrix were three negative one, negative five two. I think we just calculated that a little while ago. I said, we're gonna come back and use that in a moment. So that's the A inverse. This is the B. You see, here's my matrix X. Here's my A inverse. Here's B. So if I multiply the two matrices on the right, I'll have my unknowns X and Y. So let's see, what would these entries be? Well, for X, that's gonna be 36 minus 28 is eight. And for Y, that's gonna be negative 60 plus 56 is negative four. So what this tells me is, X equals eight, Y equals negative four. And I have just solved the system of equations up here using an inverse matrix. Now, I wouldn't say that this is the fastest way to solve a two by two system, but knowing about the property of an inverse matrix and how you can use it to solve the system of equations becomes important in later courses, even if it's not the fastest way, it's an important thing to know about. Well, let's see, today we've talked about the arithmetic of matrices, adding, subtracting, multiplying matrices, multiplying by a scalar. Then we've also talked about matrix equations, and then we looked at how to calculate the inverse of a matrix. I'll see you next time for episode 25.