Matrix-Matrix Multiply - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


LinearAlgebra[Generic]

  

MatrixMatrixMultiply

  

compute Matrix-Matrix product

  

MatrixVectorMultiply

  

compute Matrix-Vector product

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

MatrixMatrixMultiply[R](A,B)

MatrixVectorMultiply[R](A,v)

Parameters

R

-

the domain of computation

A,B

-

matrices of values in R

v

-

Vector of values in R

Description

• 

The (indexed) parameter R, which specifies the domain of computation, a commutative ring, must be a Maple table/module which has the following values/exports:

  

R[`0`] : a constant for the zero of the ring R

  

R[`1`] : a constant for the (multiplicative) identity of R

  

R[`+`] : a procedure for adding elements of R (nary)

  

R[`-`] : a procedure for negating and subtracting elements of R (unary and binary)

  

R[`*`] : a procedure for multiplying elements of R (binary and commutative)

  

R[`=`] : a boolean procedure for testing if two elements of R are equal

• 

The parameters A, B, and v must have compatible dimensions for the product.

Examples

> 

with⁡LinearAlgebraGeneric:

> 

Z`0`,Z`1`,Z`+`,Z`-`,Z`*`,Z`=`≔0,1,`+`,`-`,`*`,`=`

Z0,Z1,Z`+`,Z`-`,Z`*`,Z`=`≔0,1,`+`,`-`,`*`,`=`

(1)
> 

A≔Matrix⁡2,1,4,3,2,1,0,0,5

A≔214321005

(2)
> 

B≔Matrix⁡1,2,3,2,1,2,3,2,1

B≔123212321

(3)
> 

MatrixMatrixMultiplyZ⁡A,B

16131210101415105

(4)
> 

v≔Vector⁡1,2,3

v≔123

(5)
> 

MatrixVectorMultiplyZ⁡A,v

161015

(6)

See Also

LinearAlgebra[Generic]

LinearAlgebra[MatrixMatrixMultiply]

LinearAlgebra[MatrixVectorMultiply]