Ask Your Question
0

From this collection, I want to find (if there is any) three matrices A,B,C satisfying A+B=C

asked 2024-05-15 20:13:03 +0100

rewi gravatar image
 M = MatrixSpace(ZZ,2,2)
 s=matrix([[1,0],[0,1]])
 for A in M:
    if A^3==s:
    show(A)

From this collection, I want to find (if there is any) three matrices $A,B,C$ satisfying $A+B=C$. But I am not getting that..

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2024-05-15 21:02:34 +0100

Max Alekseyev gravatar image

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.

edit flag offensive delete link more

Comments

You can also use brute force and just list all of the solutions to $A^3=I$, if you're willing to work mod 3. Then since there are only 9 solutions, you can just try all triples to see if there is a solution to A+B=C, and there isn't.

John Palmieri gravatar imageJohn Palmieri ( 2024-05-15 21:41:46 +0100 )edit

In the case of $A^3=A$, you will obviously get the solutions where $A=0$ and $B=C$.

John Palmieri gravatar imageJohn Palmieri ( 2024-05-15 21:44:46 +0100 )edit
0

answered 2024-05-15 21:24:41 +0100

rewi gravatar image

updated 2024-05-15 21:26:35 +0100

Thank you..

in place of s, if I put A, then what will be the resultant code? Now I want $A^3=A,B^3=B, C^3=C$ and $A^2+B^2=C^2$

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2024-05-15 20:13:03 +0100

Seen: 190 times

Last updated: May 15