Ask Your Question
0

Echelon form of matrix with coefficients in Zp

asked 2014-12-05 10:10:06 -0500

updated 2015-01-14 07:31:03 -0500

FrédéricC gravatar image

I was wondering if there was a way to find the echelon form of a matrix with coefficients in Zp with sage? I tried

Matrix(Zp(5), 3, 3, [1..9]).echelon_form()

but this gives a NotImplementedError as echelon_form is not implemented over generic non-exact rings at present. I would also very much like the transformation matrix used to get to echelon form if possible.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2014-12-05 13:04:07 -0500

Hello,

NotImplementedError exactly tells you the current state of Sage library on that function... one workaround is to go over QQ (or possibly ZZ) make the echelon form and go back to Zp

sage: m = Matrix(Zp(5), 3, 3, [1..9])
sage: m.change_ring(QQ).echelon_form().change_ring(Zp(5))
[ 1 + O(5^20)  0             4 + 4*5 + 4*5^2 + ...  + O(5^20)]
[ 0            1 + O(5^20)   2 + O(5^20)                     ]
[ 0            0             0                               ]

(note that I slightly edited the output)

Vincent

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-12-05 10:10:06 -0500

Seen: 51 times

Last updated: Dec 06 '14