<s>[INST] QR decompostion - how to finish decomposition? I try to find $QR$ decomposition, but I got stuck in some etap and I can't continue - how to finish it ?
$$ A= \left[\begin{matrix}
1 & -1 \\
1 & 0  \\
1 & 1  \\
1 & 2
\end{matrix}\right] $$
$v =  \left[\begin{matrix}
1+2  \\
1 \\
1 \\
1
\end{matrix}\right] \cdot \frac{1}{\sqrt{9+1+1+1}} = \frac{1}{2\sqrt{3}}\cdot   \left[\begin{matrix}
1+2  \\
1 \\
1 \\
1
\end{matrix}\right] $
$$Q_1 = I - 2vv^t = I - \frac16  A= \left[\begin{matrix}
9 & 3 & 3 &3 \\
3 & 1 & 1 &1 \\
3 & 1 & 1 &1 \\
3 & 1 & 1 &1 \\
\end{matrix}\right]  = \left[\begin{matrix}
-\frac{1}{2} & -\frac{1}{2} & -\frac{1}{2} &-\frac{1}{2} \\
-\frac{1}{2} & \frac{5}{6} & -\frac{1}{6} &-\frac{1}{6} \\
-\frac{1}{2} &- \frac{1}{6} & \frac{5}{6} &-\frac{1}{6} \\
-\frac{1}{2} &- \frac{1}{6} & -\frac{1}{6} &\frac{5}{6} \\
\end{matrix}\right] $$
$$Q_1A =\left[\begin{matrix}
-2 & -1  \\
0 & 0 \\
0  &1 \\
0 &2 \\
\end{matrix}\right] $$
 [/INST] Let me try again: using my $v_2$ from the answer compute the second Householder matrix. This matrix is $Q_2$.
You have already computed $Q_1$ in your question-post.
Then define a matrix $Q^T$ as the product of both in this very order:
$Q^T =Q_2Q_1$
Then you have that $Q^T$ is an orthogonal matrix and therefore $Q^TQ=I$ is the unit matrix.
You have by the computation the equation
$Q_2Q_1A=R$
This is nothing else (using the definition of $Q^T$ on the Left hand side and the orthogonality of Q on the Right hand side):
$Q^TA = Q^TQR$
And now you multiply both sides with Q to get
$\underbrace{QQ^T}_{=I}A = \underbrace{QQ^T}_{=I}QR$
So
$ A = QR$
</s>