ECE210a_lecture9_small

# ECE210a_lecture9_small - Numerical aspects t-Digit...

This preview shows pages 1–3. Sign up to view the full content.

Gram-Schmidt Gram-Schmidt example Consider finding an orthonormal basis from the vectors, x 1 = 1 1 × 10 3 1 × 10 3 , x 2 = 1 1 × 10 3 0 , x 3 = 1 0 1 × 10 3 , using 3-digit arithmetic. bardbl x 1 bardbl = radicalbig 1 + 1 × 10 6 + 1 × 10 6 = 1 , so q 1 = x 1 ; Now, q T 1 x 2 = bracketleftbig 1 1 × 10 3 1 × 10 3 bracketrightbig 1 1 × 10 3 0 = 1 . To find the direction of the second orthonormal vector, ˆ q 2 = x 2 −( q 1 ,x 2 ) q 1 = 1 1 × 10 3 0 1 × 1 1 × 10 3 1 × 10 3 = 0 0 1 × 10 3 . Roy Smith: ECE 210a: 9 .2 Numerical aspects t -Digit Arithmetic. Examining numerical aspects. Given x ∈R , define the t -digit floating point, representation, f t ( x ) = 0 .d 1 d 2 ... d t × 10 e , where the digits, d i , and the exponent, e , minimize | x f t ( x ) | . If f t ( x ) is not unique, round away from zero. Unfortunate properties 1. f t ( x + y ) negationslash = f t ( x ) + f t ( y ). 2. f t ( xy ) negationslash = f t ( x ) f t ( y ). Consider 2-digit arithmetic with x = 21 / 2 and y = 11 / 2. Roy Smith: ECE 210a: 9 .1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Gram-Schmidt Floating arithmetic example: Three digit arithmetic gives: q 1 = 1 1 × 10 3 1 × 10 3 , q 2 = 0 0 1 , q 3 = 0 0 . 709 0 . 709 bracehtipupleft bracehtipdownrightbracehtipdownleft bracehtipupright . These two vectors are at 45 degrees! Definitely NOT orthogonal. The problem arises from the fact that the first component in each vector dominates the differences in the second two components in the calculation. Modified Gram-Schmidt In the Gram-Schmidt procedure we have, q k = ( I Q k 1 Q k 1 ) x k vextenddouble vextenddouble ( I Q k 1 Q k 1 ) x k vextenddouble vextenddouble , Q k 1 = bracketleftbig q 1 ... q k 1 bracketrightbig , Q 0 = 0 . Consider expressing the calculation of q k as a product of matrix operations. Define the projections, P 0 = I, P i = I q i q i ←− removes the part aligned with q i Roy Smith: ECE 210a: 9 .4 Gram-Schmidt Normalizing ˆ q 2 gives, q 2 = 0 0 1 . To get the last vector, ˆ q 3 = x 3 −( q 1 ,x 3 ) q 1 −( q 2 ,x 3 ) q 2 , and, ( q 1 ,x 3 ) = q T 1 x 3 = bracketleftbig 1 1 × 10 3 1 × 10 3 bracketrightbig 1 0 1 × 10 3 = 1 ( q 2 ,x 3 ) = q T 2 x 3 = bracketleftbig 0 0 1 bracketrightbig 1 0 1 × 10 3 = 1 × 10 3 .
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern