12.07.2015 Views

Sage Reference Manual: Matrices and Spaces of Matrices

Sage Reference Manual: Matrices and Spaces of Matrices

Sage Reference Manual: Matrices and Spaces of Matrices

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Sage</strong> <strong>Reference</strong> <strong>Manual</strong>: <strong>Matrices</strong> <strong>and</strong> <strong>Spaces</strong> <strong>of</strong> <strong>Matrices</strong>, Release 6.2<strong>Sage</strong> provides native support for working with matrices over any commutative or noncommutative ring. The parentobject for a matrix is a matrix space MatrixSpace(R, n, m) <strong>of</strong> all n × m matrices over a ring R.To create a matrix, either use the matrix(...) function or create a matrix space using the MatrixSpace comm<strong>and</strong><strong>and</strong> coerce an object into it.<strong>Matrices</strong> also act on row vectors, which you create using the vector(...) comm<strong>and</strong> or by making aVectorSpace <strong>and</strong> coercing lists into it. The natural action <strong>of</strong> matrices on row vectors is from the right. <strong>Sage</strong>currently does not have a column vector class (on which matrices would act from the left), but this is planned.In addition to native <strong>Sage</strong> matrices, <strong>Sage</strong> also includes the following additional ways to compute with matrices:• Several math s<strong>of</strong>tware systems included with <strong>Sage</strong> have their own native matrix support, which can be usedfrom <strong>Sage</strong>. E.g., PARI, GAP, Maxima, <strong>and</strong> Singular all have a notion <strong>of</strong> matrices.• The GSL C-library is included with <strong>Sage</strong>, <strong>and</strong> can be used via Cython.• The scipy module provides support for sparse numerical linear algebra, among many other things.• The numpy module, which you load by typing import numpy is included st<strong>and</strong>ard with <strong>Sage</strong>. It contains avery sophisticated <strong>and</strong> well developed array class, plus optimized support for numerical linear algebra. <strong>Sage</strong>’smatrices over RDF <strong>and</strong> CDF (native floating-point real <strong>and</strong> complex numbers) use numpy.Finally, this module contains some data-structures for matrix-like objects like operation tables (e.g. the multiplicationtable <strong>of</strong> a group).CONTENTS 1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!