LinearAlgebra[Generic]
CharacteristicPolynomial
compute the characteristic polynomial of a square Matrix
Calling Sequence
Parameters
Description
Examples
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)
R
-
the domain of computation
x
name of the variable
A
square Matrix of values in R
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.
with⁡LinearAlgebraGeneric:
Z`0`,Z`1`,Z`+`,Z`-`,Z`*`,Z`=`≔0,1,`+`,`-`,`*`,`=`:
A≔Matrix⁡2,1,4,3,2,1,0,0,5
A≔214321005
C≔CharacteristicPolynomialZ⁡A
C≔1−921−5
x3|x2|x|1·C
x3−9⁢x2+21⁢x−5
C≔CharacteristicPolynomialZ⁡A,x
C≔x3−9⁢x2+21⁢x−5
n,C≔CharacteristicPolynomialZ⁡A,output=factored
n,C≔0,1−5,1−41
xn⁢x+C12⁢x2+C22⁢x+C23
x−5⁢x2−4⁢x+1
CharacteristicPolynomialZ⁡A,x,output=factored
Q`0`,Q`1`,Q`+`,Q`-`,Q`*`,Q`/`,Q`=`≔0,1,`+`,`-`,`*`,`/`,`=`:
A≔Matrix⁡2,−7,−3,4,1,−3,−4,5,0,0,5,−7,0,0,0,0
A≔2−7−341−3−45005−70000
n,C≔CharacteristicPolynomialQ⁡A,output=factored
n,C≔1,1−5,111
x⁢x−5⁢x2+x+1
C≔CharacteristicPolynomialQ⁡A
C≔1−4−4−50
x4|x3|x2|x|1·C
x4−4⁢x3−4⁢x2−5⁢x
See Also
LinearAlgebra[CharacteristicPolynomial]
LinearAlgebra[Generic][BerkowitzAlgorithm]
LinearAlgebra[Generic][HessenbergAlgorithm]
LinearAlgebra[Modular][CharacteristicPolynomial]
Download Help Document