Efficient Numerical Diagonalization of Hermitian 3 × 3 Matrices
Abstract
A very common problem in science is the numerical diagonalization of symmetric or hermitian 3 × 3 matrices. Since standard "black box" packages may be too inefficient if the number of matrices is large, we study several alternatives. We consider optimized implementations of the Jacobi, QL, and Cuppen algorithms and compare them with an alytical method relying on Cardano's formula for the eigenvalues and on vector cross products for the eigenvectors. Jacobi is the most accurate, but also the slowest method, while QL and Cuppen are good general purpose algorithms. The analytical algorithm outperforms the others by more than a factor of 2, but becomes inaccurate or may even fail completely if the matrix entries differ greatly in magnitude. This can mostly be circumvented by using a hybrid method, which falls back to QL if conditions are such that the analytical calculation might become too inaccurate. For all algorithms, we give an overview of the underlying mathematical ideas, and present detailed benchmark results. C and Fortran implementations of our code are available for download from .
- Publication:
-
International Journal of Modern Physics C
- Pub Date:
- 2008
- DOI:
- arXiv:
- arXiv:physics/0610206
- Bibcode:
- 2008IJMPC..19..523K
- Keywords:
-
- Linear algebra;
- eigenvalues;
- eigenvectors;
- eigensystems;
- numerical diagonalization;
- small matrices;
- Physics - Computational Physics;
- High Energy Physics - Phenomenology;
- Mathematics - Numerical Analysis
- E-Print:
- 13 pages, no figures, new hybrid algorithm added, matches published version, typo in Eq. (39) corrected