This lecture recaps the projection matrix, then works the best straight line through three points completely (transcript, pp. 1, 4). It continues projections onto subspaces.
What P does#
projects to the nearest point in the column space (transcript, p. 1). Check the two extreme cases (pp. 1–3):
In words
b in N( capital A ^ capital T ): capital P b equals capital A ( capital A ^ capital T capital A ) to the power minus 1 capital A ^ capital T b equals 0; b equals capital A x: capital P b equals capital A ( capital A ^ capital T capital A ) to the power minus 1 capital A ^ capital T capital A x equals capital A x equals b
Vectors perpendicular to the column space are exactly those in , so kills them; a vector in the column space has the form , and the cancels against its inverse (pp. 2–3). A typical has a part in each (pp. 3–4):
In words
b equals p plus e, p equals capital P b, e equals the quantity capital I minus capital P, b
is the projection onto the perpendicular space : it is symmetric, and (p. 4).
The best straight line#
Back to the points , , (transcript, p. 4). A line through all three would need , , : that is with having columns and , and , which has no solution (p. 5). (Strang says is "one, two, three" at one point; it is .) The columns are independent, a basis for the column space, but is not in it (p. 5).
Best means: make the errors , the vertical distances from the points to the line, small in the sense of the sum of squares (pp. 5–7):
In words
minimize the norm of capital A x minus b squared equals the norm of e squared equals e one squared plus e two squared plus e three squared
This is linear regression (p. 7). Statisticians are wary of the squares when there are outliers: one point far off, perhaps a mistake, has a giant squared error that can turn the whole fit topsy-turvy (pp. 7–8). Least squares is still the most used method (p. 8).
Two pictures (pp. 8–9). In the plane of the data, the points on the line lie above or below the given , with the errors between. In , is the closest point to in the column space: a line goes through the 's, so is a combination of the columns (pp. 8–9).
The numbers (pp. 9–12). Strang ventures to call the normal equations the most important equation in statistics and estimation (p. 9):
In words
capital A ^ capital T capital A equals 3 6; 6 14, capital A ^ capital T b equals 5; 11 : 3 C plus 6 D equals 5, 6 C plus 14 D equals 11
is symmetric and invertible, and later in the course it will be called positive definite (p. 10). Calculus gives the same equations (pp. 10–11): the total squared error
In words
capital E equals the quantity C plus D minus 1, all squared plus the quantity C plus 2 D minus 2, all squared plus the quantity C plus 3 D minus 2, all squared
is minimized where and , and these partial derivatives are linear in and (p. 11). Eliminating, , so , and gives (p. 11):
In words
b equals two thirds plus one half t
At the line gives , and the errors are (pp. 12–13)
In words
b equals p plus e: 1; 2; 2 equals 7 over 6; 5 over 3; 13 over 6 plus minus one sixth; 1 over 3; minus one sixth
(Strang first takes the errors with the opposite signs and fixes them so that , pp. 12–13.) Two checks (pp. 13–14): , and is perpendicular to the whole column space, for instance to and to : (in sixths). The two pictures are the same problem: and are the combination of the columns that gives (p. 14).
Why AᵀA is invertible#
The claim: if has independent columns, is invertible (transcript, p. 15). Suppose ; the goal is (pp. 15–16). The idea: multiply by (pp. 16–17):
In words
x^ capital T capital A ^ capital T capital A x equals ( capital A x)^ capital T ( capital A x) equals the norm of capital A x squared equals 0 which gives capital A x equals 0 which gives x equals 0
A length squared is zero only for the zero vector, so ; independent columns then leave only in the nullspace (p. 17).
Looking ahead (pp. 18–19). Columns are certainly independent if they are perpendicular unit vectors, such as , , ; then . Such vectors are orthonormal. Strang's favourite pair is and (p. 18). Why they are so good, and how to make a basis orthonormal, comes next (p. 19).
A best line of your own
Fit the points , , , by a line in the least-squares sense; find , and the total squared error.
Normal equations
has columns and . and : , .
Solve
The determinant is . and . The best line is .
Projection and error
and . Check: adds to 0 (perpendicular to the first column) and (second column). The total squared error is .
Summary#
- for in , for in ; .
- Least squares minimizes ; the normal equations are also what calculus gives.
- For , , the best line is , with perpendicular to the column space.
- is invertible when has independent columns (and only then, since gives : the page's own remark); orthonormal columns give .