QR Decomposition

The QR decomposition of a general matrix is its factorization into the product of a matrix with orthonormal columns , and an upper triangular matrix , for which

where , and

Intuition

We can interpret the QR decomposition of as a change of basis, where an upper-triangular matrix can be transformed into any matrix using an orthonormal basis. More particularly,

  • is originally expressed in some arbitrary coordinate system (its column vectors may not be orthogonal).
  • In QR decomposition, we convert the basis of  into an orthonormal basis to make computations easier:
    • contains the orthonormal basis, computed using Gram-Schmidt.
    • describes how the original coordinates of  are represented in this new basis.
      Then,

For example, we can perform a real change of basis on to find , such that

Properties

(Full Rank Matrix) If has full rank,

Examples

Least Squares Using QR