*^ (Matrix Multiply)

Purpose:

Multiplies two matrices.

Syntax:

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}} 

 

W3: W1 *^ W2

 

W4: W2 *^ W1

 

W3 and W4 contain the following matrices:

 

W3 == {{11, 23, 17},

       {28, 61, 45}} 

       {38, 84, 61}} 

 

W4 == {{32, 42,  55},

       {62, 79, 104}, 

       {11, 17,  22}} 

 

Remarks:

For matrices A and B, C = 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

 

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

 

If any argument is a scalar, *^ defaults to standard element by element multiplication (equivalent to the * operator). For example:

 

4 *^ 5 == 20

 

See the ^^ (Matrix Power) operator to raise a matrix to a scalar power or raise a scalar to a matrix power.

 

See DADiSP/MatrixXL to significantly optimize *^.

See Also:

\^ (Matrix Solve)

^^ (Matrix Power)

CROSSPROD

DADiSP/MatrixXL

DET

INNERPROD

INTERPOSE

INVERSE

MDIV

MMULT

OUTERPROD

REDUCE

TRANSPOSE