Theorem (existence and uniqueness of QR factorisation)

Any matrix $A$ has a QR factorisation.

If $A$ is square and non-singular, then $A$ admits a unique factorisation $A = QR$ with $R$ having a positive diagonal.

Proof of existence: see Gram-Schmidt, Givens rotations, or Householder reflections.

Proof of uniqueness