MatrixOperationsCategory(R, Row, Col)ΒΆ
matcat.spad line 63 [edit on github]
undocumented
- *: (%, %) -> % if R has SemiRng
x * y
is the product of the matricesx
andy
. Error: if the dimensions are incompatible.
- *: (%, R) -> % if R has SemiRng
x * r
is the right scalar multiple of the scalarr
and the matrixx
.
- *: (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 scalarr
and the matrixx
.
- +: (%, %) -> % if R has AbelianMonoid
x + y
is the sum of the matricesx
andy
. Error: if the dimensions are incompatible.
- -: % -> % if R has AbelianGroup
-x
returns the negative of the matrixx
.
- -: (%, %) -> % if R has AbelianGroup
x - y
is the difference of the matricesx
andy
. Error: if the dimensions are incompatible.
- /: (%, R) -> % if R has Field
m/r
divides the elements ofm
byr
. Error: ifr = 0
.
- antisymmetric?: % -> Boolean if R has AbelianGroup
antisymmetric?(m)
returnstrue
if the matrixm
is square and antisymmetric (i.e.m[i, j] = -m[j, i]
for alli
andj
) andfalse
otherwise.
- columnSpace: % -> List Col if R has EuclideanDomain
columnSpace(m)
returns a sublist of columns of the matrixm
forming a basis of its column space.
- diagonal?: % -> Boolean if R has AbelianMonoid
diagonal?(m)
returnstrue
if the matrixm
is square and diagonal (i.e. all entries ofm
not on the diagonal are zero) andfalse
otherwise.
- exquo: (%, R) -> Union(%, failed) if R has IntegralDomain
exquo(m, r)
computes the exact quotient of the elements ofm
byr
, 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)
returnstrue
ifm
is a square matrix (i.e. ifm
has the same number of rows as columns) andfalse
otherwise.
- symmetric?: % -> Boolean
symmetric?(m)
returnstrue
if the matrixm
is square and symmetric (i.e.m[i, j] = m[j, i]
for alli
andj
) andfalse
otherwise.
- zero?: % -> Boolean if R has AbelianMonoid
zero?(m)
returnstrue
ifm
is a zero matrix andfalse
otherwise