Exercise · ZW-LINEAR-LEAST-SQUARES-001 · ★☆☆ Basic

What is the gradient of \(f(x)=\|Ax-b\|_2^2\) with respect to \(x\)?

Choose one option.

Show answer
  • C. \(2A^\top(Ax-b)\)

Explanation

The gradient of the squared norm is \(2A^\top(Ax-b)\), with the transpose of \(A\) multiplying the residual. The option using \(A\) without transposing is dimensionally incompatible when \(A\) is not square.

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-002 →