Hi all,
On Dec 17, 10:07 am, Jason Grout <[email protected]> wrote:
> Could you give us a example of precisely what you would like to type and
> what you would like Sage to return?
Of course I don't know what things olfa wants to solve. But my
impression from various previous posts about "solving systems with
symbolic matrices" was the following feature request:
sage: solve([A*A.transpose()=MatrixSpace(QQ,n)(1)], A in MatrixSpace
(QQ,n))
(or another meaningful syntax)
Expected output: A parametrization of all orthogonal (nxn)-matrices.
And this feature request can occur in two flavours:
a) n is a number, e.g., you specify n=5 and then ask sage to create
the above equations and solve them
b) n is symbolic; it is only assumed that n is a positive integer, and
sage is supposed to try and solve the system in full generality.
While I think b) is not realistic, a) could in principle be
implemented (but AFAIK, it is not implemented yet, or am I mistaken?).
Namely, one can do the following:
sage: n=2
sage: A=Matrix([[var('a_%d_%d'%(i,j)) for j in range(n)] for i in range
(n)])
sage: solve((A*A.transpose()).list(), A.list())
[[a_0_0 == r1, a_0_1 == -1*I*r1, a_1_0 == r2, a_1_1 == -1*I*r2],
[a_0_0 == r3, a_0_1 == I*r3, a_1_0 == r4, a_1_1 == I*r4], [a_0_0 ==
r5, a_0_1 == I*r5, a_1_0 == 0, a_1_1 == 0], [a_0_0 == r6, a_0_1 ==
-1*I*r6, a_1_0 == 0, a_1_1 == 0]]
Cheers,
Simon
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---