
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 add two Matrices, two Vectors, or a Matrix and a scalar, use the syntax $A+B$. In the case where one of $A$ or $B$ is a Matrix and the other is a scalar, the scalar is interpreted as a diagonal Matrix of appropriate dimensions, with that scalar value along the diagonal.

•

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 $A\xb7B$. This "." operator is noncommutative, so it does not rearrange the orders of nonscalar terms.


If $A$ and $B$ are numbers (including complex and extended numerics such as infinity and undefined), then $A\xb7B=AB$, that is, the '.' operator extends the '*' operator in this case.


If $A$ and $B$ are Vectors with the same orientation (that is, both are row Vectors or both are column Vectors) and dimension, then $A\xb7B$ is computed as their dot product.


If one of $A$ and $B$ 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 $A\xb7B\xb7C$ are interpreted as expected.


Note: In Maple, '.' can be interpreted as a decimal point (for example, $3.7$), as part of a range operator (for example, $x..y$), 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.)

•

It is an error to use the "*" operator between operands that are both Matrices or Vectors. To multiply a scalar, x, and a Matrix or Vector, you can use $x$ * $A$ or $A$ * $x$. There is a small, but important, difference between $x\xb7A$ and $xA$ in this case, where $x$ is a scalar and $A$ is a Matrix or Vector. Namely, if $x$ is a symbolic expression (not a constant), then $xA$ performs the componentwise multiplication, while $x\xb7A$ returns unevaluated.

•

If $A$ is a square Matrix, then its (integer) powers can be computed using the syntax ${A}^{n}$, where $n$ is an integer. If $n$ is negative, ${A}^{n}={\left({A}^{\left(1\right)}\right)}^{\left(n\right)}$, where ${A}^{\left(1\right)}$ is the inverse of $A$ (if it exists).

•

The transpose of a Matrix or Vector is obtained by the special syntax ${A}^{+}$ or the Transpose(A) command.


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

•

The cross product of two 3D Vectors is computed using the syntax $v\phantom{\rule[0.0ex]{0.3em}{0.0ex}}\&x\phantom{\rule[0.0ex]{0.3em}{0.0ex}}w$.



Examples


>

$\mathrm{with}\left(\mathrm{Student}:\mathrm{LinearAlgebra}\right)\:$

>

$A\u2254\u27e8\u27e81\,2\u27e9\\u27e83\,4\u27e9\\u27e85\,6\u27e9\u27e9$

${A}{\u2254}\left[\begin{array}{ccc}{1}& {3}& {5}\\ {2}& {4}& {6}\end{array}\right]$
 (1) 
$\left[\begin{array}{ccc}{2}& {3}& {5}\\ {2}& {5}& {6}\end{array}\right]$
 (2) 
>

$B\u2254\u27e8\u27e8a\,b\u27e9\\u27e8c\,d\u27e9\u27e9$

${B}{\u2254}\left[\begin{array}{cc}{a}& {c}\\ {b}& {d}\end{array}\right]$
 (3) 
>

$\mathrm{`.`}\left(B\,A\right)$

$\left[\begin{array}{ccc}{a}{+}{2}{}{c}& {3}{}{a}{+}{4}{}{c}& {5}{}{a}{+}{6}{}{c}\\ {b}{+}{2}{}{d}& {3}{}{b}{+}{4}{}{d}& {5}{}{b}{+}{6}{}{d}\end{array}\right]$
 (4) 
>

$\mathrm{`.`}\left(A\,B\right)$

$\left[\begin{array}{cc}{1}& {2}\\ {3}& {4}\\ {5}& {6}\end{array}\right]$
 (5) 
$\left[\begin{array}{cc}\frac{{d}}{{a}{}{d}{}{b}{}{c}}& {}\frac{{c}}{{a}{}{d}{}{b}{}{c}}\\ {}\frac{{b}}{{a}{}{d}{}{b}{}{c}}& \frac{{a}}{{a}{}{d}{}{b}{}{c}}\end{array}\right]$
 (6) 
$\left[\begin{array}{cc}\stackrel{{\&conjugate0;}}{{a}}& \stackrel{{\&conjugate0;}}{{b}}\\ \stackrel{{\&conjugate0;}}{{c}}& \stackrel{{\&conjugate0;}}{{d}}\end{array}\right]$
 (7) 
>

$v\u2254\u27e81\,0\,1\u27e9$

${v}{\u2254}\left[\begin{array}{c}{1}\\ {0}\\ {\mathrm{1}}\end{array}\right]$
 (8) 
>

$\mathrm{`.`}\left(A\,v\right)$

$\left[\begin{array}{c}{\mathrm{4}}\\ {\mathrm{4}}\end{array}\right]$
 (9) 
$\left[\begin{array}{ccc}{1}& {0}& {\mathrm{1}}\end{array}\right]$
 (10) 
>

$v\&x\left(\u27e82\,3\,4\u27e9\right)$

$\left[\begin{array}{c}{3}\\ {\mathrm{6}}\\ {3}\end{array}\right]$
 (11) 
>

$\mathrm{`.`}\left(v\,\u27e82\,3\,4\u27e9\right)$

$\left[\begin{array}{c}{3}\\ {0}\\ {\mathrm{3}}\end{array}\right]$
 (13) 
$\left[\begin{array}{ccc}{x}& {3}{}{x}& {5}{}{x}\\ {2}{}{x}& {4}{}{x}& {6}{}{x}\end{array}\right]$
 (14) 
>

$\mathrm{`.`}\left(x\,A\right)$

${x}{\xb7}\left[\begin{array}{ccc}{1}& {3}& {5}\\ {2}& {4}& {6}\end{array}\right]$
 (15) 


