(*^ ::[ 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.5.1 (* :[font = input; initialization; preserveAspect] *) cofactor[X_,i_,j_]:=(-1)^(i+j)Det[Transpose[Drop[ \ Transpose[Drop[X,{i,i}]],{j,j}]]] (* :[font = input; initialization; preserveAspect] *) adj[X_]:=Transpose[Table[cofactor[X,i,j],{i,Length[X]},\ {j,Length[X]}]] (* :[font = input; initialization; preserveAspect; startGroup] *) A=Table[i+j,{i,3},{j,3}] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{2, 3, 4}, {3, 4, 5}, {4, 5, 6}}] ;[o] 2 3 4 3 4 5 4 5 6 :[font = input; initialization; preserveAspect; startGroup] *) lhs=A.adj[A]; rhs=Det[A]IdentityMatrix[3]; 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.5.2 (* :[font = input; initialization; preserveAspect; startGroup] *) A=Array[Random[Integer,{-100,100}]&,{5,5}] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{-47, -45, -84, -6, -41}, {-12, -2, -73, -35, 8}, {-9, -20, 83, -21, 43}, {-93, 42, -17, -27, 10}, {-58, -48, 10, 80, -79}}] ;[o] -47 -45 -84 -6 -41 -12 -2 -73 -35 8 -9 -20 83 -21 43 -93 42 -17 -27 10 -58 -48 10 80 -79 :[font = input; initialization; preserveAspect; startGroup] *) lhs=A.adj[A]; mhs=adj[A].A; 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=Det[A]IdentityMatrix[5]; mhs-rhs (* :[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.5.3 (* :[font = input; initialization; preserveAspect; startGroup] *) A=Array[Random[Integer,{-100,100}]&,{4,4}] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{-4, -21, -98, 33}, {-100, 4, -12, -44}, {-45, -79, -28, -91}, {-31, -75, -41, 77}}] ;[o] -4 -21 -98 33 -100 4 -12 -44 -45 -79 -28 -91 -31 -75 -41 77 :[font = input; initialization; preserveAspect; startGroup] *) rhs=adj[Transpose[A]]; lhs=Transpose[adj[A]]; lhs-rhs (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{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 :[font = input; initialization; preserveAspect] *) Exercise 1.5.4 (* :[font = input; initialization; preserveAspect; startGroup] *) A=Array[Random[Integer,{-100,100}]&,{8,8}] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{43, 98, 11, -39, -39, -88, -41, 43}, {48, 20, 94, 14, 38, -76, 97, 2}, {-70, 58, 48, -69, 29, 58, 2, -78}, {92, -7, -23, 74, -5, -57, -100, 92}, {28, 33, -26, -74, -42, -69, 56, -19}, {-35, -6, -92, -17, -38, 5, -72, 17}, {-35, -5, 0, -28, -54, 30, 70, -26}, {-56, -8, 1, 94, -45, 15, 5, -37}}] ;[o] 43 98 11 -39 -39 -88 -41 43 48 20 94 14 38 -76 97 2 -70 58 48 -69 29 58 2 -78 92 -7 -23 74 -5 -57 -100 92 28 33 -26 -74 -42 -69 56 -19 -35 -6 -92 -17 -38 5 -72 17 -35 -5 0 -28 -54 30 70 -26 -56 -8 1 94 -45 15 5 -37 :[font = input; initialization; preserveAspect; startGroup] *) B=A[[{2,1,3,4,5,6,7,8}]] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{48, 20, 94, 14, 38, -76, 97, 2}, {43, 98, 11, -39, -39, -88, -41, 43}, {-70, 58, 48, -69, 29, 58, 2, -78}, {92, -7, -23, 74, -5, -57, -100, 92}, {28, 33, -26, -74, -42, -69, 56, -19}, {-35, -6, -92, -17, -38, 5, -72, 17}, {-35, -5, 0, -28, -54, 30, 70, -26}, {-56, -8, 1, 94, -45, 15, 5, -37}}] ;[o] 48 20 94 14 38 -76 97 2 43 98 11 -39 -39 -88 -41 43 -70 58 48 -69 29 58 2 -78 92 -7 -23 74 -5 -57 -100 92 28 33 -26 -74 -42 -69 56 -19 -35 -6 -92 -17 -38 5 -72 17 -35 -5 0 -28 -54 30 70 -26 -56 -8 1 94 -45 15 5 -37 :[font = input; initialization; preserveAspect; startGroup] *) lhs=Det[B]; rhs=-Det[A]; lhs-rhs (* :[font = output; output; inactive; preserveAspect; endGroup] 0 ;[o] 0 :[font = input; initialization; preserveAspect] *) Exercise 1.5.5 (* :[font = input; initialization; preserveAspect; startGroup] *) A=Array[Random[Integer,{-100,100}]&,{6,6}] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{44, 86, 47, -21, 1, -9}, {-5, -62, -43, -7, -13, 58}, {-15, -59, 98, -11, -22, 32}, {-23, 51, 31, -94, 28, -18}, {-9, -4, 67, -69, 90, -90}, {0, 22, -18, 50, -48, 55}}] ;[o] 44 86 47 -21 1 -9 -5 -62 -43 -7 -13 58 -15 -59 98 -11 -22 32 -23 51 31 -94 28 -18 -9 -4 67 -69 90 -90 0 22 -18 50 -48 55 :[font = input; initialization; preserveAspect; startGroup] *) lhs=Det[A]; A[[2]]=A[[2]]+k*A[[1]]; rhs=Det[A]; lhs-rhs (* :[font = output; output; inactive; preserveAspect; endGroup] 0 ;[o] 0 :[font = input; initialization; preserveAspect] *) Exercise 1.5.6 (* :[font = input; initialization; preserveAspect; startGroup] *) A=Array[Random[Integer,{-100,100}]&,{7,7}] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{-58, -18, 91, 61, -61, 90, 7}, {-27, -97, 82, 52, -42, -50, 47}, {-69, -53, 60, 22, -3, 63, 94}, {71, 31, 17, 68, 9, -32, 11}, {-29, -11, -38, 40, -56, 40, 15}, {15, -39, -74, -93, 52, 75, 54}, {42, 54, 13, 61, 22, 65, 48}}] ;[o] -58 -18 91 61 -61 90 7 -27 -97 82 52 -42 -50 47 -69 -53 60 22 -3 63 94 71 31 17 68 9 -32 11 -29 -11 -38 40 -56 40 15 15 -39 -74 -93 52 75 54 42 54 13 61 22 65 48 :[font = input; initialization; preserveAspect; startGroup] *) Det[A]-Det[Transpose[A]] (* :[font = output; output; inactive; preserveAspect; endGroup] 0 ;[o] 0 :[font = input; initialization; preserveAspect] *) Exercise 1.5.7 (* :[font = input; initialization; preserveAspect; startGroup] *) A=Array[Random[Integer,{-100,100}]&,{4,4}] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{26, 60, 36, -78}, {48, -76, -98, 51}, {-68, -75, -62, 7}, {73, -39, 6, -90}}] ;[o] 26 60 36 -78 48 -76 -98 51 -68 -75 -62 7 73 -39 6 -90 :[font = input; initialization; preserveAspect] *) a) (* :[font = input; initialization; preserveAspect; startGroup] *) lhs=Det[A]; rhs:=Sum[A[[i,j]]*cofactor[A,i,j],{j,1,4}]; Do[Print[lhs-rhs],{i,1,4}] (* :[font = print; inactive; preserveAspect; endGroup] 0 0 0 0 :[font = input; initialization; preserveAspect] *) b) (* :[font = input; initialization; preserveAspect; startGroup] *) lhs=Det[A]; rhs:=Sum[A[[i,j]]*cofactor[A,i,j],{i,1,4}] Do[Print[lhs-rhs],{j,1,4}] (* :[font = print; inactive; preserveAspect; endGroup] 0 0 0 0 :[font = input; initialization; preserveAspect] *) c) (* :[font = input; initialization; preserveAspect; startGroup] *) lhs:=Sum[A[[r,j]]*cofactor[A,s,j],{j,1,4}] rhs:=Sum[A[[i,r]]*cofactor[A,i,s],{i,1,4}] Do[Do[Print[lhs-rhs," for r-s=",r-s],{s,1,4}],{r,1,4}] (* :[font = print; inactive; preserveAspect; endGroup] 0 for r-s=0 0 for r-s=-1 0 for r-s=-2 0 for r-s=-3 0 for r-s=1 0 for r-s=0 0 for r-s=-1 0 for r-s=-2 0 for r-s=2 0 for r-s=1 0 for r-s=0 0 for r-s=-1 0 for r-s=3 0 for r-s=2 0 for r-s=1 0 for r-s=0 :[font = input; initialization; preserveAspect] *) (Note that the equality holds even for r=s) (* :[font = input; initialization; preserveAspect] *) Exercise 1.5.8 (* :[font = input; initialization; preserveAspect; startGroup] *) A=Array[a,{4,4}]; lhs=Det[A]; rhs=Det[Transpose[A]]; lhs-rhs (* :[font = output; output; inactive; preserveAspect; endGroup] 0 ;[o] 0 :[font = input; initialization; preserveAspect] *) Exercise 1.5.9 (* :[font = input; initialization; preserveAspect; startGroup] *) rhs=adj[Transpose[A]]; lhs=Transpose[adj[A]]; lhs-rhs (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{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 :[font = input; initialization; preserveAspect] *) Exercise 1.5.10 (* :[font = input; initialization; preserveAspect] *) We'll use induction over the dimension n for both identities in parallel. For n=1 they are both obvious, since the transpose of a 1*1 matrix is that matrix itself. Suppose now both identities are true for dimension n. Then, we look at an arbitrary (n+1)*(n+1) matrix A. Since we supposed Det[B]=Det[Transpose[B]] for any n*n matrix B, we hence have that the [[i,j]] cofactor of A is the [[j,i]] cofactor of Transpose[A] (note that those cofactors are computed from transposed n*n matrices). So, for any (n+1)*(n+1) matrix A we have: Transpose[Adj[A]]=Adj[Transpose[A]]. To the determinants: Since the textbook gives us the identity: A.Adj[A]=Det[A]*IdentityMatrix, stated in ex. 2, we'll use it in this proof, rather than some definition of Det not present in the textbook. Denote Id the IdentityMatrix and T[A] the transpose of A. Det[A]*Id=T[Det[A]*Id]=T[Adj[A].A]=T[A].T[Adj[A]]= =T[A].Adj[T[A]]=Det[T[A]]*Id (* :[font = input; initialization; preserveAspect] *) Exercise 1.5.11 (* :[font = input; initialization; preserveAspect; startGroup] *) lhs=Det[A]; B=A[[{2,1,3,4}]]; rhs=-Det[B]; lhs-rhs (* :[font = output; output; inactive; preserveAspect; endGroup] 0 ;[o] 0 :[font = input; initialization; preserveAspect] *) Exercise 1.5.12 (* :[font = input; initialization; preserveAspect; startGroup] *) A=Array[a,{4,4}]; lhs=Det[A]; A[[2]]=A[[2]]+k*A[[1]]; rhs=Det[A]; lhs-rhs (* :[font = output; output; inactive; preserveAspect; endGroup] 0 ;[o] 0 :[font = input; initialization; preserveAspect] *) Exercise 1.5.13 (* :[font = input; initialization; preserveAspect; startGroup] *) A=Array[a,{4,4}]; lhs=k*Det[A]; A[[1]]=k*A[[1]]; rhs=Det[A]; Simplify[lhs-rhs] (* :[font = output; output; inactive; preserveAspect; endGroup] 0 ;[o] 0 ^*)