Where Qis an orthogonal matrix and Ris an upper trianguler matrix.
Used to solve linear least square problems.
Orthogonal Matrices
Remember that the orthogonal matrix preserves lengths and angles in linear space. This means that multiplying a vector by an orthogonal matrix will preserve lengths and angles between vectors.
Upper Triangular Matrices
What does the upper triangular matrix mean? So let's say if we have an upper triangular matrix R.
XR=Y
Y columns are linear combinations of columns of Xin proportion decided by values in matrix R. Since R is an upper triangular matrix, it means that any column of Yis linear combination of only columns on or before that column in Xi.e column i of Yis combinations of columns 1:i of X.
The first k columns of Q form an orthonormal basis for the span of the first k columns of A for any 1 ≤ k ≤ n. The fact that any column k of A only depends on the first k columns of Q is responsible for the triangular form of R.
Derivation of QR factorization
The process described in the pictures above is called Gram-Schimdt Orthogonalizatoin procedure.
So basically QR decomposition captures the gram-schimdt orthogonailzation. it decomposed the matrix Aas to how to get multiply an orthogonal matrix Qby an upper triangular matrix R.
Solving Linear Square Solution with QR factorization
Relationship between QR and Cholesky Decomposition
The QR decomposition of tall matrix A of full rank is closely related to the problem of computing a Cholesky factorization of the nonsingular matrix ATA. Specifically, if A=QR, then ATA=RTQTQR=LLT where the lower triangular matrix L=RT can now be identified as the Cholesky factor of ATA.