> Gaby commented in the OpenAxiom thread on this subject that he thought
> the problem might be overloading of *. Does it make sense to use the
> symbol * to denote mulitiplication of a Matrix by a row vector
> (DirectProduct)?
Why should that be a problem? The only problem I can see is that for
multiplication left or right, the vector is considered as row or column
vector. So being co- or contravariant changes.
(1) -> v := vector [2,3]
(1) [2,3]
Type: Vector(PositiveInteger)
(2) -> m:= matrix [[3,4],[0,1]]
+3 4+
(2) | |
+0 1+
Type: Matrix(Integer)
(3) -> v*m
(3) [6,11]
Type: Vector(Integer)
(4) -> m*v
(4) [18,3]
Type: Vector(Integer)
And if you look at MatrixCategory, then you see (R, Row, Col) as
arguments. So, the authors actually thought about the co-/contravariance
and defined
"*": (%,Col) -> Col
++ \spad{x * c} is the product of the matrix x and the column
vector c.
++ Error: if the dimensions are incompatible.
"*": (Row,%) -> Row
++ \spad{r * x} is the product of the row vector r and the matrix x.
That makes perfect sense to me.
The problem is the interpreter not the library.
Ralf
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en.