Ask Your Question
0

Echelon form of matrix with coefficients in Zp

asked 2014-12-05 17:10:06 +0200

hypercube gravatar image

updated 2017-07-31 21:47:00 +0200

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
1

answered 2014-12-05 20:04:07 +0200

vdelecroix gravatar image

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 17:10:06 +0200

Seen: 319 times

Last updated: Dec 06 '14