MML Discourse archived in May, 2026

Matrix least square

mark

Use the normal equations to solve the system

\begin{bmatrix}1&1\\1&2\\1&3\end{bmatrix} \begin{bmatrix}x\\y\end{bmatrix} \approx \begin{bmatrix} -2\\11\\0\end{bmatrix}

in the least square sense.

Write down a geometric interpretation of your solution in terms of orthogonal projection.


Let's say that a problem like this is on next week's exam with probability 99.\overline{9}\%. Thus, I'll flip a coin and if it comes up heads or tails, then I'll put this kind of problem on.

User 009
A= \begin{bmatrix} 1 , 1 \\ 1, 2 \\ 1, 3 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} b= \begin{bmatrix} -2 \\ 11 \\ 0 \\ \end{bmatrix}
A^{T}A = \begin{pmatrix} 1, 1, 1 \\ 1, 2, 3 \end{pmatrix} \begin{pmatrix} 1, 1 \\ 1, 2 \\ 1, 3 \end{pmatrix} = \begin{pmatrix} 1^{2}+1^{2}+1^{2} & 1^{2}+1*2+1*3 \\ 1^{2}+2*1+3*1 & 1^{2}+2^{2}+3^{2} \end{pmatrix} = \begin{pmatrix} 3, 6 \\ 6, 14 \end{pmatrix}
A^{T}b = \begin{pmatrix} 1, 1, 1 \\ 1, 2, 3 \end{pmatrix} \begin{pmatrix} -2 \\ 11 \\ 0 \end{pmatrix} = \begin{pmatrix} (1*-2)+1*11+1*0 \\ (1*-2)+2*11+3*0 \end{pmatrix} = \begin{pmatrix} 9 \\ 20 \end{pmatrix}
\begin{pmatrix} 3, 6 \\ 6, 14 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} \begin{pmatrix} 9 \\ 20 \end{pmatrix} = \begin{matrix} 3x+6y=9 \\ 6x+14y=20 \end{matrix}
3x+6y=98 \\ 3x=-6y+9 \\ x=-2y+3
6(-2y+3)+14y=20 \\ -12y+18+14y=20 \\ 2y+18=20 \\ 2y=2 \\ y=1 \\ \\ x=-2(1)+3 \\ x=-2+3 \\ x=1
LSS = \begin{pmatrix} 1 \\ 1 \end{pmatrix}
mark

@User 025 Well, the write up is (understandably) a little rough, just because of the technicalities of typing up mathematics with matrices. It does look like you've got the basic ideas correct, though, and the answer of

\begin{bmatrix}x\\y\end{bmatrix} = \begin{bmatrix}1\\1\end{bmatrix}

is correct!