On 6/10/07, Nikos Apostolakis <nikos.ap at gmail.com> wrote:
>
> ...It seems that "." in maxima stands for two distinct operations,
>
the inner product (aka scalar product, aka dot product) of
> vectors and matrix multiplication.
Yes, Maxima is sloppy about the distinction, but this is partly intentional,
as a convenience feature which can be toggled with scalarmatrixp.
As for Jamie's example, Maxima also interprets lists as 1x matrices but
transposes them to x1 matrices when necessary:
[1,2] . matrix( [1,2,3],[4,5,6]); => matrix([9,12,15]) 1x2 . 2x3
=> 1x3 OK
matrix( [1,2,3],[3,4,5]) . [1,2,3] => matrix([14],[26]) 2x3 . 1x3
=> 2x1 auto-transpose
[1,2,3] . matrix([5],[6],[7]) =>
38 1x3 . 3x1 => scalar
[1,2,3] . [5,6,7] =>
38 1x3 . 1x3 =>
scalar
Convenience and rigor are often at odds. I am normally a proponent of rigor,
but I am undecided in this case. What are cases where Maxima's current
behavior would cause problems?
-s