(*^ ::[ 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 3.4.1 (* :[font = input; initialization; preserveAspect; startGroup] *) A=Table[If[i>j,1,0],{i,4},{j,4}] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{0, 0, 0, 0}, {1, 0, 0, 0}, {1, 1, 0, 0}, {1, 1, 1, 0}}] ;[o] 0 0 0 0 1 0 0 0 1 1 0 0 1 1 1 0 :[font = input; initialization; preserveAspect; startGroup] *) Id[4]=IdentityMatrix[4]; p=Det[x Id[4]-A] (* :[font = output; output; inactive; preserveAspect; endGroup] x^4 ;[o] 4 x :[font = input; initialization; preserveAspect; startGroup] *) lambda=x/.Solve[p==0,x] (* :[font = output; output; inactive; preserveAspect; endGroup] {0, 0, 0, 0} ;[o] {0, 0, 0, 0} :[font = input; initialization; preserveAspect; startGroup] *) S=NullSpace[lambda[[1]]Id[4]-A] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{0, 0, 0, 1}}] ;[o] 0 0 0 1 :[font = input; initialization; preserveAspect; startGroup] *) M=NullSpace[S] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{0, 0, 1, 0}, {0, 1, 0, 0}, {1, 0, 0, 0}}] ;[o] 0 0 1 0 0 1 0 0 1 0 0 0 :[font = input; initialization; preserveAspect; startGroup] *) P=Transpose[Join[S,M]] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{0, 0, 0, 1}, {0, 0, 1, 0}, {0, 1, 0, 0}, {1, 0, 0, 0}}] ;[o] 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 :[font = input; initialization; preserveAspect; startGroup] *) T=Inverse[P].A.P (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{0, 1, 1, 1}, {0, 0, 1, 1}, {0, 0, 0, 1}, {0, 0, 0, 0}}] ;[o] 0 1 1 1 0 0 1 1 0 0 0 1 0 0 0 0 :[font = input; initialization; preserveAspect] *) Exercise 3.4.2 (* :[font = input; initialization; preserveAspect; startGroup] *) A=Table[Mod[i+j,2],{i,4},{j,4}] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{0, 1, 0, 1}, {1, 0, 1, 0}, {0, 1, 0, 1}, {1, 0, 1, 0}}] ;[o] 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 :[font = input; initialization; preserveAspect; startGroup] *) p=Det[x Id[4]-A] (* :[font = output; output; inactive; preserveAspect; endGroup] -4*x^2 + x^4 ;[o] 2 4 -4 x + x :[font = input; initialization; preserveAspect; startGroup] *) lambda=x/.Solve[p==0,x] (* :[font = output; output; inactive; preserveAspect; endGroup] {-2, 0, 0, 2} ;[o] {-2, 0, 0, 2} :[font = input; initialization; preserveAspect; startGroup] *) Clear[S] Do[S[i]=NullSpace[lambda[[i]]Id[4]-A],{i,4}] {S[1],S[2],S[4]} (* :[font = output; output; inactive; preserveAspect; endGroup] {{{-1, 1, -1, 1}}, {{0, -1, 0, 1}, {-1, 0, 1, 0}}, {{1, 1, 1, 1}}} ;[o] {{{-1, 1, -1, 1}}, {{0, -1, 0, 1}, {-1, 0, 1, 0}}, {{1, 1, 1, 1}}} :[font = input; initialization; preserveAspect; startGroup] *) P=Transpose[Join[S[1],S[2],S[4]]] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{-1, 0, -1, 1}, {1, -1, 0, 1}, {-1, 0, 1, 1}, {1, 1, 0, 1}}] ;[o] -1 0 -1 1 1 -1 0 1 -1 0 1 1 1 1 0 1 :[font = input; initialization; preserveAspect; startGroup] *) T=Inverse[P].A.P (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{-2, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 2}}] ;[o] -2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 :[font = input; initialization; preserveAspect] *) Exercise 3.4.3 (* :[font = input; initialization; preserveAspect; startGroup] *) A=Table[If[i<=2,2,0],{i,4},{j,4}] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{2, 2, 2, 2}, {2, 2, 2, 2}, {0, 0, 0, 0}, {0, 0, 0, 0}}] ;[o] 2 2 2 2 2 2 2 2 0 0 0 0 0 0 0 0 :[font = input; initialization; preserveAspect; startGroup] *) p=Det[x Id[4]-A] (* :[font = output; output; inactive; preserveAspect; endGroup] -4*x^3 + x^4 ;[o] 3 4 -4 x + x :[font = input; initialization; preserveAspect; startGroup] *) lambda=x/.Solve[p==0,x] (* :[font = output; output; inactive; preserveAspect; endGroup] {0, 0, 0, 4} ;[o] {0, 0, 0, 4} :[font = input; initialization; preserveAspect; startGroup] *) Do[S[i]=NullSpace[lambda[[i]]Id[4]-A],{i,4}] {S[1],S[4]} (* :[font = output; output; inactive; preserveAspect; endGroup] {{{-1, 0, 0, 1}, {-1, 0, 1, 0}, {-1, 1, 0, 0}}, {{1, 1, 0, 0}}} ;[o] {{{-1, 0, 0, 1}, {-1, 0, 1, 0}, {-1, 1, 0, 0}}, {{1, 1, 0, 0}}} :[font = input; initialization; preserveAspect; startGroup] *) P=Transpose[Join[S[1],S[4]]] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{-1, -1, -1, 1}, {0, 0, 1, 1}, {0, 1, 0, 0}, {1, 0, 0, 0}}] ;[o] -1 -1 -1 1 0 0 1 1 0 1 0 0 1 0 0 0 :[font = input; initialization; preserveAspect; startGroup] *) T=Inverse[P].A.P (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 4}}] ;[o] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 :[font = input; initialization; preserveAspect] *) Exercise 3.4.4 (* :[font = input; initialization; preserveAspect; startGroup] *) A=Table[If[i==j,0,1],{i,4},{j,4}] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{0, 1, 1, 1}, {1, 0, 1, 1}, {1, 1, 0, 1}, {1, 1, 1, 0}}] ;[o] 0 1 1 1 1 0 1 1 1 1 0 1 1 1 1 0 :[font = input; initialization; preserveAspect; startGroup] *) p=Det[x Id[4]-A] (* :[font = output; output; inactive; preserveAspect; endGroup] -3 - 8*x - 6*x^2 + x^4 ;[o] 2 4 -3 - 8 x - 6 x + x :[font = input; initialization; preserveAspect; startGroup] *) lambda=x/.Solve[p==0,x] (* :[font = output; output; inactive; preserveAspect; endGroup] {-1, -1, -1, 3} ;[o] {-1, -1, -1, 3} :[font = input; initialization; preserveAspect; startGroup] *) Do[S[i]=NullSpace[lambda[[i]]Id[4]-A],{i,4}] {S[1],S[4]} (* :[font = output; output; inactive; preserveAspect; endGroup] {{{-1, 0, 0, 1}, {-1, 0, 1, 0}, {-1, 1, 0, 0}}, {{1, 1, 1, 1}}} ;[o] {{{-1, 0, 0, 1}, {-1, 0, 1, 0}, {-1, 1, 0, 0}}, {{1, 1, 1, 1}}} :[font = input; initialization; preserveAspect; startGroup] *) P=Transpose[Join[S[1],S[4]]] (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{-1, -1, -1, 1}, {0, 0, 1, 1}, {0, 1, 0, 1}, {1, 0, 0, 1}}] ;[o] -1 -1 -1 1 0 0 1 1 0 1 0 1 1 0 0 1 :[font = input; initialization; preserveAspect; startGroup] *) T=Inverse[P].A.P (* :[font = output; output; inactive; preserveAspect; endGroup] MatrixForm[{{-1, 0, 0, 0}, {0, -1, 0, 0}, {0, 0, -1, 0}, {0, 0, 0, 3}}] ;[o] -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 3 ^*)