Ask Your Question

Revision history [back]

Matrix multiplication not working for MatrixGroupElement_Gap object

Hi, I want to do a really simple multiplication between two matrices that are each independently defined from different matrix groups, but does have the same underlying structure.

sage: G 
Subgroup with 3 generators(blah, blah, blah) of General Linear Group of degree 4 over Finite Field of size 2

sage: H
Subgroup with 5 generators(blah, ... , blah) of General Linear Group of degree 4 over Finite Field of size 2

sage: g = G.random_element(); h = H.random_element();
g 
[0 1 0 0]
[1 0 0 0]
[0 0 0 1]
[1 1 1 0]
h
[1 0 0 0]
[0 1 0 0]
[1 0 1 0]
[1 1 1 1]

But when I do g*h in the sage command, it says

TypeError: unsupported operand parent(s) for *: G and H

What is the problem here? How can I overcome it?

Matrix multiplication not working for MatrixGroupElement_Gap object

Hi, I want to do a really simple multiplication between two matrices that are each independently defined from different matrix groups, but does have the same underlying structure.

sage: G 
Subgroup with 3 generators(blah, blah, blah) of General Linear Group of degree 4 over Finite Field of size 2

sage: H
Subgroup with 5 generators(blah, ... , blah) of General Linear Group of degree 4 over Finite Field of size 2

sage: g = G.random_element(); h = H.random_element();
g 
[0 1 0 0]
[1 0 0 0]
[0 0 0 1]
[1 1 1 0]
h
[1 0 0 0]
[0 1 0 0]
[1 0 1 0]
[1 1 1 1]

But when I do g*h in the sage command, it says

TypeError: unsupported operand parent(s) for *: G and H

What is the problem here? How can I overcome solve it?