21.06.2014 Views

Numerical Methods Contents - SAM

Numerical Methods Contents - SAM

Numerical Methods Contents - SAM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

x 2<br />

a<br />

.<br />

x 1<br />

Q =<br />

x 2<br />

( ) cosϕ sinϕ<br />

− sinϕ cosϕ<br />

a<br />

ϕ x<br />

. 1<br />

• Practice: for the sake of numerical stability (in order to avoid so-called cancellation) choose<br />

{ 12 (a + ‖a‖<br />

v =<br />

2 e 1 ) , if a 1 > 0 ,<br />

1<br />

2 (a − ‖a‖ 2 e 1) , if a 1 ≤ 0 .<br />

However, this is not really needed [24, Sect. 19.1] !<br />

• If K = C and a 1 = |a 1 | exp(iϕ), ϕ ∈ [0, 2π[, then choose<br />

v = 1 2 (a ± ‖a‖ 2 e 1 exp(−iϕ)) in (2.8.2).<br />

reflection at angle bisector,<br />

Fig. 21<br />

rotation turning a onto x 1 -axis.<br />

Fig. 22<br />

• efficient storage of Householder matrices → [2]<br />

➣ Note: two possible reflections/rotations<br />

△<br />

In nD: given a ∈ R n find orthogonal matrix Q ∈ R n,n such that Qa = ‖a‖ 2 e 1 , e 1 ˆ= 1st unit<br />

Choice 1:<br />

vector.<br />

Householder reflections<br />

Q = H(v) := I − 2 vvH<br />

v H v with v = 1 2 (a ± ‖a‖ 2 e 1) . (2.8.2)<br />

Ôº½<br />

¾º<br />

Ôº½ ¾º<br />

“Geometric derivation” of Householder reflection, see Figure 21<br />

Given a,b ∈ R n with ‖a‖ = ‖b‖, the difference<br />

vector v = b − a is orthogonal to the bisector.<br />

a<br />

b<br />

v<br />

Fig. 23<br />

Choice 2: successive Givens rotations (→ 2D case)<br />

⎛<br />

⎞⎛<br />

⎞ ⎛<br />

¯γ · · · ¯σ · · · 0 a 1 a (1) ⎞<br />

. ... . .<br />

.<br />

1 G 1k (a 1 , a k )a :=<br />

⎜−σ · · · γ · · · 0<br />

⎟⎜a k<br />

⎟<br />

⎝ . . . .. . ⎠⎝<br />

. ⎠ = .<br />

γ =<br />

⎜ ⎟<br />

⎝<br />

0. ⎠ , if σ =<br />

0 · · · 0 · · · 1 a n a n<br />

MATLAB-Function:<br />

[G,x] = planerot(a);<br />

a 1 √|a1<br />

| 2 +|a k | 2 ,<br />

√|a1<br />

a k<br />

| 2 +|a k | . (2.8.3)<br />

2<br />

Code 2.8.5: (plane) Givens rotation<br />

1 function [G, x ] = p l a n e r o t ( a )<br />

2 % plane Givens rotation.<br />

3 i f ( a ( 2 ) ~= 0) , r = norm( a ) ; G = [ a ’ ; −a ( 2 ) a ( 1 ) ] / r ; x = [ r ; 0 ] ;<br />

4 else , G = eye ( 2 ) ; end<br />

b = a − (a − b) = a − v vT v<br />

v T v = a − 2vvT a<br />

v T v = a − 2vvT v T v a = H(v)a ,<br />

because, due to orthogonality (a − b) ⊥ (a + b)<br />

So far, we know how to annihilate a single component of a vector by means of a Givens rotation that<br />

targets that component and some other (the first in (2.8.3)).<br />

(a − b) T (a − b) = (a − b) T (a − b + a + b) = 2(a − b) T a .<br />

Remark 2.8.4 (Details of Householder reflections).<br />

Ôº½ ¾º<br />

However, we aim to map all components to zero except for the first.<br />

This can be achieved by n − 1 successive Givens rotations.<br />

Ôº¾¼¼ ¾º

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!