I'm trying to find a value that, when multiplied by matrix A produces matrix B, or $Ax=B$. I tried using substitution for $-0.5649 x1 + 1.0228 x2 = y$ and $-0.32 x1 + 0.58 x2 = y$, but when I checked it against the solution in R, they were completely different. The correct answer is $0.5669308$, using QR factorization. I'm not sure how to do this by hand if not by regular substitution. How would you solve this system of equations? Thank you!
\begin{equation} A= \begin{bmatrix} -0.5649\\ 1.0228 \end{bmatrix} \label{eq:aeqn} \end{equation}
\begin{equation} B= \begin{bmatrix} -0.32 \\ 0.58 \end{bmatrix} \label{eq:beqn} \end{equation}
To solve the least square system, you just have to solve $$A^TAx=A^TB$$
$$x=\frac{A^TB}{A^TA}$$