matrix and vector operations



Maxima uses "." for both the commutative vector dot product and for 
noncommutative matrix multiplication. If you need both versions of "."
in the same calculation,  you might be in trouble. 

You can restore "." to be noncommutative using the command 'remove.' 
Maxima uses "~" for the vector crossproduct

(%o0)                                        DONE
(%i1) a.b - b.a;
(%o1)                                   A . b - b . A
(%i2) load("vect");
(%o2) 
c:/msys/1.0/maxinstall/share/maxima/5.9.0.9beta2/share/vector/vect.mac
(%i3) a.b - b.a;
(%o3)                                         0
(%i4) remove(".",commutative);
(%o4)                                        DONE
(%i5) a.b - b.a;
(%o5)                                   A . b - b . A
(%i6) vectorsimp(a ~ b + b ~ a);
WARNING: DECLARE VECTOR INDETERMINANTS 

NONSCALAR TO AVOID ERRORS & TO GET FULL SIMPLIFICATION 
(%o6)                                         0

Okay, I need to tell Maxima that 'a' and 'b' are not scalars

(%i7) declare([a,b],nonscalar);
(%o7)                                        DONE
(%i8) vectorsimp(a ~ b + b ~ a);
(%o8)                                         0


If you need to work wih vector components, you can do that too

(%i9) [1,2,3] ~ [4,5,6];
(%o9)                               [1, 2, 3] ~ [4, 5, 6]
(%i10) express(%);
(%o10)                                  [- 3, 6, - 3]
(%i11) 


Maybe this helps.

Barton




Jonathan Stickel <jjstickel@sbcglobal.net>
Sent by: maxima-admin@math.utexas.edu
08/26/2004 01:21 PM

 
        To:     maxima@math.utexas.edu
        cc: 
        Subject:        [Maxima] matrix and vector operations

but many other desired  functions are missing, e.g. outerproduct and 
crossproduct
started to implement these functions myself, which is a good way for me 
to learn maxima programming.  But I'm wondering if someone else has 
already done this and made his functions available?  The "vect" package 
doesn't seem what I want, and I'm concerned about: "Warning: The VECT 
package declares "." to be a commutative operator."

Thanks,
Jonathan

_______________________________________________
Maxima mailing list
Maxima@www.math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima