# Eigendecomposition of a matrix

In linear algebra, **eigendecomposition** or sometimes **spectral decomposition** is the factorization of a matrix into a canonical form, whereby the matrix is represented in terms of its eigenvalues and eigenvectors. Only diagonalizable matrices can be factorized in this way.

## Contents

## Fundamental theory of matrix eigenvectors and eigenvalues[edit]

A (non-zero) vector **v** of dimension N is an **eigenvector** of a square *N* × *N* matrix **A** if it satisfies the linear equation

where λ is a scalar, termed the **eigenvalue** corresponding to **v**. That is, the eigenvectors are the vectors that the linear transformation **A** merely elongates or shrinks, and the amount that they elongate/shrink by is the eigenvalue. The above equation is called the **eigenvalue equation** or the **eigenvalue problem**.

This yields an equation for the eigenvalues

We call *p*(*λ*) the **characteristic polynomial**, and the equation, called the **characteristic equation**, is an Nth order polynomial equation in the unknown λ. This equation will have N_{λ} distinct solutions, where 1 ≤ *N _{λ}* ≤

*N*. The set of solutions, that is, the eigenvalues, is called the

**spectrum**of

**A**.

^{[1]}

^{[2]}

^{[3]}

We can factor p as

The integer n_{i} is termed the **algebraic multiplicity** of eigenvalue λ_{i}. If the field of scalars is algebraically closed, the algebraic multiplicities sum to N:

For each eigenvalue λ_{i}, we have a specific eigenvalue equation

There will be 1 ≤ *m*_{i} ≤ *n*_{i} linearly independent solutions to each eigenvalue equation. The linear combinations of the *m*_{i} solutions are the eigenvectors associated with the eigenvalue *λ*_{i}. The integer *m*_{i} is termed the **geometric multiplicity** of *λ*_{i}. It is important to keep in mind that the algebraic multiplicity *n*_{i} and geometric multiplicity *m*_{i} may or may not be equal, but we always have *m*_{i} ≤ *n*_{i}. The simplest case is of course when *m*_{i} = *n*_{i} = 1. The total number of linearly independent eigenvectors, *N*_{v}, can be calculated by summing the geometric multiplicities

The eigenvectors can be indexed by eigenvalues, using a double index, with **v**_{ij} being the jth eigenvector for the ith eigenvalue. The eigenvectors can also be indexed using the simpler notation of a single index **v**_{k}, with *k* = 1, 2, ..., *N*_{v}.

## Eigendecomposition of a matrix[edit]

Let **A** be a square *n* × *n* matrix with n linearly independent eigenvectors q_{i} (where *i* = 1, ..., *n*). Then **A** can be factorized as

where **Q** is the square *n* × *n* matrix whose ith column is the eigenvector q_{i} of **A**, and **Λ** is the diagonal matrix whose diagonal elements are the corresponding eigenvalues, *Λ _{ii}* =

*λ*. Note that only diagonalizable matrices can be factorized in this way. For example, the defective matrix cannot be diagonalized.

_{i}The n eigenvectors q_{i} are usually normalized, but they need not be. A non-normalized set of n eigenvectors, v_{i} can also be used as the columns of **Q**. That can be understood by noting that the magnitude of the eigenvectors in **Q** gets canceled in the decomposition by the presence of **Q**^{−1}.

The decomposition can be derived from the fundamental property of eigenvectors:

### Example[edit]

The 2 × 2 real matrix **A**

may be decomposed into a diagonal matrix through multiplication of a non-singular matrix **B**

Then

for some real diagonal matrix .

Multiplying both sides of the equation on the left by **B**:

The above equation can be decomposed into two simultaneous equations:

Factoring out the eigenvalues x and y:

Letting

this gives us two vector equations:

And can be represented by a single vector equation involving two solutions as eigenvalues:

where λ represents the two eigenvalues x and y, and **u** represents the vectors *a*→ and *b*→.

Shifting *λ***u** to the left hand side and factoring **u** out

Since **B** is non-singular, it is essential that **u** is non-zero. Therefore,

Thus

giving us the solutions of the eigenvalues for the matrix **A** as *λ* = 1 or *λ* = 3, and the resulting diagonal matrix from the eigendecomposition of **A** is thus .

Putting the solutions back into the above simultaneous equations

Solving the equations, we have

Thus the matrix **B** required for the eigendecomposition of **A** is

that is:

### Matrix inverse via eigendecomposition[edit]

If a matrix **A** can be eigendecomposed and if none of its eigenvalues are zero, then **A** is nonsingular and its inverse is given by

Furthermore, because **Λ** is a diagonal matrix, its inverse is easy to calculate:

#### Practical implications^{[4]}[edit]

When eigendecomposition is used on a matrix of measured, real data, the inverse may be less valid when all eigenvalues are used unmodified in the form above. This is because as eigenvalues become relatively small, their contribution to the inversion is large. Those near zero or at the "noise" of the measurement system will have undue influence and could hamper solutions (detection) using the inverse.

Two mitigations have been proposed: truncating small or zero eigenvalues, and extending the lowest reliable eigenvalue to those below it.

The first mitigation method is similar to a sparse sample of the original matrix, removing components that are not considered valuable. However, if the solution or detection process is near the noise level, truncating may remove components that influence the desired solution.

The second mitigation extends the eigenvalue so that lower values have much less influence over inversion, but do still contribute, such that solutions near the noise will still be found.

The reliable eigenvalue can be found by assuming that eigenvalues of extremely similar and low value are a good representation of measurement noise (which is assumed low for most systems).

If the eigenvalues are rank-sorted by value, then the reliable eigenvalue can be found by minimization of the Laplacian of the sorted eigenvalues:^{[5]}

where the eigenvalues are subscripted with an s to denote being sorted. The position of the minimization is the lowest reliable eigenvalue. In measurement systems, the square root of this reliable eigenvalue is the average noise over the components of the system.

## Functional calculus[edit]

The eigendecomposition allows for much easier computation of power series of matrices. If *f* (*x*) is given by

then we know that

Because **Λ** is a diagonal matrix, functions of **Λ** are very easy to calculate:

The off-diagonal elements of *f* (**Λ**) are zero; that is, *f* (**Λ**) is also a diagonal matrix. Therefore, calculating *f* (**A**) reduces to just calculating the function on each of the eigenvalues.

A similar technique works more generally with the holomorphic functional calculus, using

from above. Once again, we find that

### Examples[edit]

which are examples for the functions . Furthermore, is the matrix exponential.

## Decomposition for special matrices[edit]

### Normal matrices[edit]

A complex normal matrix (**A*****A** = **AA***) has an orthogonal eigenvector basis, so a normal matrix can be decomposed as

where **U** is a unitary matrix and **Λ** = diag(*λ*_{1}, ..., *λ _{n}*) is a diagonal matrix.

^{[citation needed]}If

**A**is further restricted to be a Hermitian matrix (

**A**=

**A***), then

**Λ**has only real valued entries. If

**A**instead is further restricted to a unitary matrix (

**A***

**A**=

**AA*** =

**I**),

**Λ**takes all its values on the complex unit circle, that is, |

*λ*| = 1.

_{i}### Real symmetric matrices[edit]

As a special case, for every *N* × *N* real symmetric matrix, the eigenvalues are real and the eigenvectors can be chosen such that they are orthogonal to each other. Thus a real symmetric matrix **A** can be decomposed as

where **Q** is an orthogonal matrix whose columns are the eigenvectors of **A**, and **Λ** is a diagonal matrix whose entries are the eigenvalues of **A**.

## Useful facts[edit]

### Useful facts regarding eigenvalues[edit]

- The product of the eigenvalues is equal to the determinant of
**A***n*, the algebraic multiplicity._{i} - The sum of the eigenvalues is equal to the trace of
**A***n*, the algebraic multiplicity._{i} - If the eigenvalues of
**A**are*λ*_{i}, and**A**is invertible, then the eigenvalues of**A**^{−1}are simply*λ*^{−1}_{i}. - If the eigenvalues of
**A**are*λ*_{i}, then the eigenvalues of*f*(**A**) are simply*f*(*λ*_{i}), for any holomorphic function f.

### Useful facts regarding eigenvectors[edit]

- If
**A**is Hermitian and full-rank, the basis of eigenvectors may be chosen to be mutually orthogonal. The eigenvalues are real. - The eigenvectors of
**A**^{−1}are the same as the eigenvectors of**A**. - Eigenvectors are defined up to a phase, that is, if
**Av**=*λ***v**then*e*^{iθ}**v**is also an eigenvector, and specifically so is −**v**(where*θ*= π. - In the case of degenerate eigenvalues (an eigenvalue appearing more than once), the eigenvectors have an additional freedom of rotation, that is to say any linear (orthonormal) combination of eigenvectors sharing an eigenvalue (in the degenerate subspace), are themselves eigenvectors (in the subspace).

### Useful facts regarding eigendecomposition[edit]

**A**can be eigendecomposed if and only if the number of linearly independent eigenvectors, , equals the dimension of an eigenvector:- If
*p*(*λ*) has no repeated roots, that is, if then**A**can be eigendecomposed. - The statement "
**A**can be eigendecomposed" does*not*imply that**A**has an inverse. - The statement "
**A**has an inverse" does*not*imply that**A**can be eigendecomposed. A counterexample is , which is an invertable defective matrix.

### Useful facts regarding matrix inverse[edit]

**A**can be inverted if and only if- If
*λ*≠ 0_{i}*and**N*_{v}=*N*, the inverse is given by

## Numerical computations[edit]

### Numerical computation of eigenvalues[edit]

Suppose that we want to compute the eigenvalues of a given matrix. If the matrix is small, we can compute them symbolically using the characteristic polynomial. However, this is often impossible for larger matrices, in which case we must use a numerical method.

In practice, eigenvalues of large matrices are not computed using the characteristic polynomial. Computing the polynomial becomes expensive in itself, and exact (symbolic) roots of a high-degree polynomial can be difficult to compute and express: the Abel–Ruffini theorem implies that the roots of high-degree (5 or above) polynomials cannot in general be expressed simply using nth roots. Therefore, general algorithms to find eigenvectors and eigenvalues are iterative.

Iterative numerical algorithms for approximating roots of polynomials exist, such as Newton's method, but in general it is impractical to compute the characteristic polynomial and then apply these methods. One reason is that small round-off errors in the coefficients of the characteristic polynomial can lead to large errors in the eigenvalues and eigenvectors: the roots are an extremely ill-conditioned function of the coefficients.^{[6]}

A simple and accurate iterative method is the power method: a random vector **v** is chosen and a sequence of unit vectors is computed as

This sequence will almost always converge to an eigenvector corresponding to the eigenvalue of greatest magnitude, provided that **v** has a nonzero component of this eigenvector in the eigenvector basis (and also provided that there is only one eigenvalue of greatest magnitude). This simple algorithm is useful in some practical applications; for example, Google uses it to calculate the page rank of documents in their search engine.^{[7]} Also, the power method is the starting point for many more sophisticated algorithms. For instance, by keeping not just the last vector in the sequence, but instead looking at the span of *all* the vectors in the sequence, one can get a better (faster converging) approximation for the eigenvector, and this idea is the basis of Arnoldi iteration.^{[6]} Alternatively, the important QR algorithm is also based on a subtle transformation of a power method.^{[6]}

### Numerical computation of eigenvectors[edit]

Once the eigenvalues are computed, the eigenvectors could be calculated by solving the equation

using Gaussian elimination or any other method for solving matrix equations.

However, in practical large-scale eigenvalue methods, the eigenvectors are usually computed in other ways, as a byproduct of the eigenvalue computation. In power iteration, for example, the eigenvector is actually computed before the eigenvalue (which is typically computed by the Rayleigh quotient of the eigenvector).^{[6]} In the QR algorithm for a Hermitian matrix (or any normal matrix), the orthonormal eigenvectors are obtained as a product of the **Q** matrices from the steps in the algorithm.^{[6]} (For more general matrices, the QR algorithm yields the Schur decomposition first, from which the eigenvectors can be obtained by a backsubstitution procedure.^{[8]}) For Hermitian matrices, the Divide-and-conquer eigenvalue algorithm is more efficient than the QR algorithm if both eigenvectors and eigenvalues are desired.^{[6]}

## Additional topics[edit]

### Generalized eigenspaces[edit]

Recall that the *geometric* multiplicity of an eigenvalue can be described as the dimension of the associated eigenspace, the nullspace of *λ***I** − **A**. The algebraic multiplicity can also be thought of as a dimension: it is the dimension of the associated **generalized eigenspace** (1st sense), which is the nullspace of the matrix (*λ***I** − **A**)^{k} for *any sufficiently large k*. That is, it is the space of *generalized eigenvectors* (first sense), where a generalized eigenvector is any vector which *eventually* becomes 0 if *λ***I** − **A** is applied to it enough times successively. Any eigenvector is a generalized eigenvector, and so each eigenspace is contained in the associated generalized eigenspace. This provides an easy proof that the geometric multiplicity is always less than or equal to the algebraic multiplicity.

This usage should not be confused with the *generalized eigenvalue problem* described below.

### Conjugate eigenvector[edit]

A **conjugate eigenvector** or **coneigenvector** is a vector sent after transformation to a scalar multiple of its conjugate, where the scalar is called the **conjugate eigenvalue** or **coneigenvalue** of the linear transformation. The coneigenvectors and coneigenvalues represent essentially the same information and meaning as the regular eigenvectors and eigenvalues, but arise when an alternative coordinate system is used. The corresponding equation is

For example, in coherent electromagnetic scattering theory, the linear transformation **A** represents the action performed by the scattering object, and the eigenvectors represent polarization states of the electromagnetic wave. In optics, the coordinate system is defined from the wave's viewpoint, known as the Forward Scattering Alignment (FSA), and gives rise to a regular eigenvalue equation, whereas in radar, the coordinate system is defined from the radar's viewpoint, known as the Back Scattering Alignment (BSA), and gives rise to a coneigenvalue equation.

### Generalized eigenvalue problem[edit]

A **generalized eigenvalue problem** (second sense) is the problem of finding a vector **v** that obeys

where **A** and **B** are matrices. If **v** obeys this equation, with some λ, then we call **v** the *generalized eigenvector* of **A** and **B** (in the second sense), and λ is called the *generalized eigenvalue* of **A** and **B** (in the second sense) which corresponds to the generalized eigenvector **v**. The possible values of λ must obey the following equation

In the case we can find *n* ∈ **ℕ** linearly independent vectors {**v**_{1}, ..., **v**_{n}} so that for every *i* ∈ {1, ..., *n*}, **Av**_{i} = *λ _{i}*

**Bv**

_{i}, where

*λ*∈

_{i}**F**then we define the matrices

**P**and

**D**such that

Then the following equality holds

And the proof is

And since **P** is invertible, we multiply the equation from the right by its inverse, finishing the proof.

The set of matrices of the form **A** − *λ***B**, where λ is a complex number, is called a *pencil*; the term *matrix pencil* can also refer to the pair (**A**, **B**) of matrices.^{[9]}

If **B** is invertible, then the original problem can be written in the form

which is a standard eigenvalue problem. However, in most situations it is preferable not to perform the inversion, but rather to solve the generalized eigenvalue problem as stated originally. This is especially important if **A** and **B** are Hermitian matrices, since in this case **B**^{−1}**A** is not generally Hermitian and important properties of the solution are no longer apparent.

If **A** and **B** are Hermitian and **B** is a positive-definite matrix, the eigenvalues *λ* are real and eigenvectors **v**_{1} and **v**_{2} with distinct eigenvalues are **B**-orthogonal (**v**_{1}***Bv**_{2} = **0**).^{[10]} Also, in this case it is guaranteed that there exists a basis of generalized eigenvectors (it is not a defective problem).^{[9]} This case is sometimes called a *Hermitian definite pencil* or *definite pencil*.^{[9]}

## See also[edit]

- Matrix decomposition
- List of matrices
- Eigenvalue, eigenvector and eigenspace
- Spectral theorem
- Singular value decomposition
- Householder transformation
- Frobenius covariant
- Sylvester's formula
- Eigenvalue perturbation

## Notes[edit]

**^**Golub & Van Loan (1996, p. 310)**^**Kreyszig (1972, p. 273)**^**Nering (1970, p. 270)**^**Hayde, A. F.; Twede, D. R. (2002). Shen, Sylvia S. (ed.). "Observations on relationship between eigenvalues, instrument noise and detection performance".*Imaging Spectrometry VIII*. Proceedings of SPIE.**4816**: 355. Bibcode:2002SPIE.4816..355H. doi:10.1117/12.453777.**^**Twede, D. R.; Hayden, A. F. (2004). Shen, Sylvia S; Lewis, Paul E (eds.). "Refinement and generalization of the extension method of covariance matrix inversion by regularization".*Imaging Spectrometry IX*. Proceedings of SPIE.**5159**: 299. Bibcode:2004SPIE.5159..299T. doi:10.1117/12.506993.- ^
^{a}^{b}^{c}^{d}^{e}^{f}Trefethen, Lloyd N.; Bau, David (1997).*Numerical Linear Algebra*. SIAM. ISBN 978-0-89871-361-9. **^**Ipsen, Ilse, and Rebecca M. Wills,*Analysis and Computation of Google's PageRank*, 7th IMACS International Symposium on Iterative Methods in Scientific Computing, Fields Institute, Toronto, Canada, 5–8 May 2005.**^**Quarteroni, Alfio; Sacco, Riccardo; Saleri, Fausto (2000). "section 5.8.2".*Numerical Mathematics*. Springer. p. 15. ISBN 978-0-387-98959-4.- ^
^{a}^{b}^{c}Bai, Z.; Demmel, J.; Dongarra, J.; Ruhe, A.; Van Der Vorst, H., eds. (2000). "Generalized Hermitian Eigenvalue Problems".*Templates for the Solution of Algebraic Eigenvalue Problems: A Practical Guide*. Philadelphia: SIAM. ISBN 978-0-89871-471-5. **^**Parlett, Beresford N. (1998).*The symmetric eigenvalue problem*(Reprint. ed.). Philadelphia: Society for Industrial and Applied Mathematics. p. 345. doi:10.1137/1.9781611971163. ISBN 978-0-89871-402-9.

## References[edit]

- Franklin, Joel N. (1968).
*Matrix Theory*. Dover Publications. ISBN 978-0-486-41179-8. - Golub, Gene H.; Van Loan, Charles F. (1996),
*Matrix Computations*(3rd ed.), Baltimore: Johns Hopkins University Press, ISBN 978-0-8018-5414-9 - Horn, Roger A.; Johnson, Charles R. (1985).
*Matrix Analysis*. Cambridge University Press. ISBN 978-0-521-38632-6. - Horn, Roger A.; Johnson, Charles R. (1991).
*Topics in Matrix Analysis*. Cambridge University Press. ISBN 978-0-521-46713-1. - Kreyszig, Erwin (1972),
*Advanced Engineering Mathematics*(3rd ed.), New York: Wiley, ISBN 978-0-471-50728-4 - Nering, Evar D. (1970),
*Linear Algebra and Matrix Theory*(2nd ed.), New York: Wiley, LCCN 76091646 - Strang, G. (1998).
*Introduction to Linear Algebra*(3rd ed.). Wellesley-Cambridge Press. ISBN 978-0-9614088-5-5.