Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

First off, it's infeasible to perform the for A in M loop since M is an infinite set.

Instead you can employ the method of undetermined coefficients by assuming that the elements of your three matrices are variables satisfying the equations $A^3 = B^3 = C^3 = I_2$ and $A+B=C$. These equations translate into a system of polynomial equations w.r.t. the matrix elements, and Sage does provide a functionality for solving such system.

The following code show that the matrix in question do not exist even if we allow their elements be rational numbers:

K = PolynomialRing(QQ,12,'x')
x = K.gens()                                                           # variables over QQ
M = [Matrix(2,2,x[s:s+4]) for s in range(0,len(x),4)]  # three matrices formed by variables
pols = []
for A in M:
    pols.extend( (A^3 - identity_matrix(2)).list() )    # equations from A^3 = I_2
pols.extend( (M[0]+M[1]-M[2]).list() )                     # equations from M[0] + M[1] = M[2]
J = K.ideal(pols)
print('Solutions:', J.variety())

It prints

 Solutions: []

meaning that the resulting system of polynomial equations has no solutions.