Apex › Storage & databases

How conjugate gradient beats zigzag descent

Solving a symmetric-positive-definite Ax=b is the same as finding the bottom of a quadratic bowl. Steepest descent steps straight downhill and zigzags across a stretched valley, creeping to the minimum. Conjugate gradient picks A-orthogonal (conjugate) directions that don’t interfere, reaching the exact minimum of an n-D bowl in ≤ n steps. Verified in node: CG matches Gaussian elimination to 1e-16 in ≤ n iterations, with A-orthogonal directions and orthogonal residuals. One matvec per step, no factorization — the workhorse for huge sparse FEM/PDE systems. Stretch the bowl and watch descent flail while CG hits the bottom in two.

More in Storage & databases