Introduction
19
This simple reciprocal relationship between condition number and distance
to the nearest ill-posed problem is very common in numerical analysis, and we
shall encounter it again later.
At the beginning of the introduction we said that we would use canonical
forms of matrices to help solve linear algebra problems. For example, knowing
the exact Jordan canonical form makes computing exact eigenvalues trivial.
There is an analogous canonical form for polynomials, which makes accurate
polynomial evaluation easy: p(x) = ad di=1 (x − ri ). In other words, we represent the polynomial by its leading coefficient ad and its roots r1 , . . . rn . To
evaluate p(x) we use the obvious algorithm
p = ad
for i = 1 to d
p = p · (x − ri )
end for
It is easy to show the computed p = p(x) · (1 + δ), where |δ| ≤ 2dε; i.e., we
always get p(x) with high relative accuracy. But we need the roots of the
polynomial to do this!
1.7.
Vector and Matrix Norms
Norms are used to measure errors in matrix computations, so we need to
understand how to compute and manipulate them.
Missing proofs are left as problems at the end of the chapter.
Definition 1.3. Let B be a real (complex) linear space Rn (or Cn ). It is
normed if there is a function · : B → R, which we call a norm, satisfying
all of the following :
1) x ≥ 0, and x = 0 if and only if x = 0 (positive definiteness),
2) αx = |α| · x for any real (or complex) scalar α (homogeneity),
3) x + y ≤ x + y (the triangle inequality).
Example 1.4. The most common norms are xp = ( i |xi |p )1/p for 1 ≤ p <
∞, which we call p-norms, as well as x∞ = maxi |xi |, which we call the
∞-norm or infinity-norm. Also, if x is any norm and C is any nonsingular
matrix, then Cx is also a norm. We see that there are many norms that we could use to measure errors; it
is important to choose an appropriate one. For example, let x1 = [1, 2, 3]T in
meters and x2 = [1.01, 2.01, 2.99]T in meters. Then x2 is a good approximation
1 −x2 ∞
≈ .0033, and x3 = [10, 2.01, 2.99]T is
to x1 because the relative error xx
1 ∞
1 −x3 ∞
a bad approximation because xx
= 3. But suppose the first component
1 ∞
20
Applied Numerical Linear Algebra
is measured in kilometers instead of meters. Then in this norm x̂1 and x̂3 look
close:
.001
.01
x̂1 − x̂3 ∞
x̂1 = 2 , x̂3 = 2.01 , and
≈ .0033 .
x̂1 ∞
3
2.99
To compare x̂1 and x̂3 , we should use
1000
1
x̂s ≡
x̂
1
∞
to make the units the same or so that equally important errors make the norm
equally large.
Now we define inner products, which are a generalization of the standard
dot product i xi yi , and arise frequently in linear algebra.
Definition 1.4. Let B be a real (complex) linear space. ·, · : B × B → R(C)
is an inner product if all of the following apply :
1) x, y = y, x (or y, x),
2) x, y + z = x, y + x, z,
3) αx, y = αx, y for any real (or complex) scalar α,
4) x, x ≥ 0, and x, x = 0 if and only if x = 0.
Example
1.5. Over R, x, y = yT x = i xi yi , and over C, x, y = y ∗ x =
∗
T
i xi ȳi are inner products. (Recall that y = ȳ is the conjugate transpose of
y.) Definition 1.5. x and y are orthogonal if x, y = 0.
The most important property of an inner product is that it satisfies
the
Cauchy–Schwartz inequality. This can be used in turn to show that x, x is
a norm, one that we will frequently use.
Lemma 1.1. Cauchy–Schwartz inequality. |x, y| ≤ x, x · y, y.
x, x is a norm.
Lemma 1.2.
There is a one-to-one correspondence between inner-products and symmetric (Hermitian) positive definite matrices, as defined below. These matrices
arise frequently in applications.
Definition 1.6. A real symmetric (complex Hermitian) matrix A is positive
definite if xT Ax > 0 (x∗ Ax > 0) for all x = 0. We abbreviate symmetric
positive definite to s.p.d., and Hermitian positive to h.p.d..
Introduction
21
Lemma 1.3. Let B = Rn (or Cn ) and ·, · be an inner product. Then there
is an n-by-n s.p.d. (h.p.d.) matrix A such that x, y = y T Ax (y ∗ Ax). Conversely, if A is s.p.d (h.p.d.), then y T Ax (y∗ Ax) is an inner product.
The following two lemmas are useful in converting error bounds in terms
of one norm to error bounds in terms of another.
Lemma 1.4. Let · α and · β be two norms on Rn (or Cn ). There are
constants c1 , c2 > 0 such that, for all x, c1 xα ≤ xβ ≤ c2 xα . We also
say that norms · α and · β are equivalent with respect to constants c1 and
c2 .
Lemma 1.5.
√
nx2 ,
x2 ≤ x1 ≤
√
x∞ ≤ x2 ≤
nx∞ ,
x∞ ≤ x1 ≤ nx∞ .
In addition to vector norms, we will also need matrix norms to measure
errors in matrices.
Definition 1.7. · is a matrix norm on m-by-n matrices if it is a vector
norm on m · n dimensional space:
1) A ≥ 0 and A = 0 if and only if A = 0,
2) αA = |α| · A,
3) A + B ≤ A + B.
Example 1.6. maxij |aij | is called the max norm, and (
is called the Frobenius norm. |aij |2 )1/2 = AF
The following definition is useful for bounding the norm of a product of
matrices, something we often need to do when deriving error bounds.
Definition 1.8. Let · m×n be a matrix norm on m-by-n matrices, · n×p
be a matrix norm on n-by-p matrices, and · m×p be a matrix norm on mby-p matrices. These norms are called mutually consistent if A · Bm×p ≤
Am×n · Bn×p , where A is m-by-n and B is n-by-p.
Definition 1.9. Let A be m-by-n, · m̂ be a vector norm on Rm , and · n̂
be a vector norm on Rn . Then
Axm̂
x=0
xn̂
x∈Rn
Am̂n̂ ≡ max
is called an operator norm or induced norm or subordinate matrix norm.
22
Applied Numerical Linear Algebra
The next lemma provides a large source of matrix norms, ones that we will
use for bounding errors.
Lemma 1.6. An operator norm is a matrix norm.
Orthogonal and unitary matrices, defined next, are essential ingredients of
nearly all our algorithms for least squares problems and eigenvalue problems.
Definition 1.10. A real square matrix Q is orthogonal if Q−1 = QT . A
complex square matrix is unitary if Q−1 = Q∗ .
All rows (or columns) of orthogonal (or unitary) matrices have unit 2-norms
and are orthogonal to one another, since QQT = QT Q = I (QQ∗ = Q∗ Q = I).
The next lemma summarizes the essential properties of the norms and
matrices we have introduced so far. We will use these properties later in the
book.
Lemma 1.7.
1. Ax ≤ A · x for a vector norm and its corresponding
operator norm, or the vector two-norm and matrix Frobenius norm.
2. AB ≤ A · B for any operator norm or for the Frobenius norm.
In other words, any operator norm (or the Frobenius norm) is mutually
consistent with itself.
3. The max norm and Frobenius norm are not operator norms.
4. QAZ = A if Q and Z are orthogonal or unitary for the Frobenius
norm and for the operator norm induced by · 2 . This is really just the
Pythagorean theorem.
∞
5. A∞ ≡ maxx=0 Ax
j |aij | = maximum absolute row sum.
x∞ = maxi
1
T
6. A1 ≡ maxx=0 Ax
i |aij | = maximum absolute
x1 = A ∞ = maxj
column sum.
2
7. A2 ≡ maxx=0 Ax
λmax (A∗ A), where λmax denotes the largest
x2 =
eigenvalue.
8. A2 = AT 2 .
9. A2 = maxi |λi (A)| if A is normal, i.e., AA∗ = A∗ A.
10. If A is n-by-n, then n−1/2 A2 ≤ A1 ≤ n1/2 A2 .
11. If A is n-by-n, then n−1/2 A2 ≤ A∞ ≤ n1/2 A2 .
12. If A is n-by-n, then n−1 A∞ ≤ A1 ≤ nA∞ .
13. If A is n-by-n, then A1 ≤ AF ≤ n1/2 A2 .
Introduction
23
Proof. We prove part 7 only and leave the rest to the reader.
Since A∗ A is Hermitian, there exists an eigendecomposition A∗ A = QΛQ∗ ,
with Q a unitary matrix (the columns are eigenvectors), and Λ = diag(λ1 , . . . ,
λn ), a diagonal matrix containing the eigenvalues, which must all be real.
Note that all λi ≥ 0 since if one, say λ, were negative, we would take q as
its eigenvector and get the contradiction 0 ≤ Aq22 = q T AT Aq = qT λq =
λq22 < 0. Therefore
Ax2
(x∗ A∗ Ax)1/2
(x∗ QΛQ∗ x)1/2
= max
= max
x=0 x2
x=0
x=0
x2
x2
λi yi2
((Q∗ x)∗ ΛQ∗ x)1/2
(y ∗ Λy)1/2
= max
=
max
=
max
x=0
y=0
y=0
Q∗ x)2
y2
yi2
y2 ≤ max λmax i2 = λmax ,
y=0
yi
A2 = max
which is attainable by choosing y to be the appropriate column of the identity
matrix. 2
1.8.
References and Other Topics for Chapter 1
At the end of each chapter we will list the references most relevant to that
chapter. They are also listed alphabetically in the bibliography at the end. In
addition we will give pointers to related topics not discussed in the main text.
The most modern comprehensive work in this area is by G. Golub and C.
Van Loan [119], which also has an extensive bibliography. A recent undergraduate level or beginning graduate text in this material is by D. Watkins [250].
Another good graduate text is by L. Trefethen and D. Bau [241]. A classic
work that is somewhat dated but still an excellent reference is by J. Wilkinson
[260]. An older but still excellent book at the same level as Watkins is by G.
Stewart [233].
More detailed information on error analysis can be found in the recent book
by N. Higham [147]. Older but still good general references are by J. Wilkinson
[259] and W. Kahan [155].
“What every computer scientist should know about floating point arithmetic” by D. Goldberg is a good recent survey [117]. IEEE arithmetic is described formally in [11, 12, 157] as well as in the reference manuals published
by computer manufacturers. Discussion of error analysis with IEEE arithmetic
may be found in [53, 69, 157, 156] and the references cited therein.
A more general discussion of condition numbers and the distance to the
nearest ill-posed problem is given by the author in [70] as well as in a series
of papers by S. Smale and M. Shub [217, 218, 219, 220]. Vector and matrix
norms are discussed at length in [119, sects. 2.2, 2.3].