Question: For arbitrary matrix T find a solution in terms of matrices S and R


I have two general 4x4 matrices S and R subject to the given contraints (eq1, eq2, respectively). First of all, I was trying

to see if there are any specific matrices T such that the equation S.R=T (subject to the constraints of eq1 and eq2)

does NOT exist (i.e. there are no matrices S and R such that the equation holds). I tried many examples but couldn't find

any so now I suspect that any possible T has a solution.

So firstly, I need to define T to be a general 4x4 matrix. Then I want to solve S.R=T but I only want 1 solution (since there may be many solutions. I want the program to terminate after one solution is found). I want to know what S and R must be in order for the equation to hold, thus I want the program to return the solution in terms of the entries of S and R for a general matrix T. My program is below. Thanks!

S := Matrix( [ [a1, a2, a3, a4], [b1, b2, b3, b4], [c1, c2, c3, c4], [d1, d2, d3, d4] ] );
eq1:=a1*d1 = b1*c1, a2*d2 = b2*c2, a3*d3 = b3*c3, a4*d4 = b4*c4;
R := Matrix( [ [s1, t1, r1, l1], [s2, t2, r2, l2], [s3, t3, r3, l3], [s4, t4, r4, l4] ] );
eq2:=s1*l1 = t1*r1,s2*l2 = t2*r2,s3*l3 = t3*r3,s4*l4 = t4*r4;
T := Matrix( [ [1, 0, 0, 1], [0, 1, 0, 0], [0, 1, 0, 0], [1, 0, 0, 1] ] );
res:=solve(% union {eq1,eq2});

Please Wait...