The process of decomposing a matrix into where
- is orthonormal (via Gram–Schmidt)
- is upper triangular
Used for solving linear least squares problem and iterative eigenvalue algorithms.
For Square Matrix
If is a square matrix, both and are square matrices of size .
If is complex, is a unitary matrix.
If has linearly independent columns, then first columns of form an orthonormal basis for the column space of .
For Rectangular Matrix
If is a rectangular matrix (with ), as the product of unitary matrix and upper triangular matrix where as the bottom rows to be fully zeros.
Calculation
- Apply Gram-Schmidit Orthogonalization to the columns of
- The orthonormal set of matrices are the columns of
- (if is real) or (if is complex)
Application
Linear Least Solution
For . If the equation can be converted into which is easy to solve.
QR Algorithm
Suppose is a square matrix. And be the QR decomposition of . Define to recursively get and its QR decomposition.
By the above relationship, and induction, all have the eigenvalue. Under suitable conditions approaches a upper triangular matrix, which makes it easy to find the eigenvalues of .