Computing a Linear System Residual

A linear system residual measures the difference between the required right-hand side and the one produced by a proposed solution.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace an example
  2. Interpret the scale
  3. Multiply the proposed solution back into the equations
  4. Relate residual to error using the problem's sensitivity

Trace an example

For system \(2x=10\), approximation 4.9 produces right-hand side 9.8 and residual 0.2 with convention \(b-Ax\). Absolute error gives a separate input error of 0.1.

Interpret the scale

Scaling the equation changes the residual and leaves its solution unchanged. For larger systems sensitivity can vary by direction. See forward and backward error.[1][2]

Multiply the proposed solution back into the equations

Let the equations be \(2x+y=7\) and \(x+3y=6\). A candidate \((3,1)\) produces left sides seven and six, giving zero residual. A candidate \((2,1)\) produces five and five, leaving residual \((2,1)\) under \(r=b-Ax\). See matrix–vector products.

Candidate (3,1): Ax=(7,6), residual=(0,0)
Candidate (2,1): Ax=(5,5), residual=(2,1)

Relate residual to error using the problem's sensitivity

A small residual can coexist with a larger solution error for a poorly conditioned system. Report an appropriate residual norm and scaling, and use error estimates where available.

References

  1. Tobin A. Driscoll and Richard J. Braun, Fundamentals of Numerical Computation ↩
  2. Nicholas J. Higham, Accuracy and Stability of Numerical Algorithms ↩