HW1Solutions

# HW1Solutions - Numerical Methods with Matlab Homework#1...

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

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

View Full Document

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Numerical Methods with Matlab Homework #1 Due September 4‘“, 2008 1. Calculate. Be sure to SHOW YOUR WORK. (50 Points) a. w=au+Bv 2*[1-3 2 2]+3*[-2 4-1-6]=[2 -6 4 4]+[-6 12 —3 -18]=[-4 6 1 ~14] b a=uv 1 [1 -32 2] E3; v-[24-1 6] 2 1 «AL! —I * uTv= ‘3 *[-2 4 -1 ~61: 6 ”ll 3 l8 2 v‘i 6’ ~3. ~ 2 _ l; ‘f a? 1 ~11 c. b=vu v is a 1X4 matrix (aka vector). u is a 1X4 matrix (aka vector). 50 1x4 times 1x4 isn’t allowed. The internal numbers of the multiplication have to match (i.e. 1x4 4x1 which results in a 1x1 or a 4x1 1x4 which results in a 4x4 matrix). d. L1, L2, and Lmnorms foruand v. u=[1 -3 2 2]; v=[—2 4 —1 -6] L1 ofu: )|u| |1=|1l+|-3|+|2|+|2|=8 Llofv: |Iv))1=)-2|+|4|+|-1|+)-6|=13 L2 of u: | l”) I2=(12*(‘3)2+22+22)1/2=181/2=3\/§ L2 of v: | |v| I2=(('2)2+42+(-1)2+(—6)2)1/2=571/2=\/'5_7 Lmofu: )lu)|..=max(|1), l-3I, IZI, |2|)=3 L..ofu: ||v)).,.,=max()-2|, l4), l-1|,|5|)=5 e C=AB l 3 ill Q I 3‘ zatlall 3:31)}?"3 -333 l I ' l 1'4 "\ 1% ~31 ,3 l 3 Li *;+‘i+;*8 [ﬂew/+7 3+6 #8 l9 M16 1 3 I5 ‘1 AB: 8+c+1-‘/ Jilim; l;+‘/- W ”l"! ll "1 5 ‘1 “I-“Hl—g‘ .3499.” ’G'lo' (+0) —;4C>-\+‘l I ,Q) 7 “H 7 6113; 216646-469; 3361347 615 3 5 15 f. D=BA —A-‘I~Q+A ~(o*A'°l-3 ‘I+I+’>”3 ‘X+A+3+I I0 I9 5 2A BA- “NB-H GIMME “MM: I'l-‘I’rév IA 9 —I-S+§f). 3143+; AIAItB WW I-I ~7 13 Q, g ~A~II~LI+8 imam LI+I+A'D~ MIN -A a; ,3 o g E=aA+BB IaALI ~AI3I AGLIX ~6E‘I’s -‘/°II3II E- ‘Il'laigg‘Q-B-3~—’3‘IRLI+CI‘Q;\$~(0: 1-33.; ’lgsII I'A-I~I "Hall 39%55 40-1»; 73’7“ ‘AI “A‘I 7-9401 10390 »;~\$0/II 1 h c=AuT uT=['23] 2 l1 8 L! I 3 ALI \ I'CI‘I + c: ”IAI A : :JMwMLI — ”I ~A-3l I 1 'EWV} II R-S‘BI 1+0I~Co*3~ 7 I D=uA ,I 3 A’r’ D- A’LIA\A W —G~Q; (0 "I raj {rm 1” ‘5‘ [IIA‘ 3—0 H 9A 0 A 9‘35 I [B —\5 —-5 A] I F=AT , I LI A A AT: 3 l 3 3 1 \ 1 E I AI I Just write the rows as columns or write the columns as rows or ﬂip the matrix about its diagonal. 2. Determine if the following is a norm. (10 points) I I X I I4=X14+X24+X34+mXN4 3. There are three properties for norms. ALL THREE MUST HOLD so to ﬁnd ONE exception means that it is in fact NOT a norm. Property One: I (xl |>0 for all x¢0 Proof: This one is obvious. Pure inspection. l (xl |4=x14+x24m The power is even so any number will be positive. Any number will also be greater than zero. A sum of any numbers that are all greater than zero must also be greater than zero. Therefore, the first property holds. PropertYTWOI llaXl l=lallle| Proof: Assume x=[1 2] and (1:2. ax=[2 4]. Therefore, I (axI (=2‘+44=272 Hxl |=14+24=17; |a|*| |x| (=2*17=34 34:272 therefore (laxl |¢|a| *I |x|| so it must not be a norm. There is no need to disprove or prove property three since property two didn't hold. I am sure there are other ways to do this. This was a proof by example or contradiction (we assumed it would work only to find out it didn’t). Using numbers only works to disprove because it does not show the theorem is true for ALL domains. For the curious, if we took the 4th root of the right hand side of the equation, it would be a norm. The 4th root of 272 is 4.061 and 2*the 4th root of 17 is also equal to 4.061. Determine if the following vectors are orthogonal (15 points). The angle between any two vectors is expressed by: cosG=uTv/ | |u| |2*| |v| | 2. Orthogonal is defined as 90 degrees and c0590=0. So for the equation to equal zero, uTv must equal zero and their respective magnitudes are irrelevant. The order of the transpose is not relevant as it is multiplication (a*b=b*a). However, the transpose must be the second vector. 1x4 times 4x1 to get a 1x1. Otherwise, a 4x1 (as the equation indicates) times a 1x4 gives a 4x4 matrix. a u&v ——2 u=[1 -3 2 2], vT- _41 —6 —2 uvT=[1 -3 2 2] f1 =—2-12—2-12=-23 —-6 -28¢0. Therefore, they are not orthogonal. b. u & w u=[1 -3 2 2]; WT: l-‘NWW 3 uwT=[1 -3 2 2] 3 =3-9+4+2=o 1 0. They are orthogonal. w&u The order is irrelevant in multiplication. They were proven to be orthogonal in part b. w&x They are not the same dimension. 1x4 and 1x3 will not multiply to get a scalar. So no they are not orthogonal. ‘ If you just assumed a zero for x4: x=[1 3 2 0], the multiplication comes out as 16 which is not equal to zero. if x was altered to x=[1 3 2 -16], they would be orthogonal. ...
View Full 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