Operators in the Student[LinearAlgebra] Package
A+B  add Matrices or Vectors
A.B  multiply Matrices, Vectors, and scalars
x*A, A*x  multiply Matrices or Vectors, and scalars
A^n  compute powers of Matrices, including inverses
A ^ +, Transpose(A), A ^ *, HermitianTranspose(A)  compute transposes of Matrices and Vectors
v &x w  compute the cross product of Vectors

Calling Sequence


A + B
A . B
x * A
A * x
A ^ n
A ^ +
Transpose(A)
A ^ *
HermitianTranspose(A)
v &x w


Parameters


A



Matrix, Vector, or scalar

B



Matrix, Vector, or scalar

x



scalar

n



integer

v



3D Vector

w



3D Vector





Description


•

To multiply two Matrices, a Matrix and a Vector, a Matrix or Vector and a scalar, or to compute the dot product of two Vectors, use the syntax . This "." operator is noncommutative, so it does not rearrange the orders of nonscalar terms.


If one of and is a Matrix or a Vector, and the other is a Matrix, Vector, or constant and the previous case does not apply, then their product is computed as the relevant algebraic operation, without reordering. That is, the '.' operator implements noncommutative multiplication.


The '.' operator is nary, meaning that expressions such as are interpreted as expected.


Note: In Maple, '.' can be interpreted as a decimal point (for example, ), as part of a range operator (for example, ), or as the (noncommutative) multiplication operator. To distinguish between these three circumstances, Maple uses the following rule.


Any dot that is not part of a range operator (more than one '.' in a row) and not part of a number is interpreted as the noncommutative multiplication operator.


Note that the interpretation of the phrase "not part of a number" depends on whether you are using 1D or 2D input mode. In 1D input mode, interpretation proceeds from left to right, and a dot following a number will be interpreted as a decimal point unless that number already contains a decimal point. In 2D input mode, interpretation is carried out on the expression as a whole, and because spaces and juxtaposition can be interpreted as multiplication, a dot which is immediately preceded or followed by a number is always interpreted as a decimal point.


For example, in 1D input mode, 3.4 is a number, 3. 4 is an error and 3 .4 and 3 . 4 return 12. 3. .4 is 12. and 3..4 is a range.


In 2D input mode, 3.4 is a number, 3. 4 and 3 .4 are errors and 3 . 4 returns 12. 3. .4 is an error and 3..4 is again a range. (All of the errors shown by these examples are due to the rule that a number cannot appear as the righthand operand of an implicit multiplication operation. In such cases, use of explicit multiplication (*) can avoid the error. See also 2D Math Details for more information.)

•

The transpose of a Matrix or Vector is obtained by the special syntax or the Transpose(A) command.


Similarly, the Hermitian transpose of a Matrix or Vector is obtained by the special syntax or the HermitianTranspose(A) command.

•

The cross product of two 3D Vectors is computed using the syntax .



Examples


>


>


 (1) 
>


 (2) 
>


 (3) 
>


 (4) 
>


>


 (5) 
>


 (6) 
>


 (7) 
>


 (8) 
>


 (9) 
>


 (10) 
>


 (11) 
>


 (12) 
>


 (13) 
>


 (14) 
>


 (15) 

