On Fri, Oct 18, 2019 at 09:09:01PM -0700, Boyan Kostadinov wrote: > I want to get the transformation matrix from the echelon form reduction > over finite fields but I found in the SageMath documentation the following > statement: > > *The matrix library used for Z/pZ/p-matrices does not return the > transformation matrix, so the transformation option is ignored* > > Link: > http://doc.sagemath.org/html/en/reference/matrices/sage/matrix/matrix2.html#sage.matrix.matrix2.Matrix.echelon_form > > > More specifically, the call: *M.echelon_form(transformation=True**) *does > not return the transformation matrix T when M is over a finite field, only > the echelon matrix E; T is such that we have T*M=E, so T is just the > product of the elementary matrices, which perform the reducing row > operations. > > Is there any workaround to get the transformation matrix T over a finite > field? Can I get the transformation matrix T over ZZ and then reduce it > over the finite field?
Yes, this should work (with a loss in efficiency, which can be substantial on large matrices). Anyway, this is how to do this. sage: MS = MatrixSpace(GF(19),2,3) ....: C = MS.matrix([1,2,3,4,5,6]) ....: E,T = map(lambda t: matrix(GF(19),t), matrix(ZZ,C).echelon_form(transformation=True)) ....: T*C == E ....: E in MS ....: True True --------------------------------------------------------------- HTH Dmitrii > > Any advice would be much appreciated. > > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-support+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sage-support/2e5a18f6-d022-4d67-ae09-c7825e5abb4c%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/20191019085325.GA10869%40hilbert.lan.