Example 1:
This error results if Matrices, or a Matrix and a Vector, are multiplied using a commutative multiplication operator, `*`:
>
|
|
| (2.1) |
Solution 1:
To multiply Matrices and/or Vectors together using the standard Linear Algebra multiplication operation, use the non-commutative multiplication operator, `.` (dot):
Example 2:
Implicit multiplication (using a space to mean multiplication) can also be ambiguous.
>
|
|
Solution 2:
To multiply Vectors and/or Matrices and/or Arrays together using elementwise multiplication, use the standard multiplication operator, `*` followed by the "elementwise" operator, `~`:
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:
Note also that implicit multiplication is interpreted based on the operands, and when it can, Maple parses these as follows: 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:
However, best practice is to insert the explicit multiplication operator into your expressions.