Change order in product of scalar and matrix in LinearAlgebra package

In linear algebra multiplication of a scalar and a matrix can change order: aM=Ma, where a is a scalar and M is a r by c matrix. In case of four matrices K,L,M,N the product KLMN is the same as LMNK if the product LMN is a scalar. However, Maple does not allow the forementioned change of order, because the program only checks whether adjacent matrices are conformable. How can this change of order be done in Maple? The issue is that I want to check my work using Maple. TIA Harry ps. is there a brief notation in Maple for scalar by matrix multiplication?

1x1 matrix is not a scalar

It cannot. A 1x1 matrix (or Matrix) is not a scalar. Consider the product of three vectors/covectors: (mx1)(1xn)(nx1). You want to rearrange this as (1xn)(nx1)(mx1). However, if that were done, then associativity wouldn't hold, that is, (nx1)(mx1) is undefined.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}