I need to solve $Ax=b$ in lots of ways using QR decomposition.
$$A = \begin{bmatrix} 1 & 1 \\ -1 & 1 \\ 1 & 2 \end{bmatrix}, b = \begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix}$$
This is an overdetermined system. That is, it has more equations than needed for a unique solution.
I need to find $\min ||Ax-b||$. How should I solve it using QR?
I know that QR can be used to reduce the problem to $$\Vert Ax - b \Vert = \Vert QRx - b \Vert = \Vert Rx - Q^{-1}b \Vert.$$
but what do I do after this?