1

Find all least squares solutions of A x = b, where A =

\begin{bmatrix} 1 & 3 \\[0.3em] -2 &-6 \\[0.3em] 3 & 9 \end{bmatrix}

and b = \begin{bmatrix} 1 \\[0.3em] 0 \\[0.3em] 1 \end{bmatrix}

and confirm that all the solutions have the same error vector (and hence the same least squares error). Compute the least-squares error.

The system that corresponds to the reduced row echelon form of the augmented matrix is $x_1 + 3x_2 =0, 0=1, 0=0 $ since the second equation cannot be solved the system is inconsistent

I'm not sure how to calculate the least squares solutions of A x = b because the inverse of $A^TA$ does not exist and so I can't solve the normal equations $A^TAx=A^Tb$ for x

user51462
  • 673
  • 6
  • 12
  • 31

2 Answers2

2

Even though $A^TA$ is singular, you can solve the normal equations. Note that, from a theoretical perspective, $A^Tb$ is in the column space (image) of $A^T$, and the column space of $A^TA$ is the same subspace — again, for emphasis, always.

Ted Shifrin
  • 115,160
0

You want to choose $x$ that minimizes in a least squares sense the error of $Ax = b$. So you want to minimize $(Ax-b)^\intercal(Ax - b) = x^\intercal A^\intercal Ax - x^\intercal A^\intercal b - b^\intercal A x + b^\intercal b = x^\intercal A^\intercal Ax - 2 b^\intercal A x + b^\intercal b$.

At a local minimum the partial derivatives with respect to each element of $x$ will be 0.

So we want to solve $2A^\intercal A x - 2A^\intercal b = 0$, which is equivalent to $A^\intercal A x = A^\intercal b$. Since $A^\intercal A$ is square, so we can try to invert it and solve $x = (A^\intercal A)^{-1}A^\intercal b$

That's a linear equation, so it only has one solution if it has any. So there can only be one minimum.

NovaDenizen
  • 4,216
  • 15
  • 23