Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I use Scilab to generate Lie algera and Jordan algebra products?

7 views
Skip to first unread message

Starblade Enkai

unread,
Nov 18, 2009, 2:07:30 PM11/18/09
to
I am trying to define new forms of matrix multiplications using J=1/2
(AB+BA) and L=(AB-BA) and am having a small problem. Mostly I am new
to Scilab and the documentation was a bit confusing to me, since I
can't seem to find how to make my own matrix product.

Thanks in advance!

Jean-Pierre Vial

unread,
Nov 18, 2009, 3:20:15 PM11/18/09
to
Starblade Enkai a �crit :
The easiest way is define a function, something like

deff('[P]=LieProd(X,Y)','P=X*Y-Y*X');

example
X=[1,1;3,4]
Y=[5,6;7,8]
LieProd(X,Y)

Starblade Enkai

unread,
Nov 18, 2009, 6:03:07 PM11/18/09
to
On Nov 18, 12:20 pm, Jean-Pierre Vial <vial...@nerim.net> wrote:
> Starblade Enkai a écrit :> I am trying to define new forms of matrix multiplications using J=1/2

Is it possible to make a new product called GP(X,Y) = A*X*B*Y*C +
D*Y*E*X*F where A, B, C, D, E, and F are all variables and not
constants, so that you can expand GP(U,GP(V,W)) or GP(GP(U,V),W)? I
need to be able to do this to test out a more Generalized Product for
matrixes, for reasons I'd prefer to discuss once I am successful with
what I am trying to do.

calixte

unread,
Nov 19, 2009, 5:56:22 AM11/19/09
to
On 18 nov, 20:07, Starblade Enkai <starblade.idenox.en...@gmail.com>
wrote:

Hello,

You can define a new type, for example mat and overload multiplication
operator for type mat, for example :
M=mlist(['mat' 'val'],[1 2;3 4]);
N=mlist(['mat' 'val'],[5 6;7 8]);
deff('[P]=%mat_m_mat(A,B)','P=A.val*B.val-B.val*A.val')

Just type M*N and scilab will return [M,N]. Type "help overloading" to
have more informations about overloading in scilab.

Calixte

calixte

unread,
Nov 19, 2009, 6:48:49 AM11/19/09
to

It will be better to return a mat so we should define :
deff('[P]=%mat_m_mat(A,B)','P=mlist([''mat'' ''val''],A.val*B.val-
B.val*A.val)');

Calixte

Starblade Enkai

unread,
Nov 19, 2009, 11:12:51 PM11/19/09
to
> Calixte- Hide quoted text -
>
> - Show quoted text -

Thanks! Is there any way to include variables in the new matrix
function, so that AB = U*A*V*B*W + X*B*Y*A*Z in my new matrix function?

calixte

unread,
Nov 20, 2009, 5:47:15 AM11/20/09
to
On 20 nov, 05:12, Starblade Enkai <starblade.idenox.en...@gmail.com>
wrote:

Hello,

Take a look to the command "global".

Calixte

Starblade Enkai

unread,
Nov 20, 2009, 3:51:50 PM11/20/09
to

Okay, because U, V, W, X, Y, and Z are supposed to be arbitrary
variables, and A and B (and C) are supposed to be the input.

For example, say I have G(A,B,C) = F(F(A,B),C) - F(A,F(B,C)) with F
(D,E) = U*D*V*E*W + X*E*Y*D*Z, and then set up an equation. My goal is
to create an equation G(A,B,C) = G(B,C,A) = G(C,A,B) = -G(C,B,A) = -G
(A,C,B) = -G(B,A,C) where A, B, and C are all matrixes.

All I need to be able to do is simplify the equation and seperate out
each permutation of A, B, and C and that can be done manually or
automatically just as long as G(A,B,C) simplifies given a function F
(D,E).

Alternative Algebra is serious business to me, as you can see.

0 new messages