MMULT

Purpose:

Multiplies two matrices.

Syntax:

MMULT(A, B)

A

-

A matrix

B

-

A matrix

Returns:

A matrix.

Example:

W1: {{1, 3, 4},

     {5, 7, 9}, 

     {8, 9, 12}} 

 

W2: {{1, 3, 2},

     {2, 4, 5}, 

     {1, 2, 0}} 

 

mmult(W1,W2) == {{11, 23, 17},

                 {28, 61, 45},

                 {38, 84, 61}} 

 

mmult(W2,W1) == {{32, 42,  55},

                 {62, 79, 104}, 

                 {11, 17,  22}} 

Remarks:

For matrices A and B, C = mmult(A, B) is computed formally with:

 

image\mmult01.gif

 

The number of columns in A must be equal to the number of rows in B. The number of rows in the output matrix is equal to the number of rows in A, and the number of columns in the output matrix is equal to the number of columns in B.

 

Matrix multiplication is not commutative, the product is not independent of the order of the arguments:

 

image\mmult02.gif

 

However the determinant is independent of the order of the product:

 

image\mmult03.gif

 

Matrix multiplication is associative:

 

image\mmult04.gif

 

Matrix multiplication is distributive over addition:

 

image\mmult05.gif

 

mmult(a, b) is equivalent to a *^ b.

 

See DADiSP/MatrixXL to significantly optimize MMULT.

See Also:

*^ (Matrix Multiply)

\^ (Matrix Solve)

DADiSP/MatrixXL

CROSSPROD

INNERPROD

INTERPOSE

INVERSE

MDIV

OUTERPROD

REDUCE

TRANSPOSE