Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Sage Reference Manual

803374 views
1
Matrices and Spaces of Matrices
2
===============================
3
4
Sage provides native support for working with matrices over any
5
commutative or noncommutative ring. The parent object for a matrix
6
is a matrix space ``MatrixSpace(R, n, m)`` of all
7
:math:`n\times
8
m` matrices over a ring :math:`R`.
9
10
To create a matrix, either use the ``matrix(...)``
11
function or create a matrix space using the
12
``MatrixSpace`` command and coerce an object into it.
13
14
Matrices also act on row vectors, which you create using the
15
``vector(...)`` command or by making a
16
``VectorSpace`` and coercing lists into it. The natural
17
action of matrices on row vectors is from the right. Sage currently
18
does not have a column vector class (on which matrices would act
19
from the left), but this is planned.
20
21
In addition to native Sage matrices, Sage also includes the
22
following additional ways to compute with matrices:
23
24
25
- Several math software systems included with Sage have their own
26
native matrix support, which can be used from Sage. E.g., PARI,
27
GAP, Maxima, and Singular all have a notion of matrices.
28
29
- The GSL C-library is included with Sage, and can be used via
30
Cython.
31
32
- The ``scipy`` module provides support for
33
*sparse* numerical linear algebra, among many other things.
34
35
- The ``numpy`` module, which you load by typing
36
``import numpy`` is included standard with Sage. It
37
contains a very sophisticated and well developed array class, plus
38
optimized support for *numerical linear algebra*. Sage's matrices
39
over RDF and CDF (native floating-point real and complex numbers)
40
use numpy.
41
42
Finally, this module contains some data-structures for matrix-like
43
objects like operation tables (e.g. the multiplication table of a group).
44
45
.. toctree::
46
:maxdepth: 2
47
48
49
sage/matrix/matrix_space
50
51
sage/matrix/constructor
52
53
sage/matrix/docs
54
55
sage/matrix/matrix_misc
56
57
sage/matrix/matrix
58
59
sage/matrix/matrix0
60
61
sage/matrix/matrix1
62
63
sage/matrix/matrix2
64
65
sage/matrix/strassen
66
67
sage/matrix/berlekamp_massey
68
69
sage/matrix/matrix_dense
70
sage/matrix/matrix_sparse
71
72
sage/matrix/matrix_generic_dense
73
sage/matrix/matrix_generic_sparse
74
75
sage/matrix/matrix_modn_sparse
76
77
sage/matrix/matrix_symbolic_dense
78
79
sage/matrix/matrix_integer_dense
80
81
sage/matrix/matrix_rational_dense
82
83
sage/matrix/matrix_double_dense
84
85
sage/matrix/matrix_real_double_dense
86
87
sage/matrix/matrix_complex_double_dense
88
89
sage/matrix/matrix_mpolynomial_dense
90
91
sage/matrix/operation_table
92
93
sage/matrix/action
94
sage/matrix/change_ring
95
sage/matrix/echelon_matrix
96
sage/matrix/matrix_cyclo_dense
97
sage/matrix/matrix_integer_2x2
98
sage/matrix/matrix_integer_dense_hnf
99
sage/matrix/matrix_integer_dense_saturation
100
sage/matrix/matrix_integer_sparse
101
sage/matrix/matrix_mod2_dense
102
sage/matrix/matrix_mod2e_dense
103
sage/matrix/matrix_modn_dense_double
104
sage/matrix/matrix_modn_dense_float
105
sage/matrix/matrix_rational_sparse
106
sage/matrix/matrix_window
107
sage/matrix/misc
108
sage/matrix/symplectic_basis
109
110
sage/matrix/benchmark
111
112
.. include:: ../footer.txt
113
114