Home › Matrix Math › Lesson 12

Norms, Conditioning and Numerical Stability

Lesson 12 of 12

Key idea of this section

κ(A) = ‖A‖ ‖A⁻¹‖,    κ₂(A) = σ₁/σₙ        ‖δx‖/‖x‖ ≤ κ(A) ‖δb‖/‖b‖
forward error ≲ condition number × backward error

Matrix norms

A vector norm ‖·‖ on 𝔽ⁿ induces the operator norm ‖A‖ = max‖x‖=1 ‖Ax‖, which satisfies ‖Ax‖ ≤ ‖A‖‖x‖ and ‖AB‖ ≤ ‖A‖‖B‖. For the 1-norm the induced norm is the largest absolute column sum, for the ∞-norm it is the largest absolute row sum, and for the Euclidean norm it is the largest singular value, ‖A‖₂ = σ₁. The Frobenius norm ‖A‖F = (∑|aij|²)1/2 is not induced by any vector norm (‖I‖F = √n), but it is submultiplicative and unitarily invariant. For every induced norm ρ(A) ≤ ‖A‖, since Av = λv gives |λ|‖v‖ ≤ ‖A‖‖v‖.

Condition numbers

The condition number of an invertible matrix is κ(A) = ‖A‖‖A⁻¹‖ ≥ ‖AA⁻¹‖ = 1; in the 2-norm κ₂(A) = σ₁/σₙ. It measures how much relative errors in the data can be amplified in the solution. The term was introduced by Alan Turing in 1948, in a paper on rounding errors in matrix processes.

Theorem 12.1. Let Ax = b with b ≠ 0, and A(x + δx) = b + δb. Then ‖δx‖/‖x‖ ≤ κ(A) ‖δb‖/‖b‖, and for each A there exist b and δb for which equality holds.

Proof. From Aδx = δb, ‖δx‖ = ‖A⁻¹δb‖ ≤ ‖A⁻¹‖‖δb‖, and from b = Ax, ‖b‖ ≤ ‖A‖‖x‖. Multiplying the first inequality by the reciprocal of the second gives the bound. Equality holds when x is chosen with ‖Ax‖ = ‖A‖‖x‖ and δb with ‖A⁻¹δb‖ = ‖A⁻¹‖‖δb‖. ∎

Theorem 12.2. If Ax = b and (A + δA)(x + δx) = b, then ‖δx‖/‖x + δx‖ ≤ κ(A) ‖δA‖/‖A‖.

Proof. Subtracting gives Aδx = −δA(x + δx), so ‖δx‖ ≤ ‖A⁻¹‖‖δA‖‖x + δx‖ = κ(A)(‖δA‖/‖A‖)‖x + δx‖. ∎

Theorem 12.3 (Distance to singularity). min { ‖E‖₂ : A + E singular } = σₙ(A), so the relative distance from A to the nearest singular matrix is 1/κ₂(A).

Proof. This is the case k = n − 1 of Theorem 10.2: the singular matrices are exactly the matrices of rank at most n − 1, and the nearest one is An−1 at distance σₙ. ∎

Worked example: A = [ 1 1 ; 1 1.0001 ] has det A = 0.0001 and A⁻¹ = 10⁴ [ 1.0001 −1 ; −1 1 ], so κ∞(A) = 2.0001 × 20001 ≈ 4.0 × 10⁴. The system Ax = (2, 2.0001) has solution x = (1, 1). Changing the right side to (2, 2.0002), a relative change of about 5 × 10⁻⁵ in the ∞-norm, changes the solution to (0, 2), a relative change of 1. The amplification factor 20001 is within the bound κ∞(A).

A classical family of ill-conditioned matrices is the Hilbert matrix Hn = (1/(i + j − 1)), the Gram matrix of 1, t, …, tn−1 in L²(0, 1). It is positive definite, but κ₂(H₃) ≈ 524, κ₂(H₅) ≈ 4.8 × 10⁵ and κ₂(H₁₀) ≈ 1.6 × 10¹³, growing roughly like e3.5n. This is why fitting high-degree polynomials in the monomial basis is numerically hopeless, and why orthogonal polynomial bases are used instead. Note also that κ₂(A*A) = κ₂(A)², because the singular values of A*A are the squares of those of A; forming the normal equations squares the condition number.

Floating point and backward stability

IEEE double-precision arithmetic has unit roundoff u = 2⁻⁵³ ≈ 1.1 × 10⁻¹⁶: each arithmetic operation returns the exact result multiplied by (1 + δ) with |δ| ≤ u. An algorithm is backward stable if its computed output is the exact output for slightly perturbed input, with a relative perturbation of order u. Wilkinson's analysis (1961) showed that Gaussian elimination with partial pivoting computes x̂ satisfying (A + E)x̂ = b with ‖E‖∞ ≤ c n³ ρn u ‖A‖∞ for a modest constant c, where the growth factor ρn is the ratio of the largest entry produced during elimination to the largest entry of A. The worst case is ρn = 2n−1 (Practice Problem 56), but for matrices met in practice the growth is small, a phenomenon explained only partially to this day. Householder QR and the Cholesky factorization are backward stable unconditionally. Combining backward stability with Theorem 12.2 gives the rule of thumb that solving a linear system loses about log₁₀ κ(A) of the sixteen significant digits available.

Sensitivity of eigenvalues

Theorem 12.4 (Bauer–Fike). Let A = VΛV⁻¹ be diagonalizable and let μ be an eigenvalue of A + E. Then mini |μ − λi| ≤ κp(V) ‖E‖p for every p-norm.

Proof. If μ is an eigenvalue of A there is nothing to prove. Otherwise μI − A − E is singular, and μI − A − E = V(μI − Λ)(I − (μI − Λ)⁻¹V⁻¹EV)V⁻¹, so the last bracket is singular. Then 1 ≤ ‖(μI − Λ)⁻¹V⁻¹EV‖p ≤ κp(V)‖E‖p / mini |μ − λi|, because the p-norm of a diagonal matrix is the largest modulus of its entries. ∎

For normal matrices V can be taken unitary, κ₂(V) = 1, and eigenvalues move no further than ‖E‖₂, in agreement with Weyl's inequalities. Non-normal matrices can be dramatically worse: perturbing the (n, 1) entry of Jn(0) from 0 to ε produces the characteristic polynomial λⁿ − ε, whose roots have modulus ε1/n. For n = 10 and ε = 10⁻¹⁰ the eigenvalues move from 0 to modulus 0.1.

Computing eigenvalues

The power iteration xk+1 = Axk/‖Axk‖ converges to a dominant eigenvector at the rate |λ₂/λ₁|ᵏ when |λ₁| > |λ₂| (Practice Problem 57); it is the method behind PageRank. The standard algorithm for all eigenvalues of a dense matrix is the QR algorithm, found independently by John Francis (1961–62) and Vera Kublanovskaya (1961): factor Ak = QkRk and set Ak+1 = RkQk = Qk*AkQk. Each iterate is unitarily similar to A, and under mild conditions Ak converges to the Schur form. In practice the matrix is first reduced to Hessenberg form, shifts are used to accelerate convergence, and the whole computation takes O(n³) operations and is backward stable. The SVD is computed by the closely related Golub–Kahan–Reinsch algorithm, which never forms A*A.

Exercise

  • (a)
    Compute κ₂(diag(10, 0.1)).
  • (b)
    Show that κ₂(Q) = 1 for every unitary Q, and that κ₂(QA) = κ₂(A).
  • (c)
    Compute ‖A‖₁ and ‖A‖∞ for A = [ 1 −2 ; 3 4 ].
Show solution

Answers: (a) The singular values are 10 and 0.1, so κ₂ = 10/0.1 = 100. (b) ‖Qx‖₂ = ‖x‖₂ gives ‖Q‖₂ = 1, and Q⁻¹ = Q* is unitary too, so κ₂(Q) = 1; multiplying by Q does not change singular values, so κ₂(QA) = κ₂(A). (c) The absolute column sums are 4 and 6, so ‖A‖₁ = 6; the absolute row sums are 3 and 7, so ‖A‖∞ = 7.

V.3.1