The inner product, and why right angles are independence for free
Recall from Dot Product the inner product on : . It measures length, , and angle — in particular exactly when and are orthogonal (perpendicular). A set is orthogonal if every pair of distinct vectors in it dots to zero.
Here's the first gift, and it's a good one. An orthogonal set of nonzero vectors is automatically linearly independent. Proof — one clean line of dotting, no row reduction required. Suppose are nonzero and mutually orthogonal, and
Dot both sides with . Every cross term () vanishes by orthogonality, leaving
Since , we have , so . This works for every , so all coefficients are zero — independent. No row reduction, no determinant. Perpendicularity is a stronger, cleaner reason for independence than the general case ever gives you.
Orthonormal bases: coordinates for free
Normalize each vector to length one (divide by its norm) and you have an orthonormal set: mutually perpendicular and unit length, for and . An orthonormal basis is the luxury tier, and here's why.
In a general basis, finding the coordinates of means solving a linear system . In an orthonormal basis, you skip all of that. Write and dot with :
because every term dies except , where . So
The coordinate is just a dot product. No system, no inverse, no elimination. Fuck Gaussian elimination — a single multiply-and-sum is all you need. That's the whole reason orthonormal bases are worth the trouble of building — they turn coordinate-finding from a computation into a reflex.
Projection onto a subspace: the closest point
Take a subspace with orthonormal basis . The orthogonal projection of a vector onto is
Each term is the shadow of along one axis; sum the shadows. For a single direction (not necessarily unit), the formula is the un-normalized version you've seen:
The deep fact: the projection is the closest point in to . Among all vectors in the subspace, minimizes the distance , because the error comes out perpendicular to , and a perpendicular dropped to a subspace is the shortest segment to it. Minimizing distance to a subspace is exactly the least-squares problem — the backbone of fitting lines to noisy data — and it's nothing but a projection. Drag the vectors and watch the projection slide to the nearest point on the line, the error arrow staying perpendicular:
Gram–Schmidt: subtract the shadow, repeat
Now the main event. Given any basis — possibly a skewed, ugly, embarrassing mess — Gram–Schmidt manufactures an orthogonal basis spanning the same space. The move is always the same: take the next vector, subtract off its shadow on everything you've already built, keep the remainder. What's left is perpendicular to all the earlier ones by construction. Simple as hell, powerful as anything in this course.
and so on. Each subtracted term is a projection — a shadow — and removing it leaves a vector orthogonal to that direction. At the end, normalize each to get an orthonormal basis. Worked in full in Example 3. It's tedious arithmetic, not deep, but get one sign wrong and the orthogonality silently dies — so always check the dot products are zero at the end. That check is free and it has saved more homework than coffee has. Do not skip it.
Orthogonal matrices: the rigid motions
Stack an orthonormal basis into the columns of a matrix . Then — the entry of is exactly , which is on the diagonal and off it. A square matrix with is called orthogonal, and it has a superpower: it preserves lengths and angles. For any ,
Lengths are untouched; since dot products are preserved too, so are angles. Orthogonal matrices are exactly the rigid motions of space — rotations and reflections, the transformations that move the world without bending, stretching, or shearing it. Their determinant is ( rotation, reflection). And for free — inverting becomes transposing.
This is the last piece of equipment before the summit. The spectral theorem says every real symmetric matrix can be diagonalized by an orthogonal — perpendicular axes, no distortion, no shit. You just built every single tool that sentence needs. Go do the gauntlet, then climb.