Error, (in rtable/Product) use *~ for elementwise multiplication of Vectors or Matrices; use . (dot) for Vector/Matrix multiplication - Maple Help

Home : Support : Online Help : Error, (in rtable/Product) use *~ for elementwise multiplication of Vectors or Matrices; use . (dot) for Vector/Matrix multiplication

Error, (in rtable/Product) use *~ for elementwise multiplication of Vectors or Matrices; use . (dot) for Vector/Matrix multiplication

 Description An expression involving the multiplication of Vectors and/or Matrices (possibly and/or Arrays) has been constructed using the standard multiplication operator, ⋅, which is ambiguous.

Examples

This will happen if Vectors and/or Matrices are multiplied using a commutative multiplication operator, ⋅:

 >
 ${A}{:=}\left[\begin{array}{cc}\mathrm{a__11}& \mathrm{a__12}\\ \mathrm{a__21}& \mathrm{a__22}\end{array}\right]$ (2.1)
 >
 ${v}{:=}\left[\begin{array}{c}\mathrm{v__1}\\ \mathrm{v__2}\end{array}\right]$ (2.2)
 > $A\cdot v$
 >
 ${W}{:=}\left[\begin{array}{cc}{a}& {b}\\ {c}& {d}\end{array}\right]$ (2.3)
 >

Solution:

To multiply Vectors and/or Matrices together using the standard Linear Algebra multiplication operation, use the non-commutative multiplication operator, . (dot):

 >
 $\left[\begin{array}{cc}{\mathrm{a__11}}^{{2}}{+}\mathrm{a__12}{}\mathrm{a__21}& \mathrm{a__11}{}\mathrm{a__12}{+}\mathrm{a__12}{}\mathrm{a__22}\\ \mathrm{a__11}{}\mathrm{a__21}{+}\mathrm{a__21}{}\mathrm{a__22}& \mathrm{a__12}{}\mathrm{a__21}{+}{\mathrm{a__22}}^{{2}}\end{array}\right]$ (2.4)
 >
 $\left[\begin{array}{c}\mathrm{a__11}{,}\mathrm{a__11}{}\mathrm{v__1}{,}\mathrm{v__1}{+}\mathrm{a__12}{,}\mathrm{a__12}{}\mathrm{v__2}{,}\mathrm{v__2}\\ \mathrm{a__21}{,}\mathrm{a__21}{}\mathrm{v__1}{,}\mathrm{v__1}{+}\mathrm{a__22}{,}\mathrm{a__22}{}\mathrm{v__2}{,}\mathrm{v__2}\end{array}\right]$ (2.5)
 >
 $\stackrel{{&conjugate0;}}{\mathrm{v__1}{,}\mathrm{v__1}}{}\mathrm{v__1}{,}\mathrm{v__1}{+}\stackrel{{&conjugate0;}}{\mathrm{v__2}{,}\mathrm{v__2}}{}\mathrm{v__2}{,}\mathrm{v__2}$ (2.6)

To multiply Vectors and/or Matrices and/or Arrays together using elementwise multiplication, use the standard multiplication operator, ⋅ followed by the "elementwise" operator, ~:

 >
 $\left[\begin{array}{cc}{\mathrm{a__11}}^{{2}}& {\mathrm{a__12}}^{{2}}\\ {\mathrm{a__21}}^{{2}}& {\mathrm{a__22}}^{{2}}\end{array}\right]$ (2.7)
 >
 $\left[\begin{array}{cc}\mathrm{a__11}{}{a}& \mathrm{a__12}{}{b}\\ \mathrm{a__21}{}{c}& \mathrm{a__22}{}{d}\end{array}\right]$ (2.8)

Note that when multiplying Arrays together (not with Vectors or Matrices), the standard multiplication operator will result in the elementwise product, so the ~ is not necessary:

 >
 $\left[\begin{array}{cc}{{a}}^{{2}}& {{b}}^{{2}}\\ {{c}}^{{2}}& {{d}}^{{2}}\end{array}\right]$ (2.9)

Note also that implicit multiplication is interpreted based on the operands: For Vector/Matrix operands this will be interpreted as the . (dot - non-commutative) multiplication operator, while for Array operands this will be interpreted as the elementwise operator:

 >
 $\left[\begin{array}{c}\mathrm{a__11}{}\mathrm{v__1}{+}\mathrm{a__12}{}\mathrm{v__2}\\ \mathrm{a__21}{}\mathrm{v__1}{+}\mathrm{a__22}{}\mathrm{v__2}\end{array}\right]$ (2.10)
 >
 $\left[\begin{array}{cc}{{a}}^{{2}}& {{b}}^{{2}}\\ {{c}}^{{2}}& {{d}}^{{2}}\end{array}\right]$ (2.11)