Review : Matrices & Vectors — Question 5

PDF ↗

Question 5

Work with real matrices and column vectors. Write InI_n for the n×nn\times n identity, ATA^T for transpose, and ∥v∥=vTv\|v\|=\sqrt{v^Tv} for Euclidean length. Show the reasoning behind every classification; do not use eigenvalue methods.

Let a=(1,2)Ta=(1,2)^T and b=(2,1)Tb=(2,1)^T. We seek the point on the line through aa closest to bb. All points on that line have the form tata, t∈ℝt\in\mathbb R.

Tasks

  1. Minimize ∥b−ta∥2\|b-ta\|^2 exactly, giving the unique closest point and the minimum distance.

  2. Construct a matrix QQ that sends any vector to its closest point on this same line. Compute QTQ^T and Q2Q^2.

  3. Describe all vectors sent to zero and all vectors fixed by QQ. Verify that the error b−Qbb-Qb is perpendicular to the line.

  4. Prove ∥x∥2=∥Qx∥2+∥x−Qx∥2\|x\|^2=\|Qx\|^2+\|x-Qx\|^2 for every xx, and deduce a sharp length inequality with its equality condition.

Original worksheet page 1: question and worked solution for 5-2-005
Show solutionHide solution

Question 5 – Solution

Strategy. Complete the square to find the best coefficient, then express that coefficient as a linear function of the input.

Step 1: Minimize the distance. Using aTa=5a^Ta=5, aTb=4a^Tb=4 and bTb=5b^Tb=5, ∥b−ta∥2=5t2−8t+5=5(t−4/5)2+9/5.\|b-ta\|^2=5t^2-8t+5 =5(t-4/5)^2+9/5. The unique minimizer is t=4/5t=4/5, so Qb=(4/5,8/5)T,minimum distance=3/5.\boxed{Qb=(4/5,8/5)^T,\qquad \text{minimum distance}=3/\sqrt 5.}

Step 2: Build the projection matrix. For any input xx, the minimizing coefficient is (aTx)/(aTa)(a^Tx)/(a^Ta). Therefore Q=aaT5=15(1224),QT=Q,Q2=Q.Q=\frac{aa^T}{5}=\frac 15\begin{pmatrix}1&2\\2&4\end{pmatrix}, \qquad Q^T=Q,\qquad Q^2=Q. The last equality follows from aaTaaT=a(aTa)aT=5aaTaa^Taa^T=a(a^Ta)a^T=5aa^T.

Step 3: Describe the two perpendicular directions. The condition Qx=0Qx=0 is equivalent to x1+2x2=0x_1+2x_2=0, so the vectors sent to zero form the line through (2,−1)T(2,-1)^T. The fixed vectors are exactly the multiples of aa: the image lies on that line, and Q(ta)=taQ(ta)=ta. For the stated input, b−Qb=(6/5,−3/5)Tb-Qb=(6/5,-3/5)^T, whose dot product with aa is zero.

Step 4: Prove the length identity and equality case. In general aT(x−Qx)=0a^T(x-Qx)=0, so QxQx is perpendicular to x−Qxx-Qx. Expanding the squared length of their sum gives ∥x∥2=∥Qx∥2+∥x−Qx∥2,∥Qx∥≤∥x∥.\boxed{\|x\|^2=\|Qx\|^2+\|x-Qx\|^2,\qquad \|Qx\|\le\|x\|.} Equality holds exactly when x−Qx=0x-Qx=0, that is, when xx lies on the line through aa, including the zero vector. For bb, the squared lengths are 5=16/5+9/55=16/5+9/5. The plot uses equal axis scales and marks the right angle.

See the diagram in the original worksheet below.

Original worksheet page 2: question and worked solution for 5-2-005

Original worksheet layout. Use Enlarge or open the PDF for a closer view.