 MatrixGCLD - Maple Help

MatrixPolynomialAlgebra

 MatrixGCRD
 compute a greatest common right divisor of 2 matrices of polynomials in row-reduced form
 MatrixGCLD
 compute a greatest common left divisor of 2 matrices of polynomials in column-reduced form Calling Sequence MatrixGCRD(A, B, x, U, V) MatrixGCLD(A, B, x, U, V) Parameters

 A - Matrix of polynomials B - Matrix of polynomials x - variable name of the polynomial domain U - (optional) list of two matrices of polynomials V - (optional) list of two matrices of polynomials Description

 • The MatrixGCRD(A, B, x) command computes a right matrix GCD of two matrices of polynomials. Both input matrices of polynomials can be square or rectangular, but must have the same number of columns. The entries are either 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)).
 • It is required that the matrix of polynomials $[{A}^{T}{B}^{T}]^T$ have full column rank.
 • The fourth argument is optional. It is used to return a list $\left[\mathrm{U1},\mathrm{U2}\right]$ of matrices. These matrices satisfy the matrix linear diophantine equation U1 . A + U2 . B = MatrixGCRD(A,B).
 • The fifth argument is optional. It is used to return a list $\left[\mathrm{V1},\mathrm{V2}\right]$ of matrices. These matrices satisfy the matrix linear diophantine equation $\mathrm{V1}·A+\mathrm{V2}·B=0$. This is useful. If B is square and nonsingular this gives $A·\frac{1}{B}=-\frac{1}{\mathrm{V1}}·\mathrm{V2}$ a left-reduced matrix rational function.
 • The MatrixGCLD(A, B, x) command returns a left matrix GCD with optional arguments for returning solutions for matrix linear diophantine equations and right-reduced matrix rational functions.  It is required that the matrix of polynomials $[AB]$ have full row rank.
 The method used is a fraction-free algorithm by Beckermann and Labahn that computes a matrix GCD using Mahler systems. Examples

 > $\mathrm{with}\left(\mathrm{MatrixPolynomialAlgebra}\right):$
 > $A≔\mathrm{Matrix}\left(2,2,\left[\left[-9{z}^{2}-3z+1,12{z}^{2}+10z\right],\left[-3{z}^{3}+2{z}^{2}-z,4{z}^{3}+2z-2{z}^{2}\right]\right]\right):$
 > $B≔\mathrm{Matrix}\left(2,2,\left[\left[-3{z}^{3}+6{z}^{2}+5z+1,-12{z}^{2}-13z\right],\left[{z}^{4}+{z}^{3}+{z}^{2},-4{z}^{3}-3z+3{z}^{2}\right]\right]\right):$

Left matrix GCDs:

 > $C≔\mathrm{MatrixGCLD}\left(A,B,z\right)$
 ${C}{≔}\left[\begin{array}{cc}{18}{}{{z}}^{{2}}{+}{3}{}{z}{-}{2}& {-}{1}{-}{6}{}{z}\\ {-}{{z}}^{{2}}{+}{2}{}{z}& {-}{z}\end{array}\right]$ (1)

Left matrix extended GCD:

 > $C≔\mathrm{MatrixGCLD}\left(A,B,z,'U'\right)$
 ${C}{≔}\left[\begin{array}{cc}{18}{}{{z}}^{{2}}{+}{3}{}{z}{-}{2}& {-}{1}{-}{6}{}{z}\\ {-}{{z}}^{{2}}{+}{2}{}{z}& {-}{z}\end{array}\right]$ (2)
 > $\mathrm{map}\left(\mathrm{expand},A·U\left[1\right]+B·U\left[2\right]-C\right)$
 $\left[\begin{array}{cc}{0}& {0}\\ {0}& {0}\end{array}\right]$ (3)

Left matrix extended GCD with 2 matrix diophantine equations:

 > $C≔\mathrm{MatrixGCLD}\left(A,B,z,'U','V'\right)$
 ${C}{≔}\left[\begin{array}{cc}{18}{}{{z}}^{{2}}{+}{3}{}{z}{-}{2}& {-}{1}{-}{6}{}{z}\\ {-}{{z}}^{{2}}{+}{2}{}{z}& {-}{z}\end{array}\right]$ (4)
 > $U;$$V$
 $\left[\left[\begin{array}{cc}{-}{9}{}{{z}}^{{4}}{-}{9}{}{{z}}^{{3}}{-}{9}{}{{z}}^{{2}}{-}{3}{}{z}{-}{2}& {{z}}^{{3}}{+}{{z}}^{{2}}{+}{z}{-}{1}\\ {-}\frac{{45}}{{4}}{}{{z}}^{{4}}{-}\frac{{9}}{{2}}{}{{z}}^{{3}}{-}\frac{{9}}{{2}}{}{{z}}^{{2}}& \frac{{5}}{{4}}{}{{z}}^{{3}}{+}\frac{{1}}{{2}}{}{{z}}^{{2}}{+}\frac{{1}}{{2}}{}{z}{-}{1}\end{array}\right]{,}\left[\begin{array}{cc}{0}& {0}\\ {-}\frac{{9}{}{{z}}^{{4}}}{{2}}& \frac{{{z}}^{{3}}}{{2}}\end{array}\right]\right]$
 $\left[\left[\begin{array}{cc}{124416}{}{{z}}^{{2}}{+}{124416}{}{z}{+}{41472}& {82944}{}{z}\\ {196992}{}{{z}}^{{2}}{+}{62208}{}{z}{+}{20736}& {-}{62208}{+}{103680}{}{z}\end{array}\right]{,}\left[\begin{array}{cc}{-41472}& {0}\\ {103680}{}{{z}}^{{2}}& {-}{41472}{+}{41472}{}{z}\end{array}\right]\right]$ (5)
 > $\mathrm{map}\left(\mathrm{expand},A·U\left[1\right]+B·U\left[2\right]-C\right)$
 $\left[\begin{array}{cc}{0}& {0}\\ {0}& {0}\end{array}\right]$ (6)
 > $\mathrm{map}\left(\mathrm{expand},A·V\left[1\right]+B·V\left[2\right]\right)$
 $\left[\begin{array}{cc}{0}& {0}\\ {0}& {0}\end{array}\right]$ (7)

Right matrix GCDs:

 > $C≔\mathrm{MatrixGCRD}\left(A,B,z\right)$
 ${C}{≔}\left[\begin{array}{cc}{-}{5}{+}{21}{}{z}& {-}{50}{}{z}\\ {1}& {0}\end{array}\right]$ (8)

Right matrix extended GCD:

 > $C≔\mathrm{MatrixGCRD}\left(A,B,z,'U'\right)$
 ${C}{≔}\left[\begin{array}{cc}{-}{5}{+}{21}{}{z}& {-}{50}{}{z}\\ {1}& {0}\end{array}\right]$ (9)
 > $\mathrm{map}\left(\mathrm{expand},U\left[1\right]·A+U\left[2\right]·B-C\right)$
 $\left[\begin{array}{cc}{0}& {0}\\ {0}& {0}\end{array}\right]$ (10)

Right matrix extended GCD with 2 matrix diophantine equations:

 > $C≔\mathrm{MatrixGCRD}\left(A,B,z,'U','V'\right)$
 ${C}{≔}\left[\begin{array}{cc}{-}{5}{+}{21}{}{z}& {-}{50}{}{z}\\ {1}& {0}\end{array}\right]$ (11)
 > $U;$$V$
 $\left[\left[\begin{array}{cc}{-}\frac{{2678994}}{{5377}}{}{{z}}^{{5}}{-}\frac{{333576}}{{5377}}{}{{z}}^{{4}}{-}\frac{{474579}}{{5377}}{}{{z}}^{{3}}{-}{27}{}{{z}}^{{2}}{+}{6}{}{z}{-}{5}& \frac{{9612270}}{{5377}}{}{{z}}^{{4}}{+}\frac{{6298074}}{{5377}}{}{{z}}^{{3}}{+}{99}{}{{z}}^{{2}}\\ {-}\frac{{19394}}{{5377}}{}{{z}}^{{4}}{-}\frac{{32006}}{{5377}}{}{{z}}^{{3}}{+}\frac{{35371}}{{5377}}{}{{z}}^{{2}}{-}{2}{}{z}{+}{1}& \frac{{123990}}{{5377}}{}{{z}}^{{3}}{+}\frac{{145964}}{{5377}}{}{{z}}^{{2}}{-}{z}{-}{5}\end{array}\right]{,}\left[\begin{array}{cc}\frac{{262548}}{{5377}}{}{{z}}^{{5}}{-}\frac{{1471959}}{{5377}}{}{{z}}^{{4}}{+}\frac{{861723}}{{5377}}{}{{z}}^{{3}}& \frac{{787644}}{{5377}}{}{{z}}^{{4}}{-}\frac{{2052945}}{{5377}}{}{{z}}^{{3}}\\ \frac{{10968}}{{5377}}{}{{z}}^{{4}}{-}\frac{{28369}}{{5377}}{}{{z}}^{{3}}{+}\frac{{29153}}{{5377}}{}{{z}}^{{2}}& \frac{{32904}}{{5377}}{}{{z}}^{{3}}{+}\frac{{13605}}{{5377}}{}{{z}}^{{2}}\end{array}\right]\right]$
 $\left[\left[\begin{array}{cc}{385423360}{}{{z}}^{{3}}{+}{75708160}{}{{z}}^{{2}}{+}{68825600}{}{z}{+}{13765120}& {-}{1404042240}{}{{z}}^{{2}}{-}{1025501440}{}{z}{-}{158298880}\\ {137651200}{}{{z}}^{{3}}{+}{6882560}{}{{z}}^{{2}}{+}{27530240}{}{z}& {-}{495544320}{}{{z}}^{{2}}{-}{295950080}{}{z}{-}{20647680}\end{array}\right]{,}\left[\begin{array}{cc}{-}{41295360}{}{{z}}^{{3}}{+}{213359360}{}{{z}}^{{2}}{-}{117003520}{}{z}{-}{13765120}& {-}{123886080}{}{{z}}^{{2}}{+}{268419840}{}{z}\\ {-}{13765120}{}{{z}}^{{3}}{+}{75708160}{}{{z}}^{{2}}{-}{48177920}{}{z}& {-}{41295360}{}{{z}}^{{2}}{+}{103238400}{}{z}{-}{13765120}\end{array}\right]\right]$ (12)
 > $\mathrm{map}\left(\mathrm{expand},U\left[1\right]·A+U\left[2\right]·B-C\right)$
 $\left[\begin{array}{cc}{0}& {0}\\ {0}& {0}\end{array}\right]$ (13)
 > $\mathrm{map}\left(\mathrm{expand},V\left[1\right]·A+V\left[2\right]·B\right)$
 $\left[\begin{array}{cc}{0}& {0}\\ {0}& {0}\end{array}\right]$ (14) References

 Beckermann, B., and Labahn, G. "Fraction-free Computation of Matrix Rational Interpolants and Matrix GCDs." SIAM Journal on Matrix Analysis and Applications. Vol. 22 No. 1, (2000): 114-144.