Can I get the transformation matrix for echelon form reduction over a finite field?

165 views
Skip to first unread message

Boyan Kostadinov

unread,
Oct 19, 2019, 12:09:01 AM10/19/19
to sage-support
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


More specifically, the call:  M.echelon_form(transformation=Truedoes 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?

Any advice would be much appreciated.

dim...@gmail.com

unread,
Oct 19, 2019, 4:53:32 AM10/19/19
to sage-s...@googlegroups.com
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...@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.

Boyan Kostadinov

unread,
Oct 19, 2019, 12:22:49 PM10/19/19
to sage-support
Thank you so much for the prompt and helpful reply Dmitrii! Much appreciated. 

Best,
Boyan
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-s...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages