Salta al contenuto
Note per Studenti Orthogonal Projection and the Projection Theorem Report

Orthogonal Projection and the Projection Theorem

In questa pagina 4

This note is the second part of the geometry review used later to build the Fourier series: a vector space VV with a scalar product ⟨⋅,⋅⟩\langle\cdot,\cdot\rangle (linear in the first argument, conjugate-symmetric), the induced norm ∥v∥=⟨v,v⟩\|v\|=\sqrt{\langle v,v\rangle}, and orthogonality v⊥w  ⟺  ⟨v,w⟩=0v\perp w\iff\langle v,w\rangle=0.

Definition: orthogonal projection onto a subspace

Let VV be a vector space with scalar product and let WW be a subspace of VV. Given v∈Vv\in V, the orthogonal projection of vv onto WW is a vector, denoted PvWP^W_v, such that

  1. PvW∈WP^W_v\in W;
  2. v−PvW⊥wv-P^W_v\perp w for all w∈Ww\in W, i.e. ⟨v−PvW,w⟩=0\langle v-P^W_v,w\rangle=0 for all w∈Ww\in W.
            v
           /|
          / |  v - P
         /  |
  ------P---+----------  W           (P = P^W_v is the foot of the perpendicular from v to W)

Recall the lemma: if PvWP^W_v exists, then it is unique.

Lemma (unique representation of vectors given an orthogonal basis)

Let VV be a vector space with scalar product and W⊂VW\subset V the subspace W=span{w1,w2,…,wN},W=\mathrm{span}\{w_1,w_2,\dots,w_N\}, where the generators are orthogonal: ⟨wk,wh⟩=ck δk,h\langle w_k,w_h\rangle=c_k\,\delta_{k,h}, with δk,h=1\delta_{k,h}=1 if k=hk=h and 00 otherwise (δk,h\delta_{k,h} is the Kronecker delta). Then:

(a) each w∈Ww\in W has a unique representation w=∑k=1Nαkwk,αk=⟨w,wk⟩⟨wk,wk⟩,w=\sum_{k=1}^{N}\alpha_kw_k,\qquad \alpha_k=\frac{\langle w,w_k\rangle}{\langle w_k,w_k\rangle}, and moreover ∥w∥2=∑k=1Nck∣αk∣2\|w\|^2=\sum_{k=1}^{N}c_k|\alpha_k|^2.

(b) given v∈Vv\in V, v∉Wv\notin W, PvW=∑k=1Nakwk,ak=⟨v,wk⟩⟨wk,wk⟩.P^W_v=\sum_{k=1}^{N}a_kw_k,\qquad a_k=\frac{\langle v,w_k\rangle}{\langle w_k,w_k\rangle}.

Proof of (a). If w∈Ww\in W then w=∑kαkwkw=\sum_k\alpha_kw_k for some NN-tuple of coefficients. Since the wkw_k are orthogonal, they form a basis of WW, so the αk\alpha_k are uniquely determined. Taking the scalar product of both sides with wkw_k: ⟨w,wk⟩=⟨∑h=1Nαhwh,wk⟩=⟨wk,wk⟩ αk,\langle w,w_k\rangle=\Big\langle\sum_{h=1}^{N}\alpha_hw_h,w_k\Big\rangle=\langle w_k,w_k\rangle\,\alpha_k, because all the terms with h≠kh\ne k vanish; this gives αk=⟨w,wk⟩/⟨wk,wk⟩\alpha_k=\langle w,w_k\rangle/\langle w_k,w_k\rangle. Finally ∥w∥2=⟨w,w⟩=⟨∑kαkwk,∑hαhwh⟩=∑k=1N∑h=1Nαkαh‾⟨wk,wh⟩=∑k=1Nck∣αk∣2.\|w\|^2=\langle w,w\rangle=\Big\langle\sum_k\alpha_kw_k,\sum_h\alpha_hw_h\Big\rangle=\sum_{k=1}^{N}\sum_{h=1}^{N}\alpha_k\overline{\alpha_h}\langle w_k,w_h\rangle=\sum_{k=1}^{N}c_k|\alpha_k|^2 .

Proof of (b). It is enough to verify properties (1) and (2) of the definition of projection. Property (1) is trivial: PvW=∑k⟨v,wk⟩⟨wk,wk⟩wkP^W_v=\sum_k\frac{\langle v,w_k\rangle}{\langle w_k,w_k\rangle}w_k is a linear combination of the generators of WW. For (2) it is enough to show v−PvW⊥wkv-P^W_v\perp w_k for each generator, i.e. ⟨v−PvW,wk⟩=0\langle v-P^W_v,w_k\rangle=0 for k=1,…,Nk=1,\dots,N. Substituting, ⟨v−PvW,wk⟩=⟨v,wk⟩−∑h=1N⟨⟨v,wh⟩⟨wh,wh⟩wh, wk⟩.\langle v-P^W_v,w_k\rangle=\langle v,w_k\rangle-\sum_{h=1}^{N}\Big\langle\frac{\langle v,w_h\rangle}{\langle w_h,w_h\rangle}w_h,\,w_k\Big\rangle . Only the term h=kh=k survives in the sum, so it equals ⟨⟨v,wk⟩⟨wk,wk⟩wk,wk⟩=⟨v,wk⟩⟨wk,wk⟩⟨wk,wk⟩=⟨v,wk⟩.\Big\langle\frac{\langle v,w_k\rangle}{\langle w_k,w_k\rangle}w_k,w_k\Big\rangle=\frac{\langle v,w_k\rangle}{\langle w_k,w_k\rangle}\langle w_k,w_k\rangle=\langle v,w_k\rangle . Hence ⟨v−PvW,wk⟩=0\langle v-P^W_v,w_k\rangle=0. ■\blacksquare

(This lemma is the one the Fourier-series construction comes back to: the coefficients aka_k will be the Fourier coefficients. See Continuous-Time Fourier SeriesA periodic continuous-time signal is written as a combination of harmonics e^{jn w0 t} whose coefficients a_n are projections of the signal onto each harmonic; coefficients have symmetries that mirror those of the signal.Continuous-Time Fourier Series →.)

Theorem (projection theorem)

Let PvWP^W_v be the projection of vv onto WW. Then ∥v−PvW∥≤∥v−w∥for all w∈W,\|v-P^W_v\|\le\|v-w\|\qquad\text{for all }w\in W, i.e. the projection is the point of WW closest to vv. More precisely, min⁡w∈W∥v−w∥2=∥v−PvW∥2=∥v∥2−∥PvW∥2.\min_{w\in W}\|v-w\|^2=\|v-P^W_v\|^2=\|v\|^2-\|P^W_v\|^2 .

Proof. Add and subtract PvWP^W_v (0=PvW−PvW0=P^W_v-P^W_v): min⁡w∈W∥v−w∥2=min⁡w∈W⟨(v−PvW)+(PvW−w), (v−PvW)+(PvW−w)⟩.\min_{w\in W}\|v-w\|^2=\min_{w\in W}\Big\langle (v-P^W_v)+(P^W_v-w),\ (v-P^W_v)+(P^W_v-w)\Big\rangle . Since PvW−w∈WP^W_v-w\in W and v−PvW⊥w′v-P^W_v\perp w' for all w′∈Ww'\in W, the cross terms vanish and =min⁡w∈W[∥v−PvW∥2+∥PvW−w∥2].=\min_{w\in W}\Big[\|v-P^W_v\|^2+\|P^W_v-w\|^2\Big]. The optimal (unique) solution is w∗=PvWw^*=P^W_v, giving ∥v−PvW∥2\|v-P^W_v\|^2. Finally, by the Pythagorean theorem and property (2) (since v=(v−PvW)+PvWv=(v-P^W_v)+P^W_v with orthogonal summands), ∥v−PvW∥2=∥v∥2−∥PvW∥2\|v-P^W_v\|^2=\|v\|^2-\|P^W_v\|^2. ■\blacksquare

Exercise: distance from a point to a line through the origin

Prove, using projections, the distance formula dist(Q,W)=∣ax0+by0∣a2+b2,Q=(x0,y0),W: ax+by=0,\mathrm{dist}(Q,W)=\frac{|ax_0+by_0|}{\sqrt{a^2+b^2}},\qquad Q=(x_0,y_0),\quad W:\ ax+by=0, taking for granted that dist(Q,W)=∥u∥\mathrm{dist}(Q,W)=\|u\|, where u=v−PvWu=v-P^W_v is the vector from the foot of the perpendicular to QQ (this should be proved separately). Take v=[x0y0]−[00]=[x0y0]v=\begin{bmatrix}x_0\\y_0\end{bmatrix}-\begin{bmatrix}0\\0\end{bmatrix}=\begin{bmatrix}x_0\\y_0\end{bmatrix}.

Solution. The line is by=−axby=-ax, so W=span([b−a])W=\mathrm{span}\left(\begin{bmatrix}b\\-a\end{bmatrix}\right). The coefficient is α=⟨[x0y0],[b−a]⟩⟨[b−a],[b−a]⟩=bx0−ay0a2+b2,PvW=α[b−a].\alpha=\frac{\Big\langle\begin{bmatrix}x_0\\y_0\end{bmatrix},\begin{bmatrix}b\\-a\end{bmatrix}\Big\rangle}{\Big\langle\begin{bmatrix}b\\-a\end{bmatrix},\begin{bmatrix}b\\-a\end{bmatrix}\Big\rangle}=\frac{bx_0-ay_0}{a^2+b^2},\qquad P^W_v=\alpha\begin{bmatrix}b\\-a\end{bmatrix}. Writing it as a matrix acting on vv, PvW=[b−a][b−a][b−a][b−a][x0y0]=[b2a2+b2−aba2+b2−aba2+b2a2a2+b2]⏟Π (projection matrix)[x0y0].P^W_v=\frac{\begin{bmatrix}b\\-a\end{bmatrix}\begin{bmatrix}b&-a\end{bmatrix}}{\begin{bmatrix}b&-a\end{bmatrix}\begin{bmatrix}b\\-a\end{bmatrix}}\begin{bmatrix}x_0\\y_0\end{bmatrix}=\underbrace{\begin{bmatrix}\frac{b^2}{a^2+b^2}&-\frac{ab}{a^2+b^2}\\[1mm]-\frac{ab}{a^2+b^2}&\frac{a^2}{a^2+b^2}\end{bmatrix}}_{\Pi\ \text{(projection matrix)}}\begin{bmatrix}x_0\\y_0\end{bmatrix}. Then u⊥PvWu\perp P^W_v with u=v−PvW=(I−Π)[x0y0]=1a2+b2[a2x0+ab y0ab x0+b2y0]=ax0+by0a2+b2[ab],u=v-P^W_v=(I-\Pi)\begin{bmatrix}x_0\\y_0\end{bmatrix}=\frac{1}{a^2+b^2}\begin{bmatrix}a^2x_0+ab\,y_0\\ ab\,x_0+b^2y_0\end{bmatrix}=\frac{ax_0+by_0}{a^2+b^2}\begin{bmatrix}a\\b\end{bmatrix}, where II is the identity matrix. Hence ∥u∥2=(a2+b2)(ax0+by0)2(a2+b2)2=(ax0+by0)2a2+b2 ⇒ dist(Q,W)=∥u∥=∣ax0+by0∣a2+b2.\|u\|^2=\frac{(a^2+b^2)(ax_0+by_0)^2}{(a^2+b^2)^2}=\frac{(ax_0+by_0)^2}{a^2+b^2}\ \Rightarrow\ \mathrm{dist}(Q,W)=\|u\|=\frac{|ax_0+by_0|}{\sqrt{a^2+b^2}} . (The lecture shows the expansion of ∥u∥2\|u\|^2 term by term, with numerator a4x02+a2b2y02+2a3bx0y0+b4y02+a2b2x02+2ab3x0y0a^4x_0^2+a^2b^2y_0^2+2a^3bx_0y_0+b^4y_0^2+a^2b^2x_0^2+2ab^3x_0y_0, and factors it as (a2+b2)(ax0+by0)2(a^2+b^2)(ax_0+by_0)^2.)

In general, given QQ and WW, dist(Q,W)=∥Q−z∗∥\mathrm{dist}(Q,W)=\|Q-z^*\| where z∗z^* is a special point of WW: the projection of the point QQ onto the subspace WW, which is the optimum of the optimization problem solved by the projection theorem.

Versione ripasso

  • Projection of vv onto subspace WW: the vector PvWP^W_v with (1) PvW∈WP^W_v\in W and (2) v−PvW⊥wv-P^W_v\perp w for all w∈Ww\in W. If it exists, it is unique.
  • Orthogonal generators W=span{w1,…,wN}W=\mathrm{span}\{w_1,\dots,w_N\}, ⟨wk,wh⟩=ckδk,h\langle w_k,w_h\rangle=c_k\delta_{k,h}:
    • each w∈Ww\in W is w=∑kαkwkw=\sum_k\alpha_kw_k with αk=⟨w,wk⟩⟨wk,wk⟩\alpha_k=\dfrac{\langle w,w_k\rangle}{\langle w_k,w_k\rangle} (unique) and ∥w∥2=∑kck∣αk∣2\|w\|^2=\sum_kc_k|\alpha_k|^2;
    • for any vv: PvW=∑kakwkP^W_v=\sum_ka_kw_k, ak=⟨v,wk⟩⟨wk,wk⟩a_k=\dfrac{\langle v,w_k\rangle}{\langle w_k,w_k\rangle}.
  • Proof idea for PvWP^W_v: take the scalar product with each wkw_k; only the h=kh=k term survives, so ⟨v−PvW,wk⟩=0\langle v-P^W_v,w_k\rangle=0.
  • Projection theorem: ∥v−PvW∥≤∥v−w∥\|v-P^W_v\|\le\|v-w\| for all w∈Ww\in W; min⁡w∈W∥v−w∥2=∥v−PvW∥2=∥v∥2−∥PvW∥2\min_{w\in W}\|v-w\|^2=\|v-P^W_v\|^2=\|v\|^2-\|P^W_v\|^2. Proof: split v−w=(v−PvW)+(PvW−w)v-w=(v-P^W_v)+(P^W_v-w), cross term vanishes, Pythagoras.
  • Distance point-line: dist((x0,y0), ax+by=0)=∣ax0+by0∣a2+b2\mathrm{dist}\big((x_0,y_0),\,ax+by=0\big)=\dfrac{|ax_0+by_0|}{\sqrt{a^2+b^2}}, from W=span [b,−a]TW=\mathrm{span}\,[b,-a]^T, Π=1a2+b2[b2−ab−aba2]\Pi=\frac{1}{a^2+b^2}\begin{bmatrix}b^2&-ab\\-ab&a^2\end{bmatrix}, u=(I−Π)vu=(I-\Pi)v.
  • Typical mistakes: applying the coefficient formula when the generators are not orthogonal; forgetting the conjugate on the second argument of the scalar product; dividing by ⟨wk,wk⟩\langle w_k,w_k\rangle and forgetting that it is not 11 in general.

Teoria collegata