9.1 Matrix rings

How do you construct a matrix ring over a finite ring in Sage? The MatrixSpace constructor accepts any Sage ring as a base ring. Here's an example of the syntax:

sage: R = IntegerModRing(51)
sage: M = MatrixSpace(R,3,3)
sage: M(0)
[0 0 0]
[0 0 0]
[0 0 0]
sage: M(1)
[1 0 0]
[0 1 0]
[0 0 1]
sage: 5*M(1)
[5 0 0]
[0 5 0]
[0 0 5]

See About this document... for information on suggesting changes.