Every nonsingular real square matrix has a QR decomposition with orthogonal $Q$ and invertible upper triangular $R$. Gram–Schmidt proves existence by orthonormalizing its independent columns; Householder reflections are usually more stable computationally. Requiring positive diagonal entries of $R$ makes this real factorization unique.