Q is orthonormal
R is upper triangular
QR decomposition is numerically very stable at it takes \(O(ND^2)\)