Matrix-Matrix Multiply - Maple Help

LinearAlgebra[Generic]

 MatrixMatrixMultiply
 compute Matrix-Matrix product
 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

 > $\mathrm{with}\left(\mathrm{LinearAlgebra}\left[\mathrm{Generic}\right]\right):$
 > $Z\left[\mathrm{0}\right],Z\left[\mathrm{1}\right],Z\left[\mathrm{+}\right],Z\left[\mathrm{-}\right],Z\left[\mathrm{*}\right],Z\left[\mathrm{=}\right]≔0,1,\mathrm{+},\mathrm{-},\mathrm{*},\mathrm{=}$
 ${{Z}}_{{0}}{,}{{Z}}_{{1}}{,}{{Z}}_{{\mathrm{+}}}{,}{{Z}}_{{\mathrm{-}}}{,}{{Z}}_{{\mathrm{*}}}{,}{{Z}}_{{\mathrm{=}}}{≔}{0}{,}{1}{,}{\mathrm{+}}{,}{\mathrm{-}}{,}{\mathrm{*}}{,}{\mathrm{=}}$ (1)
 > $A≔\mathrm{Matrix}\left(\left[\left[2,1,4\right],\left[3,2,1\right],\left[0,0,5\right]\right]\right)$
 ${A}{≔}\left[\begin{array}{ccc}{2}& {1}& {4}\\ {3}& {2}& {1}\\ {0}& {0}& {5}\end{array}\right]$ (2)
 > $B≔\mathrm{Matrix}\left(\left[\left[1,2,3\right],\left[2,1,2\right],\left[3,2,1\right]\right]\right)$
 ${B}{≔}\left[\begin{array}{ccc}{1}& {2}& {3}\\ {2}& {1}& {2}\\ {3}& {2}& {1}\end{array}\right]$ (3)
 > $\mathrm{MatrixMatrixMultiply}\left[Z\right]\left(A,B\right)$
 $\left[\begin{array}{ccc}{16}& {13}& {12}\\ {10}& {10}& {14}\\ {15}& {10}& {5}\end{array}\right]$ (4)
 > $v≔\mathrm{Vector}\left(\left[1,2,3\right]\right)$
 ${v}{≔}\left[\begin{array}{c}{1}\\ {2}\\ {3}\end{array}\right]$ (5)
 > $\mathrm{MatrixVectorMultiply}\left[Z\right]\left(A,v\right)$
 $\left[\begin{array}{c}{16}\\ {10}\\ {15}\end{array}\right]$ (6)