A least squares problem

Use the normal equations to find the least squares solution to the system
$$
\begin{align}
x+2 y&=8 \\
3 x-y&=-2 \\
2 y-x&=-6
\end{align}.
$$

Comments

  • edited February 2020

    This system of equations corresponds to the matrix $A= \left[ \begin{array}{cc} 1 & 2 \\3 & -1 \\-1 & 2\end{array} \right] $ and the vector $b=\left[ \begin{array}{c} 8\\-2\\-6\end{array} \right] $. Now the first step to solve the least squares solution of $Ax=b$ is to multiply both sides of the equation by $A^T$. Solving for the right side of$\ \left[ \begin{array}{ccc} 1 & 3 & -1\\2 & -1 & 2\end{array} \right] \left[ \begin{array}{cc} 1 & 2 \\3 & -1 \\-1 & 2\end{array} \right] \hat{x}$ results in the 2x2 symmetric matrix $\left[ \begin{array}{cc} 11 & -3 \\-3 & 9 \end{array}
    \right] \hat{x}$.Next solving the right side $\left[ \begin{array}{ccc} 1 & 3 & -1\\2 & -1 & 2
    \end{array} \right] \left[ \begin{array}{c} 8\\-2\\-6\end{array} \right]$ results in the 2x1 vector $\left[ \begin{array}{c} 8\\6\end{array} \right].$ Augmenting the matrix and vector gives the solvable system$$\left[ \begin{array}{cc|c} 11 & -3 & 8 \\-3 & 9 & 6 \end{array} \right] $$
    The row operation $\frac{3}{11}R_1 + R_3$ gives $$\left[ \begin{array}{cc|c} 11 & -3 & 8 \\0 & 90/11 & 90/11 \end{array} \right] $$ Clearly $y=1$ so all that's left is substituting 1 in the first equation, and solving $11x -3 = 8$ also results in $x=1$.

    mark
Sign In or Register to comment.