 Hi, I'm Zor. Welcome to a new Zor education. We gradually approach the matrix multiplication definition gradually because I would like to define it in some special cases, like in this particular case today I will talk about square 2 by 2 matrices. You see, matrix multiplication is extremely important operation. I've told you many times because it's related to transformation and it's a combination of consecutive applications of different transformations. So if you are applying one transformation and then another, basically it's an equivalent to multiplication of the matrices which reflect these transformations. So what we would like to define right now is an operation of multiplication which satisfies this very simple rule. If you take the vector U and apply certain linear transformation which is reflected in some matrix A into vector V, then you can say that V is equal to U multiplied by A or A multiplied by U. It depends on whether it's a row vector or column vector, whatever. But then if you have a next transformation into vector W, then you can say that W is equal to V times B or A times U or B times B, depending on. Now, what is really important is that the W vector is the combination of vector U and matrix A and then the result is multiplied by matrix B or from the other perspective it's B times A times U. So our purpose is to define matrix multiplication AB or BA in these cases. Such that W is equal to U and then you apply the product of two matrices or in this case you apply the product of two matrices in this way. These must be equivalent. So consecutive application of A and then B should be equivalent to single application of a product of matrices A and B. So that's how I would like to define the operation of multiplication. I mean, that's the root of it. That's the understanding what's behind the definition because it's very easy to define an operation saying, okay, you do this, this and this and this is called the product of two matrices. Why? Well, this is why. We have to satisfy this particular condition so the operation of multiplication is, well, nice if you wish. It's convenient to work with and it's really reflecting certain material substance behind this matrix application, the substance being a linear transformation. All right, so keep it in mind and that's what I'm going to do with two-dimensional vectors and two-dimensional matrices, two by two. So we would like to define a two by two matrices product in such a way that these conditions are satisfied. All right, so what we do is we start with a vector u, u1, u2 and matrix first A which has I, A, J coordinates and I and J belongs to the interval one to two. So it's two by two matrix, A11, A12, A21, A22. That's how these elements of the matrix A are allocated. Now, then they apply matrix A to the vector u and I will multiply it on the left. It's more convenient for me. I will get the vector v. Now, how vector v is, how coordinates of the vector v are expressed in terms of u and matrix A. Well, this is something which we have already done many times. That's how coordinates of the vector u are related to coordinates of the vector v using the linear transformation described by the matrix A. So this is given to us. All right, next what's given is we have the B matrix and B matrix will be also expressed as B, I, J and it's also two by two matrix and I apply this matrix to vector v to get vector w which is related similarly to the v. So w1 is equal to B11B1 plus B12V2 and w2 is B21V1 plus B22V2. Now, what I was talking about before is a relationship between w and u. Can I get in one linear transformation from u to w? If I can, that would be some kind of a matrix C in such a way that C applied to u would give me w. That's what I would like to get. Now, if I will find this particular matrix of linear transformation which will convert u into w, then this matrix must actually be called a product of A and B or B and A, depending on, all right? Okay, fine. Easy. Let's do it this way. Instead of v, we'll substitute this. Instead of B1, instead of v2, we'll substitute this and let's see what happens. So it's B11 times A11U1 plus A12U2 plus B12V2. V2 is this. A21U1 plus A22U2. Now, w2 is equal to B21. The same thing here. Plus B22A21U1 plus A22U2. Okay. Now, we just have to combine u1 and u2 to get something reasonable, right? So let me just wipe out this thing. So what I will get is w1 is equal to something multiplied by u1. Now, what is multiplied by u1? B11A11, B11A11, B12A21U1. And u2 would be B11A12 plus B12A22U2. Okay. w2 equals 2. Similarly, B21A11 plus B22A21U1 plus... So with u2, I have B12A12A... B21A12, B21A12 and B22A22. Okay. That's all I need right now. So if I'm looking for a transformation from vector u to vector w with some matrix c, then these are my coefficients, right? I already expressed it this way. So C11 is this, C12 is this, C221 is this, and C22 is this. This is basically a definition of my multiplication. Because since w is equal to B times v, these matrix, these vector, v in turn is equal to A times u, A is matrix, u is vector. On another hand, I have that w is equal to c u. So it's very natural where c is expressed in these ways. So it's very natural to say that c is equal to B times A, because that would actually give me exactly what I want, meaning that the product of two matrices is a one single transformation which combines in itself two transformations consecutively applied. First A and then B, okay? And this is a definition of this multiplication. So how can I find out what is in a two by two case? By the way, we are all two by two cases. A, B and C are all matrices with two rows, two columns. How to find the coefficient C11? This how? So that's how the matrix B is multiplied by matrix A. The each particular element of the matrix C, which is the product, is defined by using these definitions. But let's take a little closer look at these definitions. Look at this. C11 equals 2. B11A11 plus B12A21. Okay, let's think about how it looks. We don't need any more of this. All we need is this definition. Let me write it down. B11, B12, B21, B22. This is my matrix B and I'm multiplying it by matrix A. And I'm getting C11, C12, C21, C22. Right? So C11 is equal to B11 times A11. Plus B12 times A21. So I'm taking the first row and the first column. And notice this. Element index is 11. Now I will use the following notation. For the row vector, let's say the first row vector B, I will use B1 and then I'll put an asterisk. And this is a vector, which means B11, B12. And the column vectors, where the second index actually, the column index is the same, but the first one is changing, I will use this notation, star 1 in this case. So what I can say is the following. This is equal to B1 asterisk, which is the first row vector. Scalar product, because this is looking actually like a scalar product of two vectors, right? B11 and B21 are components of one vector. And A11 and A21 are components of another vector. Which one? This vector. So I'm taking the first row, multiply by first column vector. So again, the C11 equals to scalar product of the combination, scalar product of first row vector and first column vector. Similarly, C12 is equal to C12. It's equal to B12, A12, stop, no. C12 is equal to B11, A21 plus B12, A21. So first column 22, which is equal to, this is the formula, one of those which I have wiped out, I shouldn't really, but that's what it is. Which is B1 asterisk, the first row vector, and the second column of the A matrix. So again, you see these 11 and this is 11. This is 12, this is 12. And the same thing will be for 21, which is the second row, B21 and the first column, A1 plus B22, A21 equals to B22 asterisk times A asterisk 1. Again, indices of the product element here correspond to row vector and column vector of the components. And finally, the third one is, I mean the fourth one is, it would be second row from the B and second column from the A, which is B21 second row and second A12 plus B22 A22, which is B times A second row vector and second column vector. So that's the rule which I actually would like you to notice, that whenever we are multiplying 2 by 2 matrix by 2 by 2 matrix, we get 2 by 2 matrix and each component of this 2 by 2 matrix, which is the product with indices i, j, where both i and j can be either 1 or 2, is equal to i's row of the B matrix, row vector, scalarly multiplied by j's column vector from the matrix A. And this represents multiplication of 2 matrices. So that's my final result for today, which I would like actually you to remember, because this would be applicable to anything else. So if you would like to have an element i, j of the product of 2 matrices, then you have to take the i's row vector of the first matrix and multiply it as a scalar product to j's column vector of the second component of the product. So what I'm going to do, my plan is to show that this rule is exactly the same for 3 by 3 matrix that would be next structure. And then based on this I will define, basically I will do exactly what many teachers do from the very beginning. They're saying, okay, this is a definition. These formulas are the definition of the multiplication and they don't explain why. But why is very important? Why is the reason behind this is that the multiplication of B times A should really produce exactly the same transformation as consecutive application of A and then B to the vector. Whatever the vector is, doesn't really matter. It doesn't depend on the vector. So that's basically the result of this lecture, which I would like to extend in the next lectures into a full definition of the product of any 2 matrices, not necessarily square and not necessarily 2 by 3 etc. Okay, don't forget that unizord.com has not only this lecture but also notes for this lecture. And for those students who register, obviously you can have exams taken and you can have your supervisor registered as your supervisor to basically enroll you into some courses or mark certain courses as completed if he or she is satisfied with your exams. So basically it's like an educational process which you can get engaged with the help of your supervisors, teachers, maybe your parents. So that's it for today. I do recommend you to read the notes again because they are in relatively better order than I put it on the board. And then attend my next lectures which are related to other aspects of matrix multiplication. It's very, very important operation, the most important operation on matrices. That's it for today. Thank you very much and good luck.