Macaulay2 » Documentation
Packages » Macaulay2Doc » matrices » mutable matrices » MutableMatrix
next | previous | forward | backward | up | index | toc

MutableMatrix -- the class of all mutable matrices

Description

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, mutableIdentity). Certain operations over RR or CC are performed using the LAPACK library and require dense encoding of matrices: LUdecomposition, SVD, solve, eigenvalues, eigenvectors.

row and column operations

matrix arithmetic

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.

Functions and methods returning a mutable matrix:

Methods that use a mutable matrix:

  • MutableMatrix * MutableMatrix -- see * -- a binary operator, usually used for multiplication
  • RingElement * MutableMatrix -- see * -- a binary operator, usually used for multiplication
  • MutableMatrix + MutableMatrix -- see + -- a unary or binary operator, usually used for addition
  • - MutableMatrix -- see - -- a unary or binary operator, usually used for negation or subtraction
  • MutableMatrix - MutableMatrix -- see - -- a unary or binary operator, usually used for negation or subtraction
  • clean(RR,MutableMatrix) -- see clean -- set to zero elements that are approximately zero
  • columnAdd(MutableMatrix,ZZ,Number,ZZ) -- see columnAdd -- add a multiple of one column to another
  • columnAdd(MutableMatrix,ZZ,RingElement,ZZ) -- see columnAdd -- add a multiple of one column to another
  • columnMult(MutableMatrix,ZZ,Number) -- see columnMult -- multiply a column by a ring element
  • columnMult(MutableMatrix,ZZ,RingElement) -- see columnMult -- multiply a column by a ring element
  • columnPermute(MutableMatrix,ZZ,List) -- see columnPermute -- permute some columns
  • columnRankProfile(MutableMatrix) -- see columnRankProfile -- find the column rank profile of a mutable matrix
  • columnSwap(MutableMatrix,ZZ,ZZ) -- see columnSwap -- interchange columns
  • determinant(MutableMatrix) -- see determinant -- determinant of a matrix
  • eigenvalues(MutableMatrix) -- see eigenvalues -- find eigenvalues of a matrix
  • eigenvectors(MutableMatrix) -- see eigenvectors -- find eigenvectors of a matrix over real or complex numbers
  • entries(MutableMatrix) -- see entries -- get the entries of a matrix
  • fillMatrix(MutableMatrix) -- see fillMatrix -- fill a mutable matrix with random numbers
  • fillMatrix(MutableMatrix,ZZ) -- see fillMatrix -- fill a mutable matrix with random numbers
  • inverse(MutableMatrix) -- see inverse(Matrix) -- compute the inverse
  • lift(MutableMatrix,type of RingElement) -- see lift -- lift to another ring
  • LUdecomposition(MutableMatrix) -- see LUdecomposition -- compute the LU decomposition of a matrix
  • MutableMatrix ^ List -- see Matrix ^ List -- select rows
  • MutableMatrix _ List -- see Matrix _ List -- select columns
  • MutableMatrix _ Sequence -- see Matrix _ Sequence -- get entry of matrix
  • matrix(MutableMatrix) -- make a matrix from a mutable one
  • mutableMatrix(MutableMatrix) -- see mutableMatrix -- make a mutable matrix
  • MutableMatrix _ Sequence = Thing -- assignment to an element of a mutable matrix
  • norm(InexactField,MutableMatrix) -- see norm
  • norm(MutableMatrix) -- see norm
  • norm(RR,MutableMatrix) -- see norm
  • nullSpace(MutableMatrix) -- see nullSpace -- find the null space of a mutable matrix
  • numColumns(MutableMatrix) -- see numColumns(Matrix) -- number of columns in a matrix or mutable matrix
  • numRows(MutableMatrix) -- see numRows(Matrix) -- number of rows in a matrix or mutable matrix
  • precision(MutableMatrix) -- see precision
  • QRDecomposition(MutableMatrix) -- see QRDecomposition -- compute a QR decomposition of a real matrix
  • rank(MutableMatrix) -- see rank -- compute the rank
  • reducedRowEchelonForm(MutableMatrix) -- see reducedRowEchelonForm -- compute the reduced row echelon form of a matrix or mutable matrix over a field
  • ring(MutableMatrix) -- see ring -- get the associated ring of an object
  • rowAdd(MutableMatrix,ZZ,Number,ZZ) -- see rowAdd -- add a multiple of one row to another
  • rowAdd(MutableMatrix,ZZ,RingElement,ZZ) -- see rowAdd -- add a multiple of one row to another
  • rowMult(MutableMatrix,ZZ,Number) -- see rowMult -- multiply a row by a ring element
  • rowMult(MutableMatrix,ZZ,RingElement) -- see rowMult -- multiply a row by a ring element
  • rowPermute(MutableMatrix,ZZ,List) -- see rowPermute -- permute some rows
  • rowRankProfile(MutableMatrix) -- see rowRankProfile -- find the row rank profile of a mutable matrix
  • rowSwap(MutableMatrix,ZZ,ZZ) -- see rowSwap -- interchange rows
  • solve(MutableMatrix,MutableMatrix) -- see solve -- solve linear equation(s)
  • source(MutableMatrix) -- see source(Matrix) -- find the source module of matrix
  • submatrix(MutableMatrix,VisibleList,VisibleList) -- see submatrix -- select part of a matrix
  • submatrix(MutableMatrix,VisibleList) -- see submatrix(Matrix,VisibleList) -- select columns
  • SVD(MutableMatrix) -- see SVD -- singular value decomposition of a matrix
  • target(MutableMatrix) -- see target(Matrix) -- find the target module of matrix
  • transpose(MutableMatrix) -- see transpose -- transpose a matrix or table

For the programmer

The object MutableMatrix is a type, with ancestor classes HashTable < Thing.


The source of this document is in Macaulay2Doc/doc_mutablematrices.m2:109:0.