= Solution
A real square <QR factorization> is $A=QR$ with $Q^\mathsf TQ=I$ and $R$ upper triangular. For an <invertible matrix> it can be made unique by requiring positive diagonal entries of $R$.
If $A$ is <orthogonal>, then $R=Q^\mathsf TA$ is <orthogonal> as well. An <orthogonal> <upper triangular matrix> is diagonal with entries $\pm1$: its first column has just its first entry, which must have modulus one, and <orthogonality> then zeros the rest of the first row; repeat inductively on the lower block. Thus
$$
\boxed{R=\operatorname{diag}(\pm1,\ldots,\pm1),}
$$
and under the positive-diagonal convention $\boxed{R=I}$, $Q=A$.
Back to article page