Let $A\in \mathbb{R}^{n\times n}$ be an invertible real matrix. Then we know that there are unique matrices $Q,R \in \mathbb{R}^{n\times n}$ such that $A=QR$ where $Q$ is an orthogonal matrix and $R$ is an upper triangular matrix.
Say $A=[A_1|…|A_n]$. We apply Gram-Schmidt process to columns of $A$ and then normalize the vectors to get orthonormal vectors $E_1,…,E_n$. Then we set $Q=[E_1|…|E_n]$ To find the matrix $R$, there is a simple way: $A=QR\rightarrow Q^TA=Q^TQR=R$. Then
$R=Q^TA= \begin{bmatrix} A_1\cdot E1 & A_2\cdot E_1 & … & A_n\cdot E_1 \\ A_1\cdot E2 & A_2\cdot E_2 &…& A_n\cdot E_2 \\ .& & &\\ .& & & \\ .\\ A_1\cdot En & A_2\cdot E_n &…& A_n\cdot E_n \\ \end{bmatrix}$
By the theorem, $R$ must be an upper triangular matrix. However, I couldn’t see why should this be the case. Why $A_i\cdot E_j=0$ whenever $i<j$? Additionally, why $A_i\cdot E_i>0$ for all $i\leq n$?
An even easier way to get the $R$ matrix in the decomposition, is to note the coefficients you get during the Gram Schmidt-Process and the normalization. As you compare the columns of $A$ only to the already established columnns of $Q$, you only find projections into these directions (and hence only entries above the diagonal). The diagonal is filled with the lengths of the vector, you are to normalize.