compute Matrix-Matrix product - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Linear Algebra : LinearAlgebra Package : Generic Subpackage : LinearAlgebra/Generic/MatrixMatrixMultiply

LinearAlgebra[Generic][MatrixMatrixMultiply] - compute Matrix-Matrix product

LinearAlgebra[Generic][MatrixVectorMultiply] - compute Matrix-Vector product

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

withLinearAlgebra[Generic]:

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

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

(1)

A:=Matrix2,1,4,3,2,1,0,0,5

A:=214321005

(2)

B:=Matrix1,2,3,2,1,2,3,2,1

B:=123212321

(3)

MatrixMatrixMultiplyZA,B

16131210101415105

(4)

v:=Vector1,2,3

v:=123

(5)

MatrixVectorMultiplyZA,v

161015

(6)

See Also

LinearAlgebra[Generic], LinearAlgebra[MatrixMatrixMultiply], LinearAlgebra[MatrixVectorMultiply]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam