LinearAlgebra

Interval matrices support standard linear algebra operations from the LinearAlgebra standard library.

julia> using IntervalArithmetic, LinearAlgebrajulia> A = interval.([1.0 0.5; 0.5 2.0], 0.1; format = :midpoint)2×2 Matrix{Interval{Float64}}: [0.899999, 1.1]_com       [0.399999, 0.600001]_com [0.399999, 0.600001]_com  [1.9, 2.1]_com

Eigenvalues and eigenvectors

The eigenvalues (eigvals) and the eigendecomposition (eigen) are computed by one of several algorithms, all subtypes of AbstractIntervalEigenAlg, which can be selected via the alg keyword argument:

Algorithmeigvalseigen
IntervalEigen (default)Gershgorin circle theorem intersected with Rohncontraction mapping theorem, falls back to eigvals and NaI eigenvectors
IntervalEigenContractioncontraction mapping theoremcontraction mapping theorem
IntervalEigenRohnRohn enclosureRohn enclosure, NaI eigenvectors
IntervalEigenHertzHertz exact hull (exponential complexity)Hertz exact hull, NaI eigenvectors

The Gershgorin circle theorem and the contraction mapping theorem enclose each eigenvalue individually, but only succeed when the interval radii are small enough. The Rohn and Hertz methods return a single interval enclosing all the eigenvalues, and are valid for any interval radius. As neither the Gershgorin circle theorem nor the Rohn enclosure is always tighter than the other, the default takes their intersection.

julia> eigvals(A)2-element Vector{Interval{Float64}}: [0.592893, 1.13432]_com [1.86568, 2.40711]_comjulia> eigen(A)LinearAlgebra.Eigen{Complex{Interval{Float64}}, Interval{Float64}, Matrix{Complex{Interval{Float64}}}, Vector{Interval{Float64}}}values:2-element Vector{Interval{Float64}}: [0.592893, 1.13432]_com [1.86568, 2.40711]_comvectors:2×2 Matrix{Complex{Interval{Float64}}}: NaI + im*NaI  NaI + im*NaI NaI + im*NaI  NaI + im*NaIjulia> eigvals(Symmetric(A); alg = IntervalArithmetic.IntervalEigenRohn())2-element Vector{Interval{Float64}}: [0.592893, 2.40711]_com [0.592893, 2.40711]_comjulia> eigvals(Symmetric(A); alg = IntervalArithmetic.IntervalEigenHertz())2-element Vector{Interval{Float64}}: [0.618975, 2.38103]_com [0.618975, 2.38103]_com

When the algorithm fails, the eigenvalues and eigenvectors are NaIs.

julia> eigen(interval.([1.0 0.5; 0.5 2.0], 1.0; format = :midpoint); alg = IntervalArithmetic.IntervalEigenContraction())LinearAlgebra.Eigen{Complex{Interval{Float64}}, Complex{Interval{Float64}}, Matrix{Complex{Interval{Float64}}}, Vector{Complex{Interval{Float64}}}}values:2-element Vector{Complex{Interval{Float64}}}: NaI + im*NaI NaI + im*NaIvectors:2×2 Matrix{Complex{Interval{Float64}}}: NaI + im*NaI  NaI + im*NaI NaI + im*NaI  NaI + im*NaI

A matrix of intervals contains non-symmetric matrices, even if its entries are symmetric. Use the Symmetric and Hermitian wrappers to only consider the symmetric and Hermitian matrices: their eigenvalues are real, and the Rohn and Hertz enclosures are tighter.

julia> eigvals(A; alg = IntervalArithmetic.IntervalEigenRohn())2-element Vector{Complex{Interval{Float64}}}: [0.592893, 2.40711]_com + im*[-0.200001, 0.200001]_com [0.592893, 2.40711]_com + im*[-0.200001, 0.200001]_comjulia> eigvals(Symmetric(A))2-element Vector{Interval{Float64}}: [0.592893, 1.13432]_com [1.86568, 2.40711]_com
Note

The matrix functions of LinearAlgebra for Symmetric and Hermitian matrices (e.g. sqrt, cos, svd) assume that the eigenvectors are orthonormal and that the eigenvalues are accurate up to roundoff errors. They throw an ArgumentError for interval matrices, except exp, log and integer powers, which have rigorous implementations.

IntervalArithmetic.IntervalEigen — Type
IntervalEigen

Default eigendecomposition algorithm for interval matrices:

  • eigvals uses the Gershgorin circle theorem, after a similarity transform by the approximate eigenvectors of the midpoint matrix, intersected with IntervalEigenRohn. When the Gershgorin circle theorem fails (e.g. when interval radii are too large), it returns the enclosure of IntervalEigenRohn.
  • eigen uses the contraction mapping theorem, as IntervalEigenContraction. When it fails, it returns the eigenvalues of eigvals and nai eigenvectors.
source
IntervalArithmetic.IntervalEigenContraction — Type
IntervalEigenContraction

Eigendecomposition via the contraction mapping theorem only, which gives tight bounds when the interval radii are small and the eigenvalues are simple. Returns nai if the contraction fails (e.g. when interval radii are too large).

source
IntervalArithmetic.IntervalEigenRohn — Type
IntervalEigenRohn

Rohn eigenvalue enclosure (fast, O(n³)). Returns a single interval enclosing all eigenvalues and, when called with eigen, nai eigenvectors. Valid for any interval radius.

source
IntervalArithmetic.IntervalEigenHertz — Type
IntervalEigenHertz

Hertz exact hull of eigenvalues (exponential O(2ⁿ) complexity). Returns a single interval enclosing all eigenvalues and, when called with eigen, nai eigenvectors.

source