Hermite normal form of a matrix
MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
linalg::hermiteForm(A
, <var>, <All>)
linalg::hermiteForm(A)
returns the Hermite
normal form of a nonsingular integer square matrix A.
The Hermite normal form of a matrix is an uppertriangular matrix H,
such that H_{jj} ≥
0 and
for j > i.
If matrix A is
not square or singular, linalg::hermiteForm
simply
returns an uppertriangular matrix.
If matrix A
is not of the domain Dom::Matrix
(Dom::Integer
) then linalg::hermiteForm
converts A
into
a matrix of this domain for intermediate computations. If this conversion
fails, then linalg::hermiteForm
issues an error
message.
linalg::hermiteForm(A, var)
returns the Hermite
normal form of A
assuming that the elements of A
are
univariate polynomials in the variable var
. If A
does
not contain var
, then hermiteForm(A)
and hermiteForm(A,var)
return
different results.
linalg::hermiteForm(A, <var>, All)
returns
the list [H, U]
, where H
is
the Hermite normal form of A
, and U
is
a unimodular transformation matrix, such that H = U*A
.
You can use the All
option with or without specifying
the variable var
.
Create the following matrix of integers.
A := matrix([[9, 36, 30], [36, 192, 180], [30, 180, 180]])
Find the Hermite normal form of this matrix.
linalg::hermiteForm(A)
Use the All
option to find the corresponding
transformation matrix.
[H, U] := linalg::hermiteForm(A, All)
Verify that H = U*A
.
H = U*A
Create the following matrix of polynomials.
B := matrix([[(x  3)^2*(x  2),(x  3)*(x  2)*(x  4)], [(x  3)*(x  2)*(x  4),(x  3)^2*(x  4)] ])
Find the Hermite normal form of this matrix.
linalg::hermiteForm(B)
Use the All
option to find the corresponding
transformation matrix.
[H, U] := linalg::hermiteForm(B, All)
If a matrix does not contain a particular variable, and you
call linalg::hermiteForm
specifying that variable
as the second argument, then the result differs from what you get
without specifying that variable. For example, create a matrix that
does not contain any variables.
A := matrix([[9, 36, 30], [36, 192, 180], [30, 180, 180]])
Call linalg::hermiteForm
specifying variable x
as
the second argument. In this case, linalg::hermiteForm
assumes that the elements of A
are univariate polynomials
in x
.
linalg::hermiteForm(A, x)
Call linalg::hermiteForm
without specifying
variables. In this case, linalg::hermiteForm
treats A
as
a matrix of integers.
linalg::hermiteForm(A)

An integer matrix of category 

Returns the list 
Matrix of the same domain type as A
. With
the option All
, linalg::hermiteForm
returns
the list [H, U]
, where H
is
a matrix of the same domain type as A
, and U
is
a corresponding transformation matrix.
If A is an n×n matrix with coefficients in ℤ then its Hermite normal form is an n×n matrix H = (h_{ij}), such that H = AU with .
The Hermite normal form H is unique if A is matrix of full row rank. The matrix U is not unique.
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.