Definitions, animated
The chapter's definitions and key theorems. Animations are paced for following step by step; use the speed buttons under a video to change the pace. Jump to a card here.Floating-point numbers
What a computer can store, and what it losesA computer stores a real number as a floating-point number ±(0.d1d2⋯dt)b × be with t digits in base b and exponent L ≤ e ≤ U. Everything else is rounded: fl(x) = x(1 + δ) with |δ| ≤ ε, the machine epsilon. Each arithmetic operation rounds again. Mostly harmless, until two nearly equal numbers are subtracted and the leading digits cancel.
Floating-point explorer
Definition · Examples 7.1.1–7.1.3 · Exercises 7.1.1–7.1.3, 7.1.6–7.1.8Arithmetic with t digits, and IEEE doubles
Examples 7.1.4, 7.1.5 · Exercises 7.1.4, 7.1.5Your browser's doubles (IEEE 754, b = 2, 53 significant bits)
Gaussian elimination
LU factorization and its costElimination without interchanges computes multipliers mki = aki/aii and factors A = LU (unit lower L holding the multipliers, upper U). Then Ax = b is solved by forward substitution Ly = b and back substitution Ux = y. The factorization costs about n3/3 multiplications; each further right-hand side costs only about n2. Doubling n makes elimination about 8 times slower.
Operation counts and timing
Algorithms 7.2.1, 7.2.2Pivoting strategies
Avoid small pivots and large multipliersA small pivot produces large multipliers, and large multipliers amplify rounding errors. Partial pivoting picks, in each column, the entry of largest absolute value as pivot, so every |mki| ≤ 1; the row interchanges give PA = LU. Complete pivoting searches the whole remaining submatrix and also swaps columns. Partial pivoting is the standard choice.
Elimination in t-digit arithmetic
Examples 7.3.1–7.3.3, 7.4.2 · Exercises 7.3.1–7.3.4, 7.3.7Matrix norms and condition numbers
How sensitive is Ax = b?A matrix norm measures how much A can stretch a vector: ‖A‖ = max ‖Ax‖/‖x‖. For the 1- and ∞-norms this is the largest column sum or row sum of |aij|; for the 2-norm it is σ1. The condition number cond(A) = ‖A‖ ‖A−1‖ bounds how relative errors in the data grow in the solution:
Ill-conditioned systems
Examples 7.4.1–7.4.5 · Exercises 7.4Hilbert matrices hᵢⱼ = 1/(i + j − 1): solving Hx = H·(1, …, 1)ᵀ in double precision
Orthogonal transformations
Householder reflections and Givens rotationsOrthogonal matrices do not magnify errors: ‖Qx‖2 = ‖x‖2 and cond2(Q) = 1. A Householder matrix H = I − (1/β)vvT reflects across the hyperplane orthogonal to v; choosing v = x − αe1 with α = ±‖x‖ sends x to αe1, zeroing all entries below the first. A Givens rotation zeroes one entry at a time. Applying such matrices column by column gives the stable QR factorization.
Reflect or rotate onto an axis
Examples 7.5.1–7.5.4In ℝⁿ: zero the entries of x below position k
The eigenvalue problem
Power method and QR algorithmCharacteristic polynomials are useless numerically. The power method repeats v = Au, u = v/(scale): if |λ1| > |λ2| ≥ ⋯, the direction converges to the dominant eigenvector and the scale to λ1, with error shrinking like |λ2/λ1|k. The QR algorithm factors Ak = QkRk and sets Ak+1 = RkQk; these are similar matrices that typically become triangular, revealing all eigenvalues on the diagonal.