LinearAlgebra[Generic] - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Linear Algebra : LinearAlgebra Package : Generic Subpackage : LinearAlgebra/Generic/CharacteristicPolynomial

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

withLinearAlgebra[Generic]:

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

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

A:=214321005

(1)

CCharacteristicPolynomial[Z]A

C:=19215

(2)

x3|x2|x|1.C

x39x2+21x5

(3)

CCharacteristicPolynomial[Z]A,x

C:=x39x2+21x5

(4)

n,CCharacteristicPolynomial[Z]A,output=factored

n,C:=0,15,141

(5)

xnx+C12x2+C22x+C23

x5x24x+1

(6)

CharacteristicPolynomial[Z]A,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

A:=2734134500570000

(8)

n,CCharacteristicPolynomial[Q]A,output=factored

n,C:=1,15,111

(9)

xnx+C12x2+C22x+C23

xx5x2+x+1

(10)

CCharacteristicPolynomial[Q]A

C:=14450

(11)

x4|x3|x2|x|1.C

x44x34x25x

(12)

See Also

LinearAlgebra[CharacteristicPolynomial]

LinearAlgebra[Generic]

LinearAlgebra[Generic][BerkowitzAlgorithm]

LinearAlgebra[Generic][HessenbergAlgorithm]

LinearAlgebra[Modular][CharacteristicPolynomial]

 


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