-------------------------------------------------------------------------------- Math 2270 Sec. 3 Laboratory Assignment #2. Treibergs Due Oct. 5, 1998 -------------------------------------------------------------------------------- Create a document in which you answer the following questions, using a mixture of MAPLE computations and textual insertions (using Ò#Ó to comment or hand- written text.) Many of you are already doing this, but make sure that your paper is self contained. Include the question, the answer and any explanation. Print out a copy and hand it in. Remember to put your name and section number on your paper. EXPERIMENTS WITH DETERMINANTS Here are some commands which you might need for this project. >with(linalg): # Loads the linear algebra routines. >A:=matrix([[1,2,6],[3,4,5],[7,9,11]]); [ 1 2 6 ] A:= [ 3 4 5 ] [ 7 9 11 ] >A[2,3]; # Gives the entry for row 2 and column 3. 5 >det(A); # Computes the determinant. -3 >transpose(A); # computes the transpose [ 1 3 7 ] [ 2 4 9 ] [ 6 5 11 ] >det("); # The double quotes " is shorthand for the # immediately preceding display. # (Transpose of A in this case.) -3 ># Here are some more instructions >band(V,n); # Makes an n x n banded matrix from the # values given for the left and top by the # 2n-1 dimensional vector V. Try # >band([0,1,2,3,4,5,6,7,8,9,10],6); >inverse(A); # computes the inverse. Same as >evalm(A^(-1)); >add(A,B); # Adds two matrices. Same as >evalm(A+B); >multiply(A,B); # Multiplies two matrices. Same as # >evalm(A &* B); >minor(A,i,j); # Gives the (n-1) x (n-1) submatrix obtained # by removing the i-th row and j-th column >adj(A); # Computes the transpose of the cofactor matrix. >mulrow(A,i,c); # Creates a new matrix by multiplying the i-th # row of A by the expression c. >addrow(A,i,j,c); # Creates a new matrix by replacing row j of # matrix A with the row formed by # c * row i + row j. >swaprow(A,i,j); # Exchanges row i and row j of matrix A. Problems 1.) Choose a 4 x 4 matrix A made up of many different entries so that the determinant is nonzero; Choose another 4 x 4 matrix B of the same type, unrelated to A. One of the matrices might be obtained using >hilbert(4); a.) Find det(A), det(B), AB, and det(AB) and verify that det(A)det(B)=det(AB). b.) Compute A+B. Show that det(A)+det(B) is not the same as det(A + B) by computing these quantities for your A and B. If you made an unlucky choice and these quantities turned out to be equal for your A and B, go back and make another choice. c.) Find the inverse matrix A^(-1) and verify that det(A^(-1)) = 1/det(A). d.) Find the transpose A^T of your matrix and check that det(A^T) = det(A). 2.) The following exercise deals with row operations and determinants. You may use A from (1) or choose another A. a.) Choose a number c other than 0 or 1. Tell MAPLE to define a new matrix AA obtained by multiplying the ith row of A by c. Verify that det(AA) = c det(A). b.) Tell maple to define a new matrix BB obtained from A by swapping two rows. Verify det(BB)= -det(A). c.) Choose a number c different from 0. Tell MAPLE to define a new matrix CC by adding c times one row to another row. Verify that det(CC) = det(A). 3.) Pick a row (or column) of your matrix A. Find all the minors and cofactors corresponding to your row. Let MM denote the matrix of cofactors. Verify that the expansion by cofactors formula for a row or column. For example if I choose row 1 (you make a different choice!) then compare to determinant > A[1,1]*MM[1,1] + A[1,2]*MM[1,2] + A[1,3]*MM[1,3]; 4.) Let Cn denote the n x n tridiagonal matrices consisting of 1Õs down the main diagonals and 0Õs elsewhere. Compute F(n) = det(Cn) for at least six different n and determine the pattern for F(n). Can you predict F(100)? Bonus: Prove your formula. C1 = [ 1 ], C2 = [ 1 1 ] C3 = [ 1 1 0 ] C4 = [ 1 1 0 0 ] [ 1 1 ], [ 1 1 1 ] [ 1 1 1 0 ] [ 0 1 1 ], [ 0 1 1 1 ] [ 0 0 1 1 ], etc