LinearAlgebra
MatrixMatrixMultiply
compute the product of two Matrices
Calling Sequence
Parameters
Description
Examples
MatrixMatrixMultiply(A, B, ip, options)
A
-
Matrix
B
ip
(optional) equation of the form inplace=true or false; specifies if output overwrites input only in the case where B is square
options
(optional); constructor options for the result object
The MatrixMatrixMultiply(A, B) function computes the standard matrix product A·B. The resulting Matrix has the same number of rows as A and the same number of columns as B.
The inplace option (ip) determines where the result is returned. If given as inplace=true and B is square, the result overwrites the first argument. Otherwise, if given as inplace=false or if this option is not included in the calling sequence, the result is returned in a new Matrix.
The condition inplace=true can be abbreviated to inplace.
The inplace option must be used with caution since, if the operation fails, the original Matrix argument may be corrupted.
The constructor options provide additional information (readonly, shape, storage, order, datatype, and attributes) to the Matrix constructor that builds the result. These options may also be provided in the form outputoptions=[...], where [...] represents a Maple list. If a constructor option is provided in both the calling sequence directly and in an outputoptions option, the latter takes precedence (regardless of the order).
The inplace and constructor options are mutually exclusive.
This function is part of the LinearAlgebra package, and so it can be used in the form MatrixMatrixMultiply(..) only after executing the command with(LinearAlgebra). However, it can always be accessed through the long form of the command by using LinearAlgebra[MatrixMatrixMultiply](..).
This function (with no additional options) has an equivalent shortcut notation, A·B. For more information, see the dot operator.
This routine allows for acceleration by the Graphics Processing Unit (GPU) on hardware supporting Compute Unified Device Architecture (CUDA). See CUDA and CUDA,supported_routines for additional details.
with⁡LinearAlgebra:
R≔Matrix⁡cos⁡θ,−sin⁡θ,sin⁡θ,cos⁡θ
R≔cos⁡θ−sin⁡θsin⁡θcos⁡θ
M≔MatrixMatrixMultiply⁡R,Transpose⁡R
M≔cos⁡θ2+sin⁡θ200cos⁡θ2+sin⁡θ2
Map⁡simplify,M
1001
A≔Matrix⁡1,3,i,j↦ai,j:
B≔Matrix⁡3,1,i,j↦bi,j:
MatrixMatrixMultiply⁡A,B
a1,1⁢b1,1+a1,2⁢b2,1+a1,3⁢b3,1
See Also
dot
LinearAlgebra[Multiply]
Download Help Document