mit18_06s10_pset6_s10_soln

Upload: djoseph1

Post on 03-Apr-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 MIT18_06S10_pset6_s10_soln

    1/11

    18.06ProblemSet6SolutionsTotal: 100points

    Section 4.3. Problem 4: WritedownE =Axb2 asasumof foursquaresthe last one is (C + 4D20)2. Find the derivative equations E/C = 0 andE/D=0. Divideby2toobtainthenormalequationsATAx =ATb.Solution (4points)

    Observe

    1 0 0

    A=1 11 3, b=88, anddefinex= CD .1 4 20

    Then C

    C+D8 Axb= ,C+ 3D8C+ 4D20

    and

    Ax

    b2 =C2 + (C+D

    8)2 + (C+ 3D

    8)2 + (C+ 4D

    20)2.

    ThepartialderivativesareE/C= 2C+2(C+D8)+2(C+ 3D8)+2(C+ 4D20)=8C+16D72,E/D=2(C+D8)+6(C+ 3D8)+8(C+ 4D20)=16C+52D224.

    Ontheotherhand,ATA= 4 8 , ATb= 36 .

    8 26 112Thus,ATAx=ATbyieldstheequations4C+ 8D=36, 8C+ 26D=112. Multiplying

    by

    2and

    looking

    back,

    we

    see

    that

    these

    are

    precisely

    the

    equations

    E/C

    = 0

    andE/D=0.Section 4.3. Problem 7: Findtheclosest lineb=Dt,through theorigin,tothesamefourpoints. AnexactfitwouldsolveD 0=0,D 1=8,D 3=8,D 4=20.

    1

  • 7/28/2019 MIT18_06S10_pset6_s10_soln

    2/11

    Findthe4by1matrixAandsolveATAx

    =ATb. Redrawfigure4.9ashowingthe

    bestlineb=Dtandthees.Solution (4points)Observe

    0 0A=13, b=88, ATA=(26), ATb=(112).

    4 20Thus,solvingATAx=ATb,wearriveat

    D=56/13.Hereisthediagramanalogoustofigure4.9a.

    Section4.3. Problem9: Formtheclosestparabolab=C+Dt+Et2 tothesamefour points, and write down the unsolvable equations Ax = b in three unknowns

    2

  • 7/28/2019 MIT18_06S10_pset6_s10_soln

    3/11

  • 7/28/2019 MIT18_06S10_pset6_s10_soln

    4/11

    Note

    A=1 1 01 0 11 1 01 0 1.

    Tofindthebestfitplane,wemustfindxsuchthatAxbisintheleftnullspaceofA. Observe

    Axb=C+D

    C+E1CD3

    .CE4

    Computing, we find that the first entry of AT(Axb) is 4C8. This is zerowhen C = 2, the average of the entries of b. Plugging in the point (0,0), we getC+D(0)+E(0)=C=2asdesired.Section 4.3. Problem 29: Usually there will be exactly one hyperplane inRnthatcontainsthengivenpointsx=0,a1,...,an1.beexactlyoneplanecontaining0,a1,a2 unlessexactlyonehyperplaneinRn?

    (Exampleforn=3: Therewill.) What isthetesttohave

    Solution (12points)The sentence in paranthesiscan becompleteda coupleofdifferentways. One

    couldwriteTherewillbeexactlyoneplanecontaining0, a1, a2 unlessthesethreepointsarecolinear. AnotheracceptableanswerisTherewillbeexactlyoneplanecontaining0, a1, a2 unlessthevectorsa1 anda2 arelinearlydependent.

    In general, 0, a1, . . . , an1 will be contained in an unique hyperplaneunless allofthe points 0, a1, . . . , an1 are contained in ann2 dimensional subspace. Saidanother way, 0, a1, . . . , an1 will be contained in an unique hyperplane unless thevectorsa1, . . . , an1 arelinearlydependent.Section 4.4. Problem 10: Orthonormalvectorsareautomatically linearly independent.(a)Vectorproof: Whenc1q1 +c2q2 +c3q3 =0, whatdotproduct leadstoc1 =0?Similarlyc2 =0andc3 =0. Thus,theqsareindependent.(b)Matrixproof: ShowthatQx=0 leadstox=0. SinceQmayberectangular,youcanuseQT butnotQ1.

    4

  • 7/28/2019 MIT18_06S10_pset6_s10_soln

    5/11

    Solution (4 points) For part (a): Dotting the expression c1q1 +c2q2 +c3q3 withq1, we get c1 = 0 since q1 q1 = 1, q1 q2 = q1 q3 = 0. Similarly, dotting the expression with q2 yields c2 =0 and dotting the expression with q3 yields c3 =0.Thus,{q1, q2, q3}isalinearlyindependentset.

    For part (b): Let Q be the matrix whose columns are q1, q2, q3. Since Q hasorthonormalcolumns,QTQisthethreebythreeidentitymatrix. Now,multiplyingtheequationQx=0ontheleftbyQT yieldsx=0. Thus,thenullspaceofQisthezerovectoranditscolumnsarelinearlyindependent.Section 4.4. Problem 18: Find the orthonormal vectors A,B,C by Gram-Schmidtfroma,b,c:

    a=(1,1,0,0) b=(0,1,1,0) c=(0,0,1,1).Show {A,B,C} and {a,b,c} are bases for the space of vectors perpendicular tod=(1,1,1,1).Solution (4points)WeapplyGram-Schmidttoa,b,c. Wehave

    A= a = 1 ,1,0,0 .a 2 2Next,

    B= b(bA)A = (21,21,1,0) = 1 , 1 2,0 .b(bA)A (2

    1,2

    1,1,0) 6 6, 3Finally,

    c(c A)A(c B)B 1 1 1 3C=c(c

    A)A(c

    B)B = 23,23,23, 2 .

    Notethat{a,b,c}isalinearlyindependentset. Indeed,x1a+x2b+x3c= (x1, x2x1, x3x2,x3)=(0,0,0,0)

    impliesthatx1 =x2 =x3 =0. Wechecka (1,1,1,1)=b (1,1,1,1)=c (1,1,1,1)= 0. Hence,allthreevectorsareinthenullspaceof(1,1,1,1). Moreover,thedimensionofthecolumnspaceofthetransposeandthedimensionofthenullspacesumtothedimension ofR4. Thus, the space of vectors perpendicular to (1,1,1,1) is threedimensional. Since{a,b,c} isa linearly independentsetinthisspace, it isabasis.

    5

  • 7/28/2019 MIT18_06S10_pset6_s10_soln

    6/11

    Since{A,B,C} is anorthonormal set, it isa linearly independentsetby problem10. Thus,itmustalsospanthespaceofvectorsperpendicularto(1,1,1,1),anditisalsoabasisofthisspace.Section4.4. Problem35: Factor[Q, R] =qr(A)forA=eye(4)diag([111],1).You are orthogonalizing the columns (1,1,0,0), (0,1,1,0), (0,0,1,1), and(0,0,0,1) of A. Can you scale the orthogonal columns of Q to get nice integercomponents?Solution (12points)Hereisacopyofthematlabcode

    Notethatscalingthefirstcolumnby2,thesecondcolumnby6,thethirdcolumn

    by

    23,andthefourthcolumnby2yields

    1 1 1 11 1 1 10 2 1 10 0 3 1

    6

    .

  • 7/28/2019 MIT18_06S10_pset6_s10_soln

    7/11

    Section4.4. Problem36: IfAismbyn,qr(A)producesasquare AandzeroesbelowR: ThefactorsfromMATLABare(m bym)(m byn)

    RA= Q1 Q2 .0ThencolumnsofQ1 areanorthonormalbasisforwhichfundamentalsubspace?ThemncolumnsofQ2 areanorthonormalbasisforwhichfundamentalsubspace?Solution (12points)ThencolumnsofQ1 formanorthonormalbasisforthecolumn

    spaceofA. ThemncolumnsofQ2 formanorthonormalbasisfortheleftnullspaceofA.

    Section

    5.1.

    Problem

    10:

    If

    the

    entries

    in

    every

    row

    of

    A

    add

    to

    zero,

    solve

    Ax=0toprovedetA=0. Ifthoseentriesaddtoone,showthatdet(AI)=0.DoesthismeandetA=I?Solution (4points)Ifx=(1,1, . . . ,1),thenthecomponentsofAxarethesumsof

    the rows of A. Thus, Ax=0. Since A has non-zeronullspace, it is not invertibleanddetA=0. IftheentriesineveryrowofAsumtoone,thentheentriesineveryrowofAIsumtozero. Hence,AIhasanon-zeronullspaceanddet(AI)=0.ThisdoesnotmeanthatdetA=I. Forexampleif

    A= 01 1

    0 ,

    thentheentriesofeveryrowofAsumtoone. However,detA=1.Section 5.1. Problem 18: Userowoperationstoshowthatthe3by3Vandermondedeterminantis

    1 a a2det1 b b2= (ba)(ca)(cb).

    1 c c2

    Solution (4points)Doingelimination,weget 1 a a2 1 a a2 1 a a2

    det1 b b2=det0 ba b2a2= (ba)det0 1 b+a=1 c c2 0 ca c2a2 0 ca c2a2

    7

  • 7/28/2019 MIT18_06S10_pset6_s10_soln

    8/11

    1 a a2

    = (ba)det

    0 1 b+a

    = (ba)(ca)(cb).0 0 (c

    a)(c

    b)

    Section 5.1. Problem31: (MATLAB)TheHilbertmatrixhilb(n)hasi, j entryequal to 1/(i+j1). Print the determinants of hilb(1),hilb(2), . . . ,hilb(10).Hilbertmatricesarehardtoworkwith! Whatarethepivotsofhilb(5)?Solution (12points)Hereistherelevantmatlabcode.

    Notethatthedeterminantsofthe4ththrough10thHilbertmatricesdifferfromzero by less than one ten thousandth. The pivots of the fifth Hilbert matrix are1, .0833,.0056, .0007, .0000upto foursignificantfigures. Thus,weseethatthereisevenapivotofthefifthHilbertmatrixthatdiffersfromzerobylessthanonetenthousandth.

    8

  • 7/28/2019 MIT18_06S10_pset6_s10_soln

    9/11

    Section 5.1. Problem 32: (MATLAB)What isthetypicaldeterminant(experimentally) of rand(n) and randn(n) for n = 50,100,200,400? (And what doesInfmeaninMATLAB?)Solution (12points)Thismatlabcodecomputessomeexamplesforrand.

    Asyoucansee, rand(50) is around105, rand(100) isaround1025, rand(200) isaround1079,andrand(400)isaround10219.Thismatlabcodecomputessomeexamplesforrandn.

    9

  • 7/28/2019 MIT18_06S10_pset6_s10_soln

    10/11

    Note that randn(50) is around 1031, randn(100) is around 1078, randn(200) isaround10186,andrandn(400)isjusttoobigformatlab.

    10

  • 7/28/2019 MIT18_06S10_pset6_s10_soln

    11/11

    MIT OpenCourseWarehttp://ocw.mit.edu

    18.06 Linear Algebra

    Spring 2010

    For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

    http://ocw.mit.edu/http://ocw.mit.edu/termshttp://ocw.mit.edu/termshttp://ocw.mit.edu/