What’s that?

Let VV be a subspace of Rd\R^d. Then any vector wRdw \in \R^d can be uniquely decomposed as:

w=w+ww = w_{||} + w_{\perp}

where

  • wVw_{||} \in V
  • wVw_{\perp} \in V^\perp
  • V={vRd:vu=0u,  uV}V^{\perp} = \{v \in \R^d : v^\intercal u = 0 \quad \forall u,\; u \in V\}

Proof

clipboard.png

  • Let V=span{x(i),,x(N)}V = span\{x^{(i)}, \dots, x^{(N)}\}

1. Define ww_{||} as an orthogonal projection

w=projV(w)w_{||} = proj_V(w)
  • projV(w)proj_V(w) is a unique vector that is closest to ww (minvVwv)(\min_{v \in V} ||w-v||)

2. Define ww_\perp

w=www_\perp = w - w_{||}

3. Show wVw_\perp \perp V

By the properties of orthogonal projection, ww_\perp is orthogonal to every vector in VV.

wx(j)=(ww)x(j)=0w_\perp^\intercal x^{(j)} = (w - w_{||})^\intercal x^{(j)} = 0

Express ww_{||} in terms of basis vector

Since wV=span{x(1),,x(N)}w_{||} \in V = span\{x^{(1)}, \dots, x^{(N)}\}, by definition of span:

w=j=1Nα(j)x(j)w_{||} = \sum^N_{j = 1} \alpha^{(j)}x^{(j)}

for some coefficient α(1),α(N)R\alpha^{(1)}, \dots \alpha^{(N)} \in \R