LU with partial row pivoting

In this lecture we calculated the LU factorization of the general example of last Friday, but now after interchanging the rows, and found that we get the exact result back up to some round off error of magnitude machine precision. The general pivoting method was illustrated on a 3-by-3 matrix.

While pivoting concerns the numerical stability of one method to solve linear systems, at the end of the lecture we introduced the conditioning of this problem. We ended the lecture pondering the relation

              _       _
  r = A ( x - x )     x is computed solution,
with x being the exact solution to Ax = b. Obviously if the residual r is large, then something went wrong in our calculation, but when does a small residual imply a correct result?