(*^ ::[ 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 1.4.1 (* :[font = input; initialization; preserveAspect] *) A=Array[(1/(#1+#2-1))&,{5,5}]; B=Array[(#1+#2-1)&,{5,6}]; Unprotect[C]; C=Table[1/(j+1),{i,5},{j,6}]; (* :[font = input; initialization; preserveAspect] *) a) (* :[font = input; initialization; preserveAspect; startGroup] *) A.B (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{5, 437/60, 287/30, 237/20, 212/15, 197/12}, {71/20, 5, 129/20, 79/10, 187/20, 54/5}, {197/70, 547/140, 5, 853/140, 503/70, 1159/140}, {657/280, 1357/420, 3457/840, 5, 4943/840, 2843/420}, {1271/630, 2321/840, 4421/1260, 10721/2520, 5, 14479/2520}}] ;[o] 437 287 237 212 197 --- --- --- --- --- 5 60 30 20 15 12 71 129 79 187 54 -- --- -- --- -- 20 5 20 10 20 5 197 547 853 503 1159 --- --- --- --- ---- 70 140 5 140 70 140 657 1357 3457 4943 2843 --- ---- ---- ---- ---- 280 420 840 5 840 420 1271 2321 4421 10721 14479 ---- ---- ---- ----- ----- 630 840 1260 2520 5 2520 :[font = input; initialization; preserveAspect] *) b) (* :[font = input; initialization; preserveAspect; startGroup] *) A.(B+C) (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{737/120, 362/45, 811/80, 923/75, 1045/72, 586/35}, {171/40, 329/60, 109/16, 819/100, 1151/120, 1541/140}, {941/280, 299/70, 2953/560, 2209/350, 2063/280, 4133/490}, {937/336, 1777/504, 4857/1120, 21743/4200, 4343/720, 2703/392}, {1721/720, 2846/945, 5321/1440, 13871/3150, 77479/15120, 12904/2205}}] ;[o] 737 362 811 923 1045 586 --- --- --- --- ---- --- 120 45 80 75 72 35 171 329 109 819 1151 1541 --- --- --- --- ---- ---- 40 60 16 100 120 140 941 299 2953 2209 2063 4133 --- --- ---- ---- ---- ---- 280 70 560 350 280 490 937 1777 4857 21743 4343 2703 --- ---- ---- ----- ---- ---- 336 504 1120 4200 720 392 1721 2846 5321 13871 77479 12904 ---- ---- ---- ----- ----- ----- 720 945 1440 3150 15120 2205 :[font = input; initialization; preserveAspect] *) c) (* :[font = input; initialization; preserveAspect; startGroup] *) A.B+A.C (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{737/120, 362/45, 811/80, 923/75, 1045/72, 586/35}, {171/40, 329/60, 109/16, 819/100, 1151/120, 1541/140}, {941/280, 299/70, 2953/560, 2209/350, 2063/280, 4133/490}, {937/336, 1777/504, 4857/1120, 21743/4200, 4343/720, 2703/392}, {1721/720, 2846/945, 5321/1440, 13871/3150, 77479/15120, 12904/2205}}] ;[o] 737 362 811 923 1045 586 --- --- --- --- ---- --- 120 45 80 75 72 35 171 329 109 819 1151 1541 --- --- --- --- ---- ---- 40 60 16 100 120 140 941 299 2953 2209 2063 4133 --- --- ---- ---- ---- ---- 280 70 560 350 280 490 937 1777 4857 21743 4343 2703 --- ---- ---- ----- ---- ---- 336 504 1120 4200 720 392 1721 2846 5321 13871 77479 12904 ---- ---- ---- ----- ----- ----- 720 945 1440 3150 15120 2205 :[font = input; initialization; preserveAspect] *) d) (* :[font = input; initialization; preserveAspect; startGroup] *) A.(B-C) (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{463/120, 587/90, 2159/240, 1709/150, 4951/360, 3379/210}, {113/40, 271/60, 487/80, 761/100, 1093/120, 1483/140}, {127/56, 124/35, 2647/560, 1028/175, 1961/280, 398/49}, {457/240, 1057/360, 2617/672, 20257/4200, 5783/1008, 39059/5880}, {921/560, 1901/756, 3721/1120, 8621/2100, 73721/15120, 16579/2940}}] ;[o] 463 587 2159 1709 4951 3379 --- --- ---- ---- ---- ---- 120 90 240 150 360 210 113 271 487 761 1093 1483 --- --- --- --- ---- ---- 40 60 80 100 120 140 127 124 2647 1028 1961 398 --- --- ---- ---- ---- --- 56 35 560 175 280 49 457 1057 2617 20257 5783 39059 --- ---- ---- ----- ---- ----- 240 360 672 4200 1008 5880 921 1901 3721 8621 73721 16579 --- ---- ---- ---- ----- ----- 560 756 1120 2100 15120 2940 :[font = input; initialization; preserveAspect] *) e) (* :[font = input; initialization; preserveAspect; startGroup] *) A.B-A.C (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{463/120, 587/90, 2159/240, 1709/150, 4951/360, 3379/210}, {113/40, 271/60, 487/80, 761/100, 1093/120, 1483/140}, {127/56, 124/35, 2647/560, 1028/175, 1961/280, 398/49}, {457/240, 1057/360, 2617/672, 20257/4200, 5783/1008, 39059/5880}, {921/560, 1901/756, 3721/1120, 8621/2100, 73721/15120, 16579/2940}}] ;[o] 463 587 2159 1709 4951 3379 --- --- ---- ---- ---- ---- 120 90 240 150 360 210 113 271 487 761 1093 1483 --- --- --- --- ---- ---- 40 60 80 100 120 140 127 124 2647 1028 1961 398 --- --- ---- ---- ---- --- 56 35 560 175 280 49 457 1057 2617 20257 5783 39059 --- ---- ---- ----- ---- ----- 240 360 672 4200 1008 5880 921 1901 3721 8621 73721 16579 --- ---- ---- ---- ----- ----- 560 756 1120 2100 15120 2940 :[font = input; initialization; preserveAspect] *) f) (* :[font = input; initialization; preserveAspect] *) A.(B.C) : not defined (* :[font = input; initialization; preserveAspect] *) g) (* :[font = input; initialization; preserveAspect] *) (A.B).C : not defined (* :[font = input; initialization; preserveAspect] *) h) (* :[font = input; initialization; preserveAspect; startGroup] *) MatrixPower[A,5] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{445816483439/80015040000, 887363751649/274337280000, 5227474328389/2240421120000, 32958117976009/17923368960000, 306965630861131/201637900800000}, {887363751649/274337280000, 1352380860767/720135360000, 9105400283419/6721263360000, 71761331911877/67212633600000, 213882509167681/241965480960000}, {5227474328389/2240421120000, 9105400283419/6721263360000, 2736906678823/2800526400000, 6902507578753/8961684480000, 180012828253381/282293061120000}, {32958117976009/17923368960000, 71761331911877/67212633600000, 6902507578753/8961684480000, 19040362658809/31365895680000, 162142911595081/322620641280000}, {306965630861131/201637900800000, 213882509167681/241965480960000, 180012828253381/282293061120000, 162142911595081/322620641280000, 151022043178381/362948221440000}}] ;[o] 445816483439 887363751649 5227474328389 ------------ ------------ ------------- 80015040000 274337280000 2240421120000 32958117976009 306965630861131 -------------- --------------- 17923368960000 201637900800000 887363751649 1352380860767 9105400283419 ------------ ------------- ------------- 274337280000 720135360000 6721263360000 71761331911877 213882509167681 -------------- --------------- 67212633600000 241965480960000 5227474328389 9105400283419 2736906678823 ------------- ------------- ------------- 2240421120000 6721263360000 2800526400000 6902507578753 180012828253381 ------------- --------------- 8961684480000 282293061120000 32958117976009 71761331911877 6902507578753 -------------- -------------- ------------- 17923368960000 67212633600000 8961684480000 19040362658809 162142911595081 -------------- --------------- 31365895680000 322620641280000 306965630861131 213882509167681 180012828253381 --------------- --------------- --------------- 201637900800000 241965480960000 282293061120000 162142911595081 151022043178381 --------------- --------------- 322620641280000 362948221440000 :[font = input; initialization; preserveAspect] *) i) (* :[font = input; initialization; preserveAspect; startGroup] *) Inverse[A].MatrixPower[A,6] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{445816483439/80015040000, 887363751649/274337280000, 5227474328389/2240421120000, 32958117976009/17923368960000, 306965630861131/201637900800000}, {887363751649/274337280000, 1352380860767/720135360000, 9105400283419/6721263360000, 71761331911877/67212633600000, 213882509167681/241965480960000}, {5227474328389/2240421120000, 9105400283419/6721263360000, 2736906678823/2800526400000, 6902507578753/8961684480000, 180012828253381/282293061120000}, {32958117976009/17923368960000, 71761331911877/67212633600000, 6902507578753/8961684480000, 19040362658809/31365895680000, 162142911595081/322620641280000}, {306965630861131/201637900800000, 213882509167681/241965480960000, 180012828253381/282293061120000, 162142911595081/322620641280000, 151022043178381/362948221440000}}] ;[o] 445816483439 887363751649 5227474328389 ------------ ------------ ------------- 80015040000 274337280000 2240421120000 32958117976009 306965630861131 -------------- --------------- 17923368960000 201637900800000 887363751649 1352380860767 9105400283419 ------------ ------------- ------------- 274337280000 720135360000 6721263360000 71761331911877 213882509167681 -------------- --------------- 67212633600000 241965480960000 5227474328389 9105400283419 2736906678823 ------------- ------------- ------------- 2240421120000 6721263360000 2800526400000 6902507578753 180012828253381 ------------- --------------- 8961684480000 282293061120000 32958117976009 71761331911877 6902507578753 -------------- -------------- ------------- 17923368960000 67212633600000 8961684480000 19040362658809 162142911595081 -------------- --------------- 31365895680000 322620641280000 306965630861131 213882509167681 180012828253381 --------------- --------------- --------------- 201637900800000 241965480960000 282293061120000 162142911595081 151022043178381 --------------- --------------- 322620641280000 362948221440000 :[font = input; initialization; preserveAspect] *) j) (* :[font = input; initialization; preserveAspect] *) Id[n_]:=Array[If[#1==#2,1,0]&,{n,n}] (* :[font = input; initialization; preserveAspect; startGroup] *) A+3Id[5] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{4, 1/2, 1/3, 1/4, 1/5}, {1/2, 10/3, 1/4, 1/5, 1/6}, {1/3, 1/4, 16/5, 1/6, 1/7}, {1/4, 1/5, 1/6, 22/7, 1/8}, {1/5, 1/6, 1/7, 1/8, 28/9}}] ;[o] 1 1 1 1 - - - - 4 2 3 4 5 1 10 1 1 1 - -- - - - 2 3 4 5 6 1 1 16 1 1 - - -- - - 3 4 5 6 7 1 1 1 22 1 - - - -- - 4 5 6 7 8 1 1 1 1 28 - - - - -- 5 6 7 8 9 :[font = input; initialization; preserveAspect] *) k) (* :[font = input; initialization; preserveAspect; startGroup] *) Id[5].A (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{1, 1/2, 1/3, 1/4, 1/5}, {1/2, 1/3, 1/4, 1/5, 1/6}, {1/3, 1/4, 1/5, 1/6, 1/7}, {1/4, 1/5, 1/6, 1/7, 1/8}, {1/5, 1/6, 1/7, 1/8, 1/9}}] ;[o] 1 1 1 1 - - - - 1 2 3 4 5 1 1 1 1 1 - - - - - 2 3 4 5 6 1 1 1 1 1 - - - - - 3 4 5 6 7 1 1 1 1 1 - - - - - 4 5 6 7 8 1 1 1 1 1 - - - - - 5 6 7 8 9 :[font = input; initialization; preserveAspect] *) l) (* :[font = input; initialization; preserveAspect; startGroup] *) MatrixPower[A,3]-3A+Id[5] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{381/1400, -7961/43200, -55163/1058400, -10051/2822400, 560191/31752000}, {-7961/43200, 173599/226800, -417607/2116800, -1737103/10584000, -5295659/38102400}, {-55163/1058400, -417607/2116800, 78359/98000, -781801/4233600, -7435559/44452800}, {-10051/2822400, -1737103/10584000, -781801/4233600, 1350683/1646400, -8567459/50803200}, {560191/31752000, -5295659/38102400, -7435559/44452800, -8567459/50803200, 47880541/57153600}}] ;[o] 381 7961 55163 10051 ---- -(-----) -(-------) -(-------) 1400 43200 1058400 2822400 560191 -------- 31752000 7961 173599 417607 1737103 -(-----) ------ -(-------) -(--------) 43200 226800 2116800 10584000 5295659 -(--------) 38102400 55163 417607 78359 781801 -(-------) -(-------) ----- -(-------) 1058400 2116800 98000 4233600 7435559 -(--------) 44452800 10051 1737103 781801 1350683 -(-------) -(--------) -(-------) ------- 2822400 10584000 4233600 1646400 8567459 -(--------) 50803200 560191 5295659 7435559 8567459 -------- -(--------) -(--------) -(--------) 31752000 38102400 44452800 50803200 47880541 -------- 57153600 :[font = input; initialization; preserveAspect] *) Exercise 1.4.2 (* :[font = input; initialization; preserveAspect; startGroup] *) L=Array[Min,{2,2}]; M=Array[Max,{2,2}]; M.L-L.M (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{0, 1}, {-1, 0}}] ;[o] 0 1 -1 0 :[font = input; initialization; preserveAspect; startGroup] *) L=Array[Min,{3,3}]; M=Array[Max,{3,3}]; M.L-L.M (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{0, 4, 5}, {-4, 0, 0}, {-5, 0, 0}}] ;[o] 0 4 5 -4 0 0 -5 0 0 :[font = input; initialization; preserveAspect; startGroup] *) L=Array[Min,{10,10}]; M=Array[Max,{10,10}]; M.L-L.M (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{0, 53, 103, 149, 190, 225, 253, 273, 284, 285}, {-53, 0, 49, 93, 131, 162, 185, 199, 203, 196}, {-103, -49, 0, 43, 79, 107, 126, 135, 133, 119}, {-149, -93, -43, 0, 35, 61, 77, 82, 75, 55}, {-190, -131, -79, -35, 0, 25, 39, 41, 30, 5}, {-225, -162, -107, -61, -25, 0, 13, 13, -1, -30}, {-253, -185, -126, -77, -39, -13, 0, -1, -17, -49}, {-273, -199, -135, -82, -41, -13, 1, 0, -17, -51}, {-284, -203, -133, -75, -30, 1, 17, 17, 0, -35}, {-285, -196, -119, -55, -5, 30, 49, 51, 35, 0}}] ;[o] 0 53 103 149 190 225 253 273 284 285 -53 0 49 93 131 162 185 199 203 196 -103 -49 0 43 79 107 126 135 133 119 -149 -93 -43 0 35 61 77 82 75 55 -190 -131 -79 -35 0 25 39 41 30 5 -225 -162 -107 -61 -25 0 13 13 -1 -30 -253 -185 -126 -77 -39 -13 0 -1 -17 -49 -273 -199 -135 -82 -41 -13 1 0 -17 -51 -284 -203 -133 -75 -30 1 17 17 0 -35 -285 -196 -119 -55 -5 30 49 51 35 0 :[font = input; initialization; preserveAspect; startGroup] *) L=Array[Min,{11,11}]; M=Array[Max,{11,11}]; M.L-L.M (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{0, 64, 125, 182, 234, 280, 319, 350, 372, 384, 385}, {-64, 0, 60, 115, 164, 206, 240, 265, 280, 284, 276}, {-125, -60, 0, 54, 101, 140, 170, 190, 199, 196, 180}, {-182, -115, -54, 0, 46, 83, 110, 126, 130, 121, 98}, {-234, -164, -101, -46, 0, 36, 61, 74, 74, 60, 31}, {-280, -206, -140, -83, -36, 0, 24, 35, 32, 14, -20}, {-319, -240, -170, -110, -61, -24, 0, 10, 5, -16, -54}, {-350, -265, -190, -126, -74, -35, -10, 0, -6, -29, -70}, {-372, -280, -199, -130, -74, -32, -5, 6, 0, -24, -67}, {-384, -284, -196, -121, -60, -14, 16, 29, 24, 0, -44}, {-385, -276, -180, -98, -31, 20, 54, 70, 67, 44, 0}}] ;[o] 0 64 125 182 234 280 319 350 372 384 385 -64 0 60 115 164 206 240 265 280 284 276 -125 -60 0 54 101 140 170 190 199 196 180 -182 -115 -54 0 46 83 110 126 130 121 98 -234 -164 -101 -46 0 36 61 74 74 60 31 -280 -206 -140 -83 -36 0 24 35 32 14 -20 -319 -240 -170 -110 -61 -24 0 10 5 -16 -54 -350 -265 -190 -126 -74 -35 -10 0 -6 -29 -70 -372 -280 -199 -130 -74 -32 -5 6 0 -24 -67 -384 -284 -196 -121 -60 -14 16 29 24 0 -44 -385 -276 -180 -98 -31 20 54 70 67 44 0 :[font = input; initialization; preserveAspect] *) Exercise 1.4.3 (* :[font = input; initialization; preserveAspect; startGroup] *) g[i_,j_]=i^2-j^2; A=Array[g,{3,3}] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{0, -3, -8}, {3, 0, -5}, {8, 5, 0}}] ;[o] 0 -3 -8 3 0 -5 8 5 0 :[font = input; initialization; preserveAspect; startGroup] *) p[A]=MatrixPower[A,3]+98A (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}] ;[o] 0 0 0 0 0 0 0 0 0 :[font = input; initialization; preserveAspect] *) If A were invertible, then MatrixPower[A,3]+98A = 0 ==> A.(MatrixPower[A,2]+98Id) = 0 ==> Inverse[A].A.(MatrixPower[A,2]+98Id) = Inverse[A].0 ==> MatrixPower[A,2]+98Id = 0, which is not true: (* :[font = input; initialization; preserveAspect; startGroup] *) MatrixPower[A,2]+98Id[3] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{25, -40, 15}, {-40, 64, -24}, {15, -24, 9}}] ;[o] 25 -40 15 -40 64 -24 15 -24 9 :[font = input; initialization; preserveAspect] *) Now, see what error message Mathematica gives: (* :[font = input; initialization; preserveAspect; startGroup] *) Inverse[A] (* :[font = message; inactive; preserveAspect] LinearSolve::nosol: Linear equation encountered which has no solution. :[font = output; output; inactive; preserveAspect; endGroup] Inverse[{{0, -3, -8}, {3, 0, -5}, {8, 5, 0}}] ;[o] Inverse[{{0, -3, -8}, {3, 0, -5}, {8, 5, 0}}] :[font = input; initialization; preserveAspect] *) Exercise 1.4.4 (* :[font = input; initialization; preserveAspect; startGroup] *) A=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] *) p[x]=Det[Id[5]x-A] (* :[font = output; output; inactive; preserveAspect; endGroup] -5 - 39*x - 98*x^2 - 85*x^3 - 15*x^4 + x^5 ;[o] 2 3 4 5 -5 - 39 x - 98 x - 85 x - 15 x + x :[font = input; initialization; preserveAspect; startGroup] *) -5Id[5]-39A-98A.A-85A.A.A-15A.A.A.A+A.A.A.A.A (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}}] ;[o] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 :[font = input; initialization; preserveAspect] *) From p[A]=0 we have A.(-39Id-98A-85A.A-15A.A.A+A.A.A.A)=5Id ==> (-39Id-98A-85A.A-15A.A.A+A.A.A.A)/5 = Inverse[A] (* :[font = input; initialization; preserveAspect; startGroup] *) (-39Id[5]-98A-85A.A-15A.A.A+A.A.A.A)/5 (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{-1, 1, 0, 0, 0}, {1, -2, 1, 0, 0}, {0, 1, -2, 1, 0}, {0, 0, 1, -2, 1}, {0, 0, 0, 1, -4/5}}] ;[o] -1 1 0 0 0 1 -2 1 0 0 0 1 -2 1 0 0 0 1 -2 1 4 -(-) 0 0 0 1 5 :[font = input; initialization; preserveAspect; startGroup] *) Inverse[A] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{-1, 1, 0, 0, 0}, {1, -2, 1, 0, 0}, {0, 1, -2, 1, 0}, {0, 0, 1, -2, 1}, {0, 0, 0, 1, -4/5}}] ;[o] -1 1 0 0 0 1 -2 1 0 0 0 1 -2 1 0 0 0 1 -2 1 4 -(-) 0 0 0 1 5 :[font = input; initialization; preserveAspect] *) Exercise 1.4.5 (* :[font = input; initialization; preserveAspect] *) A:=Array[Random[Integer,{-10,10}]&,{4,4}]; (* :[font = input; initialization; preserveAspect; startGroup] *) Do[Print[Inverse[A]//MatrixForm],{i,1,10}] (* :[font = print; inactive; preserveAspect; endGroup] 453 430 101 89 -(----) -(----) -(----) ---- 3001 3001 3001 3001 217 218 214 248 ---- -(----) ---- -(----) 3001 3001 3001 3001 180 167 219 223 ---- -(----) ---- ---- 3001 3001 3001 3001 675 124 71 86 ---- ---- ---- ---- 3001 3001 3001 3001 231 1102 65 206 -(----) -(----) ---- ---- 6995 6995 1399 1399 38 151 104 230 ---- ---- ---- -(----) 1399 1399 1399 1399 464 3 70 101 -(----) -(----) ---- -(----) 6995 6995 1399 1399 461 193 160 31 ---- -(----) -(----) ---- 6995 6995 1399 1399 889 480 168 1067 ---- -(----) ---- ---- 6001 6001 6001 6001 25 54 619 105 -(----) ---- -(----) ---- 6001 6001 6001 6001 332 3 299 1006 -(----) -(----) -(----) -(----) 6001 6001 6001 6001 131 523 117 650 -(----) ---- ---- -(----) 6001 6001 6001 6001 168 383 17 661 ---- ---- ---- ---- 3331 3331 6662 6662 334 8 235 320 ---- ---- ---- ---- 3331 3331 3331 3331 440 210 679 145 ---- ---- ---- ---- 3331 3331 6662 6662 185 164 179 102 ---- ---- -(----) -(----) 3331 3331 3331 3331 189 266 510 549 ---- ---- -(----) ---- 2029 2029 2029 2029 263 295 291 9 -(----) -(----) ---- ---- 2029 2029 2029 2029 67 56 213 98 -(----) ---- ---- -(----) 2029 2029 2029 2029 640 525 793 603 -(----) -(----) ---- -(----) 2029 2029 2029 2029 307 153 9 1007 -(----) --- -- ---- 3010 430 43 3010 1 1 1 -(--) -(--) -- 70 10 0 70 117 38 7 222 ---- -(---) -(--) -(----) 1505 215 43 1505 4 1 4 -- -(-) -(--) 35 5 0 35 155 10 41 97 --- -(--) -(--) -(---) 264 33 66 528 27 1 7 1 -- -(--) -(--) -(--) 44 11 11 88 5 1 1 -(-) - -(--) 8 0 2 16 5 2 3 1 -- -(--) -(--) -(--) 22 11 11 44 26 74 127 3 --- ---- ---- -(----) 245 1715 1715 1715 1 214 3 186 -- ---- --- ---- 49 1715 343 1715 19 137 8 38 --- ---- ---- -(----) 245 1715 1715 1715 8 6 171 212 --- -(---) ---- -(----) 245 343 1715 1715 263 141 153 46 ---- -(----) ---- ---- 4154 2077 8308 2077 33 6 581 219 -(----) -(----) ---- -(----) 4154 2077 8308 2077 154 56 29 33 -(----) -(----) -(----) ---- 2077 2077 2077 2077 219 149 457 246 ---- -(----) -(----) -(----) 4154 2077 8308 2077 361 73 394 353 ---- -(----) ---- -(----) 1001 1001 1001 1001 8 5 11 1 -- -(---) -- -- 91 182 91 91 271 115 293 387 ---- ---- ---- -(----) 1001 2002 1001 1001 27 9 38 36 -(--) --- -(--) -- 77 154 77 77 :[font = input; initialization; preserveAspect] *) The probability for random integer matrices (in a given range) to be invertble is quite high, as our example shows. For matrices of real numbers ("true reals", as opposed to their computer representations), that proba- bility actually equals 1. (* :[font = input; initialization; preserveAspect] *) Exercise 1.4.6 (* :[font = input; initialization; preserveAspect; startGroup] *) A=Array[a,{3,3}]; B=Array[b,{3,3}]; C=Array[c,{3,3}]; lhs=(A+B).C; rhs=A.C+B.C; Simplify[lhs-rhs] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}] ;[o] 0 0 0 0 0 0 0 0 0 :[font = input; initialization; preserveAspect] *) Exercise 1.4.7 (* :[font = input; initialization; preserveAspect; startGroup] *) A=Array[a,{5,5}]; lhs=(k*Id[5]).A; mhs=k*A; rhs=A.(k*Id[5]); lhs-mhs (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}}] ;[o] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 :[font = input; initialization; preserveAspect; startGroup] *) rhs-mhs (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}}] ;[o] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 :[font = input; initialization; preserveAspect] *) Exercise 1.4.8 (* :[font = input; initialization; preserveAspect; startGroup] *) Myrand:=Random[Integer,{-100,-1}]; Table[Myrand/Myrand,{i,5},{j,5}] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{61/33, 1/3, 82/75, 8/11, 23/24}, {8, 4/7, 29/3, 55/18, 1}, {20/9, 91/92, 31/12, 43/8, 53/35}, {5/12, 61/19, 32/19, 3/59, 13/3}, {92/49, 98/93, 44/35, 29/28, 79/52}}] ;[o] 61 1 82 8 23 -- - -- -- -- 33 3 75 11 24 4 29 55 - -- -- 8 7 3 18 1 20 91 31 43 53 -- -- -- -- -- 9 92 12 8 35 5 61 32 3 13 -- -- -- -- -- 12 19 19 59 3 92 98 44 29 79 -- -- -- -- -- 49 93 35 28 52 :[font = input; initialization; preserveAspect] *) Exercise 1.4.9 a) (* :[font = input; initialization; preserveAspect] *) f:=Function[{i,j},If[i<=j,Myrand,0]] (* :[font = input; initialization; preserveAspect] *) b) (* :[font = input; initialization; preserveAspect; startGroup] *) L=Array[f,{6,6}] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{-69, -94, -10, -98, -17, -82}, {0, -49, -97, -4, -59, -10}, {0, 0, -5, -42, -45, -84}, {0, 0, 0, -87, -74, -85}, {0, 0, 0, 0, -97, -76}, {0, 0, 0, 0, 0, -43}}] ;[o] -69 -94 -10 -98 -17 -82 0 -49 -97 -4 -59 -10 0 0 -5 -42 -45 -84 0 0 0 -87 -74 -85 0 0 0 0 -97 -76 0 0 0 0 0 -43 :[font = input; initialization; preserveAspect; startGroup] *) M=Array[f,{6,6}] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{-3, -35, -20, -34, -57, -45}, {0, -43, -5, -87, -95, -88}, {0, 0, -66, -35, -39, -95}, {0, 0, 0, -33, -49, -40}, {0, 0, 0, 0, -19, -16}, {0, 0, 0, 0, 0, -31}}] ;[o] -3 -35 -20 -34 -57 -45 0 -43 -5 -87 -95 -88 0 0 -66 -35 -39 -95 0 0 0 -33 -49 -40 0 0 0 0 -19 -16 0 0 0 0 0 -31 :[font = input; initialization; preserveAspect] *) c) (* :[font = input; initialization; preserveAspect; startGroup] *) L.M (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{207, 6457, 2510, 14108, 18378, 19061}, {0, 2107, 6647, 7790, 9755, 14941}, {0, 0, 330, 1561, 3108, 5479}, {0, 0, 0, 2871, 5669, 7299}, {0, 0, 0, 0, 1843, 3908}, {0, 0, 0, 0, 0, 1333}}] ;[o] 207 6457 2510 14108 18378 19061 0 2107 6647 7790 9755 14941 0 0 330 1561 3108 5479 0 0 0 2871 5669 7299 0 0 0 0 1843 3908 0 0 0 0 0 1333 :[font = input; initialization; preserveAspect] *) Exercise 1.4.10 (* :[font = input; initialization; preserveAspect] *) a) (* :[font = input; initialization; preserveAspect] *) g:=Function[{i,j},If[i= k, which proves our statement. (* ^*)