Characteristic Polynomial - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


LinearAlgebra[Generic]

  

CharacteristicPolynomial

  

compute the characteristic polynomial of a square Matrix

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

CharacteristicPolynomial[R](A)

CharacteristicPolynomial[R](A,x)

CharacteristicPolynomial[R](A,output=factored)

CharacteristicPolynomial[R](A,output=expanded)

CharacteristicPolynomial[R](A,method=Berkowitz)

CharacteristicPolynomial[R](A,method=Hessenberg)

Parameters

R

-

the domain of computation

x

-

name of the variable

A

-

square Matrix of values in R

Description

• 

The (indexed) parameter R, which specifies the domain of computation, a commutative ring, must be a Maple table/module which has the following values/exports:

  

R[`0`] : a constant for the zero of the ring R

  

R[`1`] : a constant for the (multiplicative) identity of R

  

R[`+`] : a procedure for adding elements of R (nary)

  

R[`-`] : a procedure for negating and subtracting elements of R (unary and binary)

  

R[`*`] : a procedure for multiplying elements of R (binary and commutative)

  

R[`=`] : a boolean procedure for testing if two elements of R are equal

• 

A must be a square (n x n) Matrix of values from R.

• 

The optional parameter x must be a name.

• 

CharacteristicPolynomial[R](A) returns a Vector V of dimension n+1 of values in R containing the coefficients of the characteristic polynomial of A. The characteristic polynomial is the polynomial V[1]*x^n + V[2]*x^(n-1) + ... + V[n]*x + V[n+1].

• 

CharacteristicPolynomial[R](A,x) returns the characteristic polynomial as a Maple expression in the variable x. This option should only be used if the data type for R is compatible with Maple's * operator. For example, if the elements of R are represented by Vectors, or Arrays, then this option should not be used because Vector([1,2,3])*x is simplified to Vector([x,2*x,3*x]).

• 

The optional argument output=... specifies the form of the output. In the case output=expanded, the characteristic polynomial is returned as one Vector encoding the characteristic polynomial in expanded form. In the case output=factored, the characteristic polynomial is returned as a sequence of the form m, [v1, v2, ...] where m is a non-negative integer, and v1, v2, ... are Vectors of elements of R representing (not necessarily irreducible) factors of the characteristic polynomial. The integer m represents the factor x^m. The implementation looks for diagonal blocks and computes the characteristic polynomial of each block separately.

• 

The optional argument method=... specifies the algorithm to be used. The option method=Berkowitz directs the code to use the Berkowitz algorithm, which uses O(n^4) arithmetic operations in R. The option method=Hessenberg directs the code to use the Hessenberg algorithm, which uses O(n^3) arithmetic operations in R but requires R to be a field, i.e., the following operation must be defined:

  

R[`/`]: a procedure for dividing two elements of R

  

If method=... is not given, and the operation R[`/`] is defined, then the Hessenberg algorithm is used, otherwise the Berkowitz algorithm is used.

Examples

withLinearAlgebraGeneric:

Z`0`,Z`1`,Z`+`,Z`-`,Z`*`,Z`=`0,1,`+`,`-`,`*`,`=`:

AMatrix2,1,4,3,2,1,0,0,5

A214321005

(1)

CCharacteristicPolynomialZA

C1−921−5

(2)

x3|x2|x|1·C

x39x2+21x5

(3)

CCharacteristicPolynomialZA,x

Cx39x2+21x5

(4)

n,CCharacteristicPolynomialZA,output=factored

n,C0,1−5,1−41

(5)

xnx+C12x2+C22x+C23

x5x24x+1

(6)

CharacteristicPolynomialZA,x,output=factored

x5x24x+1

(7)

Q`0`,Q`1`,Q`+`,Q`-`,Q`*`,Q`/`,Q`=`0,1,`+`,`-`,`*`,`/`,`=`:

AMatrix2,7,3,4,1,3,4,5,0,0,5,7,0,0,0,0

A2−7−341−3−45005−70000

(8)

n,CCharacteristicPolynomialQA,output=factored

n,C1,1−5,111

(9)

xnx+C12x2+C22x+C23

xx5x2+x+1

(10)

CCharacteristicPolynomialQA

C1−4−4−50

(11)

x4|x3|x2|x|1·C

x44x34x25x

(12)

See Also

LinearAlgebra[CharacteristicPolynomial]

LinearAlgebra[Generic]

LinearAlgebra[Generic][BerkowitzAlgorithm]

LinearAlgebra[Generic][HessenbergAlgorithm]

LinearAlgebra[Modular][CharacteristicPolynomial]