Hermite normal form of a matrix
This functionality does not run in MATLAB.
linalg::hermiteForm(A
, <All>)
linalg::hermiteForm(A)
computes the Hermite
normal form of a nonsingular integer square matrix A.
This is an uppertriangular matrix H such
that H_{jj} ≥
0 and
for j > i.
In the case, A is
not a square matrix or a singular matrix, the matrix H is
simply an uppertriangular matrix.
If the matrix A
is not of the domain Dom::Matrix
(Dom::Integer
) then A
is
converted into a matrix of this domain for intermediate computations.
If this conversion fails, then an error message is returned.
linalg::hermiteForm
(A, All
)
computes a transformation matrix U and
a matrix H such
that H = U A.
We compute the Hermite normal form of the matrix:
A := Dom::Matrix(Dom::Rational)( [[9, 36, 30], [36, 192, 180], [30, 180, 180]] )
linalg::hermiteForm(A)
We may also compute the transformation matrix by giving the
option All
:
linalg::hermiteForm(A, All)
Let us check the result:
U := linalg::hermiteForm(A, All)[2]:
U * A

An integer matrix of category 

Returns the list 
Either a matrix of the same domain type as A
or
the list [H, U]
when the option All
is
given.
Let A be an n×n matrix with coefficients in ℤ. Then there exists an n×n matrix H = (h_{ij}) in Hermite normal form such that H = AU with .
Note that H is
unique, if A has
full row rank. The matrix U is
not unique. U may
be computed by using the option All
.
If A is a square matrix, then the product of the diagonal elements of its Hermite normal form is, up to the sign, the determinant of A.