Sage provides native support for working with matrices over any commutative or noncommutative ring. The parent object for a matrix is a matrix space MatrixSpace(R, n, m) of all matrices over a ring .
To create a matrix, either use the matrix(...) function or create a matrix space using the MatrixSpace command and coerce an object into it.
Matrices also act on row vectors, which you create using the vector(...) command or by making a VectorSpace and coercing lists into it. The natural action of matrices on row vectors is from the right. Sage currently does not have a column vector class (on which matrices would act from the left), but this is planned.
In addition to native Sage matrices, Sage also includes the following additional ways to compute with matrices:
Finally, this module contains some data-structures for matrix-like objects like operation tables (e.g. the multiplication table of a group).