MatrixOperationsCategory(R, Row, Col)ΒΆ
matcat.spad line 63 [edit on github]
undocumented
- *: (%, %) -> % if R has SemiRng
x * yis the product of the matricesxandy. Error: if the dimensions are incompatible.
- *: (%, R) -> % if R has SemiRng
x * ris the right scalar multiple of the scalarrand the matrixx.
- *: (Integer, %) -> % if R has AbelianGroup
n * xis an integer multiple.
- *: (R, %) -> % if R has SemiRng
r*xis the left scalar multiple of the scalarrand the matrixx.
- +: (%, %) -> % if R has AbelianMonoid
x + yis the sum of the matricesxandy. Error: if the dimensions are incompatible.
- -: % -> % if R has AbelianGroup
-xreturns the negative of the matrixx.
- -: (%, %) -> % if R has AbelianGroup
x - yis the difference of the matricesxandy. Error: if the dimensions are incompatible.
- /: (%, R) -> % if R has Field
m/rdivides the elements ofmbyr. Error: ifr = 0.
- antisymmetric?: % -> Boolean if R has AbelianGroup
antisymmetric?(m)returnstrueif the matrixmis square and antisymmetric (i.e.m[i, j] = -m[j, i]for alliandj) andfalseotherwise.
- columnSpace: % -> List Col if R has EuclideanDomain
columnSpace(m)returns a sublist of columns of the matrixmforming a basis of its column space.
- diagonal?: % -> Boolean if R has AbelianMonoid
diagonal?(m)returnstrueif the matrixmis square and diagonal (i.e. all entries ofmnot on the diagonal are zero) andfalseotherwise.
- exquo: (%, R) -> Union(%, failed) if R has IntegralDomain
exquo(m, r)computes the exact quotient of the elements ofmbyr, returning"failed"if this is not possible.
- map: (R -> R, %) -> %
map(f, a)returnsb, whereb(i, j) = a(i, j)for alli,j.
- nullity: % -> NonNegativeInteger if R has IntegralDomain
nullity(m)returns the nullity of the matrixm. This is the dimension of the null space of the matrixm.
- nullSpace: % -> List Col if R has IntegralDomain
nullSpace(m)returns a basis for the null space of the matrixm. 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 matrixm.
- rowEchelon: % -> % if R has EuclideanDomain
rowEchelon(m)returns the row echelon form of the matrixm.
- square?: % -> Boolean
square?(m)returnstrueifmis a square matrix (i.e. ifmhas the same number of rows as columns) andfalseotherwise.
- symmetric?: % -> Boolean
symmetric?(m)returnstrueif the matrixmis square and symmetric (i.e.m[i, j] = m[j, i]for alliandj) andfalseotherwise.
- zero?: % -> Boolean if R has AbelianMonoid
zero?(m)returnstrueifmis a zero matrix andfalseotherwise