Friday, September 7

Multiplying Matrices

Introduction to multiplying matrices

The rectangular arrangement of some numbers in some rows and columns is called matrix.

Any matrix A is denoted by A_mxn (m by n), where m is the number of rows and n is the number of column in the matrix A and consists of m x n elements.

A_mxn = `[[a_(11),a_(12),a_(13),...,a_(1n)],[a_(21),a_(22),a_(23),...,a_(2n)],[a_(31),a_(32),a_(33),...,a_(3n)],[.,.,.,...,.],[.,.,.,...,.],[.,.,.,...,.],[a_(m1),a_(m2),a_(m3),...,a_(mn)]]`

The number of rows and number of columns m x n (m by n) gives the size of the Matrix.

For example:  A = `[[3,-1,1],[2,3,-4]]`  has 2 rows and 3 columns, so the size of matrix A is 2 x 3 (2 by 3).

Procedure for Multiplying Matrices

The two matrices A_mxn and B_pxq can be multiplied AB only if the number of columns in first matrix  A is equal to the number of rows in second matrix B. The number of columns in matrix A is n and the number of rows in matrix B is p. So, if n = p the the matrix A_mxn can be multiplied by matrix B_pxq and the size of the resultant matrix AB will be number of rows in matrix A (which is m) x number of columns in Matrix B (which is q).

A_mxn X B_pxq = AB_mxq (given that n = p).

Lets take A = `[[a_(11),a_(12)],[a_(21),a_(22)]]` and B = `[[b_(11),b_(12),b_(13)],[b_(21),b_(22),b_(23)]]` , Here the number of columns in Matrix A (which is 2) = number of rows of matrix B (which is 2). Hence we can find A x B.

Assume that A_2x2 x B_2x3 = D_2x3 = `[[d_(11),d_(12),d_(13)],[d_(21),d_(22),d_(23)]]`

To find d11 we use the first row of A and first column of B. Find the product of the elements of this rows and column,

`[[a_(11),a_(12)],[*,*]]` `[[b_(11),*,*],[b_(21),*,*]]` = `[[a_(11)b_(11) + a(12)b_(21),*,*],[*,*,*]]`

To find d12, use the elements of first row of A and second column of B, and obtain their product.

`[[a_(11),a_(12)],[*,*]]` `[[*,b_(12),*],[*,b_(22),*]]` = `[[*,a_(11)b_(12)+a_(12)b_(22),*],[*,*,*]]`

To find d23, we use the elements of second row of A and third column of B, and obtain the product.

`[[*,*],[a_(21),a_(22)]]` `[[*,*,b_(13)],[*,*,b_(23)]]` = `[[*,*,*],[*,*,a_(21)b_(13)+a_(22)b_(23)]]`

Continuing this way, we get

A x B = `[[a_(11),a_(12)],[a_(21),a_(22)]]` x `[[b_(11),b_(12),b_(13)],[b_(21),b_(22),b_(23)]]` = `[[a_(11)b_(11)+a_(12)b_(21),a_(11)b_(12)+a_(12)b_(22),a_(11)b_(13)+a_(12)b_(23)],[a_(21)b_(11)+a_(22)b_(21),a_(21)b_(12)+a_(22)b_(22),a_(21)b_(13)+a_(22)b_(23)]]`

=`[[(first row) x (first coloumn),(first row) x (secound coloumn),(first row) x (third coloumn)],[(second row) x (first coloumn), (secound row) x (second coloumn), (second row) x (third coloumn)]]`

Stuck on any of these topics how to subtract and simplify fractions, how to solve for proportions try out some best math website like mathsisfun, mathcaptain.com and math dot com.

`[[-1,3],[1,2]]` and B = `[[2],[-1]]` , can we find AB, can we find BA?

AB is possible only when number of columns in A is equal to number of rows in B.

Here number of columns in A = 2

number of rows in B = 2

Therefore, number of columns in A = number of rows in B, so AB is possible

AB = `[[-1,3],[1,2]]` `[[2],[-1]]` = `[[(-1)(2)+(3)(-1)],[(1)(2)+(2)(-1)]]` = `[[-5],[0]]`

BA is possible only when number of columns in B is equal to number of rows in A

Number of columns in B = 1

Number of rows in A = 2

Here number of columns in B `ne` number of rows in A

Therefore, BA is not possible.

No comments:

Post a Comment