construct the companion Matrix (pencil) of a monic (or non-monic) polynomial or Matrix polynomial - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Linear Algebra : LinearAlgebra Package : Constructors : LinearAlgebra/CompanionMatrix

LinearAlgebra[CompanionMatrix] - construct the companion Matrix (pencil) of a monic (or non-monic) polynomial or Matrix polynomial

Calling Sequence

CompanionMatrix(P, x, cpt, options)

CompanionMatrix(data1, data2, cpt, options)

Parameters

P

-

(optional) polynomial or matrix polynomial

x

-

(optional) name; variable to use as the main indeterminate if P is multivariate

data1

-

(optional) list; first coordinate values (nodes) for distinct points in the Lagrange basis which specify the polynomial or matrix polynomial

data2

-

(optional) list; second coordinate values (values) for distinct points in the Lagrange basis which specify the polynomial or matrix polynomial

cpt

-

(optional) BooleanOpt(compact); selects the compact form of the output in the scalar, monic polynomial case

options

-

(optional); constructor options for the result object

Description

• 

The CompanionMatrix(P) command returns the companion Matrix associated with the univariate (matrix) polynomial either provided as Px or specified by distinct data points in the Lagrange basis.

• 

If C := CompanionMatrix(P) and P&equals;a0&plus;a1x&plus;...&plus;xn (a monic univariate polynomial expressed in the monomial basis), and each coefficient is an m by m matrix or scalar if m&equals;1, then  C is an mn by mn Matrix where n is the degree of polynomial P, and if m&equals;1 then Ci&comma;n&equals;ai1 (i&equals;1..n), Ci&comma;i1&equals;1 (i&equals;2..n), and Ci&comma;j&equals;0 for all other values of i and j.  If 1<m, a block-structured matrix C is the result.  In this case, monic means that the leading coefficient of P is the identity matrix.

• 

If C := CompanionMatrix(P) and P is a univariate matrix polynomial that is not monic, or a scalar polynomial that is not monic, then C is an expression sequence of two matrices such that DeterminantxC2&plus;C1&equals;0 if and only if Px is singular.

• 

Px need not be expressed in the monomial basis; it may be expressed in any of the major orthogonal polynomial bases known to OrthogonalSeries, or in terms of the additional bases BernsteinBasis(k, n, a, b, x) meaning binomialn&comma;kxakbxnk, NewtonBasis(k, [x0, x1, ..., xn], x), or LagrangeBasis(k, [x0, x1, ..., xn], x).

• 

The CompanionMatrix(P, x) command is used when P is a multivariate polynomial; the main indeterminate of P can be specified by using the optional parameter x.

• 

In the case that the polynomial or matrix polynomial is supplied in terms of distinct points in the Lagrange basis, as data1 and data2, then a pair of Matrices C0 and C1 are returned. For each x&equals;data1i, the property DeterminantC1xC0&equals;y will hold, for the corresponding value y&equals;data2i. Given n&plus;1 distinct points the Matrices C0 and C1 will have size n&plus;2 by n&plus;2.

• 

If the compact option (cpt) is included in the calling sequence as the symbol compact or in the form compact=true, then the result is built by using a shape function designed to minimize storage.  If the option is omitted or entered as compact=false, a full rectangular Matrix is constructed.  Generally, if space is not a consideration, the full rectangular form (the default) is more efficient.  The compact option does nothing if P is a matrix polynomial.

  

Note:  If the compact form is selected, any datatype specification in the constructor options is silently ignored. The datatype of any data retrieved from the constructed Matrix is determined by the data used to build the Matrix.

• 

The constructor options provide additional information (readonly, shape, storage, order, datatype, and attributes) to the Matrix constructor that builds the result. These options may also be provided in the form outputoptions=[...], where [...] represents a Maple list.  If a constructor option is provided in both the calling sequence directly and in an outputoptions option, the latter takes precedence (regardless of the order).

Examples

withLinearAlgebra&colon;

p:=x4&plus;y3&plus;2y2&plus;3x

p:=x4&plus;y3&plus;2y2&plus;3x

(1)

CompanionMatrixp&comma;y

00x43x100012

(2)

q:=z&plus;2z5z&plus;3

q:=z&plus;2z5z&plus;3

(3)

CompanionMatrixq

00301019010

(4)

r:=3x2&plus;2xy&plus;17y2

r:=3x2&plus;2xy&plus;17y2

(5)

CompanionMatrixr&comma;x

017y212y&comma;1003

(6)

p:=RandomMatrix2&comma;2ChebyshevT0&comma;x&plus;RandomMatrix2&comma;2ChebyshevT1&comma;x&plus;RandomMatrix2&comma;2ChebyshevT2&comma;x&plus;RandomMatrix2&comma;2ChebyshevT3&comma;x&plus;RandomMatrix2&comma;2ChebyshevT4&comma;x

p:=44ChebyshevT0&comma;x&plus;8ChebyshevT1&comma;x32ChebyshevT2&comma;x93ChebyshevT3&comma;x98ChebyshevT4&comma;x31ChebyshevT0&comma;x&plus;99ChebyshevT1&comma;x4ChebyshevT2&comma;x72ChebyshevT3&comma;x&plus;57ChebyshevT4&comma;x92ChebyshevT0&comma;x&plus;69ChebyshevT1&comma;x74ChebyshevT2&comma;x76ChebyshevT3&comma;x77ChebyshevT4&comma;x67ChebyshevT0&comma;x&plus;29ChebyshevT1&comma;x&plus;27ChebyshevT2&comma;x2ChebyshevT3&comma;x&plus;27ChebyshevT4&comma;x

(7)

C1&comma;C2:=CompanionMatrixp&comma;x

C1&comma;C2:=001200044920001200316710001208690100012992900120006630001200610000012093760000012722&comma;10000000010000000010000000010000000010000000010000000019615400000011454

(8)

simplifyDeterminantp24DeterminantC1xC2

0

(9)

M0&comma;M1:=CompanionMatrixy0&comma;y1&comma;y2&comma;x0&comma;x1&comma;x2

M0&comma;M1:=x000y00x10y100x2y21x0x1x0x21x1x0x1x21x2x0x2x10&comma;1000010000100000

(10)

p:=DeterminantxM1M0

p:=x2x0y1x2x0y2x2x1y0&plus;x2x1y2&plus;x2x2y0x2x2y1xx02y1&plus;xx02y2&plus;xx12y0xx12y2xx22y0&plus;xx22y1x02x1y2&plus;x02x2y1&plus;x0x12y2x0x22y1x12x2y0&plus;x1x22y0x0x2x1x2x0x1

(11)

Show the Lagrange form of p.

iform:=collectp&comma;y0&comma;y1&comma;y2&comma;factor

iform:=xx1y0xx2x0x1x0x2xx2xx0y1x0x1x1x2&plus;xx1xx0y2x0x2x1x2

(12)

degreep&comma;x

2

(13)

See Also

LinearAlgebra, LinearAlgebra[CharacteristicPolynomial], LinearAlgebra[DiagonalMatrix], LinearAlgebra[JordanBlockMatrix], type[BooleanOpt]

References

  

Corless, Robert M., and Watt, Stephen M. "Bernstein bases are optimal, but, sometimes, Lagrange bases are better." Proceedings of SYNASC. Timisoara. pp. 141-153. MITRON Press, 2004.


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam