CompanionMatrix - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


Student[LinearAlgebra]

  

CompanionMatrix

  

construct the companion Matrix of a monic polynomial

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

CompanionMatrix(P, options)

Parameters

P

-

monic polynomial

options

-

(optional) parameters; for a complete list, see LinearAlgebra[CompanionMatrix]

Description

• 

The CompanionMatrix(P) command returns the companion Matrix associated with the univariate polynomial P⁡x.

• 

If C := CompanionMatrix(P) and P is a0+a1⁢x+⋯+xn (a monic univariate polynomial), then C is an n⁢x⁢n Matrix where n is the degree of polynomial P, Ci,n=−ai−1⁡i=1..n, Ci,i−1=1⁡i=2..n, and Ci,j=0 for all other values of i and j.

Examples

> 

with⁡StudentLinearAlgebra:

> 

p≔x4+x3+2⁢x2+3⁢x

p≔x4+x3+2⁢x2+3⁢x

(1)
> 

CompanionMatrix⁡p

0000100−3010−2001−1

(2)
> 

q≔z+2⁢z−5⁢z+3

q≔z+2⁢z−5⁢z+3

(3)
> 

CompanionMatrix⁡q

00301019010

(4)

See Also

LinearAlgebra[CompanionMatrix]

Student[LinearAlgebra]

Student[LinearAlgebra][CharacteristicPolynomial]