Numericl Liner Algebr Assignment 008 Nguyen Qun B Hong Students t Fculty of Mth nd Computer Science, Ho Chi Minh University of Science, Vietnm emil. nguyenqunbhong@gmil.com blog. http://hongnguyenqunb.wordpress.com November 25, 2016 Abstrct This ssignment ims t solving Exercises 10.1, 10.4 in [1]. Copyright c 2016 by Nguyen Qun B Hong, Student t Ho Chi Minh University of Science, Vietnm. This document my be copied freely for the purposes of eduction nd noncommercil reserch. Visit my site http://hongnguyenqunb.wordpress.com to get more. 1
CONTENTS Contents 1 Problems 3 2
1 Problems Problem 1 (Exercise 10.1, [1]). Determine the (1) eigenvlues, (2) determinnt nd (3) singulr vlues of Householder reflector. For the eigenvlues, give geometric rgument s well s n lgebric proof. In the complex cse, there is circle of possible reflections, i.e., the vector x cn be reflected to z x e 1, where z is ny sclr with z 1. And in the rel cse, there re two lterntives, with z ±1 in z x e 1. Thus, we just need to hndle this problem in the complex cse generlly. Now, in the complex cse, suppose we re constructing unitry mtrices Q k in Householder method. Ech Q k is chosen to be unitry mtrix of the form I 0 Q k (1.1) 0 F where I is the (k 1) (k 1) identity nd F is n (m k + 1) (m k + 1) unitry mtrix. Suppose, t the beginning of step k, the entries k,..., m of the kth column re given by the vector x C m k+1. The Householder reflector F effects the following mp. Explicitly, the Householder reflector F is F : x F x x e 1 (1.2) F I 2 vv v v (1.3) where v z x e 1 x. Solution. We compute eigenvlues, determinnt nd singulr vlues of F in turns. First of ll, we cn esily choose z such tht v 0. 1. If v u 0, i.e., u is perpendiculr to v, then F u u 2v v u v v (1.4) u (1.5) Hence, F hs m k eigenvlues 1 since the subspce of C m k+1 tht is orthogonl to v 0 hs dimension m k. In ddition, we lso hve v is n eigenvector of F itself. Indeed, Thus, the lst eigenvlue of F is 1. F v v 2v v v v v (1.6) v 2v (1.7) v (1.8) Geometric interprettion. The reflection of v is v, nd reflection of ny vector perpendiculr to v is v itself. 3
2. The determinnt of F is det F m k+1 i1 λ i (1.9) ( 1) 1 m k (1.10) 1 (1.11) 3. Since F is unitry, i.e., F F I, using the Theorem 5.4, [1], we deduce tht ll singulr vlues of A equl to 1. Problem 2 (Exercise 10.4, [1]). Consider the 2 2 orthogonl mtrices c s F (1.12) s c c s J (1.13) s c where s sin θ 0 nd c cos θ 0 for some θ 0. The first mtrix hs det F 1 nd is reflector - the specil cse of Householder reflector in dimension 2. The second hs det J 1 nd effects rottion insted of reflection. Such mtrix is clled Givens rottions. 1. Describe exctly wht geometric effects left-multiplictions by F nd J hve on the plne R 2. (J rottes the plne by the ngle θ, for exmple, but is the rottion clockwise or counterclockwise?) 2. Describe n lgorithm for QR fctoriztion tht is nlogous to Algorithm 10.1, [1]-p.73, but bsed on Givens rottions insted of Householder reflections. 3. Show tht your lgorithm involves six flops per entry operted on rther thn four, so tht the symptotic opertion count is 50% greter thn Work for Householder orthogonliztion: 2mn 2 2 3 n3 flops. Solution 1. We now solve 1 nd 2 through trigonometric view points since it is good ide to use trigonometric in describing geometric effects in [1]. 1. We consider R 2 in polr coordinte for simplicity. r sin α c s r sin α F (1.14) r cos α s c r cos α sin θ0 cos α cos θ r 0 sin α (1.15) sin θ 0 sin α + cos θ 0 cos α r sin (θ0 α) (1.16) r cos (θ 0 α) Geometric interprettion of F. The left-multipliction by F will reflect the plne R 2 cross the hyperplne θ θ 0 2 (1.17) 4
We hndle J similrly. r sin α c s r sin α J r cos α s c r cos α [ cos θ0 sin α + sin θ r 0 cos α cos θ 0 cos α sin θ 0 sin α r sin (α + θ0 ) r cos (α + θ 0 ) ] (1.18) (1.19) (1.20) Geometric interprettion of J. The left-multipliction by F will rotte the plne R 2 by the ngle θ 0. In prticulr, if θ 0 > 0, this rottion is counterclockwise nd if θ 0 < 0, this rottion is clockwise. Of course, if θ 0 0 this rottion is identity opertor. 2. We focus on performing elimintion under single column of A, which we then repet for ech column. For Householder, this is done by single Householder rottion. Since we re using 2 2 rottions, we hve to eliminte [ under ] r sin α column one number t time. Given 2-component vector x, r cos α we need J : x Jx [ x 2 0 ] (1.21) We now use (1.21) to find givens rottion J explicitly. r r sin α J 0 r cos α r sin (α + θ0 ) r cos (α + θ 0 ) (1.22) (1.23) Thus, we obtin system of equtions r sin (α + θ 0 ) r (1.24) r cos (α + θ 0 ) 0 (1.25) If r 0, tke J is n rbitrry givens rottions, i.e., θ 0 cn be tken rbitrrily. If r 0, we cn choose to mke (1.24)-(1.25) hold. θ 0 π 2 α (1.26) Describe n lgorithm for QR fctoriztion for given rottions. Then we just do this working bottom-up from the column: rotte the bottom two rows to introduce one zero, the the next two rows to introduce second zero, etc. Solution 2. We now solve 2 nd 3 s usul. This pproch is good for counting flops in 3. 5
[ 2. Insted of trigonometric nottion, we cn tke x b (1.21) becomes [ ] 2 + b 2 s J 0 b cos θ0 + b sin θ 0 sin θ 0 + b cos θ 0 Thus, we obtin system of equtions ] s usul. Then (1.27) (1.28) Solving (1.29)-(1.30) out yields Some esy computtion yields Hence, we cn choose cos θ 0 + b sin θ 0 2 + b 2 (1.29) sin θ 0 + b cos θ 0 0 (1.30) cos θ 0 sin θ 0 2 + b 2 (1.31) b 2 + b 2 (1.32) tn 2 θ 0 1 cos 2 θ 0 1 (1.33) 2 + b 2 2 1 (1.34) b2 2 (1.35) θ 0 rctn b (1.36) nd the description of n lgorithm for QR fctoriztion for givens rottions is the sme s the bove rgument. 3. To multiply J by single 2-component vector requires mulplictions nd 2 ddition, or 6 flops, s indicted below ( cos rctn b ) ( + b sin rctn b ) J ( b sin rctn b ) ( + b cos rctn b ) (1.37) Tht is 6 flops per column vector element of the mtrix. Wheres Householder requires 4 flops per column vector element, see [1]-p.59. Therefore, 6 flops of givens rottions is 50% more thn 4 flops of Householder. The End 6
REFERENCES References [1] Lloyd N. Trefethen, Dvid Bu III, Numericl Liner Algebr, SIAM Society for Industril nd Applied Mthemtics, 1997. 7