Lab 5 · Lecture 5 · Conditioning and Stability
Conditioning Lab
Measure how sensitive a problem is, and see the difference between a sensitive problem and a careless algorithm.
Move the slider to change one number of the system slightly. Watch the crossing point and the amplification factor.
The same exact formula, run forward (unstable) and backward (stable). Every correct value lies between 0 and 1/(n+1).
Condition number of a 2×2 system
Try this
Hilbert matrix
Try this
Forward vs backward recurrence
Try this
Q1 Define the condition number of a function and compute it for and .
. : (well-conditioned for all ). : , which is huge near .
Q2 Compute for .
, . , , so : well-conditioned.
Q3 Distinguish an ill-conditioned problem and an unstable algorithm, with one example each.
Ill-conditioned: exact answer very sensitive to data; e.g. , (). Unstable: the algorithm amplifies its own rounding errors; e.g. forward, which gives although .
Q4 A matrix has . How many correct digits do you expect in single and double precision?
Double: about . Single: about , so none.
Q5 Explain forward and backward error using the computed root of .
Forward error . Backward error: , so solves exactly; the data changed by .
Q6 Is a matrix with a very small determinant always ill-conditioned? Explain.
No. has determinant (3×3) but . Conditioning depends on , not on the size of the determinant.