LinearAlgebra[Modular]
IntegerCharacteristicPolynomial
computation of the characteristic polynomial of an integer matrix using modular methods
Calling Sequence
Parameters
Description
Examples
IntegerCharacteristicPolynomial(A, lambda)
A
-
square matrix with integer entries
lambda
variable to use for output characteristic polynomial
The IntegerCharacteristicPolynomial function computes the characteristic polynomial for a square Matrix with integer entries. This is a programmer level function, and it does not perform argument checking. Thus, argument checking must be handled external to this function.
Note: The IntegerCharacteristicPolynomial routine uses a probabilistic approach that achieves great gains for structured systems. Information on controlling the probabilistic behavior can be found in _EnvProbabilistic.
This command is part of the LinearAlgebra[Modular] package, so it can be used in the form IntegerCharacteristicPolynomial(..) only after executing the command with(LinearAlgebra[Modular]). However, it can always be used in the form LinearAlgebra[Modular][IntegerCharacteristicPolynomial](..).
with⁡LinearAlgebraModular:
M≔Matrix⁡2,1,3,4,3,1,−2,1,−3
M≔213431−21−3
IntegerCharacteristicPolynomial⁡M,x
x3−2⁢x2−8⁢x−20
LinearAlgebra:-CharacteristicPolynomial⁡M,x
This function is provided as a high-efficiency function for computation of characteristic polynomials for larger matrices. For example:
M≔LinearAlgebra:-RandomMatrix⁡50,50,density=0.5,generator=−99..99,outputoptions=datatype=integer
tt≔time⁡:
p1≔IntegerCharacteristicPolynomial⁡M,x:
t1≔time⁡−tt
t1≔0.025
_EnvDisableModular≔true:
p2≔LinearAlgebra:-CharacteristicPolynomial⁡M,x:
t2≔time⁡−tt
t2≔0.654
expand⁡p1−p2
0
Speed-up factor:
t2t1
26.16000000
See Also
LinearAlgebra/Details
LinearAlgebra[CharacteristicPolynomial]
Download Help Document