The test that made the answer small
Worth reading first: A correction cheaper than the problem · The exact answer to a nearby problem · Orthogonal is a number.
The inverse that is never formed gave the real reason to avoid writing as an instruction. The cost is the small objection, three times the arithmetic. The large one is that the route through a computed inverse is not backward stable and the route through LU is, and at they differ by twelve orders of magnitude in the number that says whose fault a wrong answer is. Its sequel, the gap refinement can close, left that finding standing and studied its repair.
Both essays, like most measurements of a linear solver, built their right-hand side the same way. A vector is drawn at random, and is set to , since then the true answer is known and a forward error can be computed. That is a sensible habit with a side effect nobody remarked on: it fixes a property of the problem that turns out to decide the result.
The bound has the answer’s size in it
The residual of is . Whatever the right-hand side, it is about , because is an inverse with a rounding-level error relative to its size, and the multiplication by brings that back. The normwise backward error divides the residual by . So it is approximately
and everything hangs on the size of . Write , which is the answer’s size over the largest it could possibly be, . The backward error is then about . At the top of its range, , the inverse is as stable as anything. At the bottom, , it has lost all the digits it can.
Druinsky and Toledo made this observation in 2012, in a paper whose title is the question the first essay here assumed it had answered. The measurement that follows puts numbers on it for the same kind of matrix: order 30, singular values spaced geometrically from one down to , with singular vectors drawn at random, and known, so that can be read directly.
At the inverse route’s backward error starts at where is , and falls in a straight line to where is one. The fitted slope is . LU’s, on the same right-hand sides, wanders between and the whole way across. So the two lines start twelve decades apart and end at the same place. Turning the dial to a lower condition number shortens the line from the left, since the least possible is , and leaves the right-hand end exactly where it was.
As a law it is good. The backward error times over lies between 0.006 and 0.34 across all three condition numbers, around a hundred right-hand sides spanning fourteen decades of . So the backward error is about a tenth of a unit of roundoff over , within a factor of ten either way, which is an extremely tight description of a quantity that varies by twelve orders of magnitude. Only one number is doing that work.
The construction that picks the bad end
Now the question is where the usual test sits on that line.
With for a random , is , a few times its minimum. The reason is that a random has components of comparable size along all of the right singular vectors, and multiplies the largest by one and the smallest by , so that lies very nearly along the top left singular vectors and has a norm of about one per . So the test chooses a problem where , the smallest an answer can be. The inverse route’s backward error on it is . LU’s is . Those are the twelve orders the earlier essay reported. Set exactly on a top singular vector and it is almost the same, .
With a random the answer is as different as it could be. The solution now picks up the bottom singular vector’s directly, so is about as large as it can be, is about 0.2, and the inverse route’s median backward error is , the same as LU’s. With on a bottom singular vector, is about 0.3 and the two routes come to and . On those right-hand sides nothing separates them.
Against the picture is the earlier one with a second line added. On the inverse route climbs from at to at , a slope of about one. On a random it stays between and across all twelve decades, overlapping LU’s line so closely that the two are barely distinguishable. The statement that the backward error of the inverse route grows like , which the first essay stated and measured, is true of this right-hand side and not of the route.
A claim’s most tempting form needs to be stated so it can be refused: that the inverse route is unstable whatever is. Fed a random right-hand side at , the claim that the two routes are six orders apart fails.
How far from the bad end a right-hand side lands by itself
If the good end needed something contrived, the point would be academic. It needs nothing.
Over 200 random right-hand sides at the median is 0.15, the largest is 0.54 and the least is 0.016. At the median is 0.33 and the least is 0.16. The numbers barely depend on the conditioning, because a random vector has a component on the bottom left singular vector of relative size about , and is about that whatever is. Getting a of by chance would need to miss the bottom singular directions to fourteen digits, on all of them. Nothing but a construction makes that happen, and does it exactly.
So a measurement meant to compare two solvers was done on a right-hand side with a probability of essentially zero under the most natural random model. That makes neither end the true one, and it leaves open where a problem nobody randomised actually lands.
Where problems nobody randomised land
The natural guess is that real problems sit at the bad end, since a real problem has a solution first and data second, which is the construction. That guess is wrong for the most common kind of matrix, and for an interesting reason. The operator matters as much as the data, because what sets is how much of the solution lies along the small singular vectors.
Take a second difference operator on 128 points, with a condition number of 6,700, and a smooth solution. A differential operator’s small singular values belong to its smooth modes, so a smooth solution lies almost entirely along them. Then is 0.64, near its top, and the inverse route’s backward error is against LU’s , a gap of four. The same operator with a random solution has of and a gap of 270. With a random source rather than a random solution, is 0.12 and the gap is nine. So the same matrix occupies three different places along the line, according to what it is being asked.
A smoothing operator reverses it. A Gaussian blur has its large singular values on its smooth modes, so a smooth solution lies on the top vectors and falls to the bottom of its range. At a width of three on 64 points the gap between the routes is over a thousand, and on order-12 Hilbert with a right-hand side from the vector of ones it is the full distance, against . Those two matrices have condition numbers above , so the law’s own prediction is meaningless there, since the smallest singular value cannot be computed at all, and the ordering is the only thing to be read. Add a noise of one per cent to the blur’s data, which is what any measured data would have, and jumps from to while the gap falls from over a thousand to about sixty. A small amount of noise carries the problem a long way along the line, because noise has components on the bottom vectors and the smooth signal did not.
It is no accident that a measurement on the Hilbert matrix found the inverse at its worst. The number that decides nothing and many of the essays that followed use Hilbert matrices, and with that matrix lands where any smoothing operator does. So does a discretised integral equation, the setting of the regularisation field, and there the point is moot in a different way, since nobody there is solving to the bottom of the spectrum.
Which is why it is not an excuse
The forward errors add a second reason for caution. On a random the two routes’ forward errors are identical to the figures printed, at , so an inverse costs nothing there. On the inverse route is worse, but by far less than the backward error suggests: against at , about fifteen times, where the backward gap is twelve decades. So the extreme instability of the inverse route, the thing that makes it look like a different class of method, is nearly all a statement about blame and almost none about digits. That is the same conclusion the refinement essay reached from another direction: the forward error lands on the LU route’s number after one correction.
And a random right-hand side’s forgiving verdict is not a good outcome for the person holding the answer. At near one, the answer is dominated by what the smallest singular value does to whatever lies along the bottom vector, and that is the setting in which a small residual is not a small error. A backward error of says that the computed answer exactly solves a very nearby system. It does not say the answer means anything; at it has a relative error of on a good day, and if the data were measured it has nothing at all. The route is forgiven precisely where the problem has already spent its digits on something else, as the exact answer to a nearby problem sets out.
The refusal this suggests is therefore narrower than a general rule to stop worrying. It is that a code’s backward error cannot be predicted from the route alone, and that a comparison of routes on measures the route at one extreme of its range.
What a person holding a computed inverse should do
None of this argues for forming an inverse. The first essay’s other reasons remain: three times the arithmetic for no benefit, and a dense object in place of a sparse factor. Its side-by-side comparison is also not contradicted. LU is as good as or better than the inverse route at every measured, so there is no right-hand side for which forming the inverse is the better choice, and the two only ever tie.
What it changes is how a caller should read an inverse that already exists, for instance in old code or as the output of a library that only returns one. In those cases the check is cheap and has a clear answer. Compute at a cost of , and divide. That gives the backward error directly, and it is the very quantity one number that has to be right warns about computing carefully. If it is small then this particular answer is fine, and refining it would achieve nothing. If it is large then one step of refinement repairs it for . Neither route needs an estimate of . And there is no need for a blanket rule, when the question can be asked of the answer in hand.
There is also something here for anyone writing a test. A solver test using measures behaviour in the corner where is small. The test is still worth having, and it is the one that exposes this difference. But a suite containing only that test would not see a route whose error depends on the right-hand side, and could report a stable route as unstable. A small addition, a right-hand side drawn at random with its reference answer from a higher precision, covers the other end. This is the same trouble that the elimination field’s accounts of growth have, in which a bound’s worst case is one thing and what occurs in a sampled matrix is something quite different. And a test which draws its solution from the problem’s own smooth modes, rather than at random, shows which end the application is really at.
What order 30 does not show
Thirty is small, and the matrices have singular values spaced evenly in the logarithm with random singular vectors. Those choices remove anything else that might have been going on, and in doing so they set the median of a random right-hand side at about or a little below. On a larger matrix the median would fall as the square root of the order, so it would still be many orders of magnitude from the bad end. The constant around depends a little on the order too, and is bounded rather than exact. The right-hand sides in the sweep are combinations of two singular vectors only, chosen to run across all values of with nothing else varying. And the six named problems are single instances, each with one grid and one draw of noise, so they can show where a problem lands and cannot show how far it might wander.
The computed inverse here is formed by solving for each column, which gives the small residual on the side that this analysis uses. An inverse computed from the triangular factors in the way a library routine does it has a small residual on the other side instead, so it may behave differently.
Still open: the inverse with its other side small, and structured right-hand sides
The other side. An inverse formed from its factors by solving has a small left residual and not a small right one. Multiplying by it leaves a residual that is not controlled by the same bound. The prediction with a sign is that on the same matrices and the same right-hand sides that form’s backward error exceeds the column form’s by at least a factor of ten at on random , breaking the agreement with LU measured above, while its forward error on falls to within twice LU’s, where the column form’s is fifteen times.
A grid that refines. The second difference operator’s smooth solution stays near the top of the range at one size. The prediction with a sign is that holds above 0.5 on a smooth solution at every size from 32 to 512, while the condition number grows like the square of the size, so that the gap between the two routes stays under ten throughout, and a random solution’s gap grows in proportion to the condition number. If so, refining a grid leaves a smooth problem forgiven however badly conditioned it becomes.
What links here
Computed from the collection, not written here: the essays that point at this one.
Shares its objects with
Essays that name at least two of the same things, and that neither author linked.
- A second small value costs the sign nothing — both name backward error, condition number, lu factorisation, singular values
- An accuracy that is a backward error — both name backward error, condition number, forward error, residual
- Bracketing an error nobody can measure — both name backward error, condition number, forward error, residual
- The fifth author — both name backward error, condition number, forward error, residual
- The problem the solver was actually given — both name backward error, condition number, forward error, residual
- The residual knew the error — both name backward error, condition number, forward error, residual
Named objects
A flat tag is an object no other essay names yet.
Backward errorCondition numberForward errorLU factorisationMatrix inverseResidualSingular values