Matrix multiplication is an important concept in linear algebra, but it can also be a super tricky one. Use this guide to help you along every step of the way Not every pair of matrices can be multiplied. If you have two matrices, the number of columns in the first matrix MUST equal the number of rows in the second matrix How to multiply matrices For example, a 2 x 3 matrix can be multiplied by a 3 x 3 matrix because there are three columns in the first matrix and three rows in the second Can be multiplied x How to multiply matrices On the other hand, a 5 x 2 matrix cannot be multiplied by another 5 x 2 matrix even though they both have the same dimensions. Here is a visual representation: Can’t be multiplied x If two matrices can be multiplied, what would the new dimensions be? It would be the number of rows of the first matrix and the number of columns of the second matrix. So for the example above that would work, the dimensions would be a 2 x 3 matrix. Let’s actually do the multiplying in the next few steps How to multiply matrices You would take the first row of the first matrix and then multiply it by the first column of the second matrix. You would do it by multiplying the first entry in that row by the first entry in the column, second entry in the row by second in column, etc until you finish! Your sum’s place in the new matrix is the row number and column number of the row and column that you multiplied. Let’s continue our example 2x1=2 4x4=16 6x7=42 Sum: 60 gives on row 1, col 1 How to multiply matrices The next step would be to multiply the first row by the second column, and in the new matrix, that would be in row 1 column 2. Then you would multiply the first row by the third column- that sum would be in row 1 column 3! Then you repeat the above with row 2 of matrix 1 to fill the second row of our final matrix Here is the finished product:
Do'stlaringiz bilan baham: |