LinearAlgebra
HermiteForm
compute the Hermite normal form of a Matrix
Calling Sequence
Parameters
Description
Examples
HermiteForm(A, x, m, out, options, outopts)
A
-
Matrix
x
(optional) name; specify the variable in which the entries of A are rational polynomials over Q
m
(optional) equation of the form method = name where name is one of 'integer' or 'rational'; specify the method to use
out
(optional) equation of the form output = obj where obj is one of 'H' or 'U', or a list containing one or more of these names; select result objects to compute
options
(optional); constructor options for the result object(s)
outopts
(optional) equation(s) of the form outputoptions[o] = list where o is one of 'H' or 'U'; constructor options for the specified result object
The HermiteForm(A) function computes the Hermite normal form (row reduced echelon form) of an m x n rectangular Matrix of univariate polynomials in x over the field of rational numbers Q, or rational expressions over Q.
The Hermite normal form H is obtained by doing elementary row operations on A. This includes interchanging rows, multiplying through a row by a unit, and subtracting a polynomial multiple of one row from another.
The number of nonzero rows of H is Rank(A). If n = m, ∏i=1n⁡Hi,i=normal⁡Determinant⁡A where normal means unit normal, that is, monic.
If the variable x is specified, or if the option method='rational' is specified, or if the Matrix A is not of type 'Matrix(integer)', computation takes place over the field of rational polynomials. If the option method='integer' is specified, or if an optional variable name is not specified and the Matrix A is of type 'Matrix(integer)', the computation takes place over the integers to supply the integer-only Hermite normal form.
If the variable name x is not specified and the Matrix is not of type 'Matrix(integer)', the routine selects the indeterminate if indets(A) has a single member, and returns an error if indets(A) has more than a single member. If indets(A) has no members and A is not of type 'Matrix(integer)', the computation takes place over the field of rational polynomials using a dummy variable.
The output option (out) determines the content of the returned expression sequence.
Depending on what is included in the output option, an expression sequence containing one or more of the factors H (the Hermite normal form) or U (the transformation Matrix) are returned. If output is a list, the objects are returned in the same order as specified in the list.
The returned Matrix objects have the property that H=U·A.
Specifying the option method='integer[reduced]' causes the integer transformation matrix U to be reduced using lattice basis reduction. This can result in substantially smaller entries if the input matrix A does not have full row rank, but at an increased running time.
The constructor options provide additional information (readonly, shape, storage, order, datatype, and attributes) to the Matrix constructor that builds the result. These options may also be provided in the form outputoptions[o]=[...], where [...] represents a Maple list. If a constructor option is provided in both the calling sequence directly and in an outputoptions[o] option, the latter takes precedence (regardless of the order).
The following list indicates permissible values for the index [o] of outputoptions with their corresponding meaning.
H
Hermite form
U
transformation Matrix
This function is part of the LinearAlgebra package, and so it can be used in the form HermiteForm(..) only after executing the command with(LinearAlgebra). However, it can always be accessed through the long form of the command by using LinearAlgebra[HermiteForm](..).
with⁡LinearAlgebra:
A≔3+z,4,z2−1|1,z,4|−4,2,−1
A≔3+z1−44z2z2−14−1
H,U≔HermiteForm⁡A,output=H,U
H,U≔10−776⁢z2+29304⁢z−5315201319⁢z2+3176⁢z−373800z3+14⁢z2−154⁢z−432,7304⁢z2−9304⁢z+319−7⁢z304+37304−7⁢z304−376−376⁢z2−776⁢z+3193⁢z76−5763⁢z76+419−14⁢z3+14⁢z+414⁢z2−z−13414⁢z2+34⁢z−1
map⁡expand,U·A
10−776⁢z2+29304⁢z−5315201319⁢z2+3176⁢z−373800z3+14⁢z2−154⁢z−432
mul⁡Hi,i,i=1..3
z3+14⁢z2−154⁢z−432
Determinant⁡A
4⁢z3+z2−15⁢z−86
lcoeff⁡
HermiteForm⁡0,2,x|0,2⁢y,x⁢y,x
1y0000
A≔RandomMatrix⁡5,3
A≔−76−429−722744−2892−3269−31−749967
HermiteForm⁡A,output=U
69344−8982033007353400177773−23026684618905990115385−14945654922588040199471−258371949461016570174571−22611983093889661
HermiteForm⁡A,output=U,method=integerreduced
64−164−112−153163−501136185−9799−266−195−265277271−355122129832−408−629−823737
See Also
indets
LinearAlgebra[Determinant]
LinearAlgebra[RowOperation]
MatrixPolynomialAlgebra[HermiteForm]
Download Help Document