Form the projection matrix A(A transpose A) inverse A transpose
Form P = A(AT A)-1 AT for a matrix with independent columns. The idea in plain words, a worked example, and a check with the answers shown — part of the free Linear Algebra guides.
You have a subspace — a line, a plane, some flat thing through the origin — and a vector that is usually not in it. There is exactly one point of closest to, and the arrow from to meets at a right angle. That is the whole idea of a projection, and everything else here is that sentence written as algebra.
Three names for the three objects:
- is the projection of onto. It is in. - is the error, also called the residual. It is perpendicular to. - is the matrix with for every. Same job, written as something you can multiply.
Take the line case,. Every point of that line is a multiple, so the problem is to find the single number. The condition is that the error is perpendicular to the line:
Then and
Read the shape: is a column times a row, which is a full matrix; is a single number. So is a matrix divided by a scalar — it has rank one, and the division by is the step students drop.
Now replace the single vector with independent columns in a matrix. The same right angle, applied to each column separately, gives equations at once:
The number became the matrix; dividing by a number became inverting a matrix. Nothing else changed.
Let and, and let be their span in. Find the projection matrix.
Step 1 — the Gram matrix., from,,.
Step 2 — invert it., so.
Step 3 — multiply. Multiply times times:
Step 4 — check, in this order.
- - ✓ (compare two entries, not all nine).
- - — verified by multiplication, and it must hold, because is already in.
- - and ✓ — the subspace does not move.
- - ✓, the dimension of.
Four checks, and any one of them failing means the answer is wrong even if the arithmetic looked clean.
- Form P = A(A^T A)^-1 A^T for a matrix with independent columns
- Check a claimed projection matrix by symmetry, idempotence, the fixed columns and the trace
- Read rank and trace off the dimension of the target subspace without forming P
(a) projects onto a 2-dimensional subspace. What are,, and what does project onto?
(b) Is an orthogonal projection? Answer yes or no and give the one check that decides it.
Answers
(a) and, the eigenvalues along and across the subspace. projects onto the 2-dimensional orthogonal complement, with the same rank and trace.
(b) No. It does square to itself, so it is a projection — but its transpose is, which is not. The shadow is cast at a slant. One comparison of two entries settles it.