Given the matrix $$A=\begin{pmatrix} \sqrt{\frac{1}{2}}&\frac{1}{\sqrt{2}}&\frac{1}{2}\\\sqrt{\frac{1}{2}}&\frac{-1}{\sqrt{2}}&\frac{1}{2}\\0&0&\sqrt{\frac{1}{2}}\end{pmatrix}$$
If we are told that $A=QR$ is a QR factorization of $A$, what is the relationship between $A^TA$ and $R^TR$?
I'm a bit confused because typically, for QR-factorization, the equation $M=QR$ is used when $M$ is a span of linearly independent vectors, not necessarily an orthogonal matrix. How does this affect Gram-Schmidt and the transpose function?
$$A^TA=(R^TQ^T)(QR)$$ But $Q$ is an orthogonal matrix, so $Q^T=Q^{-1}$ and $Q^TQ=I$. Thus, $$A^TA=R^TIR=R^TR$$