## `linalg::hermiteForm` -- Hermite normal form of a matrix

#### Introduction

`linalg::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)`

#### Parameters

`A` | - | an integer matrix of category `Cat::Matrix`

#### Returns

a matrix of the same domain type as `A`.

#### Related Functions

`linalg::frobeniusForm`, `linalg::jordanForm`, `linalg::smithForm`, `lllint`

#### Details

- 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.

#### Example 1

We 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  |
                                  +-           -+

#### Background

- Let A be an m x n matrix with coefficients in Z. Then there exists an m x n matrix H = (h[i,j]) in Hermite normal form such that H = AU with det(U) = +/- 1.

  Note that H is unique, if A has 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 the determinant of A.

#### Changes

- The algorithm works for arbitrary matrices that can be converted into the domain `Dom::Matrix``(Dom::Integer)`.

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000