Ask Your Question

Revision history [back]

You should work on the Z/nZ module as follows:

sage: R = IntegerModRing(15)

You should work on the Z/nZ module as follows:

sage: R = IntegerModRing(15)
sage: M = Matrix(R, [[1,2],[1,4],[2,4]])
sage: b = vector(R,[3,5,6])
sage: M.solve_right(b)
(1, 1)

You should directly work on the Z/nZ $\mathbb{Z}/n\mathbb{Z}$ module as follows:

sage: R = IntegerModRing(15)
sage: M = Matrix(R, [[1,2],[1,4],[2,4]])
sage: b = vector(R,[3,5,6])
vector(R, [3,5,6])
sage: M.solve_right(b)
(1, 1)

You should directly work on the $\mathbb{Z}/n\mathbb{Z}$ $\mathbb{Z}/m\mathbb{Z}$ module as follows:

sage: R = IntegerModRing(15)
sage: M = Matrix(R, [[1,2],[1,4],[2,4]])
sage: b = vector(R, [3,5,6])
sage: M.solve_right(b)
(1, 1)