On Thu, Dec 11, 2008 at 2:52 PM, Alasdair <[email protected]> wrote:
>
> Suppose I create a matrix over the ring of integers mod 10:
>
> M=random_matrix(IntegerModRing(10),3,3)
>
> Now the adjoint certainly exists, but M.adjoint() isn't as yet
> implemented over general rings - only over ZZ or QQ. How can I use,
> say, Maxima or Pari within Sage to compute the adjoint of M?
You can do it as illustrated below. However, note that for a random
input matrix it does not work in PARI (as you seem to think it
should), as illustrated below:
sage: M=random_matrix(IntegerModRing(10),3,3)
sage: b = pari(M)
sage: b.matadjoint()
---------------------------------------------------------------------------
PariError Traceback (most recent call last)
CODE:
sage[2]=matadjoint(sage[1]);
GP/PARI ERROR:
*** matadjoint: impossible inverse modulo: Mod(8, 10).
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---