Mathwords logoMathwords

Matrix Decomposition — Definition, Formula & Example

Matrix decomposition is the process of rewriting a matrix as a product of two or more simpler matrices, such as triangular, orthogonal, or diagonal ones. The original matrix is hard to work with directly. The simpler pieces make solving, inverting, or analyzing it much easier.

A matrix decomposition of A∈Rm×nA \in \mathbb{R}^{m \times n} is an equation A=F1F2⋯FkA = F_1 F_2 \cdots F_k in which each factor FiF_i belongs to a prescribed structured class, for example lower or upper triangular, orthogonal, diagonal, or permutation. Each type of decomposition comes with its own existence conditions on AA, and some types are also unique under those conditions.

Key Formula

A=F1F2⋯FkA = F_1 F_2 \cdots F_k
Where:
  • AA = The matrix being decomposed (size m × n)
  • FiF_i = Structured factor matrices, such as triangular, orthogonal, or diagonal
  • kk = Number of factors, usually 2 or 3

How It Works

Each decomposition is named for the shape of its factors. LU gives triangular factors. QR gives an orthogonal factor times an upper triangular one. Eigen decomposition PDP−1PDP^{-1} needs a diagonalizable square matrix. The singular value decomposition UΣVTU\Sigma V^T exists for every real matrix, square or not. Cholesky, LLTLL^T, applies only to symmetric positive definite matrices. To compute any of them, you fix the required structure of the factors and then solve for their unknown entries.

Worked Example

Problem: The matrix A=[4225]A = \begin{bmatrix} 4 & 2 \\ 2 & 5 \end{bmatrix} is symmetric positive definite. Find its Cholesky decomposition A=LLTA = LL^T, where L=[a0bc]L = \begin{bmatrix} a & 0 \\ b & c \end{bmatrix} is lower triangular with positive diagonal entries.
Step 1: Multiply out LLTLL^T and match each entry to AA. This turns the factorization into three small equations.
LLT=[a0bc][ab0c]=[a2ababb2+c2]=[4225]LL^T = \begin{bmatrix} a & 0 \\ b & c \end{bmatrix}\begin{bmatrix} a & b \\ 0 & c \end{bmatrix} = \begin{bmatrix} a^2 & ab \\ ab & b^2 + c^2 \end{bmatrix} = \begin{bmatrix} 4 & 2 \\ 2 & 5 \end{bmatrix}
Step 2: Solve the equations in order. Each one uses the value found just before it.
a=4=2,b=2a=1,c=5−b2=4=2a = \sqrt{4} = 2, \qquad b = \frac{2}{a} = 1, \qquad c = \sqrt{5 - b^2} = \sqrt{4} = 2
Step 3: Verify by multiplying the factors back together.
[2012][2102]=[4225]=A\begin{bmatrix} 2 & 0 \\ 1 & 2 \end{bmatrix}\begin{bmatrix} 2 & 1 \\ 0 & 2 \end{bmatrix} = \begin{bmatrix} 4 & 2 \\ 2 & 5 \end{bmatrix} = A
Answer: L=[2012]L = \begin{bmatrix} 2 & 0 \\ 1 & 2 \end{bmatrix}, so A=LLTA = LL^T with LT=[2102]L^T = \begin{bmatrix} 2 & 1 \\ 0 & 2 \end{bmatrix}.

Why It Matters

In a numerical linear algebra course you learn that you almost never compute A−1A^{-1} directly. Instead, you decompose AA once and reuse the factors to solve Ax=bA\mathbf{x} = \mathbf{b} for many different right-hand sides. Engineering simulations rely on this, and so does the SVD used in image compression and in recommender systems that predict movie ratings.

Common Mistakes

Mistake: Multiplying the factors in the wrong order, for example computing LTLL^TL instead of LLTLL^T.
Correction: Matrix multiplication is not commutative. In the example above, LTL=[5224]L^TL = \begin{bmatrix} 5 & 2 \\ 2 & 4 \end{bmatrix}, which is not AA. Always multiply the factors in the exact order the decomposition specifies.

Related Terms