Eigenvalue algorithm

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Template:Short description In numerical analysis, one of the most important problems is designing efficient and stable algorithms for finding the eigenvalues of a matrix. These eigenvalue algorithms may also find eigenvectors.

Eigenvalues and eigenvectors

Script error: No such module "Labelled list hatnote". Given an n × nScript error: No such module "Check for unknown parameters". square matrix AScript error: No such module "Check for unknown parameters". of real or complex numbers, an eigenvalue λScript error: No such module "Check for unknown parameters". and its associated generalized eigenvector vScript error: No such module "Check for unknown parameters". are a pair obeying the relation[1]

(AλI)k𝐯=0,

where vScript error: No such module "Check for unknown parameters". is a nonzero n × 1Script error: No such module "Check for unknown parameters". column vector, IScript error: No such module "Check for unknown parameters". is the n × nScript error: No such module "Check for unknown parameters". identity matrix, kScript error: No such module "Check for unknown parameters". is a positive integer, and both λScript error: No such module "Check for unknown parameters". and vScript error: No such module "Check for unknown parameters". are allowed to be complex even when AScript error: No such module "Check for unknown parameters". is real. When k = 1Script error: No such module "Check for unknown parameters"., the vector is called simply an eigenvector, and the pair is called an eigenpair. In this case, Av = λvScript error: No such module "Check for unknown parameters".. Any eigenvalue λScript error: No such module "Check for unknown parameters". of AScript error: No such module "Check for unknown parameters". has ordinary[note 1] eigenvectors associated to it, for if kScript error: No such module "Check for unknown parameters". is the smallest integer such that (AλI)k v = 0Script error: No such module "Check for unknown parameters". for a generalized eigenvector vScript error: No such module "Check for unknown parameters"., then (AλI)k−1 vScript error: No such module "Check for unknown parameters". is an ordinary eigenvector. The value kScript error: No such module "Check for unknown parameters". can always be taken as less than or equal to nScript error: No such module "Check for unknown parameters".. In particular, (AλI)n v = 0Script error: No such module "Check for unknown parameters". for all generalized eigenvectors vScript error: No such module "Check for unknown parameters". associated with λScript error: No such module "Check for unknown parameters"..

For each eigenvalue λScript error: No such module "Check for unknown parameters". of AScript error: No such module "Check for unknown parameters"., the kernel ker(AλI)Script error: No such module "Check for unknown parameters". consists of all eigenvectors associated with λScript error: No such module "Check for unknown parameters". (along with 0), called the eigenspace of λScript error: No such module "Check for unknown parameters"., while the vector space ker((AλI)n)Script error: No such module "Check for unknown parameters". consists of all generalized eigenvectors, and is called the generalized eigenspace. The geometric multiplicity of λScript error: No such module "Check for unknown parameters". is the dimension of its eigenspace. The algebraic multiplicity of λScript error: No such module "Check for unknown parameters". is the dimension of its generalized eigenspace. The latter terminology is justified by the equation

pA(z)=det(zIA)=i=1k(zλi)αi,

where detScript error: No such module "Check for unknown parameters". is the determinant function, the λiScript error: No such module "Check for unknown parameters". are all the distinct eigenvalues of AScript error: No such module "Check for unknown parameters". and the αiScript error: No such module "Check for unknown parameters". are the corresponding algebraic multiplicities. The function pA(z)Script error: No such module "Check for unknown parameters". is the characteristic polynomial of AScript error: No such module "Check for unknown parameters".. So the algebraic multiplicity is the multiplicity of the eigenvalue as a zero of the characteristic polynomial. Since any eigenvector is also a generalized eigenvector, the geometric multiplicity is less than or equal to the algebraic multiplicity. The algebraic multiplicities sum up to nScript error: No such module "Check for unknown parameters"., the degree of the characteristic polynomial. The equation pA(z) = 0Script error: No such module "Check for unknown parameters". is called the characteristic equation, as its roots are exactly the eigenvalues of AScript error: No such module "Check for unknown parameters".. By the Cayley–Hamilton theorem, AScript error: No such module "Check for unknown parameters". itself obeys the same equation: pA(A) = 0Script error: No such module "Check for unknown parameters"..[note 2] As a consequence, the columns of the matrix ij(AλiI)αi must be either 0 or generalized eigenvectors of the eigenvalue λjScript error: No such module "Check for unknown parameters"., since they are annihilated by (AλjI)αj. In fact, the column space is the generalized eigenspace of λjScript error: No such module "Check for unknown parameters"..

Any collection of generalized eigenvectors of distinct eigenvalues is linearly independent, so a basis for all of CnScript error: No such module "Check for unknown parameters". can be chosen consisting of generalized eigenvectors. More particularly, this basis {vi}Script error: No such module "Su".Script error: No such module "Check for unknown parameters". can be chosen and organized so that

  • if viScript error: No such module "Check for unknown parameters". and vjScript error: No such module "Check for unknown parameters". have the same eigenvalue, then so does vkScript error: No such module "Check for unknown parameters". for each kScript error: No such module "Check for unknown parameters". between iScript error: No such module "Check for unknown parameters". and jScript error: No such module "Check for unknown parameters"., and
  • if viScript error: No such module "Check for unknown parameters". is not an ordinary eigenvector, and if λiScript error: No such module "Check for unknown parameters". is its eigenvalue, then (AλiI)vi = vi−1Script error: No such module "Check for unknown parameters". (in particular, v1Script error: No such module "Check for unknown parameters". must be an ordinary eigenvector).

If these basis vectors are placed as the column vectors of a matrix V = [v1 v2vn]Script error: No such module "Check for unknown parameters"., then VScript error: No such module "Check for unknown parameters". can be used to convert AScript error: No such module "Check for unknown parameters". to its Jordan normal form:

V1AV=[λ1β1000λ2β2000λ30000λn],

where the λiScript error: No such module "Check for unknown parameters". are the eigenvalues, βi = 1Script error: No such module "Check for unknown parameters". if (Aλi+1)vi+1 = viScript error: No such module "Check for unknown parameters". and βi = 0Script error: No such module "Check for unknown parameters". otherwise.

More generally, if WScript error: No such module "Check for unknown parameters". is any invertible matrix, and λScript error: No such module "Check for unknown parameters". is an eigenvalue of AScript error: No such module "Check for unknown parameters". with generalized eigenvector vScript error: No such module "Check for unknown parameters"., then (WTemplate:I supAWλI)k WTemplate:I supv = 0Script error: No such module "Check for unknown parameters".. Thus λScript error: No such module "Check for unknown parameters". is an eigenvalue of WTemplate:I supAWScript error: No such module "Check for unknown parameters". with generalized eigenvector WTemplate:I supvScript error: No such module "Check for unknown parameters".. That is, similar matrices have the same eigenvalues.

Normal, Hermitian, and real-symmetric matrices

Script error: No such module "Labelled list hatnote". The adjoint M*Script error: No such module "Check for unknown parameters". of a complex matrix MScript error: No such module "Check for unknown parameters". is the transpose of the conjugate of MScript error: No such module "Check for unknown parameters".: M * = M TScript error: No such module "Check for unknown parameters".. A square matrix AScript error: No such module "Check for unknown parameters". is called normal if it commutes with its adjoint: A*A = AA*Script error: No such module "Check for unknown parameters".. It is called Hermitian if it is equal to its adjoint: A* = AScript error: No such module "Check for unknown parameters".. All Hermitian matrices are normal. If AScript error: No such module "Check for unknown parameters". has only real elements, then the adjoint is just the transpose, and AScript error: No such module "Check for unknown parameters". is Hermitian if and only if it is symmetric. When applied to column vectors, the adjoint can be used to define the canonical inner product on CnScript error: No such module "Check for unknown parameters".: wv = w* vScript error: No such module "Check for unknown parameters"..[note 3] Normal, Hermitian, and real-symmetric matrices have several useful properties:

  • Every generalized eigenvector of a normal matrix is an ordinary eigenvector.
  • Any normal matrix is similar to a diagonal matrix, since its Jordan normal form is diagonal.
  • Eigenvectors of distinct eigenvalues of a normal matrix are orthogonal.
  • The null space and the image (or column space) of a normal matrix are orthogonal to each other.
  • For any normal matrix AScript error: No such module "Check for unknown parameters"., CnScript error: No such module "Check for unknown parameters". has an orthonormal basis consisting of eigenvectors of AScript error: No such module "Check for unknown parameters".. The corresponding matrix of eigenvectors is unitary.
  • The eigenvalues of a Hermitian matrix are real, since (λλ)v = (A*A)v = (AA)v = 0Script error: No such module "Check for unknown parameters". for a non-zero eigenvector vScript error: No such module "Check for unknown parameters"..
  • If AScript error: No such module "Check for unknown parameters". is real, there is an orthonormal basis for RnScript error: No such module "Check for unknown parameters". consisting of eigenvectors of AScript error: No such module "Check for unknown parameters". if and only if AScript error: No such module "Check for unknown parameters". is symmetric.

It is possible for a real or complex matrix to have all real eigenvalues without being Hermitian. For example, a real triangular matrix has its eigenvalues along its diagonal, but in general is not symmetric.

Condition number

Any problem of numeric calculation can be viewed as the evaluation of some function fScript error: No such module "Check for unknown parameters". for some input xScript error: No such module "Check for unknown parameters".. The condition number κ(f, x)Script error: No such module "Check for unknown parameters". of the problem is the ratio of the relative error in the function's output to the relative error in the input, and varies with both the function and the input. The condition number describes how error grows during the calculation. Its base-10 logarithm tells how many fewer digits of accuracy exist in the result than existed in the input. The condition number is a best-case scenario. It reflects the instability built into the problem, regardless of how it is solved. No algorithm can ever produce more accurate results than indicated by the condition number, except by chance. However, a poorly designed algorithm may produce significantly worse results. For example, as mentioned below, the problem of finding eigenvalues for normal matrices is always well-conditioned. However, the problem of finding the roots of a polynomial can be very ill-conditioned. Thus eigenvalue algorithms that work by finding the roots of the characteristic polynomial can be ill-conditioned even when the problem is not.

For the problem of solving the linear equation Av = bScript error: No such module "Check for unknown parameters". where AScript error: No such module "Check for unknown parameters". is invertible, the matrix condition number κ(A−1, b)Script error: No such module "Check for unknown parameters". is given by ||A||op||A−1||opScript error: No such module "Check for unknown parameters"., where || ||op is the operator norm subordinate to the normal Euclidean norm on CnScript error: No such module "Check for unknown parameters".. Since this number is independent of bScript error: No such module "Check for unknown parameters". and is the same for AScript error: No such module "Check for unknown parameters". and A−1Script error: No such module "Check for unknown parameters"., it is usually just called the condition number κ(A)Script error: No such module "Check for unknown parameters". of the matrix AScript error: No such module "Check for unknown parameters".. This value κ(A)Script error: No such module "Check for unknown parameters". is also the absolute value of the ratio of the largest singular value of AScript error: No such module "Check for unknown parameters". to its smallest. If AScript error: No such module "Check for unknown parameters". is unitary, then ||A||op = ||A−1||op = 1Script error: No such module "Check for unknown parameters"., so κ(A) = 1Script error: No such module "Check for unknown parameters".. For general matrices, the operator norm is often difficult to calculate. For this reason, other matrix norms are commonly used to estimate the condition number.

For the eigenvalue problem, Bauer and Fike proved that if λScript error: No such module "Check for unknown parameters". is an eigenvalue for a diagonalizable n × nScript error: No such module "Check for unknown parameters". matrix AScript error: No such module "Check for unknown parameters". with eigenvector matrix VScript error: No such module "Check for unknown parameters"., then the absolute error in calculating λScript error: No such module "Check for unknown parameters". is bounded by the product of κ(V)Script error: No such module "Check for unknown parameters". and the absolute error in AScript error: No such module "Check for unknown parameters"..[2] As a result, the condition number for finding λScript error: No such module "Check for unknown parameters". is κ(λ, A) = κ(V) = ||V ||op ||V −1||opScript error: No such module "Check for unknown parameters".. If AScript error: No such module "Check for unknown parameters". is normal, then VScript error: No such module "Check for unknown parameters". is unitary, and κ(λ, A) = 1Script error: No such module "Check for unknown parameters".. Thus the eigenvalue problem for all normal matrices is well-conditioned.

The condition number for the problem of finding the eigenspace of a normal matrix AScript error: No such module "Check for unknown parameters". corresponding to an eigenvalue λScript error: No such module "Check for unknown parameters". has been shown to be inversely proportional to the minimum distance between λScript error: No such module "Check for unknown parameters". and the other distinct eigenvalues of AScript error: No such module "Check for unknown parameters"..[3] In particular, the eigenspace problem for normal matrices is well-conditioned for isolated eigenvalues. When eigenvalues are not isolated, the best that can be hoped for is to identify the span of all eigenvectors of nearby eigenvalues.

Algorithms

The most reliable and most widely used algorithm for computing eigenvalues is John G. F. Francis' and Vera N. Kublanovskaya's QR algorithm, considered one of the top ten algorithms of 20th century.[4]

Any monic polynomial is the characteristic polynomial of its companion matrix. Therefore, a general algorithm for finding eigenvalues could also be used to find the roots of polynomials. The Abel–Ruffini theorem shows that any such algorithm for dimensions greater than 4 must either be infinite, or involve functions of greater complexity than elementary arithmetic operations and fractional powers. For this reason algorithms that exactly calculate eigenvalues in a finite number of steps only exist for a few special classes of matrices. For general matrices, algorithms are iterative, producing better approximate solutions with each iteration.

Some algorithms produce every eigenvalue, others will produce a few, or only one. However, even the latter algorithms can be used to find all eigenvalues. Once an eigenvalue λScript error: No such module "Check for unknown parameters". of a matrix AScript error: No such module "Check for unknown parameters". has been identified, it can be used to either direct the algorithm towards a different solution next time, or to reduce the problem to one that no longer has λScript error: No such module "Check for unknown parameters". as a solution.

Redirection is usually accomplished by shifting: replacing AScript error: No such module "Check for unknown parameters". with AμIScript error: No such module "Check for unknown parameters". for some constant μScript error: No such module "Check for unknown parameters".. The eigenvalue found for AμIScript error: No such module "Check for unknown parameters". must have μScript error: No such module "Check for unknown parameters". added back in to get an eigenvalue for AScript error: No such module "Check for unknown parameters".. For example, for power iteration, μ = λScript error: No such module "Check for unknown parameters".. Power iteration finds the largest eigenvalue in absolute value, so even when λScript error: No such module "Check for unknown parameters". is only an approximate eigenvalue, power iteration is unlikely to find it a second time. Conversely, inverse iteration based methods find the lowest eigenvalue, so μScript error: No such module "Check for unknown parameters". is chosen well away from λScript error: No such module "Check for unknown parameters". and hopefully closer to some other eigenvalue.

Reduction can be accomplished by restricting AScript error: No such module "Check for unknown parameters". to the column space of the matrix AλIScript error: No such module "Check for unknown parameters"., which AScript error: No such module "Check for unknown parameters". carries to itself. Since A - λIScript error: No such module "Check for unknown parameters". is singular, the column space is of lesser dimension. The eigenvalue algorithm can then be applied to the restricted matrix. This process can be repeated until all eigenvalues are found.

If an eigenvalue algorithm does not produce eigenvectors, a common practice is to use an inverse iteration based algorithm with μScript error: No such module "Check for unknown parameters". set to a close approximation to the eigenvalue. This will quickly converge to the eigenvector of the closest eigenvalue to μScript error: No such module "Check for unknown parameters".. For small matrices, an alternative is to look at the column space of the product of AλTemplate:'IScript error: No such module "Check for unknown parameters". for each of the other eigenvalues λTemplate:'Script error: No such module "Check for unknown parameters"..

A formula for the norm of unit eigenvector components of normal matrices was discovered by Robert Thompson in 1966 and rediscovered independently by several others.[5][6][7][8][9] If AScript error: No such module "Check for unknown parameters". is an n×n normal matrix with eigenvalues λi(A)Script error: No such module "Check for unknown parameters". and corresponding unit eigenvectors viScript error: No such module "Check for unknown parameters". whose component entries are vi,jScript error: No such module "Check for unknown parameters"., let AjScript error: No such module "Check for unknown parameters". be the n1×n1 matrix obtained by removing the iScript error: No such module "Check for unknown parameters".-th row and column from AScript error: No such module "Check for unknown parameters"., and let λk(Aj)Script error: No such module "Check for unknown parameters". be its kScript error: No such module "Check for unknown parameters".-th eigenvalue. Then |vi,j|2k=1,kin(λi(A)λk(A))=k=1n1(λi(A)λk(Aj))

If p,pj are the characteristic polynomials of A and Aj, the formula can be re-written as |vi,j|2=pj(λi(A))p(λi(A)) assuming the derivative p is not zero at λi(A).

Hessenberg and tridiagonal matrices

Script error: No such module "Labelled list hatnote".

Because the eigenvalues of a triangular matrix are its diagonal elements, for general matrices there is no finite method like gaussian elimination to convert a matrix to triangular form while preserving eigenvalues. But it is possible to reach something close to triangular. An upper Hessenberg matrix is a square matrix for which all entries below the subdiagonal are zero. A lower Hessenberg matrix is one for which all entries above the superdiagonal are zero. Matrices that are both upper and lower Hessenberg are tridiagonal. Hessenberg and tridiagonal matrices are the starting points for many eigenvalue algorithms because the zero entries reduce the complexity of the problem. Several methods are commonly used to convert a general matrix into a Hessenberg matrix with the same eigenvalues. If the original matrix was symmetric or Hermitian, then the resulting matrix will be tridiagonal.

When only eigenvalues are needed, there is no need to calculate the similarity matrix, as the transformed matrix has the same eigenvalues. If eigenvectors are needed as well, the similarity matrix may be needed to transform the eigenvectors of the Hessenberg matrix back into eigenvectors of the original matrix.

Method Applies to Produces Cost without similarity matrix Cost with similarity matrix Description
Householder transformations General Hessenberg <templatestyles src="Fraction/styles.css" />2n33 + O(n2)Script error: No such module "Check for unknown parameters".[10]Template:Rp <templatestyles src="Fraction/styles.css" />4n33 + O(n2)Script error: No such module "Check for unknown parameters".[10]Template:Rp Reflect each column through a subspace to zero out its lower entries.
Givens rotations General Hessenberg <templatestyles src="Fraction/styles.css" />4n33 + O(n2)Script error: No such module "Check for unknown parameters".[10]Template:Rp Apply planar rotations to zero out individual entries. Rotations are ordered so that later ones do not cause zero entries to become non-zero again.
Arnoldi iteration General Hessenberg Perform Gram–Schmidt orthogonalization on Krylov subspaces.
Lanczos algorithm Hermitian Tridiagonal Arnoldi iteration for Hermitian matrices, with shortcuts.

For symmetric tridiagonal eigenvalue problems all eigenvalues (without eigenvectors) can be computed numerically in time O(n log(n)), using bisection on the characteristic polynomial.[11]

Iterative algorithms

Iterative algorithms solve the eigenvalue problem by producing sequences that converge to the eigenvalues. Some algorithms also produce sequences of vectors that converge to the eigenvectors. Most commonly, the eigenvalue sequences are expressed as sequences of similar matrices which converge to a triangular or diagonal form, allowing the eigenvalues to be read easily. The eigenvector sequences are expressed as the corresponding similarity matrices.

Method Applies to Produces Cost per step Convergence Description
Lanczos algorithm Hermitian m Script error: No such module "Check for unknown parameters". largest/smallest eigenpairs
Power iteration general eigenpair with largest value O(n2)Script error: No such module "Check for unknown parameters". linear Repeatedly applies the matrix to an arbitrary starting vector and renormalizes.
Inverse iteration general eigenpair with value closest to μ linear Power iteration for (AμI)−1Script error: No such module "Check for unknown parameters".
Rayleigh quotient iteration Hermitian any eigenpair cubic Power iteration for (AμiI)−1Script error: No such module "Check for unknown parameters"., where μiScript error: No such module "Check for unknown parameters". for each iteration is the Rayleigh quotient of the previous iteration.
Preconditioned inverse iteration[12] or LOBPCG algorithm positive-definite real symmetric eigenpair with value closest to μ Inverse iteration using a preconditioner (an approximate inverse to AScript error: No such module "Check for unknown parameters".).
Bisection method real symmetric tridiagonal any eigenvalue linear Uses the bisection method to find roots of the characteristic polynomial, supported by the Sturm sequence.
Laguerre iteration real symmetric tridiagonal any eigenvalue cubic[13] Uses Laguerre's method to find roots of the characteristic polynomial, supported by the Sturm sequence.
QR algorithm Hessenberg all eigenvalues O(n2)Script error: No such module "Check for unknown parameters". cubic Factors A = QR, where Q is orthogonal and R is triangular, then applies the next iteration to RQ.
all eigenpairs 6n3 + O(n2)Script error: No such module "Check for unknown parameters".
Jacobi eigenvalue algorithm real symmetric all eigenvalues O(n3)Script error: No such module "Check for unknown parameters". quadratic Uses Givens rotations to attempt clearing all off-diagonal entries. This fails, but strengthens the diagonal.
Divide-and-conquer Hermitian tridiagonal all eigenvalues O(n2)Script error: No such module "Check for unknown parameters". Divides the matrix into submatrices that are diagonalized then recombined.
all eigenpairs (<templatestyles src="Fraction/styles.css" />43)n3 + O(n2)Script error: No such module "Check for unknown parameters".
Homotopy method real symmetric tridiagonal all eigenpairs O(n2)[14]Script error: No such module "Check for unknown parameters". Constructs a computable homotopy path from a diagonal eigenvalue problem.
Folded spectrum method real symmetric eigenpair with value closest to μ Preconditioned inverse iteration applied to (AμI)2Script error: No such module "Check for unknown parameters".
MRRR algorithm[15] real symmetric tridiagonal some or all eigenpairs O(n2)Script error: No such module "Check for unknown parameters". "Multiple relatively robust representations" – performs inverse iteration on a LDLT decomposition of the shifted matrix.
Gram iteration[16] general Eigenpair with largest eigenvalue super-linear Repeatedly computes the Gram product and rescales, deterministically.

Direct calculation

While there is no simple algorithm to directly calculate eigenvalues for general matrices, there are numerous special classes of matrices where eigenvalues can be directly calculated. These include:

Triangular matrices

Since the determinant of a triangular matrix is the product of its diagonal entries, if T is triangular, then det(λIT)=i(λTii). Thus the eigenvalues of T are its diagonal entries.

Factorable polynomial equations

If pScript error: No such module "Check for unknown parameters". is any polynomial and p(A) = 0,Script error: No such module "Check for unknown parameters". then the eigenvalues of AScript error: No such module "Check for unknown parameters". also satisfy the same equation. If pScript error: No such module "Check for unknown parameters". happens to have a known factorization, then the eigenvalues of AScript error: No such module "Check for unknown parameters". lie among its roots.

For example, a projection is a square matrix PScript error: No such module "Check for unknown parameters". satisfying P2 = PScript error: No such module "Check for unknown parameters".. The roots of the corresponding scalar polynomial equation, λ2 = λScript error: No such module "Check for unknown parameters"., are 0 and 1. Thus any projection has 0 and 1 for its eigenvalues. The multiplicity of 0 as an eigenvalue is the nullity of PScript error: No such module "Check for unknown parameters"., while the multiplicity of 1 is the rank of PScript error: No such module "Check for unknown parameters"..

Another example is a matrix AScript error: No such module "Check for unknown parameters". that satisfies A2 = α2IScript error: No such module "Check for unknown parameters". for some scalar αScript error: No such module "Check for unknown parameters".. The eigenvalues must be ±αScript error: No such module "Check for unknown parameters".. The projection operators

P+=12(I+Aα)
P=12(IAα)

satisfy

AP+=αP+AP=αP

and

P+P+=P+PP=PP+P=PP+=0.

The column spaces of P+Script error: No such module "Check for unknown parameters". and PScript error: No such module "Check for unknown parameters". are the eigenspaces of AScript error: No such module "Check for unknown parameters". corresponding to +αScript error: No such module "Check for unknown parameters". and αScript error: No such module "Check for unknown parameters"., respectively.

2×2 matrices

For dimensions 2 through 4, formulas involving radicals exist that can be used to find the eigenvalues. While a common practice for 2×2 and 3×3 matrices, for 4×4 matrices the increasing complexity of the root formulas makes this approach less attractive.

For the 2×2 matrix

A=[abcd],

the characteristic polynomial is

det[λabcλd]=λ2(a+d)λ+(adbc)=λ2λtr(A)+det(A).

Thus the eigenvalues can be found by using the quadratic formula:

λ=tr(A)±tr2(A)4det(A)2.

Defining gap(A)=tr2(A)4det(A) to be the distance between the two eigenvalues, it is straightforward to calculate

λa=12(1±adgap(A)),λb=±cgap(A)

with similar formulas for cScript error: No such module "Check for unknown parameters". and dScript error: No such module "Check for unknown parameters".. From this it follows that the calculation is well-conditioned if the eigenvalues are isolated.

Eigenvectors can be found by exploiting the Cayley–Hamilton theorem. If λ1, λ2Script error: No such module "Check for unknown parameters". are the eigenvalues, then (Aλ1I)(Aλ2I) = (Aλ2I)(Aλ1I) = 0Script error: No such module "Check for unknown parameters"., so the columns of (Aλ2I)Script error: No such module "Check for unknown parameters". are annihilated by (Aλ1I)Script error: No such module "Check for unknown parameters". and vice versa. Assuming neither matrix is zero, the columns of each must include eigenvectors for the other eigenvalue. (If either matrix is zero, then AScript error: No such module "Check for unknown parameters". is a multiple of the identity and any non-zero vector is an eigenvector.)

For example, suppose

A=[4323],

then tr(A) = 4 − 3 = 1Script error: No such module "Check for unknown parameters". and det(A) = 4(−3) − 3(−2) = −6Script error: No such module "Check for unknown parameters"., so the characteristic equation is

0=λ2λ6=(λ3)(λ+2),

and the eigenvalues are 3 and -2. Now,

A3I=[1326],A+2I=[6321].

In both matrices, the columns are multiples of each other, so either column can be used. Thus, (1, −2)Script error: No such module "Check for unknown parameters". can be taken as an eigenvector associated with the eigenvalue -2, and (3, −1)Script error: No such module "Check for unknown parameters". as an eigenvector associated with the eigenvalue 3, as can be verified by multiplying them by AScript error: No such module "Check for unknown parameters"..

Symmetric 3×3 matrices

The characteristic equation of a symmetric 3×3 matrix AScript error: No such module "Check for unknown parameters". is:

det(αIA)=α3α2tr(A)α12(tr(A2)tr2(A))det(A)=0.

This equation may be solved using the methods of Cardano or Lagrange, but an affine change to AScript error: No such module "Check for unknown parameters". will simplify the expression considerably, and lead directly to a trigonometric solution. If A = pB + qIScript error: No such module "Check for unknown parameters"., then AScript error: No such module "Check for unknown parameters". and BScript error: No such module "Check for unknown parameters". have the same eigenvectors, and βScript error: No such module "Check for unknown parameters". is an eigenvalue of BScript error: No such module "Check for unknown parameters". if and only if α = + qScript error: No such module "Check for unknown parameters". is an eigenvalue of AScript error: No such module "Check for unknown parameters".. Letting q=tr(A)/3 and p=(tr((AqI)2)/6)1/2, gives

det(βIB)=β33βdet(B)=0.

The substitution β = 2cos θScript error: No such module "Check for unknown parameters". and some simplification using the identity cos 3θ = 4cos3 θ − 3cos θScript error: No such module "Check for unknown parameters". reduces the equation to cos 3θ = det(B) / 2Script error: No such module "Check for unknown parameters".. Thus

β=2cos(13arccos(det(B)/2)+2kπ3),k=0,1,2.

If det(B)Script error: No such module "Check for unknown parameters". is complex or is greater than 2 in absolute value, the arccosine should be taken along the same branch for all three values of kScript error: No such module "Check for unknown parameters".. This issue doesn't arise when AScript error: No such module "Check for unknown parameters". is real and symmetric, resulting in a simple algorithm:[17]

% Given a real symmetric 3x3 matrix A, compute the eigenvalues
% Note that acos and cos operate on angles in radians

p1 = A(1,2)^2 + A(1,3)^2 + A(2,3)^2
if (p1 == 0) 
   % A is diagonal.
   eig1 = A(1,1)
   eig2 = A(2,2)
   eig3 = A(3,3)
else
   q = trace(A)/3               % trace(A) is the sum of all diagonal values
   p2 = (A(1,1) - q)^2 + (A(2,2) - q)^2 + (A(3,3) - q)^2 + 2 * p1
   p = sqrt(p2 / 6)
   B = (1 / p) * (A - q * I)    % I is the identity matrix
   r = det(B) / 2

   % In exact arithmetic for a symmetric matrix  -1 <= r <= 1
   % but computation error can leave it slightly outside this range.
   if (r <= -1) 
      phi = pi / 3
   elseif (r >= 1)
      phi = 0
   else
      phi = acos(r) / 3
   end

   % the eigenvalues satisfy eig3 <= eig2 <= eig1
   eig1 = q + 2 * p * cos(phi)
   eig3 = q + 2 * p * cos(phi + (2*pi/3))
   eig2 = 3 * q - eig1 - eig3     % since trace(A) = eig1 + eig2 + eig3
end

Once again, the eigenvectors of AScript error: No such module "Check for unknown parameters". can be obtained by recourse to the Cayley–Hamilton theorem. If α1, α2, α3Script error: No such module "Check for unknown parameters". are distinct eigenvalues of AScript error: No such module "Check for unknown parameters"., then (Aα1I)(Aα2I)(Aα3I) = 0Script error: No such module "Check for unknown parameters".. Thus the columns of the product of any two of these matrices will contain an eigenvector for the third eigenvalue. However, if α3 = α1Script error: No such module "Check for unknown parameters"., then (Aα1I)2(Aα2I) = 0Script error: No such module "Check for unknown parameters". and (Aα2I)(Aα1I)2 = 0Script error: No such module "Check for unknown parameters".. Thus the generalized eigenspace of α1Script error: No such module "Check for unknown parameters". is spanned by the columns of Aα2IScript error: No such module "Check for unknown parameters". while the ordinary eigenspace is spanned by the columns of (Aα1I)(Aα2I)Script error: No such module "Check for unknown parameters".. The ordinary eigenspace of α2Script error: No such module "Check for unknown parameters". is spanned by the columns of (Aα1I)2Script error: No such module "Check for unknown parameters"..

For example, let

A=[326225214].

The characteristic equation is

0=λ3λ2λ+1=(λ1)2(λ+1),

with eigenvalues 1 (of multiplicity 2) and -1. Calculating,

AI=[226215215],A+I=[426235213]

and

(AI)2=[408408408],(AI)(A+I)=[044022022]

Thus (−4, −4, 4)Script error: No such module "Check for unknown parameters". is an eigenvector for −1, and (4, 2, −2)Script error: No such module "Check for unknown parameters". is an eigenvector for 1. (2, 3, −1)Script error: No such module "Check for unknown parameters". and (6, 5, −3)Script error: No such module "Check for unknown parameters". are both generalized eigenvectors associated with 1, either one of which could be combined with (−4, −4, 4)Script error: No such module "Check for unknown parameters". and (4, 2, −2)Script error: No such module "Check for unknown parameters". to form a basis of generalized eigenvectors of AScript error: No such module "Check for unknown parameters".. Once found, the eigenvectors can be normalized if needed.

Eigenvectors of normal 3×3 matrices

If a 3×3 matrix A is normal, then the cross-product can be used to find eigenvectors. If λ is an eigenvalue of A, then the null space of AλI is perpendicular to its column space. The cross product of two independent columns of AλI will be in the null space. That is, it will be an eigenvector associated with λ. Since the column space is two dimensional in this case, the eigenspace must be one dimensional, so any other eigenvector will be parallel to it.

If AλI does not contain two independent columns but is not 0Script error: No such module "Check for unknown parameters"., the cross-product can still be used. In this case λ is an eigenvalue of multiplicity 2, so any vector perpendicular to the column space will be an eigenvector. Suppose 𝐯 is a non-zero column of AλI. Choose an arbitrary vector 𝐮 not parallel to 𝐯. Then 𝐯×𝐮 and (𝐯×𝐮)×𝐯 will be perpendicular to 𝐯 and thus will be eigenvectors of λ.

This does not work when A is not normal, as the null space and column space do not need to be perpendicular for such matrices.

See also

Notes

<templatestyles src="Reflist/styles.css" />

  1. The term "ordinary" is used here only to emphasize the distinction between "eigenvector" and "generalized eigenvector".
  2. where the constant term is multiplied by the identity matrix IScript error: No such module "Check for unknown parameters"..
  3. This ordering of the inner product (with the conjugate-linear position on the left), is preferred by physicists. Algebraists often place the conjugate-linear position on the right: wv = v* wScript error: No such module "Check for unknown parameters"..

Script error: No such module "Check for unknown parameters".

References

<templatestyles src="Reflist/styles.css" />

  1. Script error: No such module "citation/CS1".
  2. Script error: No such module "citation/CS1".
  3. Script error: No such module "citation/CS1".
  4. Script error: No such module "Citation/CS1".
  5. Script error: No such module "Citation/CS1".
  6. Script error: No such module "Citation/CS1".
  7. Script error: No such module "Citation/CS1".
  8. Script error: No such module "Citation/CS1".
  9. Script error: No such module "Citation/CS1".
  10. a b c Script error: No such module "citation/CS1".
  11. Script error: No such module "citation/CS1".
  12. Script error: No such module "citation/CS1".
  13. Script error: No such module "citation/CS1".
  14. Script error: No such module "citation/CS1".
  15. Script error: No such module "citation/CS1".
  16. Script error: No such module "citation/CS1".
  17. Script error: No such module "citation/CS1".

Script error: No such module "Check for unknown parameters".

Further reading

  • Script error: No such module "Citation/CS1".

Template:Numerical linear algebra