Ask Your Question

Equation in Matrix

asked 2015-08-25 02:24:56 +0200

nur_hamid gravatar image

I have problem in center of Terwilliger Algebra. But, I will explain simple problem for simplicity my problem.

For example, I have matrix


and also I have


These matrix have condition


for any B=B1,B2,B3,B4 If I solve it by hand, it is easy to get a1,a2,a3,a4. But how to do it by sage? Can sage solve it? Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-08-25 03:23:03 +0200

calc314 gravatar image

Here is one approach for this small scale problem.




eqtns=[M[i,j]==N[i,j] for i in [0,1] for j in [0,1]]
print eqtns
edit flag offensive delete link more


Thanks for your help. It is so helpful. Why do it use [0,1] on for i in [0,1] for j in [0,1]]. Can we save the solution? For example, if we type a2, it will show 0. Thanks

nur_hamid gravatar imagenur_hamid ( 2015-08-25 15:01:32 +0200 )edit

The indices $i,j$ are the indices for your matrix. Sage begins these at 0. So, since these are 2 by 2 matrices, the indices of the entries are 0 and 1.

calc314 gravatar imagecalc314 ( 2015-08-25 16:29:19 +0200 )edit

For my example, the solution is [[a1 == r2, a2 == 0, a3 == 0, a4 == r1]]. So a2 and a3 must be 0 while a1 and a4 can be any real numbers. This is going to be tricky to substitute for a1,a2,a3,a4 since two of them are arbitrary.

calc314 gravatar imagecalc314 ( 2015-08-25 16:32:21 +0200 )edit

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2015-08-25 02:24:56 +0200

Seen: 446 times

Last updated: Aug 25 '15