Computation and Applications

Chapter 21 closed Part V by naming a debt: “every proof here is an existence or a comparison, and not one of them is an algorithm. That is the subject of Chapter 24.” It is the book’s largest single debt — twenty-six promises across eighteen files — and it has been accumulating since Chapter 3, where partial pivoting was recommended for a reason the book could not yet give. Twenty chapters have built objects and proved things about them. Not one has said how to produce those objects from data of finite accuracy, in finitely many arithmetic operations, and not one has been able to say what an answer computed that way even means.

This chapter answers three questions in that order. What does a computed answer mean? It is the exact answer to a nearby question, and the whole of numerical linear algebra lies in making “nearby” precise: a model of arithmetic, backward error, and the rule that ties the two to Chapter 16’s condition number, with Chapter 20’s residual bounds supplying the error bars. How are the objects of this book actually computed? Elimination with pivoting, least squares by reflections, eigenvalues by iteration — because no finite eigenvalue algorithm can exist — Krylov subspaces, conjugate gradients, the fast Fourier transform, and fast multiplication. What is linear algebra for? Vibrations, principal components, and graphs, each an application in which a theorem already proved does the work.

The chapter is about arithmetic, algorithms, and cost. No product, library, or language is named anywhere in it: an algorithm here is a rule for producing numbers from numbers, and its cost is a count of arithmetic operations.

Conventions

Seven conventions hold throughout, and each is stated once where it is introduced.

  • u is the unit roundoff and fl(⋅) the rounding map of §01’s model, with R the set of representable numbers and γk=ku/(1−ku) the accumulated-rounding constant, defined in §01 and used in every section that mentions arithmetic.
  • A flop is one arithmetic operation, and costs are leading-order counts, written 23n3+O(n2). The constant matters and the exponent matters more; §§02 and 13 are where that sentence is made quantitative.
  • Perturbations of data are ΔA and Δb, and a computed object carries a hat: x^, L^. Chapters 16, 17, and 20 wrote a perturbation E; E is kept here for a perturbation whose size is given, and Δ for one produced by an algorithm.
  • κ(A) always means Chapter 16 §08’s condition number (Definition 16.8.1). Chapter 20 §11’s condition number of a simple eigenvalue does not appear in this chapter, so the two never have to be told apart.
  • Iteration indices are superscripts in parentheses, x(k), A(k), leaving subscripts free for coordinates.
  • |A| is the entrywise absolute value (|aij|), as in Chapter 19, and A≤B the entrywise order. This is a local override of Chapter 13’s |A|=(A∗A)1/2, which does not appear in this chapter.
  • New symbols, each defined at its first use: the growth factor gn (§02), the Krylov space Kk(A,b) and the Ritz values (§06), the energy norm ‖⋅‖A and the Chebyshev polynomials Tk (§07, the same polynomials as Chapter 11 §10), the mass and stiffness matrices M and K (§09), the data matrix X with its centered form Xc and sample covariance S (§10), the graph Laplacian and its reduced form (§11, following Chapter 3 §07), the unnormalized Fourier matrix Wn=nFn (§12), and the arithmetic cost M(n) with the exponent ω (§13). Two letters are reused, each with a warning where it happens: L is the flowed matrix of §08 and the Laplacian of §11, and K is §09’s stiffness matrix, not Chapter 19 §09’s second-difference matrix Kn.

What the chapter assumes

Every earlier chapter assumed only field axioms, and Part V added a short list of facts from analysis. This chapter adds assumptions of a different kind, and both are stated as definitions so that the reader can see exactly where mathematics stops.

Floating-point arithmetic is not a theorem of linear algebra. It is a model of a machine. A machine stores finitely many numbers and rounds every result to one of them, and the statement that it does so with a small relative error is a description of a device, not a fact to be proved. So §01 states it as a definition, Definition 24.1.1, in the register this book uses for definitions: a finite set of representable numbers, a rounding map fl, and the requirement fl(x⊙y)=(x⊙y)(1+δ),|δ|≤u, for ⊙∈{+,−,×,÷} and for the square root, with overflow and underflow excluded by assumption. Everything after §01 is a theorem about that model. The model is an idealization: the arithmetic in common use satisfies it for those five operations, with u about 10−16, and every rounding claim in this chapter is a consequence of it and of nothing else.

Section 9 does the same for a piece of physics. Newton’s second law and Hooke’s law are not theorems either, so Definition 24.9.1 names them as clauses (P1) and (P2), says that Hooke’s law holds only for small displacements and that no real system is free of friction, and every statement about vibrations is then a theorem about that idealization. Nothing outside §09 uses it.

No new analysis is imported. The list remains Chapter 16’s facts (A1)–(A6) — completeness, monotone convergence, compactness of closed bounded sets, the extreme value theorem, the intermediate value theorem, and the mean value theorem — together with the algebra of limits. Each is named again where it is used. Chapter 21’s quoted fact (A7), the Nevanlinna–Pick characterization behind Loewner’s theorem, is not used anywhere in this chapter, and neither is any consequence of it that Chapter 21 marked as resting on it.

What is quoted and not proved

Several classical results in this subject have proofs longer than the sections that need them. The book’s practice is to prove everything or to name the result at its point of use and say plainly that it is not proved. Here is the complete list, section by section; each item is flagged again in the section that quotes it.

  • §02 — that Chapter 3’s ordering of elimination, which updates the whole trailing block at each step, satisfies the same backward error bound as the ordering §02 displays. The section also declines to quantify the seam between that bound, which is about the factors the model computes, and the growth bound, which is about exact elimination. Separately, and not a quoted theorem at all: partial pivoting is not shown to be backward stable, and §02 says so rather than tidying it.
  • §03 — Wilkinson’s accumulated backward error for a complete Householder factorization, of which §03 proves the one-reflection case; and the rates at which classical and modified Gram–Schmidt lose orthogonality, uκ2(A)2 and uκ2(A).
  • §04 — that Rayleigh quotient iteration converges at a quadratic rate, not a cubic one, for a general diagonalizable matrix. The cubic Hermitian rate is proved.
  • §05 — the theorem of Abel and Ruffini, quoted from Chapter 11 §08, which is the reason every eigenvalue method in this chapter iterates; and the general convergence theorem of the QR algorithm, of which §05 proves the first column and hence the whole 2×2 case.
  • §06 — the Kaniel–Paige–Saad estimate for the extreme Ritz values, of which §06 proves a clean special case; and the analysis of the loss of orthogonality in Lanczos, which §06 describes and names without proving.
  • §08 — the differentiability of t↦Q(t), which the continuous form of the Toda statement rests on. The discrete form, that the QR iterates sit on the flow at integer times, is proved.
  • §10 — not a quoted theorem but a missing subject. Chapter 13 §11 promised an argument that a sample says something about a population, and that is statistics, which this book does not develop. Section 10 proves everything deterministic, supplies the finite-population reading, and says plainly where it stops.
  • §13 — the recursive form of Strassen’s error bound; Winograd’s lower bound of seven multiplications for the 2×2 product; the equality of the two definitions of ω, through all arithmetic operations and through multiplications alone; every bound on ω below log2⁡7; and Laderman’s twenty-three-product identity for 3×3 matrices, which an exercise hands to the reader.

Nothing in this book is proved from any of them. Every theorem in the chapter either proves its own case or carries what it needs as an explicit hypothesis, and since all of these enter the book here, no earlier chapter can rest on them either. The one place a quoted result is used at all is exercise C1 (b) of §13, where Laderman’s identity is given to the reader as a hypothesis and the deduction from it is the reader’s own.

What you need

This chapter draws on almost the whole book. Chapters 5, 14, 15, 22, and 23 are the exceptions: duality, bilinear forms, tensor products, affine and projective geometry, and algebras and representations are not used here. Chapter 21 supplies the sentence the chapter answers, but none of its theorems.

Roadmap

  • Floating point and backward error. The model, the constant γk, the backward error of an inner product, and the three words the chapter runs on: backward stable, forward error, mixed stability. Then the rule, made a theorem: forward error at most condition number times backward error.
  • Elimination, pivoting, and cost. One step of elimination is a Schur complement of a 1×1 pivot. The cost is 23n3, and half that for Cholesky. A triangular solve is backward stable, and so is the factorization, up to a growth factor that partial pivoting bounds by 2n−1 — a bound that is attained, which is why the section stops short of calling partial pivoting stable.
  • Least squares in practice. The sensitivity of the least-squares solution involves the residual as well as κ2(A). Forming the normal equations loses twice the digits; the reflection route loses them once, because one reflection is backward stable, and classical Gram–Schmidt loses orthogonality at a rate this section states with credit.
  • The power method. Repeated multiplication finds the dominant eigenvector at rate |λ2/λ1|, the Rayleigh quotient squares that for Hermitian matrices, a shift and an inverse pick out any eigenvalue, and updating the shift from the Rayleigh quotient makes the convergence cubic. It all fails when two eigenvalues share a modulus.
  • The QR algorithm. Factor and reverse, repeatedly. The iterates are orthogonal iteration applied to the powers of the matrix, which is where the convergence comes from; Hessenberg form brings the cost of a step down to about 6n2 flops; and a shift is what turns slow convergence into fast.
  • Krylov subspaces. The right home for an iteration that can afford only one matrix–vector product at a time. Gram–Schmidt inside that space is the Arnoldi process and gives a Hessenberg matrix, with a three-term recurrence — the Lanczos process — when the matrix is Hermitian; the eigenvalues of the small matrix interlace the large one’s, and Chapter 20’s bounds apply to them verbatim. In floating point the three-term economy costs orthogonality, and the section says so.
  • Steepest descent and conjugate gradients. Solving Ax=b by minimizing a quadratic. Steepest descent converges like (κ−1)/(κ+1); conjugate gradients minimizes over the whole Krylov space and converges like (κ−1)/(κ+1). The square root is the point, and Chebyshev polynomials, small on an interval and large just outside it, are where it comes from.
  • Lax pairs and the Toda flow. The chapter’s one piece of pure mathematics: a differential equation whose flow preserves the spectrum, and which the QR iterates sit on at integer times. That the flow’s time-one map is a step of the algorithm is derived, but only after granting a differentiability this book has not set up. An algorithm and a differential equation can be the same object seen at two resolutions.
  • Vibrations. Masses and springs give Mx¨=−Kx, the substitution x=eiωtv gives a generalized eigenproblem, and Chapter 13 gives the M-orthonormal basis of normal modes. Stiffening raises every frequency, adding mass lowers them, and pinning a mass interlaces them.
  • Principal components. The best-fitting k-dimensional affine subspace of a finite set of points is spanned by the leading singular vectors of the centered data matrix, and “variance explained” is a theorem rather than a convention. The covariance matrix is never formed, for §03’s reason, and the inference from a sample to a population is handed back to statistics.
  • Graph Laplacians. L=NN⊤ for the incidence matrix of Chapter 3 §07. The multiplicity of the eigenvalue 0 counts components, the second smallest eigenvalue measures connectivity and the signs of its eigenvector split the graph, and the determinant of a reduced Laplacian counts spanning trees, which completes Chapter 7 §07.
  • The fast Fourier transform. The Fourier matrix factors into a permutation, two half-size copies of itself, and a diagonal factor. Solving the resulting recurrence gives O(nlog⁡n), and with it fast convolution, fast polynomial multiplication, and fast circulant solves.
  • Fast matrix multiplication. Two 2×2 matrices multiply with seven products instead of eight, and the recursion gives O(nlog2⁡7). The exponent ω is at least 2, which is proved; everything known about it below log2⁡7 is stated with credit and not proved. Strassen’s algorithm satisfies a norm error bound but no entrywise one, and a small entry really can come out with every digit wrong. The section closes the chapter.

Named moves

  • State the machine as a definition, then prove theorems about it. When a subject rests on something that is not mathematics, isolate it in one definition, say what kind of statement it is, and derive the rest. Everything in this chapter that mentions rounding is a consequence of Definition 24.1.1 alone, and §09 treats its two physical laws the same way.
  • Measure an answer by a change in the data that makes it exact. The forward error is what one wants and cannot see; the backward error is what one can bound. Prove the backward statement and let the condition number convert it.
  • Count the operations, and solve the recurrence exactly. An asymptotic order hides the constant that decides whether an algorithm is worth using. Every cost in this chapter is a closed form or an explicit leading term.
  • A residual is an error bar. Chapter 20’s perturbation bounds turn a quantity the algorithm already has into a certificate, which is what allows an iteration to know when to stop.
  • Iterate in a subspace, not along a direction. The Krylov space is generated by the one operation an iteration can afford, and it is large enough to contain the answer to a polynomial approximation problem whose solution is the algorithm.
  • A conserved spectrum comes from a commutator. If L˙=[B,L], then L(t) is a similarity orbit and its eigenvalues do not move; differentiating a conjugation is the whole proof.
  • A fast algorithm is a factorization. Factor the linear map (the Fourier matrix) or the bilinear map (the matrix product) into cheap pieces and recursive calls, then count the calls against the size reduction.

Found a typo or a mistake? Report it, or read this page’s source

The text of this book is licensed under CC BY-NC-SA 4.0.