For $QR$ decomposition, does R always have to be upper triangular matrix?

499 Views Asked by At

$\begin{bmatrix} 1 &1 &2 \\ 0&0 &1 \\ 1 &0 &0 \end{bmatrix}$

I have that matrix, and I want to find $QR$ decomposition. So that I choose second column

$q_{2}=\begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}$

as my first orthonormal vector, and it is natural to find the other ones

$q_{1}=\begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}$ $q_{3}=\begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix}$

such that $Q= \begin{bmatrix} 0&1 &0 \\ 0&0 &1 \\ 1 &0 &0 \end{bmatrix} \to Q^{T}= \begin{bmatrix} 0&0 &1 \\ 1&0 &0 \\ 0 &1 &0 \end{bmatrix} $

thus, $Q^{T}A=R= \begin{bmatrix} 1 &0 &0 \\ 1&1 &2 \\ 0 &0 &1 \end{bmatrix} $

and if I did not make any mistake R is not upper triangular. Is this possible ?