Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Lecture Notes on Solving Large Scale Eigenvalue Problems.pdf
Скачиваний:
49
Добавлен:
22.03.2016
Размер:
2 Мб
Скачать
☆

6.3. A NUMERICAL EXAMPLE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

115

and

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

sin( (x(k), e1)) =

kx2(k)k

=

 

 

 

ky2(k)k

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

k

x(k)

k

q| 1

(k)

2

|

k

 

2

 

k

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

y

(k)

+ t y

(k)

 

2 + y

(k)

 

 

2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<

 

 

 

ky2 k

 

 

 

 

2

 

 

y(k)

 

2(

 

µ

 

 

+ ε)k

 

y(0)

 

.

 

 

 

 

 

q41 |y1(k)|2 + 41 ky2(k)k2

≤

 

 

k

2

k ≤

 

|

 

2

|

 

k

2

k

 

Since we can choose ε arbitrarily small, we have proved

Theorem 6.2 Let the eigenvalues of A Fn×n be arranged such that |λ1| > |λ2| ≥ |λ3| ≥ · · · ≥ |λn|. Let u1 and v1 be right and left eigenvectors of A corresponding to λ1, respectively. Then, the vector sequence generated by Algorithm 6.1 converges to u1 in the sense that

 

 

 

λ2

 

k

 

 

 

 

 

 

(6.13)

sin ϑ(k) = sin( (x(k), u1)) ≤ c ·

 

λ1

 

 

provided that v x(0)

= 0.

 

 

 

 

1

6

 

 

 

 

Proof. We only have to show the requirement v1x(0)2 6= 0. In the previous derivation we assumed y1(0) = 1. This was done for convenience since the iteration does not depend

on scalings. So, an equivalent assumption is y1(0) 6= 0. From this, we immediately obtain [1, −t ]x(0) 6= 0. But [1, −t ] is the left eigenvector of A in (6.4) corresponding to its largest eigenvalue. With the considerations after (6.3) this translates to the claimed condition

v1x(0) 6= 0.

Remark 6.4. The quantity µk in Algorithm 6.1 converges to |λ1|. The sign of λ1 can be found by comparing single components of y(k) and x(k−1).

Remark 6.5. The convergence of the vector iteration is faster the smaller the quotient

|λ2|/|λ1| is.

Remark 6.6. If v1x(0) = 0 then the vector iteration converges to an eigenvector corresponding to the second largest eigenvalue. In practice, rounding errors usually prevent this behaviour of the algorithm. After a long initial phase the x(k) turn to u1.

Remark 6.7. In case that λ1 6= λ2 but |λ1| = |λ2| there may be no convergence at all. An

example is

 

0

−1

,

x(0) =

β

.

A =

 

 

1

0

 

 

α

 

6.3A numerical example

In the following MATLAB script we assume that A is upper triangular and that the largest eigenvalue (in modulus) is at position (1,1), i.e., |a1,1| > |aj,j | for all j > 1.

%Demo Simple Vector Iteration

%

n = 6; randn(’state’,0);

A = diag([n:-1:1]) + triu(randn(n),1) % upper triangular matrix

116

CHAPTER 6. VECTOR ITERATION (POWER METHOD)

7

 

 

 

 

 

 

 

 

 

6

 

 

 

 

 

 

 

 

 

5

 

 

 

 

 

 

eigenvalue

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

angle(xk, u1)

 

 

4

 

 

 

 

 

 

angle/old angle

 

3

 

 

 

 

 

 

 

 

 

2

 

 

 

 

 

 

 

 

 

1

 

 

 

 

 

 

 

 

 

0

20

40

60

80

100

120

140

160

180

0

Figure 6.2: Plot of three important quantities: eigenvalue, angle between eigenvector approximation and exact eigenvector, convergence rate of eigenvector

x0 = rand(n,1); x0=x0/norm(x0)

% initial vector

e = eye(n,1); % Right eigenvector corresponding to largest

%eigenvalue A(1,1)

%----------------------------------------------------------

x=x0; ang = norm(x - e*(e’*x))

hist = [ang,nan,nan];

if ~exist(’tol’), tol = 100*eps; end oldang = nan;

while

ang

> tol

 

 

x

= A*x;

 

 

mue

=

norm(x);

%

This is an approximation for the

x

=

x/mue;

%

searched eigenvalue

ang

=

norm(x - e*(e’*x));

 

 

hist = [hist; [mue,ang,ang/oldang]]; oldang = ang;

end

Because the solution is known, we can compute the angle between iterate and true solution. We can even use this angle in the stopping criterion. The matrix A is given by

A =

6.0000

1.1892

-0.5883

-0.0956

-0.6918

-0.3999

0

5.0000

2.1832

-0.8323

0.8580

0.6900

6.4. THE SYMMETRIC CASE

 

 

 

117

0

0

4.0000

0.2944

1.2540

0.8156

0

0

0

3.0000

-1.5937

0.7119

0

0

0

0

2.0000

1.2902

0

0

0

0

0

1.0000

The development of three important quantities is given in Fig. 6.2. In Fig. 6.3 the case is depicted when the initial vector is chosen orthogonal to the left eigenvector corresponding to λ1 = 6. Initially, the approximated eigenvalue is 5. Because the stopping criterion

7

 

 

 

 

 

 

 

 

6

 

 

 

 

 

 

 

 

5

 

 

 

 

 

 

 

 

4

 

 

 

 

 

eigenvalue

 

 

 

 

 

 

angle(xk, u1)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

angle/old_angle

 

3

 

 

 

 

 

 

 

 

2

 

 

 

 

 

 

 

 

1

 

 

 

 

 

 

 

 

0

50

100

150

200

250

300

350

400

0

Figure 6.3: Plot of three important quantities: eigenvalue, angle between eigenvector approximation and exact eigenvector, convergence rate of eigenvector. Here, the initial vector is chosen orthogonal to the left eigenvector corresponding to the largest eigenvalue

does not hold, the iteration continues until eventually rounding errors take e ect.

6.4The symmetric case

Let us now consider the Hermitian/symmetric case. We again assume the now real eigenvalues to be arranged as in (6.5). But now the Schur decomposition of A becomes its spectral decomposition,

(6.14)

A = UΛU ,

U = [u1

, . . . , un], Λ = diag(λ1, . . . , λn).

For the convergence analysis, we assume that A is diagonal, and that

(6.15)

 

λ1 > λ2

≥ · · · ≥ λn ≥ 0.

Therefore, in (6.4) we have s = 0 and S2 = diag(λ2, . . . , λn). In (6.6) we have t = 0, and in (6.8) we have x(k) = λk1y(k), i.e., x(k) equals y(k), up to scaling. Therefore, the convergence analysis for y(k) holds for x(k) as well.

In contrast to the general case, in the Hermitian case we approximate the eigenvalue by the Rayleigh quotient of x(k),

(6.16)

λ(k) := x(k) Ax(k),

kx(k)k = 1.

118

CHAPTER 6. VECTOR ITERATION (POWER METHOD)

Algorithm 6.2 Simple vector iteration for Hermitian matrices

1:Choose a starting vector x(0) Fn with kx(0)k = 1.

2:y(0) := Ax(0).

3:λ(0) := y(0) x(0).

4:k := 0.

5:while ky(k) − λ(k)x(k)k > tol do

6:k := k + 1;

7:x(k) := yk−1/kyk−1k;

8:y(k) := Ax(k);

9:λ(k) := y(k) x(k);

10:end while

The symmetric algorithm is given in Algorithm 6.2.

In order to investigate the convergence of the Rayleigh quotient we work with auxuliary vectors

(6.17)

1

y(k) =

 

y2(k)

!

= 1 x(k).

|x(1k)|

Notice, that any ‘reasonable’ approximation of the first eigenvector e1 has a nonzero first component. For the Rayleigh quotients we have

ρ(y(k)) = ρ(x(k)).

Now,

(6.18)

λ

(k)

=

y(k) Ay(k)

 

(e1 + y2(k)) A(e1 + y2(k)) λ1 + y2(k) Ay2(k)

 

 

=

 

 

 

 

 

 

 

=

 

 

 

 

 

y(k) y(k)

 

 

(k)

k

2

 

 

 

(k)

k

2

 

 

 

 

 

 

 

 

 

1 + ky2

 

 

 

 

 

1 + ky2

 

where we used that e y(k)

= 0 and e Ay(k) = 0. Because,

 

 

 

 

 

 

 

 

 

1

2

 

1

2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

tan ϑ(k) := tan( (y(k), e1)) = ky2(k)k

 

 

 

and

 

 

 

 

 

 

 

 

 

 

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1 + tan2

(φ) =

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1 − sin2(φ)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

we get from (6.18) that

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(6.19)

λ(k) = (λ1 + y2(k) Ay2(k))(1 − sin2 ϑ(k)) = λ1 − λ1 sin2 ϑ(k) + y2(k) Ay2(k) cos2 ϑ(k).

Now, since λ1 > 0,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(6.20)

0 ≤ λ1 − λ(k) = λ1 sin2

ϑ(k) − y2(k) Ay2(k) cos2 ϑ(k)

 

 

 

 

 

 

≤ λ1 sin

2

ϑ

(k)

(k)

k

2

cos

2

ϑ

(k)

= (λ1

− λn) sin

2

ϑ

(k)

.

 

 

 

− λnky2

 

 

 

 

 

In summary, we have proved

Theorem 6.3 Let A be a symmetric matrix with spectral decomposition (6.14)–(6.15).

Then, the simple vector iteration of Algorithm 6.2 computes sequences λ(k) ∞ and

k=0

6.4. THE SYMMETRIC CASE

 

 

 

 

 

 

119

 

 

 

 

 

 

 

 

1

 

 

 

 

 

 

 

 

of A and the corre-

x(k) ∞

that converge linearly towards the largest eigenvalue λ1

k=0

 

 

 

 

 

 

 

provided that the initial vector x(0) has a nonzero component in

sponding eigenvector u

 

 

 

 

 

 

 

 

 

 

 

1

 

6

 

 

 

 

 

 

the direction of u1, i.e., that u x(0)

= 0. The convergence rates are given by

 

 

sin ϑ(k) ≤

λ1

 

sin ϑ(0)

,

|λ1 − λ(k)| ≤ (λ1 − λn)

λ1

 

 

sin2 ϑ(0).

 

 

 

 

 

 

 

λ2

 

k

 

 

 

λ2

 

2k

 

(k)

 

 

(k)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

where ϑ

 

=

(x

 

,

u

.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

 

 

 

 

 

 

 

Thus, the speed of convergence is determined by the ratio of the two eigenvalues largest in modulus and the quality of the initial guess x(0). Both sequences λ(k) and x(k) converge linearly, but the decisive ratio appears squared in the bound for the approximation error in the eigenvalue. λ1 − λn is called the spread of the spectrum of A. Its occurance in the bound for λmax − λ(k) shows that a simple scaling of the matrix does not a ect the convergence behavior of the algorithm.

Example 6.4 Let’s compute the smallest eigenvalue and corresponding eigenvector of the one-dimensional Poisson matrix T = Tn of Example 2.7 with n = 40. Let us assume that we know an upper bound τ for the largest eigenvalue λn of T then the transformed matrix τI − T has the same eigenvectors as T and eigenvalues τ − λn < τ − λn−1 < · · · < τ − λ1. So, we apply vector iteration to compute the desired quantities.

We set τ = 4(n + 1)2/π2 a number that is easily obtained by applying Gerschgorin’s circle theorem. We performed a MATLAB experiment starting with a random vector.

>>n=40;

>>T = (4*((n+1)^2/pi^2))*eye(n) - ((n+1)^2/pi^2)*p_1d(n);

>>rand(’state’,0); x0=rand(n,1);

>>[x,lam,nit]=vit(T,x0,1e-4);

>>tau-lam

ans = 0.9995

>> nit nit =

1968

In as many as 1968 iteration steps we arrived at an eigenvalue approximation 0.9995. This number is correct to all digits. The di erence to the eigenvalue 1 of the continuous eigenvalue problem −u′′(x) = λu(x) is due to the discretization error. Figure 6.4 shows the convergence history of this calculation. The straight lines show the actual angle ϑ(k) between x(k) and u1 (above) and the actual error λ(k) − λ1. These quantities can of course not be computed in general. In this example we know them, see Ex. 2.7. The dotted lines show powers of q = (τ − λ2)/(τ − λ1) that indicate the convergence rates given by Theorem 6.3. Here, q = 0.9956. Clearly, the convergence is as predicted.

Example 6.5 We mentioned that a good initial vector can reduce the number of iteration steps. Remember that the smallest eigenfunction is sin x, a function that is positive on the whole interval (0, π). Let us therefore set x(0) to be the vector of all ones.

>>x0 = ones(n,1);

>>[x,lam,nit]=vit(T,x0,1e-4);

>>nit

nit =

866

120

CHAPTER 6. VECTOR ITERATION (POWER METHOD)

102

100

10−2

10−4

10−6

10−8

10−10

0

200

400

600

800

1000

1200

1400

1600

1800

2000

Figure 6.4: Simple vector iteration with τI40 − T40

This is a surprisingly high reduction in the number of iteration steps. Figure 6.5 shows the convergence history of this calculation. Again the doted lines indicate the convergence

102

100

10−2

10−4

10−6

10−8

10−10

0

100

200

300

400

500

600

700

800

900

Figure 6.5: Simple vector iteration with τI40 − T40 and starting vector (1, 1, . . . , 1)T

rates that are to be expected. The actual convergence rates are evidently much better. How can that be?

The eigenvectors of Tn resemble the eigenfunctions sin kx of the continuous eigenvalue problem. Therefore the coe cients corresponding to eigenvectors corresponding to eigenfunctions antisymmetric with respect to the point π/2 vanish. In particular x2 = 0. Therefore the convergence rate is not q = (τ −λ2)/(τ −λ1) but qˆ = (τ −λ3)/(τ −λ1). This is verified by the numbers given in Fig. 6.6 where the assymptotic corrected convergence rates qˆ and qˆ2 are indicated.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]