[GAP Forum] Solving X*A*X^-1 = B for given square matrices A and B;

Mbg Nimda mbg.nimda at gmail.com
Wed Sep 12 18:20:35 BST 2012


Dear Forum  Members,

It is indeed possible to solve this by solving  the system of equations given by
X*A - B*X; if the matrices are n x n then we have to solve n^2
equations in n^2 indeterminates. I use the following code, but I have
to run each loop "manually" and I would like to write a for..do...od;
loop.

rr:=[1..20]*0;;
n:=0;;
W;             #the list of equations
n:=n+1;     #beginning of  the loop
1
r:=W[n];
x_8-x_9+x_10-x_11
d:=11;       #this is the only line I have to repeat for each loop and
that I would like to be done automatically
PolynomialCoefficientsOfPolynomial(r,d);
[ x_37-x_39+x_40, -Z(3)^0 ]
rr[n]:=[last[1],d];
[ x_37-x_39+x_40, 42 ]
for i in [n..20] do r:=W[i]; W[i]:=Value(r, [X(F,d)], [rr[n][1]]); od;

So the question is how to obtain the number of the last term of a
multivariate polynomial (of degree 1).

The purpose of solving this problem is to find a suitable base such
that a given nilpotent matrix reduces to diagonal Young blocks.

Thanks a lot for any help,

Marc Bogaerts



More information about the Forum mailing list