Manuals/calci/MATRIXMULTIPLY

Revision as of 14:14, 21 June 2017 by Devika (talk | contribs) (Created page with "<div style="font-size:30px">'''MATRIXMULTIPLY(a,b)'''</div><br/> *where <math>a</math> and <math>b</math> are the array of two matrices. ==Description== *This function gives ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
MATRIXMULTIPLY(a,b)


  • where and are the array of two matrices.

Description

  • This function gives product of two matrices.
  • Matrix multiplication is of two types:
Type 1: A scalar (a constant) is multiplied with the each element of the matrix.
Type 2: Multiplication of two matrices. 
  • We can do the matrix multiplication when the number of columns in the first matrix equals the number of rows in the second matrix.
  • For e.g. 4x2 matrix can multiply with 2x3. The matrix product of two arrays   and   is:   where   is the row number and   is the column number.
  • i.e Multiply the elements of each row of 1st matrix by elements of each column of 2nd matrix.
  • So the resultant mat

rix is of the order: Rows of 1st matrix × Columns of 2nd.

  • For e.g If we multiply a 4x2 matrix with a 2x3 matrix, the product matrix is of order 4x3.
  • Matrix multiplication satisfies the associative and distributive properties.But it is not satisfies the commutative property.
  • i.e., Let A,B and C are three matrices, then A(BC)= (AB)C (Associative property)
  • A(B+C)= AB+AC and (A+B)C = AC+BC (Distributive properties)
  • k(AB)=(kA)B=A(kB)where k is a constant.But   (Commutative property)

Examples

1. MATRIXMULTIPLY([2,-3,4;-5,6,7],9)

18 -27 36
-45 54 63

2. MATRIXMULTIPLY([4,7.2,6;9,-8,12],[2,3;6,5;9,8])

105.2 96
78 83

See Also

References

Matrix Multiplication