Exercise · ZW-LINEAR-LEAST-SQUARES-010 · ★★★ Advanced

Let \(A=\begin{pmatrix}1&1\\1&2\\1&3\end{pmatrix}\) and \(b=(1,2,2)^\top\). Compute the least squares solution \(x^*\) and the residual \(\|Ax^*-b\|_2^2\).

Choose one option.

Show answer
  • B. \(x^*=(\tfrac{2}{3},\tfrac{1}{2})^\top\), residual \(\tfrac{1}{6}\)

Explanation

The normal equations give \(x^*=(\tfrac{2}{3},\tfrac{1}{2})^\top\), and the residual \(Ax^*-b=(\tfrac{1}{6},-\tfrac{1}{3},\tfrac{1}{6})^\top\) has squared norm \(\tfrac{1}{6}\). The option with residual \(\tfrac{1}{3}\) uses the same \(x^*\) but adds the squared components incorrectly.

Study Continuous optimization in ZWMath →

Review the concept: Linear least squares

Optimization problem that minimizes the sum of squared residuals \(\|Ax-b\|_2^2\) to approximate a vector \(b\) by linear combinations of the columns of \(A\).

\[\min_{x}\ \|Ax-b\|_2^2 \quad \Rightarrow \quad A^\top A\,x = A^\top b\]

More practice problems: linear least squares

← ZW-LINEAR-LEAST-SQUARES-009