The interactive film is in the book's Companion

Play it, pause it, turn it and drag it with Mathematics for AI and Machine Learning.

Get the book

The Projection Matrix: Outer times Inverse Inner

Chapter 2 · Mathematics for AI and Machine Learning · Advanced · 1:37

An interactive live film: P = X (X^T X)^{-1} X^T casts u's shadow on the plane of two columns; the residual is orthogonal to both and P^2 = P. Drag a column until the shortcut X X^T gives the same projection.

Narration

Two columns, x zero and x one, span a plane W, here the floor. A vector u stands above it.

The projection matrix onto W is X, times the inverse of X transposed X, times X transposed: outer, times inverse inner. P u is the shadow of u on the plane, the green arrow.

The rest of the narration is in the book's Companion.

More from Chapter 2

Interactive1:40Change of Basis: One Vector, Two Sets of CoordinatesChapter 2Preview1:29The Matrix Inverse: Squashed Means GoneChapter 2Preview1:53A Matrix Moves the CubeChapter 2Preview1:49Rank One as a LandscapeChapter 2Preview2:29Four Views of Matrix MultiplicationChapter 2Preview1:44Column Space: Every Output Ax Lies on One PlaneChapter 2Preview1:36Matrix Norm and Condition Number: the Largest StretchChapter 2