Polynomial Matrix Utilities

Purpose

This notebook shows the usage of the package PolynomialMatrices.m.

Refernces

For a complete treatment of polynomial matrix theory and for more references see

KAILATH Thomas, “Linear Systems”, Prentice-Hall, 1980

KUCERA Vladimir, “Analysis and Design of Discrete Linear Control Systems”, Prentice-Hall, New York, 1991

KUCERA Vladimir, “Discrete Linear Control”, Academia of Praha, Praha, 1979.

Load the package

Put the file PolynomialMatrices.m in a directory searched by Mathematica, or append its path to $Path

AppendTo[$Path, 
        DirectoryName[...... ...  ...  .. ]];

<< PolynomialMatrices`

Get a list of the loaded functions

?PolynomialMatrices`*

Some examples on how to use all these functions follow.

Hermite, Smith and McMillan forms

These three functions have two versions: one computing only the canonical form

HermiteForm[m = {{(x^2), x + 1, 0}, {x, x - 1, 1}, {x + 1, x, 1}}] // 
      MatrixForm

and an extended version returning the unimodular matrices that lead to that form too

{h,u}=ExtendedHermiteForm[m]

h===Expand[u.m]

u is unimodular

Det[u]

The function HermiteForm computes the Hermite form of matrices with dependent columns as well:

HermiteForm[{{x, (x^2), x}, {(x^2), (x^3), x + 1}, {(x^3), (x^4), x + 2}}] // 
      MatrixForm

The functions that compute the Smith and McMillan forms can be used the same way

SmithForm[m={{x-1,x+1,0},{x,x-2,1},{x+1,2x,1}}]//MatrixForm
MatrixForm/@({s,u,v}=ExtendedSmithForm[m])
s===Expand[u.m.v]

SmithForm[
        m = DiagonalMatrix[{1 - x, 1 - x, 1 - x, 
              1 - x, -2 - x, -2 - x}]] // MatrixForm
MatrixForm /@ ({s, u, v} = ExtendedSmithForm[m])
s === Expand[u . m . v]

McMillanForm[
        m = {{(x/((((x + 1))^2) (((x + 2))^2))), 
              (x/(((x + 2))^2))}, {-(x/(((x + 2))^2)), -(x/(((x + 2))^2))}}] // MatrixForm

MatrixForm/@({mc,u,v}=ExtendedMcMillanForm[m])
mc===Simplify[u.m.v]

These functions work on matrices whose elemtents are polynomials with symbolic coefficients as well; in this case one must specify the indeterminate, otherwise an error message is displayed:

SmithForm[
      m = {{(x^2) + d x + k, k, 0}, {d x, k, 1}, {x, x, d}}]

The right input is

SmithForm[m,x]

Division

The result of LDivision[a,b] is a list {q,r} consisting of the quotient and the remainder obtained by left division of matrix a by matrix b (a=b.q+r). The matrices a and b must have the same number of rows.

{q, r} = 
      LDivision[a = {{(x^2) + 2  (x^4)}, {1 + x + (x^2)}}, 
        b = {{(x^2) + 1, 1}, {1, (x^2)}}]
a === Expand[b . q + r]

The functions LQuotient and LRemainder compute only the left quotient and remainder respectively:

LQuotient[a,b]
LRemainder[a,b]

LGCD computes the greatest common left divisor of two polynomial matrices

g = 
      LGCD[a = {{(x^2) + x}, {(x^2) + x}}, 
        b = {{(x^2), x}, {(x^2) - x + 1, x}}]
LRemainder[a, g, x]
LRemainder[b, g, x]

The least common left multiple of two polynomial matrices is given by Llcm

Llcm[{{x - 1, 1}, {x + 1, 0}}, {{(x^2), 1}, {1, 0}}]

The function LCoprime is a left coprimality test for polynomial matrices

LCoprime[{{x, x + 1, x - 2}, {0, x, 0}}, {{x, x - 1}, {(x^2), 
          1}}]

The functions for the right division are: RDivision, RQuotient, RRemainder, RGCD, Rlcm, RCoprime and their usage is the same.

Diophantine Equations

The degree of a polynomial vector is the maximun degree of its entries.
The function DiophantineSolve finds two polynomial matrices X, Y (if any) of minimal column degree that solve the equation a.X+b.Y==c, where a, b, c, are polynomial matrices with the same number of rows

a = {{1, 1}, {0, 1}};
b = {{1 - x, 2  x}, {1 - x, x}};
c = {{1 - x}, {(x^2)}};
DiophantineSolve[a, b, c]

It is also possible to compute ALL the minimal column degree solutions of the diophantine equation: it is sufficient to specify one more variable that will be used to describe the free variables of the result

DiophantineSolve[a,b,c,x,t]

For every real or complex value of the t[i]'s this is a minimal column degree solution of the diophantine equation.
The following is an example of a diophantine equation which has no solution:

DiophantineSolve[{{(x^2), x}}, {{(x^3) + x}}, {{1}}]

Some other useful functions

A matrix is said to be column reduced if the matrix of the leading coefficients has full column rank. A polynomial matrix can always be put in column reduced form using only elementary operations on the columns; PolynomialColumnReduce computes the unimodular matrix that represents these elementary operations.

m = {{(x^2) - 1, (x^3)}, {1, x - 1}, {2  x, 
            1}};
PolynomialColumnReduce[m]

To put the matrix m in column reduced form it is sufficient to postmultiply it by the unimodular matrix just computed

Expand[m.PolynomialColumnReduce[m]]

PolynomialRowReduce[m] computes a unimodular matrix U such that U.m is row reduced.
The function Rank[m] returns the rank of matrix m and EliminateDep[m] eliminates the dependent rows of m:

Rank[m = {{(x^2) - 1, (x^2)}, {1, 0}, {x, 1}}]
EliminateDep[m]

The function PolyExtendedGCD is the polynomial version of ExtendedGCD:

?PolyExtendedGCD

PolynomialGCD[(x^2) - 1, (x^2) + 2  x + 1]
PolyExtendedGCD[{(x^2) - 1, (x^2) + 2  x + 1}]

PolynomialDegree[m,x] returns the degree of a matrix (or vector) m

PolynomialDegree[{{x - 1, 0}, {(x^3) - (x^2) + 1, x}}]

ExtPolQ[list,x] yields True if all the entries of "list" are polynomials in x or in (x^(-1))

ExtPolQ[{x, (x^(-1))}, x]
ExtPolQ[{(x^(-3)), 1/x, 1}, x]