click to play button
click to replay button
Matrix operations
X
    00:00 / 00:00
    CC
    Hello wonderful mathematics people. This is Anna Cox from Kellogg Community College. 2 matrices of the same size are called equal provided that each element of A is equal to the corresponding element in B. Addition of two matrices that are the same size occur when adding corresponding elements of the matrices A+B. So A of the same row and column plus B of the same row and column Aij plus bij sub IJ's multiplication of a matrix by a number C is just C times the matrix A where C is multiplied by each element of each row and column. Column vector is A n * 1 matrix. It is written as a column A1A2 straight down. Sometimes due to notation, we use parentheses and do A1, A2, The parentheses tell us it's a column vector. We use that notation sometimes just because it takes less room on a piece of paper. Row vector is A1 by N matrix and it uses brackets, so bracket A1, A2,... So remember column vector, If it's written horizontally, it's got parentheses. If it's written with a bracket, it's a row vector. If we look at two matrices that are to be added together literally we add the locations. So 10 + 6, zero plus -9, negative 15 + -3, negative 5 + -2125 + -3 and 30 + -15 So we would get 16 negative 9, negative 18, negative 26, 22, and 15 if we thought about taking that first one and multiplying everything through by 4. If we had four times that first matrix, it literally would be taking each and every location and multiplying it by 4. So 4 * 10 4 * 0 four times -15 four times -5 four times 25, four times 30. So that would equal 40, zero -60 negative 2100 and 120. So when we add them, we add each row and each column location element wise. If we multiply by some constant, we multiply each and every element in the matrices by that constant. Matrix multiplication. Suppose that A is an M by P matrix and B is AP by N matrix. Then the product AB is the M by N matrix defined by the element of AB in its ith row, and JTH column is the sum of the products of corresponding elements in the ith row of A and the JTH column of B. We have some rules of matrix algebra. A+B equal B + A A+. The quantity b + C equal the quantity A+B plus CA times the quantity BC equal the quantity AB times C We have the distributive property also A times the quantity b + C equal AB plus AC and the quantity AB plus C equals AC plus BC. We do not have the commutative property of multiplication with matrices. We're going to show that here in just a moment. So if we look at an example of doing some matrix multiplication, what we're going to do is we're going to go across the row and down a column. So we're going to look at this row by this column, and that's the first row, first column. So all of that's going to go in the 1st row, first column location. So we're going to have 1 * 7 + 0 * 1 + -3 * 0. That's all first row, first column. Then we're going to go to 1st row, second column. So now we're going to have 1 * -4 + 0 * 5 + -3 * 3. I'm going to read across the row and down the column. Then we're going to go to 1st row, third column. So we're going to have 1 * 3 + 0 * -2 plus -3 * 9. I've completed my first row of my product matrix. I'm going to do the same thing now to my second row. So if I do my second row first column, so that's going to go here. If I have 3 * -4 + 2 * 5 + 4 * 3 next, we're going to do 2nd row, second column, that's going to go right here. So we're going to have 3 * -4 + 2 * 5 + 4 * 3 next 2nd row, third column. Just going to go over here. So 3 * 3 + 2 * -2 + 4 * 9. Finally, 3rd row first column so 2 * 7 + -3 * 1 + 5 * 0, third row second column 2 * -4 + -3 * 5 + 5 * 3. And finally, 3rd row, third column 2 * 3 + -3 * -2 + 5 * 9. When we compute this out, we're going to see that we're going to get 7 here -4 and -9 so -13 here 3 and -27 so -24 231541 11 negative 857. So that's what we get when we multiply this first matricy by the 2nd matricy. Now what we're going to do in the next example is we're just going to flip the order. We're going to show that the products are not the same, so the exact same matrices. But now the seven negative 4/3 is going to come first. So first row, first column I was going to go right there 7 * 1 + -4 * 3 + 3 * 2. Then first row, second column 7 * 0 + -4 * 2 + 3 * -3 1st row, third column 7 * -3 + -4 * 4 + 3 * 5. Now we're going to go to the next row. So 2nd row, first column 1 * 1 + 5 * 3 + -2 * 2. Then second row, second column, 1 * 0 + 5 * 2 + -2 * -3. Then second row, third column 1 * -3 + 5 * 4 + -2 * 5. Finally, we're going to go 3rd row, first column, and that's going to go right here. So then we're going to have 0 * 1 + 3 * 3 + 9 * 2, third row, second column 0 * 0 + 3 * 2 + 9 * -3 third row, third column 0 * -3 + 3 * 4 + 9 * 5. So when we compute this seven -12 and six, we're going to get one negative 17, negative 2212, sixteen 7/27, negative 21 and 57. When we look at this result here, and we look at the result we had a moment ago, we can see that clearly the commutative property of multiplication does not hold. The first times, the second was not the same result as the second times, the 1st. When we look here, we now have matrices that are not squares. So this one's going to have two rows by two columns, and this one's going to have two rows by three columns. So these two inner numbers have to be the same in order for us to even be able to multiply. And the two outer numbers are going to tell me what my resulting matrices matrices is going to be. So we're going to have two rows and three columns when we're done. So we're going to go across the 1st row and down the first column. So we get 2 * -1 + 1 * 3 go across the 1st row and down the second column. So 2 * 0 + 1 * -2 across the 1st row and down the third column, 2 * 4 + 1 * 5. Doing the same thing with the second one, 4 * -1 + 3 * 3, so going across the 2nd row, down the first column, now across the 2nd row and down the second column. So 4 * 0 + 3 * -2 and finally 4 * 4 + 3 * 5 S When we compute this one out, we're going to get one negative 213, five -6 and 31. When we look at this next one, we get 2 rows by three columns and two rows by two columns. The fact that these inside numbers are not the same, IE the column of the first one doesn't match the row of the second, just means that we can't do it. It's not possible, and we're done. And we go to the next problem here. We're going to start with an equation X 1 - 3 X 2 + 6 X 4 = 0 X 3 + 9 X 4 = 0. And what we want to do is we want to come up with a vector that's going to be the solution. So if we thought about the fact that we can't get the X4 by itself, let's call that X4 T. So we're going to let X equal X1X2X3 and X4. We don't know X4, so let's call it T If we can see that X4 is T, then we could show that X3 is just really -9 T. We'd take the X 4X sub four and replace it with T and then take that 9 T to the other side. So we'd get a -9 T here. We can't get our X sub two by itself, so let's call it some variable S And what that does is it lets our X1 then be -3 S taken to the other side. So +3 S -6 T So 3 S -6 T would be X1X2 would be S -9 T&T. Now a different way to write this would be to split things up into a matricy times S plus another matricy times T So our S matricy would be 310 and 0 because we had three s s 1S and then no s s in the last two terms. Our T matricy would be -6 zero -9 and one. Sometimes this would be written as S parenthesis. Remember 3100 plus t ( -6 zero negative 9/1. Remember, if we use parentheses and we write it horizontally, it's still a column matrix. Our last example is going to be starting with 3457. We want to find letters ABC and D such that A * B equal I which equals B * A. Now the I is called the identity matrix 1001 and we do have commutative property and very, very select cases for multiplication, but overall we do not. So here we're trying to find a matrices where AB times AB equal I, which would equal B * A. So we're going to start with actually finding what ABC and D are. If we say 3457 times ABCD, and we want that to equal 3A plus 4C going across the row and down the column, 3B plus 4D5A plus 7C and 5B plus 7D. Now that matrix C is going to equal the identity matrix 1001. So what that really tells us is 3A plus 4C is going to equal 1 and five A + 7 C is going to equal 03B plus 4D is going to equal 0 and 5B plus 7D is going to equal 1. If we solve these simultaneously, let's say we're going to multiply that top 1 by 5 S 15. A plus 20C equal 5. We multiply the bottom one by a -3 so -15 A -21 C equals 0. We can see that negative C equal 5 or C equal 5. And if we get C equal -5, we can see that A has got to equal 7 by substituting it back in for the second one. If I multiply the top 1 by 5 again, we get 15-B plus 20D equaling zero. If I multiply the second one by a -3 negative fifteen B -, 21 D equal -3 so negative D equal -3 or D equal 3, when I substitute that back in I get B equal -4. So my B matrices is going to be 7 negative 4 negative 5:00 and 3:00. And if I've done this correctly, I should be able to show that seven -4 negative 5 three times 3457 is going to give us the identity matrix. So 7 * 3 + -4 * 5, seven times 4 + -4 * 7, negative 5 * 3 + 3 * 5 and -5 * 4 + 3 * 7. Remember, I'm reading across the row and down the column and pairing them up. So across the row, down the column, across the row, down the column, and finally across the row and down the column. So when I compute all this 21 and -20 is one that's 00 and -20 positive 21/1. That's what we were asked to show. We want to define a matrix B such that A * B equaled B * A which equaled the identity matrix. Thank you and have a wonderful day.