MatrixLinearAlgebraFunctions(R, Row, Col, M)

matfuns.spad line 457 [edit on github]

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 of m (i.e. the matrix n such that m*n = determinant(m)*id) and the detrminant of m.

determinant: M -> R

determinant(m) returns the determinant of the matrix m. an error message is returned if the matrix is not square.

elColumn2!: (M, R, Integer, Integer) -> M

elColumn2!(m, a, i, j) adds to column i a*column(m, j) : elementary operation of second kind. (i ~=j)

elRow1!: (M, Integer, Integer) -> M

elRow1!(m, i, j) swaps rows i and j of matrix m : elementary operation of first kind

elRow2!: (M, R, Integer, Integer) -> M

elRow2!(m, a, i, j) adds to row i a*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 matrix m.

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 of m over R

minordet: M -> R

minordet(m) computes the determinant of the matrix m using 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 matrix m. This is the dimension of the null space of the matrix m.

nullSpace: M -> List Col if R has IntegralDomain

nullSpace(m) returns a basis for the null space of the matrix m.

rank: M -> NonNegativeInteger if R has IntegralDomain

rank(m) returns the rank of the matrix m.

rowEchelon: M -> M if R has EuclideanDomain

rowEchelon(m) returns the row echelon form of the matrix m.