Condition numbers and error blow-up
The question
- 1 SeeShift two lines and compare their intersections.
- 2 TryChange the direction of the input error.
- 3 ProveBuild a bound on the output error.
- 4 ApplyCheck solutions against a measurement budget.
Before you start · 3 quick checks on elimination, relative error, and absolute value
Two ideas before you start
2 ideasA reading moves a line
Changing the right side of an equation translates its line in parallel.
Each equation is a line. The intersection satisfies both equations. A change to a right-side reading shifts its line without rotating it.
Exact definition
Write the system as \(Au=b\), where \(A\) contains the coefficients, \(u=(x,y)\) contains the unknowns, and \(b=(b_1,b_2)\) contains the readings. For a nonzero coefficient row \((a,c)\), the equation \(ax+cy=b_i\) describes a line. Its normal direction is \((a,c)\), so changing \(b_i\) leaves its direction fixed.
The lesson on linear systems explains when a system has a unique solution. Here the line pairs in the game and explorer each have a unique intersection.
Measure the largest component
Two bars extend from a shared zero line. Use the longer bar to measure the vector's size.
With the maximum norm, the size of a vector is the largest absolute value of its components.
Exact definition
For a vector \(v\), the maximum norm is \(\|v\|_\infty=\max_i |v_i|\). This measures the largest coordinate change when \(v\) is the difference between two points. If the original vector \(v\) is nonzero and the change is \(\Delta v\), the relative change is \(\|\Delta v\|_\infty/\|v\|_\infty\). Multiplying that ratio by a hundred writes it as a percentage.
Fine print on the matrix norm
The matrix norm used here is the largest absolute row sum. Take the absolute value of each entry, add within each row, and keep the largest sum. For any real square matrix \(M\),
\[\|M\|_\infty=\max_i\sum_j |m_{ij}|.\]The triangle inequality gives \(|(Mv)_i|\le (\sum_j|m_{ij}|)\,\|v\|_\infty\) for each row. Taking the largest left side gives \(\|Mv\|_\infty\le\|M\|_\infty\|v\|_\infty\). To attain equality, take a row with the largest sum and choose the entries of \(v\) to match its signs. Use either sign for a zero entry. Then \(\|v\|_\infty=1\) and in that row the signed products add as absolute values.
This is why the row sum describes how much a matrix can stretch an input in the maximum norm. The norm depends on the choice of coordinates and how those coordinates are scaled. In applications, choose comparable units before treating the largest numerical component as a physical error measure.
Find the largest shift at the crossing
- Pick a layout. All layouts start at the same intersection.
- Press Test shift to lower one reading and raise the other by the same amount.
- Lock the layout you think moves the intersection farthest in the maximum norm.
| Layout | Movement score | Condition number |
|---|
How the score is calculated
Here \(x+y=b_1\) and \(x+(1+d)y=b_2\), with \(d\gt0\). Subtract the first equation from the second. This gives \(dy=b_2-b_1\); then \(x=b_1-y\). A shift alters the difference between the readings while \(d\) stays fixed.
The score is \(\max(|\Delta x|,|\Delta y|)\). The condition number in the last column uses the whole coefficient matrix. It bounds a ratio of relative changes, as the proof shows. In the game, the amount of input change and the starting point are the same for each layout, so the absolute movement score compares layouts directly.
As \(d\) tends to zero, the line directions approach each other. At \(d=0\) the lines coincide if the readings agree, and they are parallel and distinct if the readings differ. This boundary has no unique solution, so the game uses positive gaps.
Change how the readings shift
- Choose a coefficient gap. Then pick a pattern for the two reading errors.
- Compare the observed amplification with the condition number for that matrix.
Goals
Separate size, direction, and the bound
With \(A\) invertible, its maximum-norm condition number is \(\kappa_\infty(A)=\|A\|_\infty\|A^{-1}\|_\infty\). In the explorer, the observed amplification is the relative change in \(u\) divided by the relative change in \(b\). Every input pattern uses the same maximum error in the readings. The pattern decides how much the difference \(b_2-b_1\) changes.
The condition number stays fixed while the error pattern changes for a given \(A\). For the original right side in the explorer, an even tighter multiplier is \(\|A^{-1}\|_\infty\|b\|_\infty/\|u\|_\infty\). The theorem replaces the last ratio by \(\|A\|_\infty\) to get a bound valid across nonzero original right sides.
Bound relative error for a fixed matrix
Let \(A\) be a fixed, invertible real square matrix. Let \(b\ne0\) and \(\Delta b\ne0\). Let \(u\) solve \(Au=b\), and \(u+\Delta u\) solve the system with right side \(b+\Delta b\). In the maximum norm, write
\[\begin{aligned} E_b&=\frac{\|\Delta b\|_\infty}{\|b\|_\infty},\\ E_u&=\frac{\|\Delta u\|_\infty}{\|u\|_\infty}. \end{aligned}\]Then \(E_u\le \kappa_\infty(A)\,E_b\), where \(\kappa_\infty(A)=\|A\|_\infty\|A^{-1}\|_\infty\). The bound also holds for \(\Delta b=0\), when both errors are zero.
Build the bound one step at a time. The two matrix products in the proof use different matrices.
When the bound can be reached
You may choose the original \(u\) and the perturbation \(\Delta b\) independently when asking for the worst case over all \(b\ne0\). Choose \(u\) from the signs of a row of \(A\) with largest absolute sum. Choose \(\Delta b\) from the signs of such a row of \(A^{-1}\). The matrix norm refresher shows that both norm inequalities in the proof then reach equality. Defining \(b=Au\) yields a nonzero right side.
If the original \(b\) is given, its solution is fixed. In that case the ratio \(\|b\|_\infty/\|u\|_\infty\) may be smaller than \(\|A\|_\infty\), even if the perturbation attains the inverse norm. The condition-number bound can then overestimate the greatest amplification for that particular right side.
Forward error, residual, and backward stability
For a computed vector \(\hat u\), the forward error measures its difference from the solution of the given system. With the residual convention \(r=b-A\hat u\), the computed vector solves \(A\hat u=b-r\) exactly in real arithmetic. So the relative backward error when only the right side may change is \(\|r\|_\infty/\|b\|_\infty\). The theorem bounds the relative forward error by the condition number times that backward error.
Backward stability is a property of an algorithm on a class of problems and in a specified perturbation model. Its computed result is the exact solution of a nearby input problem, with perturbations bounded in terms of the arithmetic precision. Some models allow the matrix to change as well. The bound proved here concerns changes to the right side with the matrix held fixed. A small residual for one solve is evidence about that computed vector in the fixed-matrix model.
Floating point explains how rounding enters computations. Finite differences gives another example of error amplification, where input errors enter a difference quotient divided by the step size.
Use the bound and measure actual error
Use the maximum norm throughout. For questions in percent, type the percentage as a number. Each problem has a hint and a worked solution.
Further reading
- N. J. Higham, Accuracy and Stability of Numerical Algorithms.
- L. N. Trefethen and D. Bau III, Numerical Linear Algebra.