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

Conjugate Gradient: Two Steps to the Bottom

Chapter 7 · Mathematics for AI and Machine Learning · Advanced · 1:58

An interactive live film: on the quadratic bowl phi(x) = 1/2 x^T A x - b^T x, steepest descent zig-zags while conjugate gradient reaches the minimum in two A-orthogonal steps; drag the start point.

Narration

Here is the bowl phi of x equals one half x transpose A x minus b transpose x, with A equal to four, two, two, two, and b equal to two, zero. Its lowest point, the green star, is x star equals one, minus one: the solution of A x equals b.

Start at the origin. Steepest descent moves along the residual, the downhill direction, and stops where the line just touches a contour. Then it turns by a right angle. The orange path zig zags in ever smaller steps.

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

More from Chapter 7

Interactive1:44Rayleigh Quotient: The Height of a Quadratic Form on the Unit CircleChapter 7Preview1:29Quadratic Forms See Only the Symmetric PartChapter 7Preview1:29The Spectral Theorem: Symmetric Means Perpendicular EigenvectorsChapter 7Preview1:35Cholesky: a Square Root That Exists Only for Positive Definite MatricesChapter 7Preview1:40Gram Matrices: Two of Them, One Set of EigenvaluesChapter 7Preview1:26The Graph Laplacian: Smooth and Rough Signals on a GraphChapter 7