# Group action in sage

I want to define a group action in sage. The group is a direct product of two general linear groups. The set under action is of matrices and the action is $(A,B) (M)=A^{-1}MB$. Assume all matrices have compatible sizes in order for multiplication. I might need a stabelizer later so I was thinking doing it in GAP but could not figure out how. Any suggestions?

edit retag close merge delete

The group $G_A$ of all "$A$-matices" is commuting (elementwise) with the corresponding $G_B$? Is $G_A$ commutative?

Since we expect (for a left action): $$(A_1A_2)^{-1}(B_1B2)\ M =(A_1A_2,B_1B_2)\ M=((A_1,B_1)(A_2,B_2))\ M$$ $$\qquad =(A_1,B_1)\ ((A_2,B_2)M)=(A_1,B_1)\ A_2^{-1}B_2M =A_1^{-1}B_1\ A_2^{-1}B_2M$$

Is it ok to get the $G_A$-stabilizer of the $G_B$-stabilizer of the relevant set $X_M$ of considered "$M$-matrices" ?

( 2017-07-23 18:01:05 +0100 )edit

@dan_fulea $G_{A}$ is not commutative . Sorry I made a mistake while posting. The definition of action is now corrected. I have defined a function action of the direct product group on space of matrices which produces the required output. Now if you can guide how to get that stabilizer that would be great.

( 2017-07-23 19:15:46 +0100 )edit

Please explain again which is the frame and the point of the question:

(1) Which are exactly the matrix spaces? All matrices $A,B,M$ are of the shape $n\times n$? Or $M$ is of shape $k\times n$ and $A,B$ square matrices of type $k\times k$ and $n\times n$?

(2) Mathematical issue: Is the action a left action? (Using usual matrix multiplications, not the "opposite ones".)

(3) We fix $A,B$ and look for all matrices $M$ satisfying $$A^{-1}MB=M\ ?$$ If yes, do we really need the group action, as the question was mainly stated?

(4) The above stabilizing condition is equivalent to $MB=AM$. This is a linear equation that we may solve in sage, but maybe $A,B$ should be given explicitly. Is this the question, the only one (i imagine) we can attack using sage.

( 2017-07-24 13:09:07 +0100 )edit

@dan_fulea M is of shape k×n and A,B square matrices of type k×k and n×n. The group is $GL(k,F_{q})$ direct product with $GL(n,F_{q})$ which acts on space of k×n matrices as defined above. I need a stabelizer i.e all the pairs $(A,B) \in GL(k,F_{q}) \times GL(n,F_{q})$ for a fixed M. I think what you stated with points 3 and 4 gives different thing than this.

( 2017-07-24 14:21:02 +0100 )edit

Thanks, this is a statement we can live with! WLOG $k\le n$. Then we reduce $M$, of rank $r\le k\le n$ to a block matrix $X=X(r)$ of the shape $(r+(k-r))\times(r+(k-r)+(n-k))$

I 0 0
0 0 0


because for some invertible matrices $S,T$ we have $M=SXT$, so that $AM=MB$ becomes $ASXT=SXTB$, i.e. $$\underbrace{S^{-1}AS}_{A'}\ X=X\ \underbrace{TBT^{-1}}_{B'}$$and we replace $(A,B)$ by $(A',B')$, getting a controlled conjugated group. So let $M=X$. Then we write $A,B$ in blocks such that we can multiply

[ A11 A12 ] [ I 0 0 ]
[ A21 A22 ] [ 0 0 0 ]


and

[ I 0 0 ] [ B11 B12 B13 ]
[ 0 0 0 ] [ B21 B22 B23 ]
[ 0 0 0 ] [ B31 B32 B33 ]


... so $A_{11}=B_{11}$, $A_{21}=0$, $B_{12}=0$, \$B_{13 ...(more)

( 2017-07-24 21:02:22 +0100 )edit