QR Decomposition

Let be a matrix then

Exists orthogonal matrix and upper triangular matrix such that

If then

Thin QR is

where

has orthonormal columns and same size as
and has the bottom rows being

Full QR is

where is square orthogonal