Hermite form of matrix

Only for matlab R2016 and R2017 and above

For any square n-by-n matrix A with integer coefficients, there exists an n-by-n matrix H and an n-by-n unimodular matrix U, such that U*A = H, where His the Hermite normal form of A. A unimodular matrix is a real square matrix, such that its determinant equals 1 or -1. If A is a matrix of polynomials, then the determinant of U is a constant.

hermiteForm returns the Hermite normal form of a nonsingular integer square matrix A as an upper triangular matrix H, such that Hjj0 and Hjj2<HijHjj2 for j>i. If A is not a square matrix or a singular matrix, the matrix H is simply an upper triangular matrix.

[U,H] = hermiteForm(A)

example:

Hermite form of matrix