A mutable matrix in Macaulay2 is a rectangular array of elements of a specific ring, whose entries can be modified.
A mutable matrix is different from a Matrix
in that a matrix contains degree information for the target and source of the matrix, while a mutable matrix has no such information. Also, more operations are provided for matrices.
For an overview of mutable matrices, see mutable matrices
Mutable matrices can either be encoded in a sparse manner (the matrix only encodes the non-zero elements), or in a dense manner (all elements are stored -- even zeros). The distinction is an option to several of the routines that create mutable matrices (mutableMatrix
). Certain operations over RR or CC are performed using the lapack library and require dense encoding of matrices: LUdecomposition
row and column operations
Many matrix arithmetic routines are only available for immutable matrices, not mutable matrices. It is necessary to use matrix
to make an immutable matrix first.