linalg(deprecated)/smith - Help

linalg(deprecated)

 smith
 compute the Smith normal form of a matrix

 Calling Sequence smith(A, x) smith(A, x, U, V)

Parameters

 A - square matrix of univariate polynomials in x x - the variable name U - name V - name

Description

 • Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[SmithForm], instead.
 - For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
 • The Smith normal form of a matrix with univariate polynomial entries in x over a field F is computed. Thus the polynomials are then regarded as elements of the Euclidean domain F[x].
 • This routine is only as powerful as Maple's normal function, since at present it only understands the field Q of rational numbers and rational functions over Q.
 • The Smith normal form of a matrix is a diagonal matrix S obtained by doing elementary row and column operations.  The diagonal entries satisfy the following property for all $n\le \mathrm{rank}\left(A\right)$: $\prod _{i=1}^{n}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}{S}_{i,i}$ is equal to the (monic) greatest common divisor of all n by n minors of A.
 • In the case of four arguments, the third argument U and the fourth argument V will be assigned the transformation matrices on output, such that smith(A) = U &* A &* V.
 • The command with(linalg,smith) allows the use of the abbreviated form of this command.

Examples

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

 > $\mathrm{with}\left(\mathrm{linalg}\right):$
 > $A≔\left[\begin{array}{cc}1-x& y-xy\\ 0& 1-{x}^{2}\end{array}\right]$
 ${A}{≔}\left[\begin{array}{cc}{1}{-}{x}& {-}{x}{}{y}{+}{y}\\ {0}& {-}{{x}}^{{2}}{+}{1}\end{array}\right]$ (1)
 > $\mathrm{smith}\left(A,x\right)$
 $\left[\begin{array}{cc}{-}{1}{+}{x}& {0}\\ {0}& {{x}}^{{2}}{-}{1}\end{array}\right]$ (2)
 > $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]$ (3)
 > $\mathrm{smith}\left(H,x\right)$
 $\left[\begin{array}{cc}{-}{3}{+}{x}& {0}\\ {0}& {{x}}^{{3}}{-}{9}{}{{x}}^{{2}}{+}{26}{}{x}{-}{24}\end{array}\right]$ (4)
 > $B≔\mathrm{smith}\left(A,x,U,V\right)$
 ${B}{≔}\left[\begin{array}{cc}{-}{1}{+}{x}& {0}\\ {0}& {{x}}^{{2}}{-}{1}\end{array}\right]$ (5)
 > $\mathrm{eval}\left(U\right)$
 $\left[\begin{array}{cc}{-}{1}& {0}\\ {x}{+}{1}& {-}{1}\end{array}\right]$ (6)
 > $\mathrm{eval}\left(V\right)$
 $\left[\begin{array}{cc}{1}{-}{y}& {-}{y}\\ {1}& {1}\end{array}\right]$ (7)
 > $\mathrm{evalm}\left(\left(U&*A\right)&*V-B\right)$
 $\left[\begin{array}{cc}\left({-}{1}{+}{x}\right){}\left({1}{-}{y}\right){+}{x}{}{y}{-}{y}{+}{1}{-}{x}& {-}\left({-}{1}{+}{x}\right){}{y}{+}{x}{}{y}{-}{y}\\ \left({x}{+}{1}\right){}\left({1}{-}{x}\right){}\left({1}{-}{y}\right){+}\left({x}{+}{1}\right){}\left({-}{x}{}{y}{+}{y}\right){+}{{x}}^{{2}}{-}{1}& {-}\left({x}{+}{1}\right){}\left({1}{-}{x}\right){}{y}{+}\left({x}{+}{1}\right){}\left({-}{x}{}{y}{+}{y}\right)\end{array}\right]$ (8)