Or directly through the adjugate method
sage: R.<a,b,c,d> = ZZ[]
sage: RR = R.quotient(a*d-b*c-1)
sage: a,b,c,d = RR.gens()
sage: m = matrix(2, [a,b,c,d])
sage: n = m.adjugate() # we know that det=1 in this case
sage: m * n
[1 0]
[0 1]
Le 12/07/2019 à 16:53, Vincent Delecroix a écrit :
Dear Michael,
At least, you need to know that the determinant is invertible...
See the related tickets
https://trac.sagemath.org/ticket/15160
https://trac.sagemath.org/ticket/27869
Note that the division free inversion of matrices is not a
completely trivial task. A simple way is to go via the matrix
of cofactors by computing determinant with division free
algorithms. This should be reasonable enough.
Best
Vincent
Le 12/07/2019 à 16:43, Michael Jung a écrit :
Dear developers,
I need to compute the inverses of matrices over commutative rings (namely
scalar fields on manifolds). Unfortunately, the algorithms only
process if
the ring is a field or a corresponding fraction field is known. For
now, I
will pretend that the algebra of scalar fields is an algebraic field.
However, for most cases, the algorithms work for arbitrary rings aswell
when the matrix is invertible. I wonder why that hasn't been implemented
yet. It would be nice if there was (for example) an additional attribute
(something like "force=True") for the inverse function to pretend that
the
given ring is a field and at least try a computation.
Best regards,
Michael
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-devel/7cb36eeb-0212-3da3-7612-2ef07d46d33d%40gmail.com.
For more options, visit https://groups.google.com/d/optout.