Sage Reference Manual
Matrices and Spaces of Matrices1===============================23Sage provides native support for working with matrices over any4commutative or noncommutative ring. The parent object for a matrix5is a matrix space ``MatrixSpace(R, n, m)`` of all6:math:`n\times7m` matrices over a ring :math:`R`.89To create a matrix, either use the ``matrix(...)``10function or create a matrix space using the11``MatrixSpace`` command and coerce an object into it.1213Matrices also act on row vectors, which you create using the14``vector(...)`` command or by making a15``VectorSpace`` and coercing lists into it. The natural16action of matrices on row vectors is from the right. Sage currently17does not have a column vector class (on which matrices would act18from the left), but this is planned.1920In addition to native Sage matrices, Sage also includes the21following additional ways to compute with matrices:222324- Several math software systems included with Sage have their own25native matrix support, which can be used from Sage. E.g., PARI,26GAP, Maxima, and Singular all have a notion of matrices.2728- The GSL C-library is included with Sage, and can be used via29Cython.3031- The ``scipy`` module provides support for32*sparse* numerical linear algebra, among many other things.3334- The ``numpy`` module, which you load by typing35``import numpy`` is included standard with Sage. It36contains a very sophisticated and well developed array class, plus37optimized support for *numerical linear algebra*. Sage's matrices38over RDF and CDF (native floating-point real and complex numbers)39use numpy.4041Finally, this module contains some data-structures for matrix-like42objects like operation tables (e.g. the multiplication table of a group).4344.. toctree::45:maxdepth: 2464748sage/matrix/matrix_space4950sage/matrix/constructor5152sage/matrix/docs5354sage/matrix/matrix_misc5556sage/matrix/matrix5758sage/matrix/matrix05960sage/matrix/matrix16162sage/matrix/matrix26364sage/matrix/strassen6566sage/matrix/berlekamp_massey6768sage/matrix/matrix_dense69sage/matrix/matrix_sparse7071sage/matrix/matrix_generic_dense72sage/matrix/matrix_generic_sparse7374sage/matrix/matrix_modn_sparse7576sage/matrix/matrix_symbolic_dense7778sage/matrix/matrix_integer_dense7980sage/matrix/matrix_rational_dense8182sage/matrix/matrix_double_dense8384sage/matrix/matrix_real_double_dense8586sage/matrix/matrix_complex_double_dense8788sage/matrix/matrix_mpolynomial_dense8990sage/matrix/operation_table9192sage/matrix/action93sage/matrix/change_ring94sage/matrix/echelon_matrix95sage/matrix/matrix_cyclo_dense96sage/matrix/matrix_integer_2x297sage/matrix/matrix_integer_dense_hnf98sage/matrix/matrix_integer_dense_saturation99sage/matrix/matrix_integer_sparse100sage/matrix/matrix_mod2_dense101sage/matrix/matrix_mod2e_dense102sage/matrix/matrix_modn_dense_double103sage/matrix/matrix_modn_dense_float104sage/matrix/matrix_rational_sparse105sage/matrix/matrix_window106sage/matrix/misc107sage/matrix/symplectic_basis108109sage/matrix/benchmark110111.. include:: ../footer.txt112113114