MatrixLinearAlgebraFunctions(R, Row, Col, M)¶
matfuns.spad line 456 [edit on github]
Row: FiniteLinearAggregate R
Col: FiniteLinearAggregate R
M: MatrixCategory(R, Row, Col)
MatrixLinearAlgebraFunctions provides functions to compute inverses and canonical forms.
- adjoint: M -> Record(adjMat: M, detMat: R) if R has IntegralDomain
adjoint(m)returns the ajoint matrix ofm(i.e. the matrixnsuch thatm*n= determinant(m)*id) and the detrminant ofm.
- determinant: M -> R
determinant(m)returns the determinant of the matrixm. an error message is returned if the matrix is not square.
- elColumn2!: (M, R, Integer, Integer) -> M
elColumn2!(m, a, i, j)adds to columnia*column(m,j) : elementary operation of second kind. (i~=j)
- elRow1!: (M, Integer, Integer) -> M
elRow1!(m, i, j)swaps rowsiandjof matrixm: elementary operation of first kind
- elRow2!: (M, R, Integer, Integer) -> M
elRow2!(m, a, i, j)adds to rowia*row(m,j) : elementary operation of second kind. (i~=j)
- fractionFreeGauss!: M -> M if R has IntegralDomain
fractionFreeGauss(m)performs the fraction free gaussian elimination on the matrixm, also known as Bareiss algorithm.
- inverse: M -> Union(M, failed) if R has Field
inverse(m)returns the inverse of the matrix. If the matrix is not invertible, “failed” is returned. Error: if the matrix is not square.
- invertIfCan: M -> Union(M, failed) if R has IntegralDomain
invertIfCan(m)returns the inverse ofmoverR
- minordet: M -> R
minordet(m)computes the determinant of the matrixmusing minors. Error: if the matrix is not square.
- normalizedDivide: (R, R) -> Record(quotient: R, remainder: R) if R has EuclideanDomain
normalizedDivide(n, d)returns a normalized quotient and remainder such that consistently unique representatives for the residue class are chosen, e.g. positive remainders
- nullity: M -> NonNegativeInteger if R has IntegralDomain
nullity(m)returns the mullity of the matrixm. This is the dimension of the null space of the matrixm.
- nullSpace: M -> List Col if R has IntegralDomain
nullSpace(m)returns a basis for the null space of the matrixm.
- rank: M -> NonNegativeInteger if R has IntegralDomain
rank(m)returns the rank of the matrixm.
- rowEchelon: M -> M if R has EuclideanDomain
rowEchelon(m)returns the row echelon form of the matrixm.