for the questions below

you can use A,B,C as single varible or matrix form if needed

you can use A,B,C as single varible or matrix form if needed

1.how to calculate AA1, AA2 and B2 in terms of A,B,C?

2.how to calculate A,B,C in terms of AA1, AA2 and B2 ?

xrestart;

with(LinearAlgebra):

A := Matrix([[a1,a2,a3],[a4,a5,a6],[a7,a8,a9]]);

B := Matrix([[b1,b2,b3],[b4,b5,b6],[b7,b8,b9]]);

C := Matrix([[c1,c2,c3],[c4,c5,c6],[c7,c8,c9]]);

#AA1,AA2, C:=seq(Matrix(3, symbol=i), i=[a,b,c]);

#AA1 := Matrix([[aaa1,0,0],[0,aaa1,0],[0,0,aaa1]]);

#AA2 := Matrix([[aab1,0,0],[0,aab1,0],[0,0,aab1]]);

#B2 := Matrix([[aabb1,0,0],[0,aabb1,0],[0,0,aabb1]]);

AA1 := Matrix([[aaa1,aaa2,aaa3],[aaa4,aaa5,aaa6],[aaa7,aaa8,aaa9]]);

AA2 := Matrix([[aab1,aab2,aab3],[aab4,aab5,aab6],[aab7,aab8,aab9]]);

B2 := Matrix([[aabb1,aabb2,aabb3],[aabb4,aabb5,aabb6],[aabb7,aabb8,aabb9]]);

eq2 := C.A+C.B;

eq3 := C.B+C;

eq4 := B+C.A;

ABC := fsolve(map(t->Equate(op(t))[], [eq2=AA1,eq3=AA2,eq4=B2]));