A reduced QR decomposition of an matrix over the real numbers with full column rank, , writes , where is with orthonormal columns and is a upper triangular matrix with positive diagonal. Applying the Gram-Schmidt process to the columns of constructs and records the coefficientsThis last column identity is exactly the matrix multiplication . The upper triangular matrix records that the th input uses only the first new directions, while its positive diagonal records the norms of the nonzero orthogonal projection residuals. Since , one also has ; denotes the transpose and the identity matrix. Over the complex numbers, use the conjugate transpose in these identities.
For the three-dimensional Gram-Schmidt process example, the exact matrices areFor example, the last column reconstructs asThe diagonal entries are approximately . Each is a norm of the new direction before it was scaled to length one.
The computed QR factorization: input matrix , orthonormal columns of , and the upper triangular matrix of orthogonal projection coefficients
. Details. For a linear least-squares problem, the orthogonal projection of onto the column space of is . Hence the minimizing coefficients solve the linear system by back substitution. Let consist of the first two columns of the example; its reduced factors are and the leading block of . For , the linear system isThus , agreeing with the orthogonal projection computed above, and the minimum Euclidean norm of is . The QR decomposition separates building an orthonormal basis from recovering coefficients in the original basis.[ref]
https://ocw.mit.edu/courses/18-065-matrix-methods-in-data-analysis-signal-processing-and-machine-learning-spring-2018/resources/lecture-9-four-ways-to-solve-least-squares-problems/. Strang, MIT 18.065, Lecture 9: Four Ways to Solve Least Squares Problems
Let with and square invertible upper triangular . The normal equations for linear least squares reduce from to the system in the title. It is solved by back substitution. The geometric identity proves existence and uniqueness of the minimizer. For tall , is an orthogonal projection, not the identity on the entire observation space.
Let be block diagonal with blocks . If a real invertible matrix commutes with , its QR decomposition , with orthogonal and upper triangular with positive diagonal, has both and . Indeed , so is orthogonal and upper triangular in blocks. Orthogonality forces its off-diagonal blocks to vanish. Its diagonal blocks are . For with , this block is . Orthogonality of its columns forces , and hence each block is the identity. Thus , proving the claim.
If a real -by- matrix has full column rank, with , then is positive-definite. Its upper-triangular Cholesky decomposition , with positive diagonal, is unique. Defining gives and . Any other such factorization yields another Cholesky factor of , so its and then its must agree. This proves existence and uniqueness; it does not assert that forming is the most numerically stable algorithm.
For a full-column-rank matrix , extend the thin QR decomposition to an orthogonal matrix . Thenso maps the column space of onto the first coordinate directions. Successive Householder transformations construct the same reduction without first forming a full orthogonal basis.
A linear least-squares problem minimizes over . If has full column rank, orthogonality reduces it to the upper-triangular system formed from the leading block of and the leading entries of .
Articles by others on the same topic
QR decomposition is a method in linear algebra for decomposing a matrix into the product of two matrices: an orthogonal matrix \( Q \) and an upper triangular matrix \( R \).
