Eigendecomposition of a matrix explained

In linear algebra, eigendecomposition 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. When the matrix being factorized is a normal or real symmetric matrix, the decomposition is called "spectral decomposition", derived from the spectral theorem.

Fundamental theory of matrix eigenvectors and eigenvalues

See also: Eigenvalue, eigenvector and eigenspace.

A (nonzero) vector of dimension is an eigenvector of a square matrix if it satisfies a linear equation of the form\mathbf \mathbf = \lambda \mathbffor some scalar . Then is called the eigenvalue corresponding to . Geometrically speaking, the eigenvectors of are the vectors that 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 p\left(\lambda\right) = \det\left(\mathbf - \lambda \mathbf\right) = 0. We call the characteristic polynomial, and the equation, called the characteristic equation, is an th-order polynomial equation in the unknown . This equation will have distinct solutions, where . The set of solutions, that is, the eigenvalues, is called the spectrum of .[1]

If the field of scalars is algebraically closed, then we can factor asp(\lambda) = \left(\lambda - \lambda_1\right)^\left(\lambda - \lambda_2\right)^ \cdots \left(\lambda-\lambda_\right)^ = 0. The integer is termed the algebraic multiplicity of eigenvalue . The algebraic multiplicities sum to : \sum_^ = N.

For each eigenvalue, we have a specific eigenvalue equation\left(\mathbf - \lambda_i \mathbf\right)\mathbf = 0. There will be linearly independent solutions to each eigenvalue equation. The linear combinations of the solutions (except the one which gives the zero vector) are the eigenvectors associated with the eigenvalue . The integer is termed the geometric multiplicity of . It is important to keep in mind that the algebraic multiplicity and geometric multiplicity may or may not be equal, but we always have . The simplest case is of course when . The total number of linearly independent eigenvectors,, can be calculated by summing the geometric multiplicities\sum_^ = N_.

The eigenvectors can be indexed by eigenvalues, using a double index, with being the th eigenvector for the th eigenvalue. The eigenvectors can also be indexed using the simpler notation of a single index, with .

Eigendecomposition of a matrix

\left[\begin{smallmatrix}1&1\ 0&1\end{smallmatrix}\right]

(which is a shear matrix) cannot be diagonalized.

The eigenvectors are usually normalized, but they don't have to be. A non-normalized set of eigenvectors, can also be used as the columns of . That can be understood by noting that the magnitude of the eigenvectors in gets canceled in the decomposition by the presence of . If one of the eigenvalues has multiple linearly independent eigenvectors (that is, the geometric multiplicity of is greater than 1), then these eigenvectors for this eigenvalue can be chosen to be mutually orthogonal; however, if two eigenvectors belong to two different eigenvalues, it may be impossible for them to be orthogonal to each other (see Example below). One special case is that if is a normal matrix, then by the spectral theorem, it's always possible to diagonalize in an orthonormal basis .

The decomposition can be derived from the fundamental property of eigenvectors:\begin\mathbf \mathbf &= \lambda \mathbf \\\mathbf \mathbf &= \mathbf \mathbf \\\mathbf &= \mathbf\mathbf\mathbf^ .\endThe linearly independent eigenvectors with nonzero eigenvalues form a basis (not necessarily orthonormal) for all possible products, for, which is the same as the image (or range) of the corresponding matrix transformation, and also the column space of the matrix . The number of linearly independent eigenvectors with nonzero eigenvalues is equal to the rank of the matrix, and also the dimension of the image (or range) of the corresponding matrix transformation, as well as its column space.

The linearly independent eigenvectors with an eigenvalue of zero form a basis (which can be chosen to be orthonormal) for the null space (also known as the kernel) of the matrix transformation .

Example

The 2 × 2 real matrix \mathbf = \begin 1 & 0 \\ 1 & 3 \\ \endmay be decomposed into a diagonal matrix through multiplication of a non-singular matrix \mathbf = \begin a & b \\ c & d \end \in \mathbb^.

Then\begin a & b \\ c & d \end^\begin 1 & 0 \\ 1 & 3 \end\begin a & b \\ c & d \end = \begin x & 0 \\ 0 & y \end,for some real diagonal matrix

\left[\begin{smallmatrix}x&0\ 0&y\end{smallmatrix}\right]

.

Multiplying both sides of the equation on the left by :\begin 1 & 0 \\ 1 & 3 \end \begin a & b \\ c & d \end = \begin a & b \\ c & d \end \begin x & 0 \\ 0 & y \end.The above equation can be decomposed into two simultaneous equations: \begin\begin 1 & 0\\ 1 & 3 \end \begin a \\ c \end = \begin ax \\ cx \end \\[1.2ex]\begin 1 & 0\\ 1 & 3 \end \begin b \\ d \end = \begin by \\ dy \end\end .Factoring out the eigenvalues and : \begin\begin 1 & 0\\ 1 & 3 \end \begin a \\ c \end = x\begin a \\ c \end \\[1.2ex]\begin 1 & 0\\ 1 & 3 \end \begin b \\ d \end = y\begin b \\ d \end\end Letting\mathbf = \begin a \\ c \end, \quad \mathbf = \begin b \\ d \end,this gives us two vector equations: \begin\mathbf \mathbf = x \mathbf \\\mathbf \mathbf = y \mathbf\endAnd can be represented by a single vector equation involving two solutions as eigenvalues:\mathbf \mathbf = \lambda \mathbfwhere represents the two eigenvalues and, and represents the vectors and .

Shifting to the left hand side and factoring out\left(\mathbf - \lambda \mathbf\right) \mathbf = \mathbfSince is non-singular, it is essential that is nonzero. Therefore,\det(\mathbf - \lambda \mathbf) = 0Thus(1- \lambda)(3 - \lambda) = 0giving us the solutions of the eigenvalues for the matrix as or, and the resulting diagonal matrix from the eigendecomposition of is thus

Putting the solutions back into the above simultaneous equations \begin\begin 1 & 0 \\ 1 & 3 \end \begin a \\ c \end = 1\begin a \\ c \end \\[1.2ex]\begin 1 & 0 \\ 1 & 3 \end \begin b \\ d \end = 3\begin b \\ d \end\end

Solving the equations, we havea = -2c \quad\text \quad b = 0, \qquad c,d \in \mathbb.Thus the matrix required for the eigendecomposition of is\mathbf = \begin -2c & 0 \\ c & d \end,\qquad c, d\in \mathbb, that is:\begin-2c & 0 \\ c & d \end^ \begin 1 & 0 \\ 1 & 3 \end \begin -2c & 0 \\ c & d \end = \begin 1 & 0 \\ 0 & 3 \end,\qquad c, d\in \mathbb

Matrix inverse via eigendecomposition

See main article: Inverse matrix.

If a matrix can be eigendecomposed and if none of its eigenvalues are zero, then is invertible and its inverse is given by\mathbf^ = \mathbf\mathbf^\mathbf^If

A

is a symmetric matrix, since

Q

is formed from the eigenvectors of

A

,

Q

is guaranteed to be an orthogonal matrix, therefore

Q-1=QT

. Furthermore, because is a diagonal matrix, its inverse is easy to calculate:\left[\mathbf{\Lambda}^{-1}\right]_ = \frac

Practical implications

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.[2]

Two mitigations have been proposed: truncating small or zero eigenvalues, and extending the lowest reliable eigenvalue to those below it. See also Tikhonov regularization as a statistically motivated but biased method for rolling off eigenvalues as they become dominated by noise.

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:[3] \min\left|\nabla^2 \lambda_\mathrm\right|where the eigenvalues are subscripted with an 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

The eigendecomposition allows for much easier computation of power series of matrices. If is given byf(x) = a_0 + a_1 x + a_2 x^2 + \cdotsthen we know thatf\!\left(\mathbf\right) = \mathbf\,f\!\left(\mathbf\right)\mathbf^Because is a diagonal matrix, functions of are very easy to calculate:\left[f\left(\mathbf{\Lambda}\right)\right]_ = f\left(\lambda_i\right)

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

A similar technique works more generally with the holomorphic functional calculus, using\mathbf^ = \mathbf \mathbf^ \mathbf^from above. Once again, we find that\left[f\left(\mathbf{\Lambda}\right)\right]_ = f\left(\lambda_i\right)

Examples

\begin \mathbf^2 &= \left(\mathbf\mathbf\mathbf^\right) \left(\mathbf\mathbf\mathbf^\right) = \mathbf\mathbf\left(\mathbf^\mathbf\right)\mathbf\mathbf^ = \mathbf\mathbf^2\mathbf^ \\[1.2ex] \mathbf^n &= \mathbf\mathbf^n\mathbf^ \\[1.2ex] \exp \mathbf &= \mathbf \exp(\mathbf) \mathbf^\endwhich are examples for the functions

f(x)=x2,f(x)=xn,f(x)=\exp{x}

. Furthermore,

\exp{A

} is the matrix exponential.

Decomposition for spectral matrices

See main article: Spectral theorem. Spectral matrices are matrices that possess distinct eigenvalues and a complete set of eigenvectors. This characteristic allows spectral matrices to be fully diagonalizable, meaning they can be decomposed into simpler forms using eigendecomposition. This decomposition process reveals fundamental insights into the matrix's structure and behavior, particularly in fields such as quantum mechanics, signal processing, and numerical analysis.[4]

Normal matrices

A complex-valued square matrix

A

is normal (meaning,

A*A=AA*

, where

A*

is the conjugate transpose) if and only if it can be decomposed as

A=UΛU*

, where

U

is a unitary matrix (meaning

U*=U-1

) and

Λ=

diag(

λ1,\ldots,λn

) is a diagonal matrix. The columns

u1,,un

of

U

form an orthonormal basis and are eigenvectors of

A

with corresponding eigenvalues

λ1,\ldots,λn

.[5]

For example, consider the 2 x 2 normal matrix

A=\begin{bmatrix}1&2\ 2&1\end{bmatrix}

.

The eigenvalues are

λ1=3

and

λ2=-1

.

The (normalized) eigenvectors corresponding to these eigenvalues are

u
1=1
\sqrt{2
}\begin1\\1\end and
u
2=1
\sqrt{2
}\begin-1\\1\end.

The diagonalization is

A=UΛU*

, where

U=\begin{bmatrix}1/\sqrt{2}&1/\sqrt{2}\ 1/\sqrt{2}&-1/\sqrt{2}\end{bmatrix}

,

Λ=

\begin{bmatrix}3&0\ 0&-1\end{bmatrix}

and

U*=U-1=

\begin{bmatrix}1/\sqrt{2}&1/\sqrt{2}\ 1/\sqrt{2}&-1/\sqrt{2}\end{bmatrix}

.

The verification is

UΛU*=

\begin{bmatrix}1/\sqrt{2}&1/\sqrt{2}\ 1/\sqrt{2}&-1/\sqrt{2}\end{bmatrix}

\begin{bmatrix}3&0\ 0&-1\end{bmatrix}

\begin{bmatrix}1/\sqrt{2}&1/\sqrt{2}\ 1/\sqrt{2}&-1/\sqrt{2}\end{bmatrix}

=\begin{bmatrix}1&2\ 2&1\end{bmatrix}=A

.

This example illustrates the process of diagonalizing a normal matrix

A

by finding its eigenvalues and eigenvectors, forming the unitary matrix

U

, the diagonal matrix

Λ

, and verifying the decomposition.

Real symmetric matrices

As a special case, for every real symmetric matrix, the eigenvalues are real and the eigenvectors can be chosen real and orthonormal. Thus a real symmetric matrix can be decomposed as

A=QΛQT

, where is an orthogonal matrix whose columns are the real, orthonormal eigenvectors of, and is a diagonal matrix whose entries are the eigenvalues of .

Diagonalizable Matrices

Diagonalizable matrices can be decomposed using eigendecomposition, provided they have a full set of linearly independent eigenvectors. They can be expressed as

A=PDP-1

, where

P

is a matrix whose columns are eigenvectors of

A

and

D

is a diagonal matrix consisting of the corresponding eigenvalues of

A

.

Positive Definite Matrices

Positive definite matrices are matrices for which all eigenvalues are positive. They can be decomposed as

A=LLT

using the Cholesky decomposition, where

L

is a lower triangular matrix.[6]

Unitary and Hermitian Matrices

Unitary Matrices satisfy

UU*=I

(real case) or

UU\dagger=I

(complex case), where

U*

denotes the conjugate transpose and

U\dagger

denotes the conjugate transpose. They diagonalize using unitary transformations.

Hermitian matrices satisfy

H=H\dagger

, where

H\dagger

denotes the conjugate transpose. They can be diagonalized using unitary or orthogonal matrices.

Useful facts

Useful facts regarding eigenvalues

Useful facts regarding eigenvectors

Useful facts regarding eigendecomposition

Nλ=N,

then can be eigendecomposed.

\left[\begin{smallmatrix}1&1\ 0&1\end{smallmatrix}\right]

, which is an invertible defective matrix.

Useful facts regarding matrix inverse

Numerical computations

Numerical computation of eigenvalues

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 th 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.[7]

A simple and accurate iterative method is the power method: a random vector is chosen and a sequence of unit vectors is computed as\frac, \frac, \frac, \ldots

This sequence will almost always converge to an eigenvector corresponding to the eigenvalue of greatest magnitude, provided that 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.[8] 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. Alternatively, the important QR algorithm is also based on a subtle transformation of a power method.

Numerical computation of eigenvectors

Once the eigenvalues are computed, the eigenvectors could be calculated by solving the equation\left(\mathbf - \lambda_i \mathbf\right)\mathbf_ = \mathbf 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). In the QR algorithm for a Hermitian matrix (or any normal matrix), the orthonormal eigenvectors are obtained as a product of the matrices from the steps in the algorithm. (For more general matrices, the QR algorithm yields the Schur decomposition first, from which the eigenvectors can be obtained by a backsubstitution procedure.[9]) For Hermitian matrices, the Divide-and-conquer eigenvalue algorithm is more efficient than the QR algorithm if both eigenvectors and eigenvalues are desired.

Additional topics

Generalized eigenspaces

Recall that the geometric multiplicity of an eigenvalue can be described as the dimension of the associated eigenspace, the nullspace of . 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 for any sufficiently large . That is, it is the space of generalized eigenvectors (first sense), where a generalized eigenvector is any vector which eventually becomes 0 if 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

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\mathbf\mathbf = \lambda \mathbf^*.For example, in coherent electromagnetic scattering theory, the linear transformation 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

A generalized eigenvalue problem (second sense) is the problem of finding a (nonzero) vector that obeys \mathbf\mathbf = \lambda \mathbf \mathbfwhere and are matrices. If obeys this equation, with some, then we call the generalized eigenvector of and (in the second sense), and is called the generalized eigenvalue of and (in the second sense) which corresponds to the generalized eigenvector . The possible values of must obey the following equation\det(\mathbf - \lambda \mathbf) = 0.

If linearly independent vectors can be found, such that for every,, then we define the matrices and such thatP = \begin | & & | \\ \mathbf_1 & \cdots & \mathbf_n \\ | & & | \end \equiv \begin (\mathbf_1)_1 & \cdots & (\mathbf_n)_1 \\ \vdots & & \vdots \\ (\mathbf_1)_n & \cdots & (\mathbf_n)_n \end(D)_ = \begin \lambda_i, & \texti = j\\ 0, & \text\endThen the following equality holds\mathbf = \mathbf\mathbf\mathbf\mathbf^And the proof is \mathbf\mathbf= \mathbf \begin | & & | \\ \mathbf_1 & \cdots & \mathbf_n \\ | & & | \end = \begin | & & | \\ A\mathbf_1 & \cdots & A\mathbf_n \\ | & & | \end = \begin | & & | \\ \lambda_1B\mathbf_1 & \cdots & \lambda_nB\mathbf_n \\ | & & | \end = \begin | & & | \\ B\mathbf_1 & \cdots & B\mathbf_n \\ | & & | \end \mathbf = \mathbf\mathbf\mathbf

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

The set of matrices of the form, where is a complex number, is called a pencil; the term matrix pencil can also refer to the pair of matrices.[10]

If is invertible, then the original problem can be written in the form\mathbf^\mathbf\mathbf = \lambda \mathbfwhich 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 and are Hermitian matrices, since in this case is not generally Hermitian and important properties of the solution are no longer apparent.

If and are both symmetric or Hermitian, and is also a positive-definite matrix, the eigenvalues are real and eigenvectors and with distinct eigenvalues are -orthogonal .[11] In this case, eigenvectors can be chosen so that the matrix defined above satisfies\mathbf^* \mathbf B \mathbf = \mathbf or \mathbf\mathbf^*\mathbf B = \mathbf,and there exists a basis of generalized eigenvectors (it is not a defective problem). This case is sometimes called a Hermitian definite pencil or definite pencil.

See also

References

External links

Notes and References

  1. Book: Evar D. . Nering . 1970 . Linear Algebra and Matrix Theory . 2nd . . New York . 76091646 . 270 .
  2. Hayde . A. F. . Twede . D. R. . Observations on relationship between eigenvalues, instrument noise and detection performance . 2002SPIE.4816..355H . 4816 . 2002 . 355 . Imaging Spectrometry VIII . 10.1117/12.453777. Proceedings of SPIE. 120953647 . Shen. Sylvia S..
  3. Twede. D. R. . Hayden. A. F. . Refinement and generalization of the extension method of covariance matrix inversion by regularization. 2004SPIE.5159..299T. 5159. 2004. 299. Imaging Spectrometry IX. 10.1117/12.506993. Proceedings of SPIE. 123123072 . Shen. Sylvia S. Lewis. Paul E.
  4. Web site: Allaire, Grégoire . Numerical linear algebra .
  5. Web site: Shores, Thomas S . Applied linear algebra and matrix analysis .
  6. Book: Carl D. Meyer . Matrix analysis and applied linear algebra . Society for Industrial and Applied Mathematics . 2023 . 9781611977431 . 2nd .
  7. Book: Lloyd N. Trefethen. Lloyd N.. Trefethen. David. Bau. Numerical Linear Algebra. 978-0-89871-361-9. SIAM. 1997.
  8. [Ilse Ipsen|Ipsen, Ilse]
  9. Book: Numerical Mathematics. Springer. section 5.8.2. 15 . Alfio Quarteroni . Alfio . Quarteroni . Riccardo . Sacco . Fausto . Saleri . 978-0-387-98959-4. 2000.
  10. Book: Z. . Bai . James Demmel . J. . Demmel . J. . Dongarra . A. . Ruhe . H. . Van Der Vorst . Templates for the Solution of Algebraic Eigenvalue Problems: A Practical Guide . SIAM . Philadelphia . 2000 . Generalized Hermitian Eigenvalue Problems . 978-0-89871-471-5 . 2022-09-09 . 2010-08-21 . https://web.archive.org/web/20100821063624/http://www.cs.utk.edu/~dongarra/etemplates/node156.html . dead .
  11. Book: Parlett, Beresford N.. The symmetric eigenvalue problem. 1998. Society for Industrial and Applied Mathematics. Philadelphia. 978-0-89871-402-9. 345. Reprint.. 10.1137/1.9781611971163.