Loading [MathJax]/jax/output/HTML-CSS/jax.js

First time here? Check out the FAQ!

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 0 years ago

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..

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
1

answered 0 years ago

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 A3=B3=C3=I2 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.

Preview: (hide)
link

Comments

You can also use brute force and just list all of the solutions to A3=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 ( 0 years ago )

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

John Palmieri gravatar imageJohn Palmieri ( 0 years ago )
0

answered 0 years ago

rewi gravatar image

updated 0 years ago

Thank you..

in place of s, if I put A, then what will be the resultant code? Now I want A3=A,B3=B,C3=C and A2+B2=C2

Preview: (hide)
link

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: 0 years ago

Seen: 231 times

Last updated: May 15 '24