The functions defined here apply to matrices defined over Euclidean Domains.
EchelonForm(a) : ModMatRngElt -> ModMatRngElt, ModMatRngElt
The (row) echelon form of matrix a belonging to a submodule of the module Hom_R(M, N). This function returns two values:
- The (row) echelon form e of a; and
- A matrix b such that b * a = e, i.e. b is a product of elementary matrices that transforms a into echelon form.
The elementary divisors of the matrix a belonging to a submodule of the module Hom_R(M, N). The divisors are returned as a sequence [e_1, ..., e_d], e_i | e_(i + 1) (i=1 , ..., d - 1) of d elements of R, where d is the rank of a.
The row Hermite normal form of an matrix a belonging to a submodule of the module Hom_R(M, N). This function returns two values:
- The Hermite normal form h of a; and
- A matrix b such that b * a = h, i.e. b is the product of elementary matrices that transforms a into Hermite normal form.
Given a matrix a belonging to the matrix ring R over the Euclidean domain S, return the column rank of a.
The Smith normal form for the matrix a belonging to a submodule of the module Hom_R(M, N). This function returns two values:
- The Smith normal form s of a; and
- Matrices b and c such that b * a * c = s, i.e. b is a matrix that transforms a into Smith normal form.
> 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 ]; > print A;
[ 1 w^1 w^5 ] [ 0 w^3 w^4 ] [ w^1 1 w^6 ] [ w^3 1 w^4 ] > print EchelonForm(A);
[ 1 0 0 ] [ 0 1 0 ] [ 0 0 1 ] [ 0 0 0 ]
> Z := Integers(); > Z4 := RSpace(Z, 4); > Z5 := RSpace(Z, 5); > M := Hom(Z4, Z5); > x := M ! [ 2, -4, 12, 7, 0, > 3, -3, 5, -1, 4, > 2, -1, -4, -5,-12, > 0, 3, 6, -2, 0 ]; > print x;
[ 2 -4 12 7 0 ] [ 3 -3 5 -1 4 ] [ 2 -1 -4 -5 -12 ] [ 0 3 6 -2 0 ] > print Rank(x); 4 > print HermiteForm(x);
[ 1 1 1 6 -164 ] [ 0 3 0 16 -348 ] [ 0 0 2 13 -200 ] [ 0 0 0 19 -316 ] > print SmithForm(x);
[ 1 0 0 0 0 ] [ 0 1 0 0 0 ] [ 0 0 1 0 0 ] [ 0 0 0 2 0 ] > print ElementaryDivisors(x); [ 2 ]