Uploaded by Leon Rushten

power method

advertisement
550
CHAPTER 10
NUMERICAL METHODS
10.3 POWER METHOD FOR APPROXIMATING EIGENVALUES
In Chapter 7 we saw that the eigenvalues of an n 3 n matrix A are obtained by solving its
characteristic equation
ln 1 cn21ln21 1 cn22ln22 1 . . . 1 c0 5 0.
For large values of n, polynomial equations like this one are difficult and time-consuming
to solve. Moreover, numerical techniques for approximating roots of polynomial equations
of high degree are sensitive to rounding errors. In this section we look at an alternative
method for approximating eigenvalues. As presented here, the method can be used only to
find the eigenvalue of A that is largest in absolute value—we call this eigenvalue the
dominant eigenvalue of A. Although this restriction may seem severe, dominant eigenvalues are of primary interest in many physical applications.
Definition of Dominant
Eigenvalue and
Dominant Eigenvector
Let l1, l2, . . . , and ln be the eigenvalues of an n 3 n matrix A. l1 is called the
dominant eigenvalue of A if
|l | > |l |,
1
i
i 5 2, . . . , n.
The eigenvectors corresponding to l1 are called dominant eigenvectors of A.
Not every matrix has a dominant eigenvalue. For instance, the matrix
A5
30
1
4
0
21
(with eigenvalues of l1 5 1 and l2 5 21) has no dominant eigenvalue. Similarly, the
matrix
2
0
0
A5 0
2
0
0
0
1
(with eigenvalues of l1 5 2, l2 5 2, and l3 5 1) has no dominant eigenvalue.
3
EXAMPLE 1
4
Finding a Dominant Eigenvalue
Find the dominant eigenvalue and corresponding eigenvectors of the matrix
A5
Solution
2 212
.
25
31
4
From Example 4 of Section 7.1 we know that the characteristic polynomial of A is
l2 1 3l 1 2 5 (l 1 1)(l 1 2). Therefore the eigenvalues of A are l1 5 21 and
l2 5 22, of which the dominant one is l2 5 22. From the same example we know that
the dominant eigenvectors of A (those corresponding to l2 5 22) are of the form
x5t
3 14,
3
t Þ 0.
SECTION 10.3
POWER METHOD FOR APPROXIMATING EIGENVALUES
551
The Power Method
Like the Jacobi and Gauss-Seidel methods, the power method for approximating eigenvalues is iterative. First we assume that the matrix A has a dominant eigenvalue with corresponding dominant eigenvectors. Then we choose an initial approximation x0 of one of the
dominant eigenvectors of A. This initial approximation must be a nonzero vector in Rn.
Finally we form the sequence given by
x1 5 Ax0
x2 5 Ax1 5 A(Ax0) 5 A2x0
...
x3 5 Ax2 5 A(A2x0) 5 A3x0
xk 5 Axk21 5 A(Ak21x0) 5 Akx0.
For large powers of k, and by properly scaling this sequence, we will see that we obtain
a good approximation of the dominant eigenvector of A. This procedure is illustrated in
Example 2.
EXAMPLE 2
Approximating a Dominant Eigenvector by the Power Method
Complete six iterations of the power method to approximate a dominant eigenvector of
A5
Solution
2 212
.
25
31
4
We begin with an initial nonzero approximation of
1
x0 5
.
1
We then obtain the following approximations.
34
Iteration
2 212 1
210
5
25 1
24
43 4 3 4
24
2 212 210
28
5
25 24
10
10
x1 5 Ax0 5
31
x2 5 Ax1 5
31
x5 5 Ax4
x6 5 Ax5
43 4 3 4
2 212 28
264
31 2543104 5 32224
2 212 264
136
53
5
1 25432224 3 464
2 212 136
2280
53
5
1 2543 464 3 2944
2 212 2280
568
53
53 4
43
4
1 25 294
190
x3 5 Ax2 5
x4 5 Ax3
Approximation
31.004
2.50
31.004
2.80
31.004
2.96
463
1.004
2.98
2943
1.004
2.99
1903
1.004
222
2.91
552
CHAPTER 10
NUMERICAL METHODS
Note that the approximations in Example 2 appear to be approaching scalar multiples of
314,
3
which we know from Example 1 is a dominant eigenvector of the matrix
A5
2 212
.
25
31
4
In Example 2 the power method was used to approximate a dominant eigenvector of the
matrix A. In that example we already knew that the dominant eigenvalue of A was l 5 22.
For the sake of demonstration, however, let us assume that we do not know the dominant
eigenvalue of A. The following theorem provides a formula for determining the eigenvalue
corresponding to a given eigenvector. This theorem is credited to the English physicist John
William Rayleigh (1842–1919).
Theorem 10.2
Determining an Eigenvalue
from an Eigenvector
If x is an eigenvector of a matrix A, then its corresponding eigenvalue is given by
l5
Ax ? x
.
x?x
This quotient is called the Rayleigh quotient.
Proof
Since x is an eigenvector of A, we know that Ax 5 lx, and we can write
Ax ? x lx ? x l(x ? x)
5
5
5 l.
x?x
x?x
x?x
In cases for which the power method generates a good approximation of a dominant
eigenvector, the Rayleigh quotient provides a correspondingly good approximation of the
dominant eigenvalue. The use of the Rayleigh quotient is demonstrated in Example 3.
EXAMPLE 3
Approximating a Dominant Eigenvalue
Use the result of Example 2 to approximate the dominant eigenvalue of the matrix
A5
Solution
2 212
.
25
31
4
After the sixth iteration of the power method in Example 2, we had obtained.
568
2.99
x6 5
< 190
.
190
1.00
3 4
3 4
With x 5 (2.99, 1) as our approximation of a dominant eigenvector of A, we use the
Rayleigh quotient to obtain an approximation of the dominant eigenvalue of A. First we
compute the product Ax.
SECTION 10.3
Ax 5
2 212
25
31
POWER METHOD FOR APPROXIMATING EIGENVALUES
553
26.02
4 31.004 5 322.014
2.99
Then, since
Ax ? x 5 (26.02)(2.99) 1 (22.01)(1) < 220.0
and
x ? x 5 (2.99)(2.99) 1 (1)(1) < 9.94,
we compute the Rayleigh quotient to be
l5
Ax ? x 220.0
<
< 22.01,
x?x
9.94
which is a good approximation of the dominant eigenvalue l 5 22.
From Example 2 we can see that the power method tends to produce approximations
with large entries. In practice it is best to “scale down” each approximation before proceeding to the next iteration. One way to accomplish this scaling is to determine the component of Axi that has the largest absolute value and multiply the vector Axi by the
reciprocal of this component. The resulting vector will then have components whose
absolute values are less than or equal to 1. (Other scaling techniques are possible. For
examples, see Exercises 27 and 28.
EXAMPLE 4
The Power Method with Scaling
Calculate seven iterations of the power method with scaling to approximate a dominant
eigenvector of the matrix
3
1
A 5 22
1
4
2
1
3
0
2 .
1
Use x0 5 (1, 1, 1) as the initial approximation.
Solution
One iteration of the power method produces
3
1
Ax0 5 22
1
2
1
3
43 4 3 4
0
2
1
1
3
1 5 1 ,
1
5
and by scaling we obtain the approximation
34 3 4
3
0.60
x1 5 15 1 5 0.20 .
5
1.00
554
CHAPTER 10
NUMERICAL METHODS
A second iteration yields
3
1
Ax1 5 22
1
2
1
3
43 4 3 4
0
2
1
0.60
1.00
0.20 5 1.00
1.00
2.20
and
3 4 3 4
1.00
0.45
1
1.00 5 0.45 .
x2 5
2.20
2.20
1.00
Continuing this process, we obtain the sequence of approximations shown in Table 10.6.
TABLE 10.6
x0
x1
x2
x3
x4
x5
x6
x7
3 4 3 4 3 4 3 4 3 4 3 4 3 4 3 4
1.00
1.00
1.00
0.60
0.20
1.00
0.45
0.45
1.00
0.48
0.55
1.00
0.51
0.51
1.00
0.50
0.49
1.00
0.50
0.50
1.00
0.50
0.50
1.00
From Table 10.6 we approximate a dominant eigenvector of A to be
3 4
0.50
x 5 0.50 .
1.00
Using the Rayleigh quotient, we approximate the dominant eigenvalue of A to be l 5 3.
(For this example you can check that the approximations of x and l are exact.)
REMARK:
Note that the scaling factors used to obtain the vectors in Table 10.6,
x1
x2
x3
x4
x5
x6
x7
↓
↓
↓
↓
↓
↓
↓
5.00
2.20
2.82
3.13
3.02
2.99
3.00,
are approaching the dominant eigenvalue l 5 3.
In Example 4 the power method with scaling converges to a dominant eigenvector. The
following theorem tells us that a sufficient condition for convergence of the power method
is that the matrix A be diagonalizable (and have a dominant eigenvalue).
Theorem 10.3
Convergence of the
Power Method
If A is an n 3 n diagonalizable matrix with a dominant eigenvalue, then there exists a
nonzero vector x0 such that the sequence of vectors given by
Ax0, A2x0, A3x0, A4x0, . . . , Akx0, . . .
approaches a multiple of the dominant eigenvector of A.
SECTION 10.3
Proof
POWER METHOD FOR APPROXIMATING EIGENVALUES
555
Since A is diagonalizable, we know from Theorem 7.5 that it has n linearly independent
eigenvectors x1, x2, . . . , xn with corresponding eigenvalues of l1, l2, . . . , ln. We
assume that these eigenvalues are ordered so that l1 is the dominant eigenvalue (with a corresponding eigenvector of x1). Because the n eigenvectors x1, x2, . . . , xn are linearly
independent, they must form a basis for Rn. For the initial approximation x0, we choose a
nonzero vector such that the linear combination
x0 5 c1x1 1 c2x2 1 . . . 1 cnxn
has nonzero leading coefficients. (If c1 5 0, the power method may not converge, and a different x0 must be used as the initial approximation. See Exercises 21 and 22.) Now, multiplying both sides of this equation by A produces
Ax0 5 A(c1x1 1 c2x2 1 . . . 1 cnxn)
5 c1(Ax1) 1 c2(Ax2) 1 . . . 1 cn(Axn)
5 c1(l1x1) 1 c2(l2x2) 1 . . . 1 cn(lnxn).
Repeated multiplication of both sides of this equation by A produces
Akx0 5 c1(l1kx1) 1 c2(l2kx2) 1 . . . 1 cn(lnkxn),
which implies that
l2
1l 2 x
3
Akx0 5 l1k c1x1 1 c2
k
2
ln
1l 2 x 4.
1 . . . 1 cn
1
k
n
1
Now, from our original assumption that l1 is larger in absolute value than the other eigenvalues it follows that each of the fractions
l2 l3
ln
,
, ...,
l1 l1
l1
is less than 1 in absolute value. Therefore each of the factors
l2 k
,
l1
l3 k
, ...,
l1
1 2 1 2
ln
l1
1 2
k
must approach 0 as k approaches infinity. This implies that the approximation
Akx0 < l1kc1x1, c1 Þ 0
improves as k increases. Since x1 is a dominant eigenvector, it follows that any scalar
multiple of x1 is also a dominant eigenvector. Thus we have shown that Akx0 approaches a
multiple of the dominant eigenvector of A.
The proof of Theorem 10.3 provides some insight into the rate of convergence of the
power method. That is, if the eigenvalues of A are ordered so that
|l | . |l | $ |l | $ . . . $ |l |,
1
2
3
n
556
CHAPTER 10
NUMERICAL METHODS
then the power method will converge quickly if l 2 y l 1 is small, and slowly if
l 2 y l 1 is close to 1. This principle is illustrated in Example 5.
| | | |
| | | |
EXAMPLE 5
The Rate of Convergence of the Power Method
(a) The matrix
A5
36
4
4
5
5
has eigenvalues of l1 5 10 and l2 5 21. Thus the ratio l 2 y l 1 is 0.1. For this
matrix, only four iterations are required to obtain successive approximations that agree
when rounded to three significant digits. (See Table 10.7.)
| | | |
TABLE 10.7
x0
x1
x2
x3
x4
31.0004 31.0004 31.0004 31.0004 31.0004
1.000
0.818
0.835
0.833
0.833
(b) The matrix
A5
24
7
3
4
10
5
has eigenvalues of l1 5 10 and l2 5 29. For this matrix, the ratio l 2 y l 1 is 0.9,
and the power method does not produce successive approximations that agree to three
significant digits until sixty-eight iterations have been performed, as shown in Table 10.8.
| | | |
TABLE 10.8
x0
x1
x2
31.0004 31.0004 31.0004
1.000
0.500
0.941
x66
...
...
x67
x68
31.0004 31.0004 31.0004
0.715
0.714
0.714
In this section we have discussed the use of the power method to approximate the
dominant eigenvalue of a matrix. This method can be modified to approximate other eigenvalues through use of a procedure called deflation. Moreover, the power method is only
one of several techniques that can be used to approximate the eigenvalues of a matrix.
Another popular method is called the QR algorithm.
This is the method used in most computer programs and calculators for finding eigenvalues and eigenvectors. The algorithm uses the QR–factorization of the matrix, as presented in Chapter 5. Discussions of the deflation method and the QR algorithm can be
found in most texts on numerical methods.
SECTION 10.3
❑
SECTION 10.3
30
4
2
1
24
3
1
3. A 5
23
3
2. A 5
25
21
4
23
1
3
3
1
2
3
6. A 5
4
0
3
3
4
0
7
22
0
0
3
In Exercises 7–10, use the Rayleigh quotient to compute the eigenvalue l of A corresponding to the given eigenvector x.
7. A 5
25
5
,x5
23
2
32
4
4
34
8. A 5
1
9. A 5 22
26
2
5
6
22
1
22 , x 5 1
23
3
3
10. A 5 23
21
2
24
22
23
3
9 ,x5 0
5
1
3
3
3
23
,x5
4
1
31
4
2
3 4
4 34
4 34
13. A 5
322
2
1
27
1
4
24
8
4
3
4
0
0
8
4
1
21
0
3
4
6
24
1
0
0
1
3
0
0
22
1
20. A 5 22
26
2
5
6
22
22
23
4
21. (a) Find the eigenvalues and corresponding eigenvectors of
A5
21
.
4
322
4
3
21. (b) Calculate two iterations of the power method with scaling,
starting with x0 5 s1, 1d.
3
12. A 5
3
21
1
0
6
14. A 5
322
23
1
6
4
4
mate a dominant eigenvector of the matrix A. Start with
x0 5 s1, 1, 1d and calculate four iterations. Then use x4 to approximate the dominant eigenvalue of A.
0
21
2
3
1
19. A 5 3
0
23
A5
0
0
C In Exercises 15–18, use the power method with scaling to approxi-
3
15. A 5 1
0
4
0
18. A 5 0
2
22. Repeat Exercise 21 using x0 5 s1, 1, 1d, for the matrix
mate a dominant eigenvector of the matrix A. Start with
x0 5 s1, 1d and calculate five iterations. Then use x5 to approximate the dominant eigenvalue of A.
30
3
0
0
21
21. (c) Explain why the method does not seem to converge to a
dominant eigenvector.
C In Exercises 11–14, use the power method with scaling to approxi-
11. A 5
26
7
2
nant eigenvalue. Apply the power method with scaling, starting
with x0 5 s1, 1, 1d, and observe the results of the first four iterations.
4
25
3
4
21
17. A 5
2
1
C In Exercises 19 and 20, the given matrix A does not have a domi-
25
23
4
4. A 5
2
4
3
21
0
2
5. A 5 0
0
557
EXERCISES
In Exercises 1–6, use the techniques presented in Chapter 7 to find
the eigenvalues of the given matrix A. If A has a dominant eigenvalue, find a corresponding dominant eigenvector.
1. A 5
EXERCISES
3
1
16. A 5 0
0
2
27
0
4
0
1
0
0
21
1
4
2
0 .
22
C 23. The matrix
A5
2 212
25
31
4
has a dominant eigenvalue of l 5 22. Observe that Ax 5 lx
implies that
1
A21x 5 x.
l
Apply five iterations of the power method (with scaling) on
A21 to compute the eigenvalue of A with the smallest magnitude.
C 24. Repeat Exercise 23 for the matrix
3
2
A5 0
0
3
21
0
4
1
2 .
3
558
CHAPTER 10
NUMERICAL METHODS
C 25. (a) Compute the eigenvalues of
3
2
A5
1
4
1
2
3
2
and B 5
1
C In Exercises 27 and 28, apply four iterations of the power method
(with scaling) to approximate the dominant eigenvalue of the given
matrix. After each iteration, scale the approximation by dividing by
its length so that the resulting approximation will be a unit vector.
4
3
.
4
25. (b) Apply four iterations of the power method with scaling to
each matrix in part (a), starting with x0 5 s21, 2d.
25. (c) Compute the ratios l2yl1 for A and B. For which do you
expect faster convergence?
26. Use the proof of Theorem 10.3 to show that
27. A 5
3
5
4
4
6
3
3
7
28. A 5 16
8
24
29
24
4
2
6
5
AsAkx 0d < l1sAkx 0d
for large values of k. That is, show that the scale factors
obtained in the power method approach the dominant eigenvalue.
10.4 APPLICATIONS OF NUMERICAL METHODS
Applications of Gaussian Elimination with Pivoting
In Section 2.5 we used least squares regression analysis to find linear mathematical models
that best fit a set of n points in the plane. This procedure can be extended to cover polynomial models of any degree as follows.
Regression Analysis
for Polynomials
The least squares regression polynomial of degree m for the points {(x1, y1), (x2, y2),
. . . , (xn, yn)} is given by
y 5 amxm 1 am21xm21 1 . . . 1 a2x2 1 a1x 1 a0,
where the coefficients are determined by the following system of m 1 1 linear equations.
na0 1
sS xida1 1
sS xi2da2 1 . . . 1
sS ximdam 5 S yi
sS xida0 1
sS xi2da1 1 sS xi3da2 1 . . . 1 sS xim11dam 5 S xiyi
sS xi2da0 1
sS xi3da1 1 sS xi4da2 1 .. . . 1 sS xim12dam 5 S xi2yi
.
.
.
m
m11
m12
2m
sS xi da0 1 sS xi da1 1 sS xi da2 1 . . . 1 sS xi dam 5 S ximyi
Note that if m 5 1 this system of equations reduces to
na0 1 2 sS xida1 5 S yi
sS xida0 1 sS xi2da1 5 S xiyi ,
Download