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

Pivoting: Why PLU Swaps Rows

Chapter 5 · Mathematics for AI and Machine Learning · Advanced · 1:45

An interactive live film: a 2 x 2 system with a tiny pivot solved for real in single precision; without the row swap the huge multiplier wipes out digits and the answer leaves the crossing of the two walls. Break it, then repair it.

Narration

Two equations in two unknowns: epsilon x zero plus x one equals one, and x zero plus x one equals two. Each equation is a wall standing on the floor, and the solution is where the walls cross, close to one, one.

Elimination uses the top left entry as its pivot. Here that pivot is epsilon, tiny, so the multiplier is one over epsilon: enormous.

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

More from Chapter 5

Interactive1:27The Determinant through LU: Shears Keep It, Pivots Give ItChapter 5Preview1:40Back Substitution: A Plane, a Line, a PointChapter 5Preview1:46Gaussian Elimination: Planes That Swing Around a LineChapter 5Preview1:22The Characteristic Polynomial: When the Box CollapsesChapter 5