Eigenvalue Problems

EigenvalueProblem and EigenvalueTarget are SciMLBase types re-exported by LinearSolve.jl. Their docstrings are maintained in SciMLBase and rendered in the SciMLBase problem interface documentation; this page summarizes how LinearSolve.jl uses them. See the eigenvalue tutorial for worked examples and the eigenvalue solvers page for the available algorithms.

Mathematical Specification

The standard problem finds pairs $(\lambda, v)$ with

\[A v = \lambda v\]

and, when a second operator B is given, the generalized problem

\[A v = \lambda B v\]

Eigenvectors follow the type of u0 when supplied, otherwise the dense vector type matching a row of A. Eigenvalues have eltype(A) when real and Complex{eltype(A)} when a general real A yields conjugate pairs.

Constructor

EigenvalueProblem(A, B = nothing, p = NullParameters();
    num_eigenpairs = nothing, eigentarget = EigenvalueTarget.LargestMagnitude,
    shift = nothing, u0 = nothing, kwargs...)
  • num_eigenpairs: how many eigenpairs to compute; nothing requests all of them from the dense solver or a solver-chosen default from the iterative backends.
  • eigentarget: which part of the spectrum to return, an EigenvalueTarget (below).
  • shift: when supplied, the eigenvalues nearest this value are returned (shift-and-invert).
  • u0: an optional starting vector for the iterative backends.
  • kwargs: extra keyword arguments passed on to the solver.

EigenvalueTarget

EigenvalueTarget is an EnumX enum selecting the part of the spectrum returned when only a subset of the eigenpairs is requested:

ValueSelects
EigenvalueTarget.LargestMagnitudelargest abs(λ) (the default)
EigenvalueTarget.SmallestMagnitudesmallest abs(λ)
EigenvalueTarget.LargestRealPartlargest (most positive) real part
EigenvalueTarget.SmallestRealPartsmallest (most negative) real part
EigenvalueTarget.LargestImaginaryPartlargest (most positive) imaginary part
EigenvalueTarget.SmallestImaginaryPartsmallest (most negative) imaginary part

Not every backend supports every target directly; the eigenvalue solvers page lists each algorithm's restrictions.

Example

using LinearSolve

A = [2.0 1.0; 1.0 3.0]
prob = EigenvalueProblem(A; num_eigenpairs = 1,
    eigentarget = EigenvalueTarget.LargestMagnitude)
sol = solve(prob)
sol.values, sol.vectors