Matrix Factorization (recommender System)
   HOME

TheInfoList



OR:

In the mathematical discipline of linear algebra, a matrix decomposition or matrix factorization is a factorization of a
matrix Matrix most commonly refers to: * ''The Matrix'' (franchise), an American media franchise ** ''The Matrix'', a 1999 science-fiction action film ** "The Matrix", a fictional setting, a virtual reality environment, within ''The Matrix'' (franchis ...
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 In mathematics, a system of linear equations (or linear system) is a collection of one or more linear equations involving the same variable (math), variables. For example, :\begin 3x+2y-z=1\\ 2x-2y+4z=-2\\ -x+\fracy-z=0 \end is a system of three ...
A \mathbf = \mathbf, the matrix ''A'' can be decomposed via the LU decomposition. The LU decomposition factorizes a matrix into a
lower triangular matrix In mathematics, a triangular matrix is a special kind of square matrix. A square matrix is called if all the entries ''above'' the main diagonal are zero. Similarly, a square matrix is called if all the entries ''below'' the main diagonal are ...
''L'' and an
upper triangular matrix In mathematics, a triangular matrix is a special kind of square matrix. A square matrix is called if all the entries ''above'' the main diagonal are zero. Similarly, a square matrix is called if all the entries ''below'' the main diagonal are ...
''U''. The systems L(U \mathbf) = \mathbf and U \mathbf = L^ \mathbf require fewer additions and multiplications to solve, compared with the original system A \mathbf = \mathbf, 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''(''R''x) = b is solved by ''R''x = ''Q''Tb = c, and the system ''R''x = c is solved by '
back substitution In mathematics, a triangular matrix is a special kind of square matrix. A square matrix is called if all the entries ''above'' the main diagonal are zero. Similarly, a square matrix is called if all the entries ''below'' the main diagonal are ...
'. 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.


Decompositions related to solving systems of linear equations


LU decomposition

*Traditionally applicable to:
square matrix 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. Square matrices are often ...
''A'', although rectangular matrices can be applicable.If a non-square matrix is used, however, then the matrix ''U'' will also have the same rectangular shape as the original matrix ''A''. And so, calling the matrix ''U'' would be incorrect as the correct term would be that ''U'' is the 'row echelon form' of ''A''. Other than this, there are no differences in LU factorization for square and non-square matrices. *Decomposition: A=LU, where ''L'' is lower triangular and ''U'' is upper triangular *Related: the ''LDU'' decomposition is 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 PA=LU, where ''L'' is lower triangular, ''U'' is upper triangular, and ''P'' is a
permutation matrix In mathematics, particularly in matrix theory, a permutation matrix is a square binary matrix that has exactly one entry of 1 in each row and each column and 0s elsewhere. Each such matrix, say , represents a permutation of elements and, when ...
. *Existence: An LUP decomposition exists for any square matrix ''A''. When ''P'' is an
identity matrix In linear algebra, the identity matrix of size n is the n\times n square matrix with ones on the main diagonal and zeros elsewhere. Terminology and notation The identity matrix is often denoted by I_n, or simply by I if the size is immaterial o ...
, the LUP decomposition reduces to the LU decomposition. *Comments: The LUP and LU decompositions are useful in solving an ''n''-by-''n'' system of linear equations A \mathbf = \mathbf. These decompositions summarize the process of
Gaussian elimination In mathematics, Gaussian elimination, also known as row reduction, is an algorithm for solving systems of linear equations. It consists of a sequence of operations performed on the corresponding matrix of coefficients. This method can also be used ...
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 In linear algebra, a matrix is in echelon form if it has the shape resulting from a Gaussian elimination. A matrix being in row echelon form means that Gaussian elimination has operated on the rows, and column echelon form means that Gaussian ...
without requiring any row interchanges, then ''P'' = ''I'', so an LU decomposition exists.


LU reduction


Block LU decomposition


Rank factorization

*Applicable to: ''m''-by-''n'' matrix ''A'' of rank ''r'' *Decomposition: 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'', which one can apply to obtain all solutions of the linear system A \mathbf = \mathbf.


Cholesky decomposition

*Applicable to: square, hermitian,
positive definite In mathematics, positive definiteness is a property of any object to which a bilinear form or a sesquilinear form may be naturally associated, which is positive-definite. See, in particular: * Positive-definite bilinear form * Positive-definite f ...
matrix ''A'' *Decomposition: 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 A=U^*U if the diagonal entries of 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, 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: 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 A is of full rank, then there exists a single R that has all positive diagonal elements. If A is square, also Q is unique. *Comment: The QR decomposition provides an effective way to solve the system of equations A \mathbf = \mathbf. The fact that Q is
orthogonal In mathematics, orthogonality is the generalization of the geometric notion of ''perpendicularity''. By extension, orthogonality is also used to refer to the separation of specific features of a system. The term also has specialized meanings in ...
means that Q^Q=I, so that A \mathbf = \mathbf is equivalent to R \mathbf = Q^ \mathbf, which is very easy to solve since R is triangular.


RRQR factorization


Interpolative decomposition


Decompositions based on eigenvalues and related concepts


Eigendecomposition

*Also called '' spectral decomposition''. *Applicable to:
square matrix 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. Square matrices are often ...
''A'' with linearly independent eigenvectors (not necessarily distinct eigenvalues). *Decomposition: A=VDV^, 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 AV=VD. 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 AA^*=A^*A, where 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 (VV^*=I) and the eigendecomposition reads as A=VDV^*. In particular all
unitary Unitary may refer to: Mathematics * Unitary divisor * Unitary element * Unitary group * Unitary matrix * Unitary morphism * Unitary operator * Unitary transformation * Unitary representation * Unitarity (physics) * ''E''-unitary inverse semigroup ...
, Hermitian, or skew-Hermitian (in the real-valued case, all
orthogonal In mathematics, orthogonality is the generalization of the geometric notion of ''perpendicularity''. By extension, orthogonality is also used to refer to the separation of specific features of a system. The term also has specialized meanings in ...
, 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 A=VDV^\mathsf, 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 x_=Ax_t starting from the initial condition x_0=c is solved by x_t = A^tc, which is equivalent to x_t = VD^tV^c, where ''V'' and ''D'' are the matrices formed from the eigenvectors and eigenvalues of ''A''. Since ''D'' is diagonal, raising it to power 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

The Jordan normal form and the Jordan–Chevalley decomposition *Applicable to:
square matrix 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. Square matrices are often ...
''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 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. Square matrices are often ...
''A'' *Decomposition (complex version): A=UTU^*, where ''U'' is a unitary matrix, U^* is the conjugate transpose of ''U'', and ''T'' is an upper triangular matrix called the complex
Schur form 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 complex square matrix as unitarily equivalent to an upper tria ...
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 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. Square matrices are often ...
''A'' *Decomposition: This is a version of Schur decomposition where V and S only contain real numbers. One can always write A=VSV^\mathsf where ''V'' is a real orthogonal matrix, V^\mathsf is the transpose of ''V'', and ''S'' is a block upper triangular matrix called the real
Schur form 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 complex square matrix as unitarily equivalent to an upper tria ...
. 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): A=QSZ^* and B=QTZ^* where ''Q'' and ''Z'' are
unitary matrices In linear algebra, a complex square matrix is unitary if its conjugate transpose is also its inverse, that is, if U^* U = UU^* = UU^ = I, where is the identity matrix. In physics, especially in quantum mechanics, the conjugate transpose ...
, 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'', \lambda_i = S_/T_, are the generalized eigenvalues that solve the
generalized eigenvalue problem 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 matri ...
A \mathbf = \lambda B \mathbf (where \lambda is an unknown scalar and v is an unknown nonzero vector). *Decomposition (real version): A=QSZ^\mathsf and B=QTZ^\mathsf where ''A'', ''B'', ''Q'', ''Z'', ''S'', and ''T'' are matrices containing real numbers only. In this case ''Q'' and ''Z'' are
orthogonal matrices In linear algebra, an orthogonal matrix, or orthonormal matrix, is a real square matrix whose columns and rows are orthonormal vectors. One way to express this is Q^\mathrm Q = Q Q^\mathrm = I, where is the transpose of and is the identity ma ...
, 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: A=VDV^\mathsf, where ''D'' is a real nonnegative diagonal matrix, and ''V'' is
unitary Unitary may refer to: Mathematics * Unitary divisor * Unitary element * Unitary group * Unitary matrix * Unitary morphism * Unitary operator * Unitary transformation * Unitary representation * Unitarity (physics) * ''E''-unitary inverse semigroup ...
. V^\mathsf denotes the matrix transpose of ''V''. *Comment: The diagonal elements of ''D'' are the nonnegative square roots of the eigenvalues of AA^*=VD^2V^*. *Comment: ''V'' may be complex even if ''A'' is real. *Comment: This is not a special case of the eigendecomposition (see above), which uses V^ instead of V^\mathsf. Moreover, if ''A'' is not real, it is not Hermitian and the form using V^* also does not apply.


Singular value decomposition

*Applicable to: ''m''-by-''n'' matrix ''A''. *Decomposition: A=UDV^*, where ''D'' is a nonnegative diagonal matrix, and ''U'' and ''V'' satisfy U^*U = I, V^*V = I. Here 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 A are always uniquely determined. U and 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: A=DUSV^*E, where ''S'' is a unique nonnegative diagonal matrix of scale-invariant singular values, ''U'' and ''V'' are
unitary matrices In linear algebra, a complex square matrix is unitary if its conjugate transpose is also its inverse, that is, if U^* U = UU^* = UU^ = I, where is the identity matrix. In physics, especially in quantum mechanics, the conjugate transpose ...
, 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 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.


Other decompositions


Polar decomposition

*Applicable to: any square complex matrix ''A''. *Decomposition: A=UP (right polar decomposition) or A=P'U (left polar decomposition), where ''U'' is a unitary matrix and ''P'' and ''P are positive semidefinite Hermitian matrices. *Uniqueness: P is always unique and equal to \sqrt (which is always hermitian and positive semidefinite). If A is invertible, then U is unique. *Comment: Since any Hermitian matrix admits a spectral decomposition with a unitary matrix, P can be written as P=VDV^*. Since P is positive semidefinite, all elements in D are non-negative. Since the product of two unitary matrices is unitary, taking W=UVone can write 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''. *Decomposition: A=QS, where ''Q'' is a complex orthogonal matrix and ''S'' is complex symmetric matrix. *Uniqueness: If A^\mathsfA has no negative real eigenvalues, then the decomposition is unique. *Comment: The existence of this decomposition is equivalent to AA^\mathsf being similar to A^\mathsfA. *Comment: A variant of this decomposition is A=RC, where ''R'' is a real matrix and ''C'' is a
circular matrix Circular may refer to: * The shape of a circle * ''Circular'' (album), a 2006 album by Spanish singer Vega * Circular letter (disambiguation) ** Flyer (pamphlet), a form of advertisement * Circular reasoning, a type of logical fallacy * Circular ...
.


Mostow's decomposition

* Applicable to: square, complex, non-singular matrix ''A''. * Decomposition: A=Ue^e^, where ''U'' is unitary, ''M'' is real anti-symmetric and ''S'' is real symmetric. * Comment: The matrix ''A'' can also be decomposed as A=U_2e^e^, where ''U''2 is unitary, ''M''2 is real anti-symmetric and ''S''2 is real symmetric.


Sinkhorn normal form

*Applicable to: square real matrix ''A'' with strictly positive elements. *Decomposition: A=D_SD_, where ''S'' is doubly stochastic and ''D''1 and ''D''2 are real diagonal matrices with strictly positive elements.


Sectoral decomposition

*Applicable to: square, complex matrix ''A'' with
numerical range In the mathematical field of linear algebra and convex analysis, the numerical range or field of values of a complex n \times n matrix ''A'' is the set :W(A) = \left\ where \mathbf^* denotes the conjugate transpose of the vector \mathbf. The nume ...
contained in the sector S_\alpha = \left\. *Decomposition: A = CZC^*, where ''C'' is an invertible complex matrix and Z = \operatorname\left(e^,\ldots,e^\right) with all \left, \theta_j\ \le \alpha .


Williamson's normal form

* Applicable to: square,
positive-definite In mathematics, positive definiteness is a property of any object to which a bilinear form or a sesquilinear form may be naturally associated, which is positive-definite. See, in particular: * Positive-definite bilinear form * Positive-definite fu ...
real matrix ''A'' with order 2''n''×2''n''. * Decomposition: A=S^\mathsf\operatorname(D,D)S, where S \in \text(2n) is a
symplectic matrix In mathematics, a symplectic matrix is a 2n\times 2n matrix M with real entries that satisfies the condition where M^\text denotes the transpose of M and \Omega is a fixed 2n\times 2n nonsingular, skew-symmetric matrix. This definition can be ext ...
and ''D'' is a nonnegative ''n''-by-''n'' diagonal matrix.


Matrix square root

* Decomposition: A=BB, not unique in general. * In the case of positive semidefinite A, there is a unique positive semidefinite B such that A=B^*B=BB.


Generalizations

There exist analogues of the SVD, QR, LU and Cholesky factorizations for quasimatrices and cmatrices or continuous matrices. 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 , and . For an account, and a translation to English of the seminal papers, see .


See also

* Matrix splitting * Non-negative matrix factorization *
Principal component analysis Principal component analysis (PCA) is a popular technique for analyzing large datasets containing a high number of dimensions/features per observation, increasing the interpretability of data while preserving the maximum amount of information, and ...


References


Notes


Citations


Bibliography

* * * * * * * * * *


External links


Online Matrix CalculatorWolfram Alpha Matrix Decomposition Computation » LU and QR DecompositionSpringer Encyclopaedia of Mathematics » Matrix factorization
GraphLab Turi is a graph-based, high performance, distributed computation framework written in C++. The GraphLab project was started by Prof. Carlos Guestrin of Carnegie Mellon University in 2009. It is an open source project using an Apache License. ...
collaborative filtering library, large scale parallel implementation of matrix decomposition methods (in C++) for multicore. {{linear algebra Matrix theory factorization