Somewhere inside every physics simulation, every 3-D renderer, every finite-element model, and many machine-learning pipelines sits a monster linear system: millions of equations, millions of unknowns, and the answers needed right now. Direct methods like Gaussian elimination are out â they'd chew through memory and time in cubic fashion. You need something smarter.
Conjugate gradient (CG) is that something. Invented by Magnus Hestenes and Eduard Stiefel in 1952, it solves a symmetric positive-definite system Ax = b by taking a sequence of steps, each perfectly crafted so it never undoes the progress of any earlier step. In theory it converges in at most n iterations for an n-variable problem. In practice, on the sparse systems that arise in real engineering, it often converges far sooner.
The trick is not just "follow the slope downhill." It is "follow a direction that is A-conjugate to everything before it" â a generalized orthogonality that keeps the search directions from interfering. Each step lands you on the exact minimum of the objective in the subspace explored so far, and those gains are never lost.
This makes CG one of the great algorithms of applied mathematics: provably finite, memory-light (you only ever need a handful of vectors), and fast enough to power daily computation at a scale naive methods cannot touch.
Comments
Loading comments...