linalg::hermiteForm --
Hermite normal form of a matrix
Introductionlinalg::hermiteForm(A) computes the
Hermite normal form of an integer matrix A. This is an
upper-triangular matrix H such that H[j,j] >=
0 and -1/2*H[j,j] <= H[i,j] < 1/2*H[j,j] for
j > i.
Call(s)linalg::hermiteForm(A)
ParametersA |
- | an integer matrix of category Cat::Matrix |
Returnsa matrix of the same domain type as A.
Related
Functionslinalg::frobeniusForm,
linalg::jordanForm,
linalg::smithForm,
lllint
DetailsA 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.
Example
1We compute the Hermite normal form of the matrix:
>> A := Dom::Matrix(Dom::Rational)(
[[9, -36, 30], [-36, 192, -180], [30, -180, 180]]
)
+- -+
| 9, -36, 30 |
| |
| -36, 192, -180 |
| |
| 30, -180, 180 |
+- -+
>> linalg::hermiteForm(A)
+- -+
| 3, 0, 30 |
| |
| 0, 12, 0 |
| |
| 0, 0, 60 |
+- -+
BackgroundNote that H is unique, if A has full row rank. The matrix U is not unique.
Dom::Matrix(Dom::Integer).