linalg(deprecated)/hermite - Maple Help

linalg(deprecated)

 hermite
 Hermite Normal Form (reduced row echelon form)

 Calling Sequence hermite(A, x) hermite(A, x, U)

Parameters

 A - rectangular matrix of polynomials in x x - name U - name

Description

 • Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[HermiteForm], instead.
 - For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
 • The function hermite computes the Hermite Normal Form (reduced row echelon form) of an m by n rectangular matrix of univariate polynomials in x over the field of rational numbers Q, or rational expressions over Q.
 • In principle this should work for polynomials in x over any field F, i.e. the Euclidean domain F[x], but in practice the code is only as powerful as Maple's normal function.
 • The Hermite normal form is obtained by doing elementary row operations on A.  This includes interchanging rows, multiplying through a row by a unit, and subtracting a multiple of one row from another.
 • One can use transposes to obtain the column form of the Hermite Normal Form of a matrix.
 • In the case of three arguments, the third argument U will be assigned the transformation matrix on output, such that the following holds: hermite(A) = U &* A.
 • The command with(linalg,hermite) allows the use of the abbreviated form of this command.

Examples

Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[HermiteForm], instead.

 > $\mathrm{with}\left(\mathrm{linalg}\right):$
 > $H≔\mathrm{inverse}\left(\mathrm{hilbert}\left(2,x\right)\right)$
 ${H}{≔}\left[\begin{array}{cc}{-}{\left({-}{3}{+}{x}\right)}^{{2}}{}\left({-}{2}{+}{x}\right)& \left({-}{3}{+}{x}\right){}\left({-}{2}{+}{x}\right){}\left({-}{4}{+}{x}\right)\\ \left({-}{3}{+}{x}\right){}\left({-}{2}{+}{x}\right){}\left({-}{4}{+}{x}\right)& {-}{\left({-}{3}{+}{x}\right)}^{{2}}{}\left({-}{4}{+}{x}\right)\end{array}\right]$ (1)
 > $\mathrm{hermite}\left(H,x\right)$
 $\left[\begin{array}{cc}{{x}}^{{2}}{-}{5}{}{x}{+}{6}& {0}\\ {0}& {{x}}^{{2}}{-}{7}{}{x}{+}{12}\end{array}\right]$ (2)
 > $H≔\mathrm{matrix}\left(3,3,\left[\left[1,x,{x}^{2}\right],\left[{x}^{3}+2x-1,0,1\right],\left[1,x-1,{x}^{2}+1\right]\right]\right)$
 ${H}{≔}\left[\begin{array}{ccc}{1}& {x}& {{x}}^{{2}}\\ {{x}}^{{3}}{+}{2}{}{x}{-}{1}& {0}& {1}\\ {1}& {x}{-}{1}& {{x}}^{{2}}{+}{1}\end{array}\right]$ (3)
 > $\mathrm{hermite}\left(H,x\right)$
 $\left[\begin{array}{ccc}{1}& {0}& {{x}}^{{2}}{+}{x}\\ {0}& {1}& {-1}\\ {0}& {0}& {{x}}^{{5}}{+}{{x}}^{{4}}{+}{2}{}{{x}}^{{3}}{+}{{x}}^{{2}}{-}{x}{-}{1}\end{array}\right]$ (4)

To obtain the column form of HNF for H do

 > $\mathrm{transpose}\left(\mathrm{hermite}\left(\mathrm{transpose}\left(H\right),x\right)\right)$
 $\left[\begin{array}{ccc}{1}& {0}& {0}\\ {0}& {1}& {0}\\ {-}{{x}}^{{4}}{-}{{x}}^{{3}}{-}{2}{}{{x}}^{{2}}{-}{x}{+}{2}& {x}{+}{1}& {{x}}^{{5}}{+}{{x}}^{{4}}{+}{2}{}{{x}}^{{3}}{+}{{x}}^{{2}}{-}{x}{-}{1}\end{array}\right]$ (5)
 > $A≔\mathrm{matrix}\left(2,3,\left[\left[x+1,{x}^{2}+1,2x-1\right],\left[x+2,{x}^{2}+x,x-2\right]\right]\right):$
 > $B≔\mathrm{hermite}\left(A,x,U\right)$
 ${B}{≔}\left[\begin{array}{ccc}{1}& {0}& \left({-}\frac{{1}}{{2}}{}{{x}}^{{2}}{-}\frac{{1}}{{2}}{}{x}\right){}\left({2}{}{x}{-}{1}\right){+}\left(\frac{{{x}}^{{2}}}{{2}}{+}\frac{{1}}{{2}}\right){}\left({-}{2}{+}{x}\right)\\ {0}& {1}& \left(\frac{{x}}{{2}}{+}{1}\right){}\left({2}{}{x}{-}{1}\right){+}\left({-}\frac{{x}}{{2}}{-}\frac{{1}}{{2}}\right){}\left({-}{2}{+}{x}\right)\end{array}\right]$ (6)
 > $\mathrm{eval}\left(U\right)$
 $\left[\begin{array}{cc}{-}\frac{{1}}{{2}}{}{{x}}^{{2}}{-}\frac{{1}}{{2}}{}{x}& \frac{{{x}}^{{2}}}{{2}}{+}\frac{{1}}{{2}}\\ \frac{{x}}{{2}}{+}{1}& {-}\frac{{x}}{{2}}{-}\frac{{1}}{{2}}\end{array}\right]$ (7)
 > $\mathrm{map}\left(\mathrm{normal},\mathrm{evalm}\left(U\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&*\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}A-B\right)\right)$
 $\left[\begin{array}{ccc}{0}& {0}& {0}\\ {0}& {0}& {0}\end{array}\right]$ (8)