Question: how to make a matrix in terms of other matrix

with(Groebner):
with(LinearAlgebra):
T := lexdeg([x1,x2,x3],[e1,e2,e3]);
hello1 := proc(xx,yy)
return MatrixMatrixMultiply(xx,yy);
end proc:
hello2 := proc(xx,yy)
return xx+yy- MatrixMatrixMultiply(xx,yy);
end proc:
m1 := Matrix(3, 3, {(1, 1) = -.737663975994461+0.*I, (1, 2) = -.588973463383001+0.*I, (1, 3) = .330094104689369+0.*I, (2, 1) = -.588012653178741+0.*I, (2, 2) = .320157823261769+0.*I, (2, 3) = -.742792089286083+0.*I, (3, 1) = -.331802619371428+0.*I, (3, 2) = .742030476217061+0.*I, (3, 3) = .582492741708719+0.*I});
m2 := Matrix(3, 3, {(1, 1) = -.742269137704830+0.*I, (1, 2) = -.590598631673326+0.*I, (1, 3) = .316590877121441+0.*I, (2, 1) = -.593533033362923+0.*I, (2, 2) = .360143915024171+0.*I, (2, 3) = -.719732518911068+0.*I, (3, 1) = -.311054762892221+0.*I, (3, 2) = .722142379823161+0.*I, (3, 3) = .617863510611693+0.*I});
m3 := Matrix(3, 3, {(1, 1) = -.751491355856820+0.*I, (1, 2) = -.574908634018322+0.*I, (1, 3) = .323636840615627+0.*I, (2, 1) = -.575794245520782+0.*I, (2, 2) = .332066412772496+0.*I, (2, 3) = -.747123071744916+0.*I, (3, 1) = -.322058579916187+0.*I, (3, 2) = .747804760642505+0.*I, (3, 3) = .580574121936877+0.*I});
AA := hello1(m1, m2);
BB := hello2(m1, m2);
GB := Basis([e1- AA,e2- BB],T):
NormalForm(m3, GB, T);

Please Wait...