Skip to content

Matrix Factorization

There are four very popular factorizations for matrices. In the literature, the word decomposition is often used instead of factorization. Note that we denote special types of matrices with special characters. This convention is as follows:

  • S\Sv denotes a symmetric matrix.
  • Q\Qv denotes an orthogonal or orthonormal matrix.
  • Λ\Lambdav denotes the diagonal matrix with eigenvalues of the matrix being factored.
  • R\Rv denotes a matrix that is closely related to the rank of the matrix being factored.

This is the lower-upper (LU) decomposition applicable to square matrices AA, and the factorization can be viewed as the matrix form of Gaussian elimination. We write

A=LU,\Av = \Lv\Uv,

where L\Lv and U\Uv are lower and upper triangular matrices.

If A\Av is symmetric and positive definite, then we can find U=LT\Uv=\Lv^{\rm T} and have

A=LLT.\Av=\Lv\Lv^{\rm T}.

This decomposition is used in algorithms to

  • solve a square system of linear equations,
  • compute the inverse of a matrix, and
  • compute the determinant of a matrix.

Here we factor an m×nm\times n matrix AA into an m×mm\times m orthogonal matrix QQ and an m×nm\times n triangular matrix RR. A popular method to compute this factorization is the Gram-Schmidt process. If AA is square then QQ is unique. We write

A=QR,\Av = \Qv\Rv,

where Q\Qv is orthogonal and R\Rv is upper-triangular.

The QR decomposition makes it easy to solve a system of equations Ax=b\Av\xv = \bv without inverting the matrix A\Av. Since Q\Qv is orthogonal, we have QTQ=I\Qv^{\rm T} \Qv = \Iv, so Ax=b\Av\xv=\bv is equivalent to Rx=QTb\Rv\xv = \Qv^{\rm T} \bv, which is easier to solve since R\Rv is triangular.

Also called eigendecomposition, this is a factorization of a square matrix into eigenvalues and eigenvectors, A=VDV1\Av=\Vv\Dv\Vv^{-1}, where D\Dv is a diagonal matrix with the eigenvalues of A\Av and the columns of V\Vv are the corresponding eigenvectors.

Although this factorization is possible for any square matrix with linearly independent eigenvectors, it is usually used for symmetric matrices S\Sv. Since the eigenvectors can be made orthonormal for a symmetric matrix, the factorization is written as:

S=QΛQT,\Sv=\Qv\Lambdav \Qv^{\rm T},

where Q\Qv is an orthogonal matrix and Λ\Lambdav is a diagonal matrix with the eigenvalues of S\Sv on the diagonal.

So, Q=[q1 q2  qn]\Qv = [\qv_1\ \qv_2\ \cdots\ \qv_n] with qi\qv_i being the column normalized eigenvectors of S\Sv, and

Λ=(λ100λn),\Lambdav = \begin{pmatrix} \lambda_1 & \dots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \dots & \lambda_n \end{pmatrix},

with λi\lambda_i being the eigenvalues of S\Sv.

Now consider S=(QΛ)QT\Sv = (\Qv\Lambdav)\Qv^{\rm T}, and view it as

S=i(column i of QΛ)×(row i of QT),\Sv = \sum_i ({\rm column\ } i {\rm\ of\ } \Qv\Lambdav) \times ({\rm row\ } i {\rm\ of\ } \Qv^{\rm T}),

which is a sum of a bunch of rank-11 matrices. The ithi^{\rm th} column of QΛ\Qv\Lambdav is λiqi\lambda_i\qv_i and the ithi^{\rm th} row of QT\Qv^{\rm T} is qiT.\qv_i^{\rm T}. Hence, we can rewrite the above sum as

S=iλiqiqiT.\Sv = \sum_i \lambda_i\qv_i\qv_i^{\rm T}.

From this expression, it is easy to see that Sqi=λiqi\Sv \qv_i = \lambda_i\qv_i, and thus (λi,qi)(\lambda_i, \qv_i) are the eigenvalue - eigenvector pairs, since the vectors qi\qv_i are orthonormal.

We have a separate dedicated section about SVD, but in essence we can factorize any matrix as

A=UΣVT,\Av = \Uv\Sigmav \Vv^{\rm T},

where U\Uv and V\Vv are orthogonal matrices and Σ\Sigmav is a non-negative diagonal matrix. The values on the diagonal of Σ\Sigmav are called singular values. Like the spectral decomposition above, the idea of an SVD is to find basis directions along which matrix multiplication is equivalent to scalar multiplication, but this is in general for any matrix instead of a square matrix.