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

Cauchy-Schwarz: a Shadow Is Never Longer than the Stick

Chapter 1 · Mathematics for AI and Machine Learning · Advanced · 1:29

An interactive live film: the inner product is |u| times the shadow of v on u's line, a leg of a right triangle whose hypotenuse is v; the triangle inequality follows. Drag v until the bound is tight.

Narration

Here are two vectors in space: u in blue, and v in purple, whose tip you will soon move.

Drop a perpendicular from the tip of v onto the line of u. The foot marks the shadow of v on that line, and the inner product of u and v is the length of u times the signed length of that shadow.

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

More from Chapter 1

Interactive1:30Span and Independence: When the Dimension JumpsChapter 1Preview1:31Gram–Schmidt, One Vector at a TimeChapter 1Preview1:42Projection onto a Line: the Closest PointChapter 1Preview1:42Norms as Cones: the Unit Ball Is a SliceChapter 1Preview1:36The Parallelogram Law: Which Norms Come from an Inner ProductChapter 1Preview1:31The Outer Product: All of Space onto One LineChapter 1Preview1:43Layer Normalization: Project, Then RescaleChapter 1