[Next] [Prev] [Right] [Left] [Up] [Index] [Root]
Element Operations

Element Operations

All operations that apply to elements of tuple modules also apply to elements of matrix modules. Here, we confine our discussion to those operations which are special to matrix modules.

Throughout this section, M is a submodule of R^((m)), N is a submodule of R^((n)) and a is a homomorphism belonging to Hom_(R)(M, N), where R is a Euclidean Domain.

See also the section in the Lattices chapter for a description of the function IsPositiveDefinite and related functions.

u * a : ModTupRngElt, ModMatRngElt -> ModTupRngElt
a(u) : ModTupRngElt, ModMatRngElt -> ModTupRngElt
Given an element u belonging to the module M, return the image of u under the homomorphism a as an element of the module N.
a * b : ModMatRngElt, ModMatRngElt -> ModMatRngElt
Given a homomorphism a belonging to a submodule of Hom(M, N), and a homomorphism b belonging to a submodule of Hom(N, P), return the composition of the homomorphisms a and b as an element of Hom(M, P). Note that if Hom(M, P) does not already exist, it will be created.
a ^ -1 : ModMatRngElt, RngIntElt -> ModMatRngElt
Given a homomorphism a belonging to a submodule of Hom(M, N) with M and N having the same dimension, return the inverse of a as an element of Hom(N, M).
Codomain(S) : ModMatRng -> ModTupRng
Given a submodule T of the module Hom(M, N), return the module N.
Codomain(a) : ModMatRngElt -> ModTupRng
The codomain N of the homomorphism a belonging to Hom(M, N).
Cokernel(a) : ModMatRngElt -> ModTupRng
The cokernel for the homomorphism a belonging to the module Hom(M, N).
NumberOfColumns(a) : ModMatRngElt -> RngIntElt
Ncols(a) : ModMatRngElt -> RngIntElt
The number of columns in the matrix a.
Domain(S) : ModMatRng -> ModTupRng
The domain M of the submodule S belonging to the module Hom(M, N).
Domain(a) : ModMatRngElt -> ModTupRng
The domain M of the homomorphism a belonging to the module Hom(M, N).
Image(a) : ModMatRngElt -> ModTupRng
RowSpace(a) : ModMatRngElt -> ModTupRng
The image of the homomorphism a belonging to the module H =Hom(M, N), returned as a submodule of N. Note that if the domain and codomain of a are matrix modules themselves, the image will be with respect to the appropriate action (right or left).
Kernel(a) : ModMatRngElt -> ModTupRng
NullSpace(a) : ModMatRngElt -> ModTupRng
The kernel of the homomorphism a belonging to the module Hom(M, N), returned as a submodule of M. Note that if the domain and codomain of a are matrix modules themselves, the kernel will be with respect to the appropriate action (right or left).
KernelMatrix(a) : ModMatRngElt -> ModTupRng
Given a matrix a belonging to the module Hom(M, N), this function returns a matrix k which is a basis matrix for the kernel of a so ka=0. This function has the advantage that the kernel is not made into a R-space and thus echelonized.
RowNullSpace(a) : ModMatRngElt -> ModTupRng
The row nullspace of the homomorphism a belonging to the module Hom(M, N), returned as a submodule of M. This is equivalent to the kernel of the transpose of a.
Morphism(M, N) : ModTupRng, ModTupRng -> ModMatRngElt
(a) If the R-module M was created as a submodule of the module N, return the inclusion homomorphism phi : M -> N as an element of Hom_R(M, N). Thus phi gives the correspondence between elements of M (represented with respect to the standard basis of M) and elements for N.

(b) If the R-module N was created as a quotient module of the module M, return the natural homomorphism phi : M -> N as an element of Hom_R(M, N). Thus phi gives the correspondence between elements of M and elements of N (represented with respect to the standard basis for N).

Rank(a) : ModMatRngElt -> RngIntElt
The dimension of the image of the homomorphism a, i.e. the rank of a.
Determinant(a) : ModMatRngElt -> 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).
NumberOfRows(a) : ModMatRngElt -> RngIntElt
Nrows(a) : ModMatRngElt -> RngIntElt
The number of rows in the matrix a.
Transpose(a) : ModMatRngElt -> ModMatRngElt
The transpose of the matrix a.
IsBijective(a) : ModMatRngElt -> BoolElt
True if the homomorphism a belonging to the module Hom(M, N) is a bijective mapping.
IsInjective(a) : ModMatRngElt -> BoolElt
True if the homomorphism a belonging to the module Hom(M, N) is an injective mapping.
IsSurjective(a) : ModMatRngElt -> BoolElt
True if the homomorphism a belonging to the module Hom_R(M, N) is a surjective mapping.

Example HMod_Operations (H43E7)

We illustrate some of these operations in the context of the module Hom_R(M, N), where M and N are, respectively, the 4-dimensional and 3-dimensional vector spaces over GF(8).

> K<w> := GaloisField(8);
> V3 := VectorSpace(K, 3);
> V4 := VectorSpace(K, 4);
> M := Hom(V4, V3);
> A := M ! [1, w, w^5, 0,  w^3, w^4, w, 1,  w^6, w^3, 1, w^4 ];
> A;
[  1   w w^5]
[  0 w^3 w^4]
[  w   1 w^6]
[w^3   1 w^4]
> Rank(A);
3
> Image(A);
Full Vector space of degree 3 over GF(2^3)
> Kernel(A);
Vector space of degree 4, dimension 1 over GF(2^3)
Echelonized basis:
(  1 w^5   1   1)
> Cokernel(A);
Vector space of degree 3, dimension 0 over GF(2^3)

[Next] [Prev] [Right] [Left] [Up] [Index] [Root]