determinant slightly buggy
- Subject: determinant slightly buggy
- From: Gosei Furuya
- Date: Wed, 30 May 2007 11:19:04 +0900
hi Stavros
As far as i can underatand ,inverse of kronecker product is
(a at b)^^(-1) = a^^(-1)@ b^^(-1),so
(a at b@c)^^(-1)=a^^(-1)@b^^(-1)@c^^(-1) and
if dgree of a is m,b is n,c is r,
determinant(a at b@c)=determinant(a)^nr *determinant(b)^mr *determinant(c)^mn.
on doing generalized matrix,inverse may be definded such as (a at b)^^(-1) =
a^^(-1)@ b^^(-1),(a at b@c)^^(-1)=a^^(-1)@b^^(-1)@c^^(-1),so on.
(%i16) outermap("*",a,b);
[ [ x1 x3 x1 x4 ] [ x2 x3 x2 x4 ] ]
[ [ ] [ ] ]
[ [ x1 y3 x1 y4 ] [ x2 y3 x2 y4 ] ]
(%o16) [ ]
[ [ x3 y1 x4 y1 ] [ x3 y2 x4 y2 ] ]
[ [ ] [ ] ]
[ [ y1 y3 y1 y4 ] [ y2 y3 y2 y4 ] ]
(%i17) ratsimp(%o16. outermap("*",a^^-1,b^^-1));
[ [ 1 0 ] [ 0 0 ] ]
[ [ ] [ ] ]
[ [ 0 1 ] [ 0 0 ] ]
(%o17) [ ]
[ [ 0 0 ] [ 1 0 ] ]
[ [ ] [ ] ]
[ [ 0 0 ] [ 0 1 ] ]
(%i18) ratsimp(outermap("*",a^^-1,b^^-1,c^^-1).outermap("*",a,b,c));
[ [ [ 1 0 0 ] [ 0 0 0 ] ] [ [ 0 0 0 ] [ 0 0 0 ] ] ]
[ [ [ ] [ ] ] [ [ ] [ ] ] ]
[ [ [ 0 1 0 ] [ 0 0 0 ] ] [ [ 0 0 0 ] [ 0 0 0 ] ] ]
[ [ [ ] [ ] ] [ [ ] [ ] ] ]
[ [ [ 0 0 1 ] [ 0 0 0 ] ] [ [ 0 0 0 ] [ 0 0 0 ] ] ]
[ [ ] [ ] ]
[ [ [ 0 0 0 ] [ 1 0 0 ] ] [ [ 0 0 0 ] [ 0 0 0 ] ] ]
[ [ [ ] [ ] ] [ [ ] [ ] ] ]
[ [ [ 0 0 0 ] [ 0 1 0 ] ] [ [ 0 0 0 ] [ 0 0 0 ] ] ]
[ [ [ ] [ ] ] [ [ ] [ ] ] ]
[ [ [ 0 0 0 ] [ 0 0 1 ] ] [ [ 0 0 0 ] [ 0 0 0 ] ] ]
(%o18) [ ]
[ [ [ 0 0 0 ] [ 0 0 0 ] ] [ [ 1 0 0 ] [ 0 0 0 ] ] ]
[ [ [ ] [ ] ] [ [ ] [ ] ] ]
[ [ [ 0 0 0 ] [ 0 0 0 ] ] [ [ 0 1 0 ] [ 0 0 0 ] ] ]
[ [ [ ] [ ] ] [ [ ] [ ] ] ]
[ [ [ 0 0 0 ] [ 0 0 0 ] ] [ [ 0 0 1 ] [ 0 0 0 ] ] ]
[ [ ] [ ] ]
[ [ [ 0 0 0 ] [ 0 0 0 ] ] [ [ 0 0 0 ] [ 1 0 0 ] ] ]
[ [ [ ] [ ] ] [ [ ] [ ] ] ]
[ [ [ 0 0 0 ] [ 0 0 0 ] ] [ [ 0 0 0 ] [ 0 1 0 ] ] ]
[ [ [ ] [ ] ] [ [ ] [ ] ] ]
[ [ [ 0 0 0 ] [ 0 0 0 ] ] [ [ 0 0 0 ] [ 0 0 1 ] ] ]
(%i19)
nest2([factor,determinant,determinant,determinant],outermap("*",a,b,c));
6 6
(%o19) (x1 y2 - x2 y1) (x3 y4 - x4 y3)
4
(x1 y2 z3 - x2 y1 z3 - x1 y3 z2 + x3 y1 z2 + x2 y3 z1 - x3 y2 z1)
(%i20) load(functs)
(%i21)
nest2([factor,tracematrix,tracematrix,tracematrix],outermap("*",a,b,c));
(%o21) (y2 + x1) (y4 + x3) (z3 + y2 + x1)
tracematrix ,determinant ,ok.
outermap("*",a,b) is matrix,so outermap("*",a,b)^^-1 shoud be equal to
outermap("*",a^^-1,b^^-1),I think.
thanks
ps with mcro makes macro
if we make (setf $%o20 (sublis '((MNCEXPT . MEXPT) (MNCTIMES . MTIMES))
$%o20)),
we can "."-->"*",so all objects can be rewrited beyond maxima interpreter as
such.
I think attribute flatten is not to do pattern matching but to calculate
semi-group calculation.
gosei furuya
2007/5/30, Stavros Macrakis <macrakis at alum.mit.edu>: wrote
>
> Hello, Gosei-san -- you seem to be suggesting that invertmx could also use
> matrix_element_*. How would that work? Would you add a
> matrix_element_power or matrix_element_inverse or matrix_element_divide
> operation?
>
> Thanks,
>
> -s
>
>