linalg(deprecated)/ihermite - Help

linalg(deprecated)

 ihermite
 integer-only Hermite Normal Form

 Calling Sequence ihermite(A) ihermite(A, U)

Parameters

 A - rectangular matrix of integers U - name

Description

 • Important: The linalg package has been deprecated. Use the superseding packages LinearAlgebra[HermiteForm], instead.
 - For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
 • The function ihermite computes the Hermite Normal Form (reduced row echelon form) of a rectangular matrix of integers.
 • The Hermite normal form of A is an upper triangular matrix H with rank(A) = the number of nonzero rows of H.  If A is an n by n matrix of full rank then $\prod _{i],i=1\mathrm{..}n}H[i$.
 • This is not an efficient method for computing the rank or determinant except that this may yield a partial factorization of $\mathrm{det}\left(A\right)$ without doing any explicit factorizations.
 • The Hermite normal form is obtained by doing elementary row operations. This includes interchanging rows, multiplying through a row by -1, and adding an integral multiple of one row to another.
 • One can use transposes to obtain column form of the Hermite Normal Form.
 • In the case of two arguments, the second argument U will be assigned the transformation matrix on output, such that the following holds: ihermite(A) = U A.
 • The command with(linalg,ihermite) allows the use of the abbreviated form of this command.

Examples

Important: The linalg package has been deprecated. Use the superseding packages, LinearAlgebra and VectorCalculus, instead.

 > $\mathrm{with}\left(\mathrm{linalg}\right):$
 > $H≔\mathrm{array}\left(\left[\left[9,-36,30\right],\left[-36,192,-180\right],\left[30,-180,180\right]\right]\right)$
 ${H}{≔}\left[\begin{array}{ccc}{9}& {-36}& {30}\\ {-36}& {192}& {-180}\\ {30}& {-180}& {180}\end{array}\right]$ (1)
 > $\mathrm{ihermite}\left(H\right)$
 $\left[\begin{array}{ccc}{3}& {0}& {30}\\ {0}& {12}& {0}\\ {0}& {0}& {60}\end{array}\right]$ (2)

To obtain column form of Hermite Normal Form

 > $\mathrm{transpose}\left(\mathrm{ihermite}\left(\mathrm{transpose}\left(H\right)\right)\right)$
 $\left[\begin{array}{ccc}{3}& {0}& {0}\\ {0}& {12}& {0}\\ {30}& {0}& {60}\end{array}\right]$ (3)
 > $A≔\mathrm{array}\left(\left[\left[3,7,11\right],\left[13,17,19\right]\right]\right):$
 > $B≔\mathrm{ihermite}\left(A,U\right)$
 ${B}{≔}\left[\begin{array}{ccc}{1}& {29}& {61}\\ {0}& {40}& {86}\end{array}\right]$ (4)
 > $\mathrm{eval}\left(U\right)$
 $\left[\begin{array}{cc}{9}& {-2}\\ {13}& {-3}\end{array}\right]$ (5)
 > $\mathrm{evalm}\left(U\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&*\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}A-B\right)$
 $\left[\begin{array}{ccc}{0}& {0}& {0}\\ {0}& {0}& {0}\end{array}\right]$ (6)