Ask Your Question

Equation in Matrix

asked 2015-08-24 19:24:56 -0500

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-24 20:23:03 -0500

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 08:01:32 -0500 )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 09:29:19 -0500 )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 09:32:21 -0500 )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-24 19:24:56 -0500

Seen: 47 times

Last updated: Aug 24 '15