Matrix Add - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


LinearAlgebra[Generic]

  

MatrixAdd

  

add two matrices

  

VectorAdd

  

add two vectors

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

MatrixAdd[R](A,B,c,d)

VectorAdd[R](v,w,c,d)

MatrixAdd[R](lA,lc)

VectorAdd[R](lv,lc)

Parameters

R

-

the domain of computation

A,B

-

Matrices of values in

c,d

-

(optional) scalar values in  (default values: )

v,w

-

Vectors of values in

lA

-

non-empty list of Matrices over

lc

-

(optional) non-empty list of scalar values in

lv

-

non-empty list of vectors over

Description

• 

The (indexed) parameter , 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 , and  must have compatible dimensions for the addition. Similarly, all Matrices in , and all Vectors in , must have compatible dimensions, and the number of elements of , if given, must match the number of element of  or , respectively.

• 

If  are omitted, then MatrixAdd and VectorAdd just compute the sum of the matrices or vectors, respectively.

Examples

(1)

(2)

(3)

(4)

(5)

(6)

(7)

(8)

(9)

(10)

(11)

Compatibility

• 

The LinearAlgebra[Generic][MatrixAdd] and LinearAlgebra[Generic][VectorAdd] commands were introduced in Maple 2021.

• 

For more information on Maple 2021 changes, see Updates in Maple 2021.

See Also

LinearAlgebra[Generic]

LinearAlgebra[MatrixAdd]

LinearAlgebra[VectorAdd]

 


Download Help Document