Please, help us to better know about our user community by answering the following short survey: https://forms.gle/wpyrxWi18ox9Z5ae9
Eigen  3.4.0
Loading...
Searching...
No Matches
Catalogue of dense decompositions

This page presents a catalogue of the dense matrix decompositions offered by Eigen. For an introduction on linear solvers and decompositions, check this page . To get an overview of the true relative speed of the different decompositions, check this benchmark .

Catalogue of decompositions offered by Eigen

Generic information, not Eigen-specificEigen-specific
DecompositionRequirements on the matrixSpeedAlgorithm reliability and accuracyRank-revealingAllows to compute (besides linear solving)Linear solver provided by EigenMaturity of Eigen's implementationOptimizations
PartialPivLUInvertibleFastDepends on condition number--YesExcellentBlocking, Implicit MT
FullPivLU-SlowProvenYes-YesExcellent-
HouseholderQR-FastDepends on condition number-OrthogonalizationYesExcellentBlocking
ColPivHouseholderQR-FastGoodYesOrthogonalizationYesExcellent-
FullPivHouseholderQR-SlowProvenYesOrthogonalizationYesAverage-
CompleteOrthogonalDecomposition-FastGoodYesOrthogonalizationYesExcellent-
LLTPositive definiteVery fastDepends on condition number--YesExcellentBlocking
LDLTPositive or negative semidefinite1Very fastGood--YesExcellentSoon: blocking

Singular values and eigenvalues decompositions
BDCSVD (divide & conquer)-One of the fastest SVD algorithmsExcellentYesSingular values/vectors, least squaresYes (and does least squares)ExcellentBlocked bidiagonalization
JacobiSVD (two-sided)-Slow (but fast for small matrices)Proven3YesSingular values/vectors, least squaresYes (and does least squares)ExcellentR-SVD
SelfAdjointEigenSolverSelf-adjointFast-average2GoodYesEigenvalues/vectors-ExcellentClosed forms for 2x2 and 3x3
ComplexEigenSolverSquareSlow-very slow2Depends on condition numberYesEigenvalues/vectors-Average-
EigenSolverSquare and realAverage-slow2Depends on condition numberYesEigenvalues/vectors-Average-
GeneralizedSelfAdjointEigenSolverSquareFast-average2Depends on condition number-Generalized eigenvalues/vectors-Good-

Helper decompositions
RealSchurSquare and realAverage-slow2Depends on condition numberYes--Average-
ComplexSchurSquareSlow-very slow2Depends on condition numberYes--Average-
TridiagonalizationSelf-adjointFastGood---GoodSoon: blocking
HessenbergDecompositionSquareAverageGood---GoodSoon: blocking

Notes:

  • 1: There exist two variants of the LDLT algorithm. Eigen's one produces a pure diagonal D matrix, and therefore it cannot handle indefinite matrices, unlike Lapack's one which produces a block diagonal D matrix.
  • 2: Eigenvalues, SVD and Schur decompositions rely on iterative algorithms. Their convergence speed depends on how well the eigenvalues are separated.
  • 3: Our JacobiSVD is two-sided, making for proven and optimal precision for square matrices. For non-square matrices, we have to use a QR preconditioner first. The default choice, ColPivHouseholderQR, is already very reliable, but if you want it to be proven, use FullPivHouseholderQR instead.

Terminology

Selfadjoint
For a real matrix, selfadjoint is a synonym for symmetric. For a complex matrix, selfadjoint is a synonym for hermitian. More generally, a matrix \( A \) is selfadjoint if and only if it is equal to its adjoint \( A^* \). The adjoint is also called the conjugate transpose.
Positive/negative definite
A selfadjoint matrix \( A \) is positive definite if \( v^* A v > 0 \) for any non zero vector \( v \). In the same vein, it is negative definite if \( v^* A v < 0 \) for any non zero vector \( v \)
Positive/negative semidefinite

A selfadjoint matrix \( A \) is positive semi-definite if \( v^* A v \ge 0 \) for any non zero vector \( v \). In the same vein, it is negative semi-definite if \( v^* A v \le 0 \) for any non zero vector \( v \)

Blocking
Means the algorithm can work per block, whence guaranteeing a good scaling of the performance for large matrices.
Implicit Multi Threading (MT)
Means the algorithm can take advantage of multicore processors via OpenMP. "Implicit" means the algortihm itself is not parallelized, but that it relies on parallelized matrix-matrix product routines.
Explicit Multi Threading (MT)
Means the algorithm is explicitly parallelized to take advantage of multicore processors via OpenMP.
Meta-unroller
Means the algorithm is automatically and explicitly unrolled for very small fixed size matrices.