Eigensystems We will discuss matrix diagonalization algorithms in umerical Recipes in the context of the eigenvalue problem in quantum mechanics, A n = λ n n, (1) where A is a real, symmetric Hamiltonian operator and n is the n-th eigenvector with eigenvalue λ n. In an -dimensional vector space, Eq. (1) becomes where A is an matrix, and x i (n) ORTHOORMAL BASIS (Orthogonality) The basis set or, by defining the transformation matrix U as (n) (n) A ij x j = λ n x i, () j=1 is the i-th element of the n-th eigenvector x (n) R. { n n =1,, } can be made orthonormal, i.e., m n x (m) (n) i x i = δ mn, (3) i=1 U in = x i (n) (i.e., the n-th column of U is the n-th eigenvector), U is orthogonal, where I is the identity matrix. orthogonal without modifying the eigenvalue. For example, Gram-Schmidt orthogonalization procedure 1 (4) U T U = I (5) Proof of Eq. (3): First note that all eigenvalues λ n are real. ( By multiplying eq. (1) by n from the left, n A n = λ n n n. For a Hermitian matrix (and of course for a real, symmetric matrix), n A n is real, and n n is also real since its complex conjugate is itself.) ext, by multiplying Eq. (1) by m from the left, we obtain Similarly, m A n = λ n m n. (6) n A m = λ m n m. (7) By taking the complex conjugate of Eq. (7) and noting the reality of the eigenvalue, Subtracting Eq. (8) from Eq. (6), m A n = λ m m n. (8) = ( λ n λ m ) m n. (9) If λ n λ m, Eq. (9) requires that m n =. On the other hand, if λ n = λ m, we can still make them
n n m m n (1) makes m n = m n m m m n = m n m n =, followed by the normalization n as n n n n 1/. (Completeness) The orthonormal basis set space, is the identity operator. Equivalently, or { n } is also complete, i.e., in the -dimensional vector n n =1 (11) n=1 x (n) (n) i x j = δ ij, (1) n=1 UU T = I. (13) Equation (11) states that any vector in the -dimensional vector space ψ is a linear combination of the basis functions, since there are only linearly independent vectors in this vector space. or The orthogonality and completeness together states that ORTHOGOAL TRASFORMATIO ψ = n n ψ, (14) n=1 U T U =UU T = I. (15) U 1 =U T. (16) ow, we use the orthogonal matrix U to restate the matrix eigenvalue problem. To do so, multiply (m) Eq. () by x i and sum the resulting equation over i, i=1 x (m) (n) i A ij x j = λ n x (m) (n) i x i = λ n δ mn, (17) j=1 i=1 where we have used the orthonormality, Eq. (3). Using U, equation (17) can be rewritten as where U T AU = Λ, (18) Λ mn = λ m δ mn, (19) is a diagonal matrix. Thus the matrix eigenvalue problem amounts to finding an orthogonal matrix, U, or the associated orthogonal transformation, Eq. (18), which eliminates all the off-diagonal matrix elements.
GRAD STRATEGY The grand strategy of matrix diagonalization is to nudge the matrix A towards diagonal form by a sequence of orthogonal transformations, A P 1 T AP 1 P T P 1 T AP 1 P, () so that its off-diagonal elements gradually disappear. At the end, the orthogonal matrix is U = P 1 P. (1) ORTHOGOAL TRASFORMATIO ~ ROTATIO: JACOBI TRASFORMATIO is As an illustration, let us consider a two-state system, for which the most general Hamiltonian matrix H = ε 1 δ. () δ ε (We define the indices such that ε 1 < ε, i.e., the first state is the lower-energy state.) We express first eigenvector of this Hamiltonian as u = cosθ sinθ = cosθ 1 + sinθ, () which is most general. (Because of the normalization condition, the any vector in the -dimensional vector space can be specified by one parameter.) Once we specify the first eigenvector, the second is readily determined from the orthonomality as v = sinθ, () cosθ see the figure below. The rotation angle θ specifies the deviation of the first eigenvector u from 1. The orthogonal matrix is then cosθ sinθ U = [ u v] =. (3) sinθ cosθ To find the specific rotation angle θ, let us return to the original eigenvalue problem, λ ε 1 δ u 1 δ λ ε u =. (4) The eigenvalues are obtained by solving the secular equation, 3
and its two solutions are det( λi H) = λ ε 1 δ = ( λ ε δ λ ε 1 )( λ ε ) δ =, (5) λ ± = ε 1 + ε ± ( ε 1 ε ) + 4δ. (6) ow let us examine the lower eigenenergy λ. By substituting the eigenvalue and the corresponding eigenvector, Eq. (), into Eq. (4), we obtain θ = tan 1 ε 1 + ε ε 1 ε δ ( ) + 4δ. (7) For example, if the off-diagonal element δ is small, we can expand Eq. (7) is its power series, the first term of which is (we have assumed ε 1 < ε ) Jacobi Transformation θ = δ ε 1 ε. (8) In Jacobi transformation, each orthogonal transformation P i in Eq. () is the two-dimensional rotation applied to a pair of rows, i and j, and the pair of columns of the same indices. One such rotation eliminates a pair (i,j) and (j,i) of off-diagonal elements. A sequence of two-dimensional rotations will eventually eliminate all the off-diagonal elements. (In fact, later rotations may partially restore offdiagonal elements eliminated earlier. evertheless, this procedure will converge, and the square sum of all the off-diagonal elements becomes smaller as we continue the procedure.) HOUSEHOLDER TRASFORMATIOS FOR TRIDIAGOALIZATIO Instead of eliminating a pair of off-diagonal elements at one time as in Jacobi transformation, Householder transformation eliminates an entire row but the first two elements at a time. In Chapter 11 of umerical Recipes, Householder transformations are used to reduce a real, symmetric matrix to a tridiagonal form, in which only the diagonal ( A ii ), upper subdiagonal ( A ii+1 ), and lower subdiagonal ( A i+1i ) elements may be nonzero. The function tred() achieves this. The resulting tridiagonal matrix is then diagonalized (i.e., both subdiagonal elements are eliminated), using another sets of orthogonal transformations in function tqli(). The magical orthogonal matrix P is constructed from a vector in the -dimensional vector space. First, let us prove a useful lemma. (Lemma) Let v ( R ) and then P is symmetric and orthogonal, i.e., P = I vvt v T v, (9) P T P = PP = I. (3) 4
First, P ij = δ ij v iv j, (31) v k k=1 is symmetric with respect to the exchange of the indices i and j. ext, P T P = I vvt v T I vvt v v T v = I 4vvT v T v + 4vvT vv T v T v ( ) = I 4vvT v T v + 4vvT v T v = I ow, given an arbitrary vector x in the -dimensional vector space, we can device an orthogonal matrix that eliminates all the elements but the first one when multiplied to x. (Theorem) For x ( R ), let where and the vector -norm is defined as. // v = x ± x e 1 (3) 1 e 1 = (33) x = x T x = x i. (34) Then Px = I vvt v T x = x v e 1, (35) i.e., the Householder matrix P, when multiplied, eliminates all the elements of x but the first one. ote that, Then i=1 v T v = x T T ( ± x e 1 )( x ± x e 1 ) = x ± x x 1 + x ( ) = x x ± x 1. 5
vv T Px = x x x ± x 1 ( ) x ( ) x T T ( ± x e 1 ) x x ( x ± x 1 ) ( ) x ( x ± x 1 ) x ( x ± x 1 ) = x x ± x e 1 = x x ± x e 1 = x x x e 1 = x e 1 The Householder matrix can be used for tridiagonalization as follows: Let us decompose a real, symmetric matrix A as. // a 11 a 1 a 1 T a 11 A 1 = A 1 a 1 A = = A 1 A a 1. (36) where A 1, A 1, and A are (-1) 1, 1 (-1), and (-1) (-1) matrices, respectively. ow let v ( R 1 ) = A 1 + sign a 1 (The sign has been chosen to minimize the cancellation error.) Then ow P A 1 I 1 vvt v T A 1 = -sign a 1 v 1 T a 11 A PAP 1 P A 1 A T a 11 A 1 k = PA a 11 k k = PA P ( ) A 1 e 1. (37) ( ) A 1 e 1 ke 1. (38) 1 P 1 P, (39) i.e., all the elements in the first row and first column but a 11, a 1 and a 1 have been eliminated by this transformation. ext, a similar Householder transformation is applied to the first column and first row of the (-1) (-1) submatrix P A P, which eliminates all the elements in the second row and second column in the original matrix but a, a 3 and a 3, so on (see the figure below, in which white cells represent eliminated matrix elements). 6
After (-) such transformations, all the off-diagonal elements but the diagonal and upper/lower subdiagonal elements are eliminated. DIAGOALIZATIO OF A TRIDIAGOAL MATRIX QR DECOMPOSITIO QR Decomposition The diagonalization of the tridiagonal matrix obtained above can use QR decomposition (or similar QL decomposition). That is, any square matrix A can be decomposed into A = QR, (4) where Q is an orthogonal matrix and R is an upper-triangular matrix, i.e., R ij = for i > j. For example, this can be achieved by using a Householder transformation as follows. First, we decompose the matrix A into the first column A 1 and the rest A : Let then and thus a 11 A = v a 1 = A 1 A. (41) ( R ) = A 1 + sign( a 11 ) A 1 e 1, (4) PA 1 I vvt v T A 1 = -sign a 11 v PA = PA 1 PA ( ) A 1 e 1 ke 1, (43) k = PA, (44) i.e., all the elements in the first column but one have been eliminated. ext, we can apply a similar elimination to A(:,:) submatrix to eliminate all the lower-triangular elements in the second column, see the figure below. After (-1) transformation, the resulting matrix is upper-triangular, i.e., 7
or P 1 P P 1 A = R, (45) Orthogonal Transformation P 1 1 P 1 P 1 1 R QR. (46) Let Eq. (4) be the QR decomposition of matrix A. Then, define another matrix by A = RQ. (48) Since R = Q 1 A = Q T A from Eq. (4), Eq. (48) defines an orthogonal transformation, A A = Q T AQ. (49) It can be proven that, if A is tridiagonal, then A is also tridiagonal, i.e., the orthogonal transformation preserves the tridiagonality. The QR algorithm consists of successive applications of this orthogonal transformation. (QR algorithm) " $ # % $ 1. Q s R s A s. A s+1 R s Q s s =1,,. (5) The following theorems then guarantee that the eigenvalues and eigenvectors can be obtained by the QR algorithm. (Theorem) 1. lim s A s is upper-triangular, and. The eigenvalues appear on its diagonal. In Chapter 11 of umerical Recipes, function tqli() uses QL algorithm, instead of the above QR algorithm, to achieve lower-triangularity, to minimize the cancellation error. 8