# Matrix decomposition

Last updated

In the mathematical discipline of linear algebra, a matrix decomposition or matrix factorization is a factorization of a matrix into a product of matrices. There are many different matrix decompositions; each finds use among a particular class of problems.

## Example

In numerical analysis, different decompositions are used to implement efficient matrix algorithms.

For instance, when solving a system of linear equations ${\displaystyle Ax=b}$, the matrix A can be decomposed via the LU decomposition. The LU decomposition factorizes a matrix into a lower triangular matrix L and an upper triangular matrix U. The systems ${\displaystyle L(Ux)=b}$ and ${\displaystyle Ux=L^{-1}b}$ require fewer additions and multiplications to solve, compared with the original system ${\displaystyle Ax=b}$, though one might require significantly more digits in inexact arithmetic such as floating point.

Similarly, the QR decomposition expresses A as QR with Q an orthogonal matrix and R an upper triangular matrix. The system Q(Rx) = b is solved by Rx = QTb = c, and the system Rx = c is solved by 'back substitution'. The number of additions and multiplications required is about twice that of using the LU solver, but no more digits are required in inexact arithmetic because the QR decomposition is numerically stable.

### LU decomposition

• Applicable to: square matrix A
• Decomposition: ${\displaystyle A=LU}$, where L is lower triangular and U is upper triangular
• Related: the LDU decomposition is ${\displaystyle A=LDU}$, where L is lower triangular with ones on the diagonal, U is upper triangular with ones on the diagonal, and D is a diagonal matrix.
• Related: the LUP decomposition is ${\displaystyle A=LUP}$, where L is lower triangular, U is upper triangular, and P is a permutation matrix.
• Existence: An LUP decomposition exists for any square matrix A. When P is an identity matrix, the LUP decomposition reduces to the LU decomposition. If the LU decomposition exists, then the LDU decomposition exists. [1]
• Comments: The LUP and LU decompositions are useful in solving an n-by-n system of linear equations ${\displaystyle Ax=b}$. These decompositions summarize the process of Gaussian elimination in matrix form. Matrix P represents any row interchanges carried out in the process of Gaussian elimination. If Gaussian elimination produces the row echelon form without requiring any row interchanges, then P = I, so an LU decomposition exists.

### Rank factorization

• Applicable to: m-by-n matrix A of rank r
• Decomposition: ${\displaystyle A=CF}$ where C is an m-by-r full column rank matrix and F is an r-by-n full row rank matrix
• Comment: The rank factorization can be used to compute the Moore–Penrose pseudoinverse of A, [2] which one can apply to obtain all solutions of the linear system ${\displaystyle Ax=b}$.

### Cholesky decomposition

• Applicable to: square, hermitian, positive definite matrix A
• Decomposition: ${\displaystyle A=U^{*}U}$, where U is upper triangular with real positive diagonal entries
• Comment: if the matrix A is Hermitian and positive semi-definite, then it has a decomposition of the form ${\displaystyle A=U^{*}U}$ if the diagonal entries of ${\displaystyle U}$ are allowed to be zero
• Uniqueness: for positive definite matrices Cholesky decomposition is unique. However, it is not unique in the positive semi-definite case.
• Comment: if A is real and symmetric, ${\displaystyle U}$ has all real elements
• Comment: An alternative is the LDL decomposition, which can avoid extracting square roots.

### QR decomposition

• Applicable to: m-by-n matrix A with linearly independent columns
• Decomposition: ${\displaystyle A=QR}$ where Q is a unitary matrix of size m-by-m, and R is an upper triangular matrix of size m-by-n
• Uniqueness: In general it is not unique, but if ${\displaystyle A}$ is of full rank, then there exists a single ${\displaystyle R}$ that has all positive diagonal elements. If ${\displaystyle A}$ is square, also ${\displaystyle Q}$ is unique.
• Comment: The QR decomposition provides an alternative way of solving the system of equations ${\displaystyle Ax=b}$ without inverting the matrix A. The fact that Q is orthogonal means that ${\displaystyle Q^{T}Q=I}$, so that ${\displaystyle Ax=b}$ is equivalent to ${\displaystyle Rx=Q^{T}b}$, which is easier to solve since R is triangular.

### Eigendecomposition

• Also called spectral decomposition .
• Applicable to: square matrix A with linearly independent eigenvectors (not necessarily distinct eigenvalues).
• Decomposition: ${\displaystyle A=VDV^{-1}}$, where D is a diagonal matrix formed from the eigenvalues of A, and the columns of V are the corresponding eigenvectors of A.
• Existence: An n-by-n matrix A always has n (complex) eigenvalues, which can be ordered (in more than one way) to form an n-by-n diagonal matrix D and a corresponding matrix of nonzero columns V that satisfies the eigenvalue equation ${\displaystyle AV=VD}$. ${\displaystyle V}$ is invertible if and only if the n eigenvectors are linearly independent (i.e., each eigenvalue has geometric multiplicity equal to its algebraic multiplicity). A sufficient (but not necessary) condition for this to happen is that all the eigenvalues are different (in this case geometric and algebraic multiplicity are equal to 1)
• Comment: One can always normalize the eigenvectors to have length one (see the definition of the eigenvalue equation)
• Comment: Every normal matrix A (i.e., matrix for which ${\displaystyle AA^{*}=A^{*}A}$, where ${\displaystyle A^{*}}$ is a conjugate transpose) can be eigendecomposed. For a normal matrix A (and only for a normal matrix), the eigenvectors can also be made orthonormal (${\displaystyle VV^{*}=I}$) and the eigendecomposition reads as ${\displaystyle A=VDV^{*}}$. In particular all unitary, Hermitian, or skew-Hermitian (in the real-valued case, all orthogonal, symmetric, or skew-symmetric, respectively) matrices are normal and therefore possess this property.
• Comment: For any real symmetric matrix A, the eigendecomposition always exists and can be written as ${\displaystyle A=VDV^{T}}$, where both D and V are real-valued.
• Comment: The eigendecomposition is useful for understanding the solution of a system of linear ordinary differential equations or linear difference equations. For example, the difference equation ${\displaystyle x_{t+1}=Ax_{t}}$ starting from the initial condition ${\displaystyle x_{0}=c}$ is solved by ${\displaystyle x_{t}=A^{t}c}$, which is equivalent to ${\displaystyle x_{t}=VD^{t}V^{-1}c}$, where V and D are the matrices formed from the eigenvectors and eigenvalues of A. Since D is diagonal, raising it to power ${\displaystyle D^{t}}$, just involves raising each element on the diagonal to the power t. This is much easier to do and understand than raising A to power t, since A is usually not diagonal.

### Jordan decomposition

• Applicable to: square matrix A
• Comment: the Jordan normal form generalizes the eigendecomposition to cases where there are repeated eigenvalues and cannot be diagonalized, the Jordan–Chevalley decomposition does this without choosing a basis.

### Schur decomposition

• Applicable to: square matrix A
• Decomposition (complex version): ${\displaystyle A=UTU^{*}}$, where U is a unitary matrix, ${\displaystyle U^{*}}$ is the conjugate transpose of U, and T is an upper triangular matrix called the complex Schur form which has the eigenvalues of A along its diagonal.
• Comment: if A is a normal matrix, then T is diagonal and the Schur decomposition coincides with the spectral decomposition.

### Real Schur decomposition

• Applicable to: square matrix A
• Decomposition: This is a version of Schur decomposition where ${\displaystyle V}$ and ${\displaystyle S}$ only contain real numbers. One can always write ${\displaystyle A=VSV^{T}}$ where V is a real orthogonal matrix, ${\displaystyle V^{T}}$ is the transpose of V, and S is a block upper triangular matrix called the real Schur form. The blocks on the diagonal of S are of size 1×1 (in which case they represent real eigenvalues) or 2×2 (in which case they are derived from complex conjugate eigenvalue pairs).

### QZ decomposition

• Also called: generalized Schur decomposition
• Applicable to: square matrices A and B
• Comment: there are two versions of this decomposition: complex and real.
• Decomposition (complex version): ${\displaystyle A=QSZ^{*}}$ and ${\displaystyle B=QTZ^{*}}$ where Q and Z are unitary matrices, the * superscript represents conjugate transpose, and S and T are upper triangular matrices.
• Comment: in the complex QZ decomposition, the ratios of the diagonal elements of S to the corresponding diagonal elements of T, ${\displaystyle \lambda _{i}=S_{ii}/T_{ii}}$, are the generalized eigenvalues that solve the generalized eigenvalue problem ${\displaystyle Av=\lambda Bv}$ (where ${\displaystyle \lambda }$ is an unknown scalar and v is an unknown nonzero vector).
• Decomposition (real version): ${\displaystyle A=QSZ^{T}}$ and ${\displaystyle B=QTZ^{T}}$ where A, B, Q, Z, S, and T are matrices containing real numbers only. In this case Q and Z are orthogonal matrices, the T superscript represents transposition, and S and T are block upper triangular matrices. The blocks on the diagonal of S and T are of size 1×1 or 2×2.

### Takagi's factorization

• Applicable to: square, complex, symmetric matrix A.
• Decomposition: ${\displaystyle A=VDV^{T}}$, where D is a real nonnegative diagonal matrix, and V is unitary. ${\displaystyle V^{T}}$ denotes the matrix transpose of V.
• Comment: The diagonal elements of D are the nonnegative square roots of the eigenvalues of ${\displaystyle AA^{*}}$.
• Comment: V may be complex even if A is real.
• Comment: This is not a special case of the eigendecomposition (see above), which uses ${\displaystyle V^{-1}}$ instead of ${\displaystyle V^{T}}$.

### Singular value decomposition

• Applicable to: m-by-n matrix A.
• Decomposition: ${\displaystyle A=UDV^{*}}$, where D is a nonnegative diagonal matrix, and U and V satisfy ${\displaystyle U^{*}U=I,V^{*}V=I}$. Here ${\displaystyle V^{*}}$ is the conjugate transpose of V (or simply the transpose, if V contains real numbers only), and I denotes the identity matrix (of some dimension).
• Comment: The diagonal elements of D are called the singular values of A.
• Comment: Like the eigendecomposition above, the singular value decomposition involves finding basis directions along which matrix multiplication is equivalent to scalar multiplication, but it has greater generality since the matrix under consideration need not be square.
• Uniqueness: the singular values of ${\displaystyle A}$ are always uniquely determined. ${\displaystyle U}$ and ${\displaystyle V}$ need not to be unique in general.

### Scale-invariant decompositions

Refers to variants of existing matrix decompositions, such as the SVD, that are invariant with respect to diagonal scaling.

• Applicable to: m-by-n matrix A.
• Unit-Scale-Invariant Singular-Value Decomposition: ${\displaystyle A=DUSV^{*}E}$, where S is a unique nonnegative diagonal matrix of scale-invariant singular values, U and V are unitary matrices, ${\displaystyle V^{*}}$ is the conjugate transpose of V, and positive diagonal matrices D and E.
• Comment: Is analogous to the SVD except that the diagonal elements of S are invariant with respect to left and/or right multiplication of A by arbitrary nonsingular diagonal matrices, as opposed to the standard SVD for which the singular values are invariant with respect to left and/or right multiplication of A by arbitrary unitary matrices.
• Comment: Is an alternative to the standard SVD when invariance is required with respect to diagonal rather than unitary transformations of A.
• Uniqueness: The scale-invariant singular values of ${\displaystyle A}$ (given by the diagonal elements of S) are always uniquely determined. Diagonal matrices D and E, and unitary U and V, are not necessarily unique in general.
• Comment: U and V matrices are not the same as those from the SVD.

Analogous scale-invariant decompositions can be derived from other matrix decompositions, e.g., to obtain scale-invariant eigenvalues. [3] [4]

## Other decompositions

### Polar decomposition

• Applicable to: any square complex matrix A.
• Decomposition: ${\displaystyle A=UP}$ (right polar decomposition) or ${\displaystyle A=P'U}$ (left polar decomposition), where U is a unitary matrix and P and P' are positive semidefinite Hermitian matrices.
• Uniqueness: ${\displaystyle P}$ is always unique and equal to ${\displaystyle {\sqrt {A^{*}A}}}$ (which is always hermitian and positive semidefinite). If ${\displaystyle A}$ is invertible, then ${\displaystyle U}$ is unique.
• Comment: Since any Hermitian matrix admits a spectral decomposition with a unitary matrix, ${\displaystyle P}$ can be written as ${\displaystyle P=VDV^{*}}$. Since ${\displaystyle P}$ is positive semidefinite, all elements in ${\displaystyle D}$ are non-negative. Since the product of two unitary matrices is unitary, taking ${\displaystyle W=UV}$one can write ${\displaystyle A=U(VDV^{*})=WDV^{*}}$ which is the singular value decomposition. Hence, the existence of the polar decomposition is equivalent to the existence of the singular value decomposition.

### Algebraic polar decomposition

• Applicable to: square, complex, non-singular matrix A. [5]
• Decomposition: ${\displaystyle A=QS}$, where Q is a complex orthogonal matrix and S is complex symmetric matrix.
• Uniqueness: If ${\displaystyle A^{T}A}$ has no negative real eigenvalues, then the decomposition is unique. [6]
• Comment: The existence of this decomposition is equivalent to ${\displaystyle AA^{T}}$ being similar to ${\displaystyle A^{T}A}$. [7]
• Comment: A variant of this decomposition is ${\displaystyle A=RC}$, where R is a real matrix and C is a circular matrix. [6]

### Mostow's decomposition

• Applicable to: square, complex, non-singular matrix A. [8] [9]
• Decomposition: ${\displaystyle A=Ue^{iM}e^{S}}$, where U is unitary, M is real anti-symmetric and S is real symmetric.
• Comment: The matrix A can also be decomposed as ${\displaystyle A=U_{2}e^{S_{2}}e^{iM_{2}}}$, where U2 is unitary, M2 is real anti-symmetric and S2 is real symmetric. [6]

### Sinkhorn normal form

• Applicable to: square real matrix A with strictly positive elements.
• Decomposition: ${\displaystyle A=D_{1}SD_{2}}$, where S is doubly stochastic and D1 and D2 are real diagonal matrices with strictly positive elements.

### Sectoral decomposition

• Applicable to: square, complex matrix A with numerical range contained in the sector ${\displaystyle S_{\alpha }=\left\{re^{i\theta }\in \mathbb {C} \mid r>0,|\theta |\leq \alpha <{\frac {\pi }{2}}\right\}}$.
• Decomposition: ${\displaystyle A=CZC^{*}}$, where C is an invertible complex matrix and ${\displaystyle Z=\operatorname {diag} \left(e^{i\theta _{1}},\ldots ,e^{i\theta _{n}}\right)}$ with all ${\displaystyle \left|\theta _{j}\right|\leq \alpha }$. [10] [11]

### Williamson's normal form

• Applicable to: square, positive-definite real matrix A with order 2n-by-2n.
• Decomposition: ${\displaystyle A=S^{T}{\textrm {diag}}(D,D)S}$, where ${\displaystyle S\in {\text{Sp}}(2n)}$ is a symplectic matrix and D is a nonnegative n-by-n diagonal matrix. [12]

## Generalizations

There exist analogues of the SVD, QR, LU and Cholesky factorizations for quasimatrices and cmatrices or continuous matrices. [13] A ‘quasimatrix’ is, like a matrix, a rectangular scheme whose elements are indexed, but one discrete index is replaced by a continuous index. Likewise, a ‘cmatrix’, is continuous in both indices. As an example of a cmatrix, one can think of the kernel of an integral operator.

These factorizations are based on early work by Fredholm (1903), Hilbert (1904) and Schmidt (1907). For an account, and a translation to English of the seminal papers, see Stewart (2011).

## Notes

1. Simon & Blume 1994 Chapter 7.
2. Piziak, R.; Odell, P. L. (1 June 1999). "Full Rank Factorization of Matrices". Mathematics Magazine. 72 (3): 193. doi:10.2307/2690882. JSTOR   2690882.
3. Uhlmann, J.K. (2018), "A Generalized Matrix Inverse that is Consistent with Respect to Diagonal Transformations", SIAM Journal on Matrix Analysis, 239 (2): 781–800, doi:10.1137/17M113890X
4. Uhlmann, J.K. (2018), "A Rank-Preserving Generalized Matrix Inverse for Consistency with Respect to Similarity", IEEE Control Systems Letters, doi:10.1109/LCSYS.2018.2854240, ISSN   2475-1456
5. Choudhury & Horn 1987 , pp. 219–225
6. Bhatia, Rajendra (2013-11-15). "The bipolar decomposition". Linear Algebra and Its Applications. 439 (10): 3031–3037. doi:10.1016/j.laa.2013.09.006.
7. Horn & merino 1995 , pp. 43–92
8. Mostow, G. D. (1955), Some new decomposition theorems for semi-simple groups, Mem. Amer. Math. Soc., 14, American Mathematical Society, pp. 31–54
9. Nielsen, Frank; Bhatia, Rajendra (2012). Matrix Information Geometry. Springer. p. 224. arXiv:. doi:10.1007/978-3-642-30232-9. ISBN   9783642302329.
10. Zhang, Fuzhen (30 June 2014). "A matrix decomposition and its applications" (PDF). Linear and Multilinear Algebra. 63 (10): 2033–2042. doi:10.1080/03081087.2014.933219.
11. Drury, S.W. (November 2013). "Fischer determinantal inequalities and Highamʼs Conjecture". Linear Algebra and Its Applications. 439 (10): 3129–3133. doi:10.1016/j.laa.2013.08.031.
12. Idel, Martin; Soto Gaona, Sebastián; Wolf, Michael M. (2017-07-15). "Perturbation bounds for Williamson's symplectic normal form". Linear Algebra and Its Applications. 525: 45–58. arXiv:. doi:10.1016/j.laa.2017.03.013.

## Related Research Articles

In linear algebra, a symmetric real matrix is said to be positive definite if the scalar is strictly positive for every non-zero column vector of real numbers. Here denotes the transpose of . When interpreting as the output of an operator, , that is acting on an input, , the property of positive definiteness implies that the output always has a positive inner product with the input, as often observed in physical processes.

An orthogonal matrix is a square matrix whose columns and rows are orthogonal unit vectors, i.e.

In mathematics, particularly linear algebra and functional analysis, a spectral theorem is a result about when a linear operator or matrix can be diagonalized. This is extremely useful because computations involving a diagonalizable matrix can often be reduced to much simpler computations involving the corresponding diagonal matrix. The concept of diagonalization is relatively straightforward for operators on finite-dimensional vector spaces but requires some modification for operators on infinite-dimensional spaces. In general, the spectral theorem identifies a class of linear operators that can be modeled by multiplication operators, which are as simple as one can hope to find. In more abstract language, the spectral theorem is a statement about commutative C*-algebras. See also spectral theory for a historical perspective.

In linear algebra, a symmetric matrix is a square matrix that is equal to its transpose. Formally,

In linear algebra, the Cholesky decomposition or Cholesky factorization is a decomposition of a Hermitian, positive-definite matrix into the product of a lower triangular matrix and its conjugate transpose, which is useful for efficient numerical solutions, e.g., Monte Carlo simulations. It was discovered by André-Louis Cholesky for real matrices. When it is applicable, the Cholesky decomposition is roughly twice as efficient as the LU decomposition for solving systems of linear equations.

In linear algebra, the singular value decomposition (SVD) is a factorization of a real or complex matrix that generalizes the eigendecomposition of a square normal matrix to any matrix via an extension of the polar decomposition.

In mathematics, a square matrix is a matrix with the same number of rows and columns. An n-by-n matrix is known as a square matrix of order . Any two square matrices of the same order can be added and multiplied.

In mathematics, a complex square matrix A is normal if it commutes with its conjugate transpose A*:

In linear algebra, a diagonal matrix is a matrix in which the entries outside the main diagonal are all zero; the term usually refers to square matrices. An example of a 2-by-2 diagonal matrix is , while an example of a 3-by-3 diagonal matrix is. An identity matrix of any size, or any multiple of it, is a diagonal matrix.

In mathematics, a Hermitian matrix is a complex square matrix that is equal to its own conjugate transpose—that is, the element in the i-th row and j-th column is equal to the complex conjugate of the element in the j-th row and i-th column, for all indices i and j:

In linear algebra, a square matrix is called diagonalizable or nondefective if it is similar to a diagonal matrix, i.e., if there exists an invertible matrix  and a diagonal matrix such that , or equivalently . For a finite-dimensional vector space , a linear map  is called diagonalizable if there exists an ordered basis of  consisting of eigenvectors of . These definitions are equivalent: if  has a matrix representation as above, then the column vectors of  form a basis of eigenvectors of , and the diagonal entries of  are the corresponding eigenvalues of ; with respect to this eigenvector basis,  is represented by . Diagonalization is the process of finding the above  and .

In linear algebra, a QR decomposition, also known as a QR factorization or QU factorization is a decomposition of a matrix A into a product A = QR of an orthogonal matrix Q and an upper triangular matrix R. QR decomposition is often used to solve the linear least squares problem and is the basis for a particular eigenvalue algorithm, the QR algorithm.

In the mathematical discipline of linear algebra, the Schur decomposition or Schur triangulation, named after Issai Schur, is a matrix decomposition. It allows one to write an arbitrary matrix as unitarily equivalent to an upper triangular matrix whose diagonal elements are the eigenvalues of the original matrix.

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.

In mathematics, operator theory is the study of linear operators on function spaces, beginning with differential operators and integral operators. The operators may be presented abstractly by their characteristics, such as bounded linear operators or closed operators, and consideration may be given to nonlinear operators. The study, which depends heavily on the topology of function spaces, is a branch of functional analysis.

In mathematics, the polar decomposition of a square real or complex matrix is a factorization of the form , where is a unitary matrix and is a positive-semidefinite Hermitian matrix, both square and of the same size.

In mathematics, the square root of a matrix extends the notion of square root from numbers to matrices. A matrix B is said to be a square root of A if the matrix product BB is equal to A.

Numerical linear algebra is the study of how matrix operations can be used to create computer algorithms which efficiently and accurately provide approximate answers to mathematical questions. It is a subfield of numerical analysis, and a type of linear algebra. Because computers use floating-point arithmetic, they cannot exactly represent irrational data, and many algorithms increase that imprecision when implemented by a computer. Numerical linear algebra uses properties of vectors and matrices to develop computer algorithms that minimize computer error while retaining efficiency and precision.

In mathematics, Sylvester’s criterion is a necessary and sufficient criterion to determine whether a Hermitian matrix is positive-definite. It is named after James Joseph Sylvester.

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.