MatrixOperationsCategory(R, Row, Col)ΒΆ

matcat.spad line 63 [edit on github]

undocumented

*: (%, %) -> % if R has SemiRng

x * y is the product of the matrices x and y. Error: if the dimensions are incompatible.

*: (%, R) -> % if R has SemiRng

x * r is the right scalar multiple of the scalar r and the matrix x.

*: (Integer, %) -> % if R has AbelianGroup

n * x is an integer multiple.

*: (R, %) -> % if R has SemiRng

r*x is the left scalar multiple of the scalar r and the matrix x.

+: (%, %) -> % if R has AbelianMonoid

x + y is the sum of the matrices x and y. Error: if the dimensions are incompatible.

-: % -> % if R has AbelianGroup

-x returns the negative of the matrix x.

-: (%, %) -> % if R has AbelianGroup

x - y is the difference of the matrices x and y. Error: if the dimensions are incompatible.

/: (%, R) -> % if R has Field

m/r divides the elements of m by r. Error: if r = 0.

antisymmetric?: % -> Boolean if R has AbelianGroup

antisymmetric?(m) returns true if the matrix m is square and antisymmetric (i.e. m[i, j] = -m[j, i] for all i and j) and false otherwise.

columnSpace: % -> List Col if R has EuclideanDomain

columnSpace(m) returns a sublist of columns of the matrix m forming a basis of its column space.

diagonal?: % -> Boolean if R has AbelianMonoid

diagonal?(m) returns true if the matrix m is square and diagonal (i.e. all entries of m not on the diagonal are zero) and false otherwise.

exquo: (%, R) -> Union(%, failed) if R has IntegralDomain

exquo(m, r) computes the exact quotient of the elements of m by r, returning "failed" if this is not possible.

map: (R -> R, %) -> %

map(f, a) returns b, where b(i, j) = a(i, j) for all i, j.

nullity: % -> NonNegativeInteger if R has IntegralDomain

nullity(m) returns the nullity of the matrix m. This is the dimension of the null space of the matrix m.

nullSpace: % -> List Col if R has IntegralDomain

nullSpace(m) returns a basis for the null space of the matrix m. Note: null space is considered as vector space over quotient field of the ring.

rank: % -> NonNegativeInteger if R has IntegralDomain

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

rowEchelon: % -> % if R has EuclideanDomain

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

square?: % -> Boolean

square?(m) returns true if m is a square matrix (i.e. if m has the same number of rows as columns) and false otherwise.

symmetric?: % -> Boolean

symmetric?(m) returns true if the matrix m is square and symmetric (i.e. m[i, j] = m[j, i] for all i and j) and false otherwise.

zero?: % -> Boolean if R has AbelianMonoid

zero?(m) returns true if m is a zero matrix and false otherwise