Proof (uniqueness of QR factorisation)

Suppose $A$ is square and non-singular. Then $A^T A$ is symmetric positive definite, because $\v x^T A^T A \v x = \|A\v x\| > 0$ for all $\v x\neq \v 0$.

Let $A = QR$ be its QR factorisation. Then $$ \begin{align*} A^T A = R^T \underbrace{Q^T Q}_{I} R = R^TR \end{align*} $$ has a unique Cholesky factorisation $LL^T$ where the diagonal of $L$ is positive. Then $R = L^T$.