(*^ ::[ Information = "This is a Mathematica Notebook file. It contains ASCII text, and can be transferred by email, ftp, or other text-file transfer utility. It should be read or edited using a copy of Mathematica or MathReader. If you received this as email, use your mail application or copy/paste to save everything from the line containing (*^ down to the line containing ^*) into a plain text file. On some systems you may have to give the file a name ending with ".ma" to allow Mathematica to recognize it as a Notebook. The line below identifies what version of Mathematica created this file, but it can be opened using any other version as well."; FrontEndVersion = "Macintosh Mathematica Notebook Front End Version 2.2"; MacintoshStandardFontEncoding; fontset = title, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, e8, 24, "Times"; fontset = subtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, e6, 18, "Times"; fontset = subsubtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, italic, e6, 14, "Times"; fontset = section, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, grayBox, M22, bold, a20, 18, "Times"; fontset = subsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, blackBox, M19, bold, a15, 14, "Times"; fontset = subsubsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, whiteBox, M18, bold, a12, 12, "Times"; fontset = text, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; fontset = smalltext, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 10, "Times"; fontset = input, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeInput, M42, N23, bold, L-5, 12, "Courier"; fontset = output, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5, 12, "Courier"; fontset = message, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, R65535, L-5, 12, "Courier"; fontset = print, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5, 12, "Courier"; fontset = info, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, B65535, L-5, 12, "Courier"; fontset = postscript, PostScript, formatAsPostScript, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeGraphics, M7, l34, w282, h287, 12, "Courier"; fontset = name, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, italic, 10, "Geneva"; fontset = header, inactive, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; fontset = leftheader, inactive, L2, 12, "Times"; fontset = footer, inactive, noKeepOnOnePage, preserveAspect, center, M7, 12, "Times"; fontset = leftfooter, inactive, L2, 12, "Times"; fontset = help, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 10, "Times"; fontset = clipboard, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; fontset = completions, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; fontset = special1, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; fontset = special2, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; fontset = special3, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; fontset = special4, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; fontset = special5, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; paletteColors = 128; automaticGrouping; currentKernel; ] :[font = input; initialization; preserveAspect] *) $Post:=If[MatrixQ[#],MatrixForm[#],#]& (* :[font = input; initialization; preserveAspect] *) Exercise 2.4.1 a) (* :[font = input; initialization; preserveAspect; startGroup] *) Do[v[i]=Table[i+j-1,{j,5}],{i,4}] RowReduce[Table[v[i],{i,4}]] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{1, 0, -1, -2, -3}, {0, 1, 2, 3, 4}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}}] ;[o] 1 0 -1 -2 -3 0 1 2 3 4 0 0 0 0 0 0 0 0 0 0 :[font = input; initialization; preserveAspect; startGroup] *) Array[%[[#]]&,2] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{1, 0, -1, -2, -3}, {0, 1, 2, 3, 4}}] ;[o] 1 0 -1 -2 -3 0 1 2 3 4 :[font = input; initialization; preserveAspect] *) b) (* :[font = input; initialization; preserveAspect; startGroup] *) Do[v[i]=Table[1/(i+j),{j,6}],{i,7}] RowReduce[Table[v[i],{i,7}]] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{1, 0, 0, 0, 0, 0}, {0, 1, 0, 0, 0, 0}, {0, 0, 1, 0, 0, 0}, {0, 0, 0, 1, 0, 0}, {0, 0, 0, 0, 1, 0}, {0, 0, 0, 0, 0, 1}, {0, 0, 0, 0, 0, 0}}] ;[o] 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 :[font = input; initialization; preserveAspect; startGroup] *) Array[%[[#]]&,6] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{1, 0, 0, 0, 0, 0}, {0, 1, 0, 0, 0, 0}, {0, 0, 1, 0, 0, 0}, {0, 0, 0, 1, 0, 0}, {0, 0, 0, 0, 1, 0}, {0, 0, 0, 0, 0, 1}}] ;[o] 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 :[font = input; initialization; preserveAspect] *) c) (* :[font = input; initialization; preserveAspect; startGroup] *) A=Table[1/(i+j-1),{i,7},{j,9}] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{1, 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9}, {1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10}, {1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10, 1/11}, {1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10, 1/11, 1/12}, {1/5, 1/6, 1/7, 1/8, 1/9, 1/10, 1/11, 1/12, 1/13}, {1/6, 1/7, 1/8, 1/9, 1/10, 1/11, 1/12, 1/13, 1/14}, {1/7, 1/8, 1/9, 1/10, 1/11, 1/12, 1/13, 1/14, 1/15}}] ;[o] 1 1 1 1 1 1 1 1 - - - - - - - - 1 2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 1 1 - - - - - - - - -- 2 3 4 5 6 7 8 9 10 1 1 1 1 1 1 1 1 1 - - - - - - - -- -- 3 4 5 6 7 8 9 10 11 1 1 1 1 1 1 1 1 1 - - - - - - -- -- -- 4 5 6 7 8 9 10 11 12 1 1 1 1 1 1 1 1 1 - - - - - -- -- -- -- 5 6 7 8 9 10 11 12 13 1 1 1 1 1 1 1 1 1 - - - - -- -- -- -- -- 6 7 8 9 10 11 12 13 14 1 1 1 1 1 1 1 1 1 - - - -- -- -- -- -- -- 7 8 9 10 11 12 13 14 15 :[font = input; initialization; preserveAspect; startGroup] *) NullSpace[A] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{-7/6435, 128/2145, -112/143, 1792/429, -140/13, 896/65, -112/15, 0, 1}, {-1/3432, 7/429, -63/286, 175/143, -175/52, 63/13, -7/2, 1, 0}}] ;[o] 7 128 112 1792 140 896 -(----) ---- -(---) ---- -(---) --- 6435 2145 143 429 13 65 112 -(---) 15 0 1 1 7 63 175 175 63 -(----) --- -(---) --- -(---) -- 3432 429 286 143 52 13 7 -(-) 2 1 0 :[font = input; initialization; preserveAspect] *) Exercise 2.4.2 (* :[font = input; initialization; preserveAspect; startGroup] *) Do[q[i]=Expand[Sum[(x-i)^j,{j,0,12}]],{i,13}] A=Table[Coefficient[q[i],x,j-1],{j,13},{i,13}] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{1, 2731, 398581, 13421773, 203450521, 1865813431, 12111126301, 61083979321, 254186582833, 909090909091, 2876892678661, 8230246567621, 21633936185161}, {-6, -16839, -1627538, -40936407, -495062934, -3776050991, -20978200914, -92474357583, -341739739142, -1099173553719, -3160223018226, -8283004558439, -20088655029078}, {36, 47635, 3047482, 57243861, 552255136, 3503159911, 16656660630, 64171171177, 210598291036, 609166040571, 1591173940786, 3820896027325, 8549989693272}, {-125, -81743, -3460133, -48529775, -373452269, -1970023775, -8016407573, -26990998943, -78662204765, -204621269039, -485577457925, -1068266933903, -2205538498253}, {295, 94779, 2653303, 27780637, 170505351, 747932695, 2604552679, 7663852953, 19834344487, 46398066451, 100029595095, 201613539829, 384048468103}, {-496, -78231, -1447676, -11312839, -55371504, -201961871, -601843276, -1547602671, -3556678544, -7481993959, -14654190396, -27059454071, -47556926416}, {610, 47139, 576304, 3360421, 13115166, 39772615, 101419564, 227901129, 465089626, 879818731, 1565482920, 2648302189, 4294252054}, {-553, -20895, -168665, -733663, -2282889, -5755583, -12558265, -24659775, -44686313, -76016479, -122876313, -190434335, -284896585}, {367, 6763, 36019, 116845, 289831, 607447, 1134043, 1945849, 3130975, 4789411, 7033027, 9985573, 13782679}, {-174, -1559, -5474, -13239, -26174, -45599, -72834, -109199, -156014, -214599, -286274, -372359, -474174}, {56, 243, 562, 1013, 1596, 2311, 3158, 4137, 5248, 6491, 7866, 9373, 11012}, {-11, -23, -35, -47, -59, -71, -83, -95, -107, -119, -131, -143, -155}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}}] ;[o] 1 2731 398581 13421773 203450521 1865813431 12111126301 61083979321 254186582833 909090909091 2876892678661 8230246567621 21633936185161 -6 -16839 -1627538 -40936407 -495062934 -3776050991 -20978200914 -92474357583 -341739739142 -1099173553719 -3160223018226 -8283004558439 -20088655029078 36 47635 3047482 57243861 552255136 3503159911 16656660630 64171171177 210598291036 609166040571 1591173940786 3820896027325 8549989693272 -125 -81743 -3460133 -48529775 -373452269 -1970023775 -8016407573 -26990998943 -78662204765 -204621269039 -485577457925 -1068266933903 -2205538498253 295 94779 2653303 27780637 170505351 747932695 2604552679 7663852953 19834344487 46398066451 100029595095 201613539829 384048468103 -496 -78231 -1447676 -11312839 -55371504 -201961871 -601843276 -1547602671 -3556678544 -7481993959 -14654190396 -27059454071 -47556926416 610 47139 576304 3360421 13115166 39772615 101419564 227901129 465089626 879818731 1565482920 2648302189 4294252054 -553 -20895 -168665 -733663 -2282889 -5755583 -12558265 -24659775 -44686313 -76016479 -122876313 -190434335 -284896585 367 6763 36019 116845 289831 607447 1134043 1945849 3130975 4789411 7033027 9985573 13782679 -174 -1559 -5474 -13239 -26174 -45599 -72834 -109199 -156014 -214599 -286274 -372359 -474174 56 243 562 1013 1596 2311 3158 4137 5248 6491 7866 9373 11012 -11 -23 -35 -47 -59 -71 -83 -95 -107 -119 -131 -143 -155 1 1 1 1 1 1 1 1 1 1 1 1 1 :[font = input; initialization; preserveAspect; startGroup] *) b=Table[Coefficient[Sum[x^j,{j,0,12}],x,i-1],{i,13}] (* :[font = output; output; inactive; preserveAspect; endGroup] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1} ;[o] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1} :[font = input; initialization; preserveAspect] *) (which was obvious, could have been entered by hand) (* :[font = input; initialization; preserveAspect; startGroup] *) LinearSolve[A,b] (* :[font = output; output; inactive; preserveAspect; endGroup] {13, -78, 286, -715, 1287, -1716, 1716, -1287, 715, -286, 78, -13, 1} ;[o] {13, -78, 286, -715, 1287, -1716, 1716, -1287, 715, -286, 78, -13, 1} :[font = input; initialization; preserveAspect] *) The above solution indicates the coeff's of a linear combination of q[i]'s which gives p. (* :[font = input; initialization; preserveAspect] *) Exercise 2.4.3 (* :[font = input; initialization; preserveAspect; startGroup] *) NullSpace[A] (* :[font = output; output; inactive; preserveAspect; endGroup] {} ;[o] {} :[font = input; initialization; preserveAspect] *) The 13 linearly independent vectors form a basis in R^13, and therefore the q[i]'s fprm a basis in P12. (* :[font = input; initialization; preserveAspect] *) Exercise 2.4.4 (* :[font = input; initialization; preserveAspect; startGroup] *) B=Array[Max,{5,5}] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{1, 2, 3, 4, 5}, {2, 2, 3, 4, 5}, {3, 3, 3, 4, 5}, {4, 4, 4, 4, 5}, {5, 5, 5, 5, 5}}] ;[o] 1 2 3 4 5 2 2 3 4 5 3 3 3 4 5 4 4 4 4 5 5 5 5 5 5 :[font = input; initialization; preserveAspect; startGroup] *) Unprotect[C]; C=Array[Min,{5,5}] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{1, 1, 1, 1, 1}, {1, 2, 2, 2, 2}, {1, 2, 3, 3, 3}, {1, 2, 3, 4, 4}, {1, 2, 3, 4, 5}}] ;[o] 1 1 1 1 1 1 2 2 2 2 1 2 3 3 3 1 2 3 4 4 1 2 3 4 5 :[font = input; initialization; preserveAspect] *) Clear[b] Do[b[i]=B[[i]],{i,5}] Do[c[i]=C[[i]],{i,5}] (* :[font = input; initialization; preserveAspect] *) The above is correct due to the symmetry of B and C. For that reason, B={b[1], ..., b[5]} and C={c[1], ..., c[5]}. (* :[font = input; initialization; preserveAspect; startGroup] *) v={5,4,3,2,1} (* :[font = output; output; inactive; preserveAspect; endGroup] {5, 4, 3, 2, 1} ;[o] {5, 4, 3, 2, 1} :[font = input; initialization; preserveAspect] *) a) (* :[font = input; initialization; preserveAspect; startGroup] *) LinearSolve[B,v] (* :[font = output; output; inactive; preserveAspect; endGroup] {-1, 0, 0, 0, 6/5} ;[o] 6 {-1, 0, 0, 0, -} 5 :[font = input; initialization; preserveAspect] *) b) (* :[font = input; initialization; preserveAspect; startGroup] *) LinearSolve[C,v] (* :[font = output; output; inactive; preserveAspect; endGroup] {6, 0, 0, 0, -1} ;[o] {6, 0, 0, 0, -1} :[font = input; initialization; preserveAspect] *) (Given that b[1], ..., b[5] and c[1], ..., c[5] are bases for R^5, uniqueness of solutions is guarranteed.) (* :[font = input; initialization; preserveAspect] *) c) (* :[font = input; initialization; preserveAspect; startGroup] *) P=Inverse[C].B (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{0, 2, 3, 4, 5}, {0, -1, 0, 0, 0}, {0, 0, -1, 0, 0}, {0, 0, 0, -1, 0}, {1, 1, 1, 1, 0}}] ;[o] 0 2 3 4 5 0 -1 0 0 0 0 0 -1 0 0 0 0 0 -1 0 1 1 1 1 0 :[font = input; initialization; preserveAspect] *) d) (* :[font = input; initialization; preserveAspect; startGroup] *) Q=Inverse[B].C (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{0, 1, 1, 1, 1}, {0, -1, 0, 0, 0}, {0, 0, -1, 0, 0}, {0, 0, 0, -1, 0}, {1/5, 2/5, 3/5, 4/5, 0}}] ;[o] 0 1 1 1 1 0 -1 0 0 0 0 0 -1 0 0 0 0 0 -1 0 1 2 3 4 - - - - 5 5 5 5 0 :[font = input; initialization; preserveAspect] *) e) (* :[font = input; initialization; preserveAspect; startGroup] *) P.LinearSolve[B,v]-LinearSolve[C,v] (* :[font = output; output; inactive; preserveAspect; endGroup] {0, 0, 0, 0, 0} ;[o] {0, 0, 0, 0, 0} :[font = input; initialization; preserveAspect] *) f) (* :[font = input; initialization; preserveAspect; startGroup] *) Q.LinearSolve[C,v]-LinearSolve[B,v] (* :[font = output; output; inactive; preserveAspect; endGroup] {0, 0, 0, 0, 0} ;[o] {0, 0, 0, 0, 0} :[font = input; initialization; preserveAspect] *) g) (* :[font = input; initialization; preserveAspect; startGroup] *) P.Q (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{1, 0, 0, 0, 0}, {0, 1, 0, 0, 0}, {0, 0, 1, 0, 0}, {0, 0, 0, 1, 0}, {0, 0, 0, 0, 1}}] ;[o] 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 ^*)