Class CharacteristicPolynomial

  • All Implemented Interfaces:
    Spectrum

    public class CharacteristicPolynomial
    extends Object
    implements Spectrum
    The characteristic polynomial of a square matrix is the function
    
     p(λ) = 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 .

    See Also:
    • 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 interface Spectrum
        Returns:
        the eigenvalues