← All notes

linear least squares residual projection

This note is adopted from a lecture I developed for EN.530.484 at JHU

Consider the (convex) problem:

θ∗=12arg⁡min⁡θ∥Φθ−y∥2.\theta^* = \frac{1}{2} \arg\min_\theta \|\Phi \theta - y\|^2.

where θ∈Rn\theta \in \mathbb{R}^n, y∈Rmy \in \mathbb{R}^m. Interestingly, this problem is directly solvable through a geometric insight, and without any of the usual first-order necessary optimality conditions.

Consider the residual vector rr

Φθ+r=y\Phi \theta + r = y

We simply need to find θ\theta such that the residual lies completely orthogonal to the image of Φ\Phi, since this is the best we can hope to do in terms of minimizing the error.

So we set ΦTr=0\Phi^T r = 0.

ΦTr=ΦT(y−Φθ)=0⇒θ=(ΦTΦ)−1Φy\Phi^T r = \Phi^T (y - \Phi \theta) = 0 \\ \Rightarrow \theta = (\Phi^T \Phi)^{-1} \Phi y

which is the standard left psuedo-inverse, but without any calculus! Kind of cool.

← All notes