In numerical linear algebra, the Jacobi eigenvalue algorithm is an iterative method for the calculation of the eigenvalues and eigenvectors of a real symmetric matrix (a process known as diagonalization). It is named after Carl Gustav Jacob Jacobi, who first proposed the method in 1846, but it only became widely used in the 1950s with the advent of computers. This algorithm is inherently a dense matrix algorithm: it draws little or no advantage from being applied to a sparse matrix, and it will destroy sparseness by creating fill-in. Similarly, it will not preserve structures such as being banded of the matrix on which it operates.
Description Let S be a symmetric matrix, and G=G(i,j,θ) be a Givens rotation matrix. Then:
S′=G⊤SG is symmetric and similar to S. Furthermore, S′ has entries:
S'ii=c2Sii−2scSij+s2SjjS'jj=s2Sii+2scSij+c2SjjS'ij=S'ji=(c2−s2)Sij+sc(Sii−Sjj)S'ik=S'ki=cSik−sSjkk≠i,jS'jk=S'kj=sSik+cSjkk≠i,jS'kl=Sklk,l≠i,j where s=sin(θ) and c=cos(θ). Since G is orthogonal, S and S′ have the same Frobenius norm ||⋅||F (the square-root sum of squares of all components), however we can choose θ such that Si′j′=0, in which case S′ has a larger sum of squares on the diagonal:
S'ij=cos(2θ)Sij+12sin(2θ)(Sii−Sjj) Set this equal to 0, and rearrange:
tan(2θ)=2SijSjj−Sii if Sjj=Sii
θ=π4 In order to optimize this effect, Sij should be the off-diagonal element with the largest absolute value, called the pivot. The Jacobi eigenvalue method repeatedly performs rotations until the matrix becomes almost diagonal. Then the elements in the diagonal are approximations of the (real) eigenvalues of S.
Convergence If p=Skl is a pivot element, then by definition |Sij|≤|p| for 1≤i,j≤n,i≠j . Let Γ(S)2 denote the sum of squares of all off-diagonal entries of S. Since S has exactly 2N:=n(n−1) off-diagonal elements, we have p2≤Γ(S)2≤2Np2 or 2p2≥Γ(S)2/N . Now Γ(SJ)2=Γ(S)2−2p2. This implies Γ(SJ)2≤(1−1/N)Γ(S)2 or Γ(SJ)≤(1−1/N)1/2Γ(S); that is, the sequence of Jacobi rotations converges at least linearly by a factor (1−1/N)1/2 to a diagonal matrix. A number of N Jacobi rotations is called a sweep; let Sσ denote the result. The previous estimate yields
Γ(Sσ)≤(1−1N)N/2Γ(S); that is, the sequence of sweeps converges at least linearly with a factor ≈ e1/2 . However the following result of Schönhage yields locally quadratic convergence. To this end let S have m distinct eigenvalues λ1,...,λm with multiplicities ν1,...,νm and let d > 0 be the smallest distance of two different eigenvalues. Let us call a number of
NS:=n(n−1)2−∑μ=1m12νμ(νμ−1)≤N Jacobi rotations a Schönhage-sweep. If Ss denotes the result then
Γ(Ss)≤n2−1(γ2d−2γ),γ:=Γ(S) . Thus convergence becomes quadratic as soon as Γ(S)<d2+n2−1
Cost Each Givens rotation can be done in O(n) steps when the pivot element p is known. However the search for p requires inspection of all N ≈ 1/2 n2 off-diagonal elements, which means this search dominates the overall complexity and pushes the computational complexity of a sweep in the classical Jacobi algorithm to O(n4). Competing algorithms attain O(n3) complexity for a full diagonalisation.
Caching row maximums We can reduce the complexity of finding the pivot element from O(N) to O(n) if we introduce an additional index array m1,…,mn−1 with the property that mi is the index of the largest element in row i, (i = 1, ..., n − 1) of the current S. Then the indices of the pivot (k, l) must be one of the pairs (i,mi). Also the updating of the index array can be done in O(n) average-case complexity: First, the maximum entry in the updated rows k and l can be found in O(n) steps. In the other rows i, only the entries in columns k and l change. Looping over these rows, if mi is neither k nor l, it suffices to compare the old maximum at mi to the new entries and update mi if necessary. If mi should be equal to k or l and the corresponding entry decreased during the update, the maximum over row i has to be found from scratch in O(n) complexity. However, this will happen on average only once per rotation. Thus, each rotation has O(n) and one sweep O(n3) average-case complexity, which is equivalent to one matrix multiplication. Additionally the mi must be initialized before the process starts, which can be done in n2 steps. Typically the Jacobi method converges within numerical precision after a small number of sweeps. Note that multiple eigenvalues reduce the number of iterations since NS<N.
… excerpt ends here. Continue reading the full article.