HermiteForm - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

MatrixPolynomialAlgebra

 HermiteForm
 compute the Hermite normal form of a Matrix (in row or column form)

 Calling Sequence HermiteForm(A, x, out) HermiteForm[row](A, x, out) HermiteForm[column](A, x, out)

Parameters

 A - Matrix x - name; variable name of the polynomial domain out - (optional) equation of the form output = obj where obj is one of 'H' or 'U', or a list containing one or more of these names; select result objects to compute

Description

 • The HermiteForm(A, x) and HermiteForm[row](A, x) commands compute the Hermite normal form (row-reduced echelon form) of an m x n rectangular Matrix of univariate polynomials in x over the field of rational numbers Q, or rational expressions over Q, that is, univariate polynomials in x with coefficients in Q(a1,...,an).
 • The HermiteForm[column](A, x) command computes the Hermite normal form (column-reduced echelon form) of A.
 The row (column) Hermite normal form is obtained by performing elementary row (column) operations on A. This includes interchanging rows (columns), multiplying a row (column) by a unit, and subtracting a polynomial multiple of one row (column) from another.
 The number of nonzero rows (columns) of the Hermite Form, H, is the rank of A. If n = m, then $\prod _{i=1}^{n}{H}_{i,i}=\mathrm{normal}\left(\mathrm{Determinant}\left(A\right)\right)$ where normal means unit normal, that is, monic.

Option

 • The output option (out) determines the content of the returned expression sequence.
 As determined by the out option, an expression sequence containing one or more of the factors H (the Hermite normal form) or U (the transformation Matrix) is returned. If obj is a list, the objects are returned in the order specified in the list.
 The returned Matrix objects have the property that $H=U·A$ for row Hermite normal form, and $H=A·U$ for column Hermite normal form.

Examples

 > $\mathrm{with}\left(\mathrm{MatrixPolynomialAlgebra}\right):$
 > $A≔⟨⟨3+x,4,{x}^{2}-1⟩|⟨1,x,4⟩|⟨-4,2,-1⟩⟩$
 ${A}{≔}\left[\begin{array}{ccc}{3}{+}{x}& {1}& {-4}\\ {4}& {x}& {2}\\ {{x}}^{{2}}{-}{1}& {4}& {-1}\end{array}\right]$ (1)
 > $H≔\mathrm{HermiteForm}\left(A,x\right)$
 ${H}{≔}\left[\begin{array}{ccc}{1}& {0}& {-}\frac{{7}}{{76}}{}{{x}}^{{2}}{+}\frac{{29}}{{304}}{}{x}{-}\frac{{53}}{{152}}\\ {0}& {1}& \frac{{3}}{{19}}{}{{x}}^{{2}}{+}\frac{{31}}{{76}}{}{x}{-}\frac{{37}}{{38}}\\ {0}& {0}& {{x}}^{{3}}{+}\frac{{1}}{{4}}{}{{x}}^{{2}}{-}\frac{{15}}{{4}}{}{x}{-}\frac{{43}}{{2}}\end{array}\right]$ (2)
 > $H,U≔\mathrm{HermiteForm}\left[\mathrm{row}\right]\left(A,x,\mathrm{output}=\left['H','U'\right]\right)$
 ${H}{,}{U}{≔}\left[\begin{array}{ccc}{1}& {0}& {-}\frac{{7}}{{76}}{}{{x}}^{{2}}{+}\frac{{29}}{{304}}{}{x}{-}\frac{{53}}{{152}}\\ {0}& {1}& \frac{{3}}{{19}}{}{{x}}^{{2}}{+}\frac{{31}}{{76}}{}{x}{-}\frac{{37}}{{38}}\\ {0}& {0}& {{x}}^{{3}}{+}\frac{{1}}{{4}}{}{{x}}^{{2}}{-}\frac{{15}}{{4}}{}{x}{-}\frac{{43}}{{2}}\end{array}\right]{,}\left[\begin{array}{ccc}\frac{{7}}{{304}}{}{{x}}^{{2}}{-}\frac{{9}}{{304}}{}{x}{+}\frac{{3}}{{19}}& {-}\frac{{7}{}{x}}{{304}}{+}\frac{{37}}{{304}}& {-}\frac{{7}{}{x}}{{304}}{-}\frac{{3}}{{76}}\\ {-}\frac{{3}}{{76}}{}{{x}}^{{2}}{-}\frac{{7}}{{76}}{}{x}{+}\frac{{3}}{{19}}& \frac{{3}{}{x}}{{76}}{-}\frac{{5}}{{76}}& \frac{{3}{}{x}}{{76}}{+}\frac{{4}}{{19}}\\ {-}\frac{{1}}{{4}}{}{{x}}^{{3}}{+}\frac{{1}}{{4}}{}{x}{+}{4}& \frac{{1}}{{4}}{}{{x}}^{{2}}{-}{x}{-}\frac{{13}}{{4}}& \frac{{1}}{{4}}{}{{x}}^{{2}}{+}\frac{{3}}{{4}}{}{x}{-}{1}\end{array}\right]$ (3)
 > $\mathrm{map}\left(\mathrm{expand},H-U·A\right)$
 $\left[\begin{array}{ccc}{0}& {0}& {0}\\ {0}& {0}& {0}\\ {0}& {0}& {0}\end{array}\right]$ (4)
 > $\mathrm{mul}\left(H\left[i,i\right],i=1..3\right)$
 ${{x}}^{{3}}{+}\frac{{1}}{{4}}{}{{x}}^{{2}}{-}\frac{{15}}{{4}}{}{x}{-}\frac{{43}}{{2}}$ (5)
 > $\mathrm{LinearAlgebra}\left[\mathrm{Determinant}\right]\left(A\right)$
 ${4}{}{{x}}^{{3}}{+}{{x}}^{{2}}{-}{15}{}{x}{-}{86}$ (6)
 > $\frac{\mathrm{lcoeff}\left(\right)}{}$
 ${{x}}^{{3}}{+}\frac{{1}}{{4}}{}{{x}}^{{2}}{-}\frac{{15}}{{4}}{}{x}{-}\frac{{43}}{{2}}$ (7)
 > $\mathrm{HermiteForm}\left[\mathrm{row}\right]\left(⟨⟨0,2,x⟩|⟨0,2y,xy⟩⟩,x\right)$
 $\left[\begin{array}{cc}{1}& {y}\\ {0}& {0}\\ {0}& {0}\end{array}\right]$ (8)
 > $H,U≔\mathrm{HermiteForm}\left[\mathrm{column}\right]\left(A,x,\mathrm{output}=\left['H','U'\right]\right)$
 ${H}{,}{U}{≔}\left[\begin{array}{ccc}{1}& {0}& {0}\\ {0}& {1}& {0}\\ \frac{{2}}{{21}}{}{{x}}^{{2}}{-}\frac{{1}}{{42}}{}{x}{-}\frac{{2}}{{21}}& \frac{{4}}{{21}}{}{{x}}^{{2}}{-}\frac{{1}}{{21}}{}{x}{-}\frac{{29}}{{42}}& {{x}}^{{3}}{+}\frac{{1}}{{4}}{}{{x}}^{{2}}{-}\frac{{15}}{{4}}{}{x}{-}\frac{{43}}{{2}}\end{array}\right]{,}\left[\begin{array}{ccc}\frac{{2}}{{21}}& \frac{{4}}{{21}}& {x}{+}\frac{{1}}{{2}}\\ {-}\frac{{1}}{{21}}& {-}\frac{{2}}{{21}}& {-}\frac{{x}}{{2}}{-}\frac{{11}}{{2}}\\ \frac{{x}}{{42}}{-}\frac{{4}}{{21}}& \frac{{x}}{{21}}{+}\frac{{5}}{{42}}& \frac{{1}}{{4}}{}{{x}}^{{2}}{+}\frac{{3}}{{4}}{}{x}{-}{1}\end{array}\right]$ (9)
 > $\mathrm{map}\left(\mathrm{expand},H-A·U\right)$
 $\left[\begin{array}{ccc}{0}& {0}& {0}\\ {0}& {0}& {0}\\ {0}& {0}& {0}\end{array}\right]$ (10)
 > $\mathrm{mul}\left(H\left[i,i\right],i=1..3\right)$
 ${{x}}^{{3}}{+}\frac{{1}}{{4}}{}{{x}}^{{2}}{-}\frac{{15}}{{4}}{}{x}{-}\frac{{43}}{{2}}$ (11)
 > $\mathrm{LinearAlgebra}\left[\mathrm{Determinant}\right]\left(A\right)$
 ${4}{}{{x}}^{{3}}{+}{{x}}^{{2}}{-}{15}{}{x}{-}{86}$ (12)
 > $\frac{\mathrm{lcoeff}\left(\right)}{}$
 ${{x}}^{{3}}{+}\frac{{1}}{{4}}{}{{x}}^{{2}}{-}\frac{{15}}{{4}}{}{x}{-}\frac{{43}}{{2}}$ (13)
 > $\mathrm{HermiteForm}\left[\mathrm{column}\right]\left(⟨⟨0,2,x⟩|⟨0,2y,xy⟩⟩,x\right)$
 $\left[\begin{array}{cc}{0}& {0}\\ {1}& {0}\\ \frac{{x}}{{2}}& {0}\end{array}\right]$ (14)