Backward stability 2026-10-24
A numerical algorithm is backward stable when its computed output is the exact output for input data perturbed by an amount comparable to the arithmetic's round-off error. The allowed input perturbations and their norm must be specified. A bound on backward error gives a forward error bound only after accounting for the problem's condition number. For example, a singular value decomposition with orthonormal computed outer factors is backward stable in the spectral norm if , with machine precision and a modest dimension-dependent constant .
Matrix-chain cost model 2026-10-18
For matrix dimensions and , ordinary matrix multiplication computes matrix entries, each using scalar multiplications. Thus its cost is scalar multiplications, with additions if each sum starts from its first term. Here we minimize only the scalar multiplication count, using this dense matrix multiplication rule throughout. The counts describe arithmetic operations, rather than measured elapsed time; matrix multiplication methods that exploit structure or use faster formulas require a different cost rule.
Take matrices , , with matrix dimensions , , . Both groupings produce a matrix product, but their intermediate matrix dimensions differ:
The second grouping first compresses into a matrix, avoiding the intermediate matrix . The saving is scalar multiplications, although both groupings use exactly two matrix multiplications. This is why counting only matrix multiplication operations hides the interesting choice.
Figure 1.
The same matrix product can require 3840 or 780 scalar multiplications
. Original binary trees for the three-matrix example. Leaves keep in the same order. Each internal node gives its resulting matrix dimensions and the local scalar multiplication cost; adding those costs gives the total. Details.
Associativity permits these regroupings in exact arithmetic; commutativity is neither assumed nor generally true for matrix multiplication. Swapping and here would even make their matrix product undefined. In floating-point arithmetic, round-off error can make the two groupings yield different computed matrix entries; the cost optimum alone does not guarantee the smallest numerical error.
Multiplying the Arnoldi decomposition by shows that the leading square block is
It is an upper Hessenberg matrix by the Arnoldi iteration. Because , it is also a symmetric matrix. Entries below the first subdiagonal vanish by the Hessenberg structure, and their reflected entries above the first superdiagonal vanish by symmetry. Consequently
The extra last row has only its final entry possibly nonzero. With the usual choice of positive normalization factors, the individual column relations are the three-term Lanczos algorithm recurrence
where the first term is omitted for . This reduction is an exact-arithmetic statement; round-off error can affect the orthogonality in an implementation.
Round-off error arises from representing numbers and carrying out arithmetic at finite precision: storing or subtracting nearly equal numbers can lose information even when the mathematical algorithm is exact. Truncation error arises from replacing a continuous or infinite mathematical operation by a finite approximation, such as discarding higher Taylor series terms in a finite difference. Refining a grid usually reduces truncation error but may increase accumulated round-off error; the two have different origins.
Use the standard spacing convention for machine epsilon: the next representable floating-point number above is . In a normalized binary representation this corresponds to significant binary digits, including the leading digit. The spacing throughout is therefore .
With rounding to nearest, the associated unit roundoff is half that spacing, ; for a normal result the relative round-off error is bounded by . Some texts instead call machine epsilon. Here denotes the spacing scale, and the iteration counts below use that convention. It describes representation precision, not a guarantee that an arbitrarily evaluated function has a relative error this small.
For negative , the mean value theorem gives . In particular,
Since is continuous and strictly increasing, it vanishes at exactly one point . The positive second derivative makes a strictly convex function on the entire real line. Its derivative changes from negative to positive at , so is the unique global minimum. One may also use to verify coercivity.
In the endpoint-bracketing form of golden-section search, begin with , a width-one interval known to contain this unique minimum, and place the two standard interior probes. The attainable position accuracy is different from that for a simple root. Around , Taylor's theorem gives
Here the minimum value is nonzero and of order one: the lower quadratic bound gives , while . Ordinary relative round-off error in these function values therefore hides changes of order , once has that size. The function-value resolution near a nondegenerate minimum is consequently of order
Each golden-section search contraction multiplies the bracket width by . Using as the nominal target width gives
Unknown evaluation-error constants can change the actual stopping point; is the standard scale-based count. Requiring position accuracy from these function-value comparisons would disregard the quadratic flatness of the minimum. The same precision effect is documented for one-dimensional numerical minimization.[ref]
Round-off error Created 2026-10-14 Updated 2026-10-20
Round-off error arises when numbers or arithmetic results are rounded to a finite set of representable values. Its scale is associated with machine epsilon, and its effects depend on subsequent operations. Even a formula with zero truncation error can lose information. In decimal arithmetic rounded to three significant digits, becomes and becomes : subtracting the stored numbers gives zero although the exact difference is . The subtraction exposes errors already present in its nearly equal operands.
This example also has a large condition number: independently perturbing the two inputs of can produce a relative amplification . High sensitivity belongs to the input-output problem; numerical stability concerns the arithmetic used to solve it. Conversely, on a common binary system with 53 significant bits and rounding to nearest, evaluates to zero while evaluates to one. Exact arithmetic makes both one: changing summation order changes the accumulated roundoff error. MIT's summation lecture explains why numerical stability and the condition number must be assessed separately.[ref]