Linear-Algebra-Done-Right Β· Unit 17 Β· Video 3 Β· Interactive Practice

T†w: The Best Approximate Solution of Smallest Norm

IKey Formulas

FormulaNameWhen equality holds
βˆ₯T(T†w)βˆ’wβˆ₯≀βˆ₯Tvβˆ’wβˆ₯\|T(T^\dagger w) - w\| \le \|Tv - w\| for every v∈Vv \in VBest fitv∈T†w+null⁑Tv \in T^\dagger w + \operatorname{null} T
βˆ₯T†wβˆ₯≀βˆ₯vβˆ₯\|T^\dagger w\| \le \|v\| for every v∈T†w+null⁑Tv \in T^\dagger w + \operatorname{null} TSmallest normv=T†wv = T^\dagger w
βˆ₯Tvβˆ’wβˆ₯2=βˆ₯Tvβˆ’TT†wβˆ₯2+βˆ₯TT†wβˆ’wβˆ₯2\|Tv - w\|^2 = \|Tv - TT^\dagger w\|^2 + \|TT^\dagger w - w\|^2Pythagoras in WWAlways: first piece ∈range⁑T\in \operatorname{range} T, second ∈(range⁑T)βŠ₯\in (\operatorname{range} T)^\perp
T†(x,y,z)=111(5xβˆ’2y,β€…β€Š5xβˆ’2y,β€…β€Šx+4y,β€…β€Šβˆ’2x+3y)T^\dagger(x, y, z) = \tfrac{1}{11}(5x - 2y,\; 5x - 2y,\; x + 4y,\; -2x + 3y)The exampleAlways, for T(a,b,c,d)=(a+b+c,β€…β€Š2c+d,β€…β€Š0)T(a, b, c, d) = (a + b + c,\; 2c + d,\; 0)

Key Insight: T†wT^\dagger w solves Tv=Prange⁑T wTv = P_{\operatorname{range} T}\, w, not Tv=wTv = w β€” the two agree only when w∈range⁑Tw \in \operatorname{range} T. Among all solutions of the projected equation it is the one in (null⁑T)βŠ₯(\operatorname{null} T)^\perp, hence the shortest.

IIVisualization 1 β€” The Foot of the Perpendicular Is the Best Fit

For T(x,y)=(x+y,β€…β€Šx+y)T(x, y) = (x + y,\; x + y) on R2\mathbf{R}^2, no point of range⁑T\operatorname{range} T is closer to ww than T(T†w)T(T^\dagger w).

IIIVisualization 2 β€” The Shortest Best Fit Lies in (null⁑T)βŠ₯(\operatorname{null} T)^\perp

For the same TT and w=(5,1)w = (5, 1), the best fits fill the line T†w+null⁑TT^\dagger w + \operatorname{null} T, and only T†wT^\dagger w is shortest.

IVVisualization 3 β€” The Video's Example in F4\mathbf{F}^4

Adding any n∈null⁑Tn \in \operatorname{null} T to T†wT^\dagger w leaves βˆ₯Tvβˆ’wβˆ₯\|Tv - w\| unchanged and adds exactly βˆ₯nβˆ₯2\|n\|^2 to βˆ₯vβˆ₯2\|v\|^2.

πŸ’‘ Challenge: with w=(11,0,7)w = (11, 0, 7), find the bb and cc that give v=(11,0,0,0)v = (11, 0, 0, 0), then check that 55+βˆ₯nβˆ₯2=12155 + \|n\|^2 = 121.

VQuiz Questions

Problem 1 Β· Apply the Formula

Given: T∈L(F4,F3)T \in \mathcal{L}(\mathbf{F}^4, \mathbf{F}^3), T(a,b,c,d)=(a+b+c,β€…β€Š2c+d,β€…β€Š0)T(a, b, c, d) = (a + b + c,\; 2c + d,\; 0), and w=(0,11,5)w = (0, 11, 5) β€” find T†wT^\dagger w.

βœ… Correct! T(βˆ’2,βˆ’2,4,3)=(0,11,0)=Prange⁑T wT(-2, -2, 4, 3) = (0, 11, 0) = P_{\operatorname{range} T}\, w, and (βˆ’2,βˆ’2,4,3)(-2, -2, 4, 3) is orthogonal to both basis vectors of null⁑T\operatorname{null} T.
❌ A best fit, but not T†wT^\dagger w. This vector does map to (0,11,0)(0, 11, 0), but it is not orthogonal to (βˆ’1,0,1,βˆ’2)(-1, 0, 1, -2), so it is not in (null⁑T)βŠ₯(\operatorname{null} T)^\perp β€” and its norm is larger than 33\sqrt{33}.
❌ Check the signs. T(2,2,βˆ’4,βˆ’3)=(0,βˆ’11,0)T(2, 2, -4, -3) = (0, -11, 0), which is not the projection (0,11,0)(0, 11, 0).
Show solution

The formula T†(x,y,z)=111(5xβˆ’2y,β€…β€Š5xβˆ’2y,β€…β€Šx+4y,β€…β€Šβˆ’2x+3y)T^\dagger(x, y, z) = \tfrac{1}{11}(5x - 2y,\; 5x - 2y,\; x + 4y,\; -2x + 3y) with x=0x = 0, y=11y = 11 gives

T†w=111(βˆ’22,β€…β€Šβˆ’22,β€…β€Š44,β€…β€Š33)=(βˆ’2,βˆ’2,4,3).T^\dagger w = \tfrac{1}{11}(-22,\; -22,\; 44,\; 33) = (-2, -2, 4, 3).

Check. T(βˆ’2,βˆ’2,4,3)=(βˆ’2βˆ’2+4,β€…β€Š8+3,β€…β€Š0)=(0,11,0)T(-2, -2, 4, 3) = (-2 - 2 + 4,\; 8 + 3,\; 0) = (0, 11, 0), the projection of ww onto range⁑T\operatorname{range} T. Orthogonality: ⟨(βˆ’2,βˆ’2,4,3),(βˆ’1,1,0,0)⟩=2βˆ’2=0\langle (-2, -2, 4, 3), (-1, 1, 0, 0) \rangle = 2 - 2 = 0 and ⟨(βˆ’2,βˆ’2,4,3),(βˆ’1,0,1,βˆ’2)⟩=2+4βˆ’6=0\langle (-2, -2, 4, 3), (-1, 0, 1, -2) \rangle = 2 + 4 - 6 = 0.

Options (a) and (b) also map to (0,11,0)(0, 11, 0), so they are best fits too, but their norms are 1111 and 41\sqrt{41}, both larger than βˆ₯T†wβˆ₯=33\|T^\dagger w\| = \sqrt{33}.

Problem 2 Β· A Best Fit That Is Not T†wT^\dagger w

Given: the same TT, w=(11,0,7)w = (11, 0, 7) with T†w=(5,5,1,βˆ’2)T^\dagger w = (5, 5, 1, -2), and v=(11,0,0,0)v = (11, 0, 0, 0) β€” which statement is true?

βœ… Correct! vβˆ’T†w=(6,βˆ’5,βˆ’1,2)∈null⁑Tv - T^\dagger w = (6, -5, -1, 2) \in \operatorname{null} T, so vv fits exactly as well as T†wT^\dagger w; the second part of the theorem then says βˆ₯T†wβˆ₯<βˆ₯vβˆ₯\|T^\dagger w\| < \|v\|.
❌ Fit and size are separate questions. Being a best fit depends only on βˆ₯Tvβˆ’wβˆ₯\|Tv - w\|; here Tv=(11,0,0)=T(T†w)Tv = (11, 0, 0) = T(T^\dagger w), so the fit is optimal regardless of βˆ₯vβˆ₯\|v\|.
❌ Not quite. Tv=(11,0,0)β‰ (11,0,7)Tv = (11, 0, 0) \ne (11, 0, 7); no vector solves Tv=wTv = w, because wβˆ‰range⁑Tw \notin \operatorname{range} T.
❌ TT is not injective. Tv=T(T†w)Tv = T(T^\dagger w) only gives vβˆ’T†w∈null⁑Tv - T^\dagger w \in \operatorname{null} T, and null⁑T\operatorname{null} T is two-dimensional.
Show solution

Tv=(11+0+0,β€…β€Š0+0,β€…β€Š0)=(11,0,0)Tv = (11 + 0 + 0,\; 0 + 0,\; 0) = (11, 0, 0), which equals T(T†w)=T(5,5,1,βˆ’2)=(11,0,0)T(T^\dagger w) = T(5, 5, 1, -2) = (11, 0, 0). So βˆ₯Tvβˆ’wβˆ₯=βˆ₯(0,0,βˆ’7)βˆ₯=7\|Tv - w\| = \|(0, 0, -7)\| = 7, the minimum, and vv is a best fit.

The difference n=vβˆ’T†w=(6,βˆ’5,βˆ’1,2)n = v - T^\dagger w = (6, -5, -1, 2) lies in null⁑T\operatorname{null} T, while T†w∈(null⁑T)βŠ₯T^\dagger w \in (\operatorname{null} T)^\perp. By Pythagoras,

βˆ₯vβˆ₯2=βˆ₯T†wβˆ₯2+βˆ₯nβˆ₯2=55+66=121,\|v\|^2 = \|T^\dagger w\|^2 + \|n\|^2 = 55 + 66 = 121,

so βˆ₯vβˆ₯=11>55β‰ˆ7.42\|v\| = 11 > \sqrt{55} \approx 7.42. It is a best fit, but not the one of smallest norm.

Problem 3 Β· Fit Error and Norm

Given: the same TT and w=(1,8,βˆ’4)w = (1, 8, -4) β€” find T†wT^\dagger w, the smallest possible value of βˆ₯Tvβˆ’wβˆ₯\|Tv - w\|, and βˆ₯T†wβˆ₯\|T^\dagger w\|.

What is T†wT^\dagger w?

What are βˆ₯T(T†w)βˆ’wβˆ₯\|T(T^\dagger w) - w\| and βˆ₯T†wβˆ₯\|T^\dagger w\|?

βœ… Correct! T†w=(βˆ’1,βˆ’1,3,2)T^\dagger w = (-1, -1, 3, 2) maps to (1,8,0)(1, 8, 0), which misses ww by 44 in the third coordinate, and βˆ₯T†wβˆ₯=15\|T^\dagger w\| = \sqrt{15} is the smallest norm among all best fits.
❌ A best fit, but not T†wT^\dagger w. This vector maps to (1,8,0)(1, 8, 0), but it is not orthogonal to both (βˆ’1,1,0,0)(-1, 1, 0, 0) and (βˆ’1,0,1,βˆ’2)(-1, 0, 1, -2).
❌ Check the signs. T(1,1,βˆ’3,βˆ’2)=(βˆ’1,βˆ’8,0)T(1, 1, -3, -2) = (-1, -8, 0), not (1,8,0)(1, 8, 0).
❌ ww is not in range⁑T\operatorname{range} T. Its third coordinate is βˆ’4β‰ 0-4 \ne 0, so βˆ₯T(T†w)βˆ’wβˆ₯=βˆ£βˆ’4βˆ£β‰ 0\|T(T^\dagger w) - w\| = |-4| \ne 0.
❌ Squared versus unsquared. βˆ₯(0,0,4)βˆ₯=4\|(0, 0, 4)\| = 4 and βˆ₯T†wβˆ₯2=15\|T^\dagger w\|^2 = 15, so βˆ₯T†wβˆ₯=15\|T^\dagger w\| = \sqrt{15}.
❌ Check T†wT^\dagger w. Substitute x=1x = 1, y=8y = 8 into the formula.
❌ Check the two lengths. Compute T(T†w)βˆ’wT(T^\dagger w) - w first.
Show solution

Step 1. With x=1x = 1, y=8y = 8:

T†w=111(5βˆ’16,β€…β€Š5βˆ’16,β€…β€Š1+32,β€…β€Šβˆ’2+24)=111(βˆ’11,βˆ’11,33,22)=(βˆ’1,βˆ’1,3,2).T^\dagger w = \tfrac{1}{11}(5 - 16,\; 5 - 16,\; 1 + 32,\; -2 + 24) = \tfrac{1}{11}(-11, -11, 33, 22) = (-1, -1, 3, 2).

Step 2. T(βˆ’1,βˆ’1,3,2)=(βˆ’1βˆ’1+3,β€…β€Š6+2,β€…β€Š0)=(1,8,0)T(-1, -1, 3, 2) = (-1 - 1 + 3,\; 6 + 2,\; 0) = (1, 8, 0), so T(T†w)βˆ’w=(0,0,4)T(T^\dagger w) - w = (0, 0, 4) and the smallest possible value of βˆ₯Tvβˆ’wβˆ₯\|Tv - w\| is 44.

Step 3. βˆ₯T†wβˆ₯2=1+1+9+4=15\|T^\dagger w\|^2 = 1 + 1 + 9 + 4 = 15, so βˆ₯T†wβˆ₯=15\|T^\dagger w\| = \sqrt{15}.

Options (a) and (c) in the first group are T†w+nT^\dagger w + n with n=(βˆ’1,1,0,0)n = (-1, 1, 0, 0) and n=(1,1,βˆ’2,4)n = (1, 1, -2, 4); their squared norms are 15+2=1715 + 2 = 17 and 15+22=3715 + 22 = 37.

Problem 4 Β· The Surjective Case

Given: S∈L(R4,R2)S \in \mathcal{L}(\mathbf{R}^4, \mathbf{R}^2) is surjective and w∈R2w \in \mathbf{R}^2 β€” which statement is true?

βœ… Correct! Surjectivity makes the projection onto range⁑S=R2\operatorname{range} S = \mathbf{R}^2 the identity, so every best fit is an exact solution, and S†wS^\dagger w is the shortest of them.
❌ The first half is right, the second is not. range⁑S=R2\operatorname{range} S = \mathbf{R}^2, so projecting onto it changes nothing: S(S†w)=wS(S^\dagger w) = w.
❌ SS has no inverse. dim⁑null⁑S=4βˆ’2=2\dim \operatorname{null} S = 4 - 2 = 2, so SS is not injective; S†=Sβˆ’1S^\dagger = S^{-1} only when SS is invertible.
❌ Too many solutions. The solutions form S†w+null⁑SS^\dagger w + \operatorname{null} S, a plane in R4\mathbf{R}^4; S†wS^\dagger w is just its shortest member.
Show solution

Since SS is surjective, range⁑S=R2\operatorname{range} S = \mathbf{R}^2 and Prange⁑S=IP_{\operatorname{range} S} = I. Hence S(S†w)=Prange⁑S w=wS(S^\dagger w) = P_{\operatorname{range} S}\, w = w: the best fit is an exact solution.

By the dimension formula, dim⁑null⁑S=4βˆ’2=2\dim \operatorname{null} S = 4 - 2 = 2, so SS is not injective and Sv=wSv = w has infinitely many solutions, namely S†w+null⁑SS^\dagger w + \operatorname{null} S. They are exactly the best fits (each has βˆ₯Svβˆ’wβˆ₯=0\|Sv - w\| = 0), and by the second part of the theorem S†wS^\dagger w is the unique one of smallest norm.

S†=Sβˆ’1S^\dagger = S^{-1} would require SS to be invertible, which is impossible from R4\mathbf{R}^4 to R2\mathbf{R}^2.

Solved: 0 / 4