LinearAlgebra[Generic] - Maple Programming Help

Home : Support : Online Help : Mathematics : Linear Algebra : LinearAlgebra Package : Generic Subpackage : LinearAlgebra/Generic/SmithForm

LinearAlgebra[Generic]

 SmithForm
 compute the Smith form of a Matrix

 Calling Sequence SmithForm[E](A) SmithForm[E](A,output=out)

Parameters

 E - the domain of computation, an Euclidean domain A - m x n Matrix of values in E out - one of S, U, or V, or a list containing one or more of these names

Description

 • SmithForm[E](A) returns the Smith Normal Form S of A which satisfies:
 (1) S[i,j] = 0 if i<>j
 (2) S[i,i] is unit normal in E (implies uniqueness)
 (3) S[i,i] | S[i+1,i+1] for all 1<=i
 (4) prod(S[i,i],i=1..d) = u*gcd(all minors of A of dimension d) where u is a unit
 (5) S[i,i] = 0 for r < i <= min(m,n) where r is the rank of A
 • The (indexed) parameter E, which specifies the domain of computation, a Euclidean domain, must be a Maple table/module which has the following values/exports:
 E[0]: a constant for the zero of the ring E
 E[1]: a constant for the (multiplicative) identity of E
 E[+]: a procedure for adding elements of E (nary)
 E[-]: a procedure for negating and subtracting elements of E (unary and binary)
 E[*]: a procedure for multiplying two elements of E (commutative)
 E[=]: a boolean procedure for testing if two elements in F are equal
 E[Quo]: a procedure which computes the quotient of a / b. E[Quo](a,b,'r') computes the quotient q of a / b and optionally assigns r the remainder satisfying a = b q + r.
 E[Rem]: a procedure for finding the remainder of a / b. E[Rem(a,b,'q') computes the remainder r of a / b and optionally assigns q the quotient satisfying a = b q + r.
 E[Gcdex]: a procedure for finding the gcd g of a and b, an element of E. E[Gcdex](a,b,'s','t') computes the gcd of a and b and optionally assigns s and t elements of E satisfying s a + t b = g.
 E[UnitPart]: a procedure for returning the unit part of an element in E
 E[EuclideanNorm]: a procedure for computing the Euclidean norm of an element in E, a non-negative integer. For non-zero a,b in E, units u,v in E, the Euclidean norm satisfies
 EuclideanNorm(a b) >= EuclideanNorm(a)
 EuclideanNorm(u) = EuclideanNorm(v)
 EuclideanNorm(u a) = EuclideanNorm(a)
 • The Smith form is computed by first computing H the Hermite form of A, then computing the Hermite form of the transpose of H. If the resulting matrix is not diagonal, often it is, then the above sequence of computations is repeated, usually once, until it is.

Examples

 > $\mathrm{with}\left(\mathrm{LinearAlgebra}[\mathrm{Generic}]\right):$
 > ${Z}_{\mathrm{0}},{Z}_{\mathrm{1}},{Z}_{\mathrm{+}},{Z}_{\mathrm{-}},{Z}_{\mathrm{*}},{Z}_{\mathrm{=}}≔0,1,\mathrm{+},\mathrm{-},\mathrm{*},\mathrm{=}:$
 > ${Z}_{\mathrm{Gcdex}}≔\mathrm{igcdex}:$
 > ${Z}_{\mathrm{Quo}},{Z}_{\mathrm{Rem}}≔\mathrm{iquo},\mathrm{irem}:$
 > ${Z}_{\mathrm{UnitPart}},{Z}_{\mathrm{EuclideanNorm}}≔\mathrm{sign},\mathrm{abs}:$
 > $A≔\mathrm{Matrix}\left(\left[\left[1,2,3,4,5\right],\left[2,3,4,5,6\right],\left[4,1,-2,-5,-2\right],\left[-1,-4,-2,1,2\right]\right]\right)$
 ${A}{≔}\left[\begin{array}{rrrrr}{1}& {2}& {3}& {4}& {5}\\ {2}& {3}& {4}& {5}& {6}\\ {4}& {1}& {-}{2}& {-}{5}& {-}{2}\\ {-}{1}& {-}{4}& {-}{2}& {1}& {2}\end{array}\right]$ (1)
 > $S≔\mathrm{SmithForm}[Z]\left(A\right)$
 ${S}{≔}\left[\begin{array}{rrrrr}{1}& {0}& {0}& {0}& {0}\\ {0}& {1}& {0}& {0}& {0}\\ {0}& {0}& {1}& {0}& {0}\\ {0}& {0}& {0}& {6}& {0}\end{array}\right]$ (2)
 > $U,V≔\mathrm{SmithForm}[Z]\left(A,\mathrm{output}=\left['U','V'\right]\right)$
 ${U}{,}{V}{≔}\left[\begin{array}{rrrr}{-}{3}& {2}& {0}& {0}\\ {2}& {-}{1}& {0}& {0}\\ {-}{15}& {12}& {-}{2}& {1}\\ {10}& {-}{7}& {1}& {0}\end{array}\right]{,}\left[\begin{array}{rrrrr}{1}& {0}& {0}& {3}& {1}\\ {0}& {1}& {1}& {-}{7}& {-}{7}\\ {0}& {0}& {-}{2}& {6}& {11}\\ {0}& {0}& {1}& {-}{3}& {-}{5}\\ {0}& {0}& {0}& {1}& {0}\end{array}\right]$ (3)
 > $\mathrm{MatrixMatrixMultiply}[Z]\left(\mathrm{MatrixMatrixMultiply}[Z]\left(U,A\right),V\right)$
 $\left[\begin{array}{rrrrr}{1}& {0}& {0}& {0}& {0}\\ {0}& {1}& {0}& {0}& {0}\\ {0}& {0}& {1}& {0}& {0}\\ {0}& {0}& {0}& {6}& {0}\end{array}\right]$ (4)