LinearAlgebra - Maple Help

Online Help

All Products    Maple    MapleSim


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

LinearAlgebra

  

MatrixMatrixMultiply

  

compute the product of two Matrices

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

MatrixMatrixMultiply(A, B, ip, options)

Parameters

A

-

Matrix

B

-

Matrix

ip

-

(optional) BooleanOpt(inplace); specifies if output overwrites input only in the case where B is square

options

-

(optional); constructor options for the result object

Description

• 

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.

Examples

withLinearAlgebra:

RMatrixcosθ,sinθ,sinθ,cosθ

R:=cosθsinθsinθcosθ

(1)

MMatrixMatrixMultiplyR,TransposeR

M:=cosθ2+sinθ200cosθ2+sinθ2

(2)

Mapsimplify,M

1001

(3)

AMatrix1,3,i,j→ai,j:

BMatrix3,1,i,j→bi,j:

MatrixMatrixMultiplyA,B

a1,1b1,1+a1,2b2,1+a1,3b3,1

(4)

See Also

dot

LinearAlgebra[Multiply]

Matrix

type[BooleanOpt]

 


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