Class CharacteristicPolynomial
- java.lang.Object
-
- dev.nm.algebra.linear.matrix.doubles.factorization.eigen.CharacteristicPolynomial
-
- All Implemented Interfaces:
Spectrum
public class CharacteristicPolynomial extends Object implements Spectrum
The characteristic polynomial of a square matrix is the functionp(λ) = det(A - λI)
The zeros of this polynomial are the eigenvalues of A. That is, λ being an eigenvalue of A is equivalent to stating that the system of linear equations(A - λI) v = 0
where I is an identity matrix, has a non-zero solution v (namely an eigenvector). The Cayley-Hamilton theorem states that every square matrix satisfies its own characteristic polynomial, that is, p(A) = 0 .
-
-
Constructor Summary
Constructors Constructor Description CharacteristicPolynomial(Matrix A)
Construct the characteristic polynomial for a square matrix.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Polynomial
getCharacteristicPolynomial()
Get the characteristic polynomial.List<Number>
getEigenvalues()
Get all the eigenvalues.String
toString()
-
-
-
Constructor Detail
-
CharacteristicPolynomial
public CharacteristicPolynomial(Matrix A)
Construct the characteristic polynomial for a square matrix.- Parameters:
A
- a square matrix- Throws:
IllegalArgumentException
- if A is not square
-
-
Method Detail
-
getCharacteristicPolynomial
public Polynomial getCharacteristicPolynomial()
Get the characteristic polynomial.- Returns:
- the characteristic polynomial
-
getEigenvalues
public List<Number> getEigenvalues()
Description copied from interface:Spectrum
Get all the eigenvalues.- Specified by:
getEigenvalues
in interfaceSpectrum
- Returns:
- the eigenvalues
-
-