[Next] [Prev] [Right] [Left] [Up] [Index] [Root]
Elementary Operations on Elements

Elementary Operations on Elements

Subsections

Arithmetic

a + b : AlgMatElt, AlgMatElt -> AlgMatElt
Sum of the matrices a and b, where a and b belong to a common matrix algebra R.
a + t : AlgMatElt, RngElt -> AlgMatElt
t + a : AlgMatElt, RngElt -> AlgMatElt
Sum of the matrix a and the scalar matrix t * I.
- a : AlgMatElt -> AlgMatElt
Negation of the matrix a.
a - b : AlgMatElt, AlgMatElt -> AlgMatElt
Difference of the matrices a and b, where a and b belong to the same matrix algebra R.
a - t : AlgMatElt, RngElt -> AlgMatElt
t - a : AlgMatElt, RngElt -> AlgMatElt
Difference of the matrix a and the scalar matrix t * I.
a * b : AlgMatElt, AlgMatElt -> AlgMatElt
Product of the matrices a and b, where a and b belong to the same matrix algebra R.
a * b : AlgMatElt, ModHomElt -> ModHomElt
Given a matrix a belonging to a subalgebra of M_n(S) and an element b of a submodule of Hom(R^((n)), R^((m))), construct the product of a and b as an element of Hom(R^((n)), R^((m))).
a * b : ModHomElt, AlgMatElt -> ModHomElt
Given a matrix a belonging to a submodule of Hom(R^((n)), R^((m))) and an element b of a subalgebra of M_m(S), construct the product of a and b as an element of Hom(R^((n)), R^((m))).
t * a : RngElt, AlgMatElt -> AlgMatElt
a * t : AlgMatElt, RngElt -> AlgMatElt
Given an element a of the matrix algebra R, and an element t belonging to the coefficient ring S of R, form their scalar product.
u * a : ModTupElt, AlgMatElt -> ModTupElt
Given an element u belonging to the S-module S^((n)) and an element a belonging to a subalgebra of M_n(S), form the element u * a of S^n.
a ^ n : AlgMatElt, RngIntElt -> AlgMatElt
If n is positive, form the n-th power of a; if n is zero, form the identity matrix; if n is negative, form the ( - n)-th power of the inverse of a.
NumberOfColumns(a) : AlgMatElt -> RngIntElt
Ncols(a) : AlgMatElt -> RngIntElt
The number of columns in the matrix a.
NumberOfRows(a) : AlgMatElt -> RngIntElt
Nrows(a) : AlgMatElt -> RngIntElt
The number of rows in the matrix a.

Predicates

Sections
Comparison
a eq b : AlgMatElt, AlgMatElt -> BoolElt
True if the matrix a is equal to the matrix b, where a and b are elements of a common matrix algebra R.
a ne b : AlgMatElt, AlgMatElt -> BoolElt
True if the matrix a is not equal to the matrix b, where a and b are elements of a common matrix algebra R.
Properties of Elements

The functions given here test properties of matrices See also the section in the Lattices chapter for a description of the function IsPositiveDefinite and related functions.

IsDiagonal(a) : AlgMatElt -> BoolElt
True iff the element a belonging to the matrix algebra R is a diagonal matrix; i.e. the only non-zero entries are on the diagonal.
IsMinusOne(a) : AlgMatElt -> BoolElt
True iff the element a belonging to the matrix algebra R is the negation of the identity element for R.
IsOne(a) : AlgMatElt -> BoolElt
True iff the element a belonging to the matrix algebra R is the identity element for R.
IsScalar(a) : AlgMatElt -> BoolElt
True iff the element a belonging to the matrix algebra R is a scalar matrix.
IsSymmetric(a) : AlgMatElt -> BoolElt
True iff the element a belonging to the matrix algebra R is a symmetric matrix; i.e. the transpose of a equals a.
IsUnit(a) : AlgMatElt -> BoolElt
True iff the matrix a belonging to the matrix algebra R is a unit.
IsZero(a) : AlgMatElt -> BoolElt
True iff the element a belonging to the matrix algebra R is the zero element for R.
Rank(a) : AlgMatElt -> RngIntElt
Return the rank of the element a belonging to the matrix algebra R.
Determinant(a) : AlgMatElt -> RngElt
    MonteCarloSteps: RngIntElt          Default: 
Given a square matrix a over the ring R, return the determinant of a as an element of R. If the coefficient ring is the integer ring Z or the rational field Q then by default a modular method based on the Hadamard bound will be used which always yields a correct answer. The modular algorithm works by computing the determinant modulo successive primes and by then using the Chinese Remainder Theorem to find the determinant modulo the product of the primes. If the parameter MonteCarloSteps is set to a small positive integer s, then a probabilistic Monte Carlo modular technique will be employed in which the Hadamard bound will not be used but when the constructed residue stays the same for s steps then the algorithm terminates with the current residue as the result. The probability of this being wrong is non-zero but extremely slight if s is large enough (1 or 2 will usually suffice).
Trace(a) : AlgMatElt -> RngElt
Given an element a of a subalgebra of M_n(S), return the trace of a as an element of S.
Transpose(a) : AlgMatElt -> AlgMatElt
Given an element a of a subalgebra of M_n(S), return the transpose of a as an element of M_n(S).
Order(a) : AlgMatElt -> RngIntElt
Given an invertible matrix a over any commutative ring, determine the order of a. If a has infinite order, the function may become stuck indefinitely since it cannot prove such.
FactoredOrder(a) : AlgMatElt -> [ <RngIntElt, RngIntElt> ]
Given an invertible matrix a over a finite field, return the order of a in factored form.
ProjectiveOrder(a) : AlgMatElt -> RngIntElt
Given an invertible matrix a over a finite field, return the projective order o of a and a scalar s such that a^o = sI.
FactoredProjectiveOrder(a) : AlgMatElt -> [ <RngIntElt, RngIntElt> ]
Given an invertible matrix a over a finite field, return the projective order o of a in factored form and a scalar s such that a^o = sI.
CharacteristicPolynomial(a: parameters) : AlgMatElt -> RngUPolElt
    Al: MonStg                          Default: "Modular"
    Proof: BoolElt                      Default: true
The characteristic polynomial of the element a belonging to the algebra M_n(R), where R can be any commutative ring. The parameter Al may be used to specify the algorithm used. The algorithm Modular (the default) can be used for matrices over Z and Q---in such a case the parameter Proof can also be used to suppress proof of correctness. The algorithm Hessenberg, allowed for matrices over fields, works by first reducing the matrix to Hessenberg form. The algorithm Interpolation, allowed for matrices over Z and Q, works by evaluating the characteristic matrix of a at various points and then interpolating. The algorithm Trace, allowed for matrices over fields, works by calculating the traces of powers of a.
MinimalPolynomial(a) : AlgMatElt -> RngUPolElt
The minimal polynomial of the element a belonging to the module M_n(R), where R is a field or Z.
HessenbergForm(a) : AlgMatElt -> AlgMatElt
The Hessenberg form for the matrix a belonging to the algebra M_n(K), where the coefficient ring K must be a field. The form has zero entries above the super-diagonal. (This form is used in one of the characteristic polynomial algorithms.)
Adjoint(a) : AlgMatElt -> AlgMatElt
The adjoint of the matrix a belonging to the algebra M_n(K), where the coefficient ring K must be a ring with exact division whose characteristic must be zero or greater than the degree of a.
Eigenvalues(a) : AlgMatElt -> { <FldElt, RngIntElt> }
The eigenvalues of the matrix a returned as a set of pairs, each of which gives the value of a distinct eigenvalue and its multiplicity. The coefficient ring must have a polynomial roots algorithm.
Eigenspace(a, e) : AlgMatElt, FldElt -> ModTup
The eigenspace of the matrix a, corresponding to the eigenvalue e, returned as a submodule of the base module for the parent algebra of a (i.e. the kernel of a - eI). If the ring element e is not a eigenvalue for the matrix a then the trivial space is returned.
[Next] [Prev] [Right] [Left] [Up] [Index] [Root]