returns a vector of the eigenvalues of matrix A.
returns a vector containing the generalized eigenvalues, if A and B are square matrices.
If S is sparse and symmetric, you can use d = eig(S) to returns the eigenvalues of S. If S is sparse but not symmetric, or if you want to return the eigenvectors of S, use the function eigs instead of eig.
produces matrices of eigenvalues (D) and eigenvectors (V) of matrix A, so that A*V = V*D. Matrix D is the canonical form of A–a diagonal matrix with A's eigenvalues on the main diagonal. Matrix V is the modal matrix–its columns are the eigenvectors of A.
If W is a matrix such that W'*A = D*W', the columns of W are the left eigenvectors of A. Use [W,D] = eig(A.'); W = conj(W) to compute the left eigenvectors.
finds eigenvalues and eigenvectors without a preliminary balancing step. Ordinarily, balancing improves the conditioning of the input matrix, enabling more accurate computation of the eigenvectors and eigenvalues. However, if a matrix contains small elements that are really due to roundoff error, balancing may scale them up to make them as significant as the other elements of the original matrix, leading to incorrect eigenvectors. Use the nobalance option in this event. See the balance function for more details.
produces a diagonal matrix D of generalized eigenvalues and a full matrix V whose columns are the corresponding eigenvectors so that A*V = B*V*D.
'chol' Computes the generalized eigenvalues of A and B using the Cholesky factorization of B. This is the default for symmetric (Hermitian) A and symmetric (Hermitian) positive definite B.
'qz' Ignores the symmetry, if any, and uses the QZ algorithm as it would for nonsymmetric (non-Hermitian) A and B.
For eig(A), the eigenvectors are scaled so that the norm of each is 1.0. For eig(A,B), eig(A,'nobalance'), and eig(A,B,flag), the eigenvectors are not normalized.
where is an n-by-n matrix, is a length n column vector, and is a scalar. The n values of that satisfy the equation are the eigenvalues, and the corresponding values of are the right eigenvectors. In MATLAB, the function eig solves for the eigenvalues , and optionally the eigenvectors .
where both and are n-by-n matrices and is a scalar. The values of that satisfy the equation are the generalized eigenvalues and the corresponding values of are the generalized right eigenvectors.
Because can be singular, an alternative algorithm, called the QZ method, is necessary.
When a matrix has no repeated eigenvalues, the eigenvectors are always independent and the eigenvector matrix V diagonalizes the original matrix A if applied as a similarity transformation. However, if a matrix has repeated eigenvalues, it is not similar to a diagonal matrix unless it has a full (independent) set of eigenvectors. If the eigenvectors are not independent then the original matrix is said to be defective. Even if a matrix is defective, the solution from eig satisfies A*X = X*D.
For inputs of type double, MATLAB uses the following LAPACK routines to compute eigenvalues and eigenvectors.
For inputs of type single, MATLAB uses the following LAPACK routines to compute eigenvalues and eigenvectors.
lapack_lug.html ), Third Edition, SIAM, Philadelphia, 1999.