I really cannot understand the proofs given to me by many different people, and I wasn't able to find a proof of this online.
Let A be a matrix consisting of n linearly independent vectors, forming a basis B of im(A). Let Q and R be the matrices of the QR factorization of A. Let U be a set consisting of the n orthogonal vectors that make up Q. Note that U is a basis of im(A). How do you prove that R is a change of coordinate matrix from the basis B to the basis U?
I use to denote by $C_{\mathscr{B}}\colon V\to\mathbb{R}^n$ the coordinate map with respect to the (ordered) basis $\mathscr{B}=\{v_1,v_2,\dots,v_n\}$: $$ C_{\mathscr{B}}(v)=\begin{bmatrix} \alpha_1 \\ \alpha_2 \\ \vdots \\ \alpha_n \end{bmatrix} \qquad\text{if and only if}\qquad v=\alpha_1v_1+\alpha_2v_2+\dots+\alpha_nv_n $$ Then, if $\mathscr{D}=\{w_1,w_2,\dots,w_n\}$ is another basis, the change of basis matrix is (given with column blocks) $$ M_{\mathscr{D}}^{\mathscr{B}}=\begin{bmatrix} C_{\mathscr{B}}(w_1) & C_{\mathscr{B}}(w_2) & \dots & C_{\mathscr{B}}(w_n)\end{bmatrix} $$ and it has the property that, for every $v\in V$, $$ C_{\mathscr{B}}(v)=M_{\mathscr{D}}^{\mathscr{B}}C_{\mathscr{D}}(v) \tag{*} $$ Note that such matrix is uniquely determined by (*) holding for every $v\in V$.
If $v$ is a vector in $\operatorname{im}(A)$, then it is uniquely written as $v=Ax$ and, by the very definition, $x=C_{\mathscr{D}}(v)$ (where $\mathscr{D}$ consists of the columns of $A$).
If $\mathscr{B}$ consists of the columns of $Q$, then from $$ v=Ax=(QR)x=Q(Rx) $$ we deduce that $Rx=C_{\mathscr{B}}(v)$. Thus the matrix $R$ satisfies the same properties as $M_{\mathscr{D}}^{\mathscr{B}}$, so it is the matrix.