Worked Examples: Structure and Numerical Evidence
Work each setup on paper before reading its derivation. The independent practice and checkpoint use separate feedback pages.
One matrix, two right-hand sides
With A=[[1,1],[2,2]], b=(3,6), eliminate the second row to get 0=0. Set x₂=t, x₁=3−t. The solution is (3,0)+t*(−1,1). Replacing b₂ by seven produces 0=1; y=(−2,1) annihilates A but not b. Count independent constraints, not equations.
Least squares as a proof, not only a solve
Fit c+mt to (0,1),(1,2),(2,2). Columns are (1,1,1) and (0,1,2). Their Gram matrix is [[3,3],[3,5]], and their dot products with y give (5,6). Subtract the normal equations to get 2m=1, then c=7/6. The residual is (−1/6,1/3,−1/6), perpendicular to both columns.
For any h, ||r−Ah||²=||r||²+||Ah||², since r^T Ah=0. This establishes the minimum and shows why dependent columns affect coefficient uniqueness rather than uniqueness of the projection. Computationally use QR to avoid forming the Gram matrix; this derivation uses it to expose the geometry.
A small residual with a large error
For A=diag(1,0.001), b=(1,0.001), exact x=(1,1), compare x-hat=(1,0). The relative infinity-norm residual is 0.001 and relative solution error is one. Condition number 1000 explains the possible amplification. The scaled backward error is 0.0005. These are three different measurements of the same candidate.
SVD tails and model changes
For diag(4,2,1), retaining only the first component gives diag(4,0,0). Its operator error is two and Frobenius error sqrt(5). If a numerical rank cutoff also discards a positive singular direction, pseudoinversion operates on that thresholded model. This is a deliberate modeling decision, not merely another exact representation of the original matrix.
Transfer
Attempt P2, P9, P14 and P16 with the page closed. Keep the initial explanation, then use feedback to identify a specific repair.