lab 5 solns

3
Math 115 Lab 5 Solutions 1. A permutation matrix is a square matrix with every entry equal to either 0 or 1, with exactly one 1 in each row and exactly one 1 in each column. Show that the determinant of a permutation matrix is either 1 or -1. Answer: There are many ways to show this. Here are three possible proofs: The rows of a permutation matrix are a permutation of the rows of the identity matrix. Every permutation can be composed of row swaps, and each row swap changes the sign of the determinant by -1. Thus the overall determinant is either 1 or -1, depending on whether an even or an odd number of row swaps must be applied to produce the identity matrix. The only 1 × 1 permutation matrix is the matrix [1], which has determinant 1. For larger matrices, suppose that in the first row there is a 1 in column j . Then cofactor expansion along the first row gives (-1) j times the determinant of the submatrix obtained by deleting row 1 and column j . Note that the resulting submatrix is a permutation matrix. Thus, by induction, the determinant of any permutation matrix is ±1. The inverse of a permutation matrix P is P T , since each diagonal entry of PP T and P T P is the dot product of a standard basis vector with itself, giving 1, and each off-diagonal entry is given by the dot product of two distinct standard basis vectors, giving 0. Therefore 1 = det(I )= det(PP T ) = det(P ) det(P T ) = det(P ) 2 , which implies that det(P )= ±1. 2. Let A = 0 2 -4 -1 1 3 5 -2 1 . Compute det(A), adj(A), and A -1 . Answer: By cofactor expansion along the first row, det(A)= -2 det -1 3 5 1 - 4 det -1 1 5 -2 = -2(-1 - 15) - 4(2 - 5) = 32 + 12 = 44. The matrix of cofactors is 1+6 -(-1 - 15) 2 - 5 -(2 - 8) 0 + 20 -(0 - 10) 6+4 -(0 - 4) 0+2 = 7 16 -3 6 20 10 10 4 2 . The adjoint is the transpose of the matrix of cofactors, i.e., adj(A)= 7 6 10 16 20 4 -3 10 2 . Finally, A -1 = 1 det(A) adj(A)= 1 44 7 6 10 16 20 4 -3 10 2 = 7/44 3/22 5/22 4/11 5/11 1/11 -3/44 5/22 1/22 . 3. Find the eigenvalues of the following matrices. (a) 1 0 0 1 Answer: The characteristic equation is 0 = det(I -xI ) = det((1-x)I ) = (1-x) 2 det(I ) = (1-x) 2 , so the only eigenvalue is 1. (b) 1 1 0 1 Answer: The characteristic equation is 0 = det 1 - x 1 0 1 - x = (1 - x) 2 , so again the only eigenvalue is 1.

Upload: patricesingson

Post on 18-Nov-2015

6 views

Category:

Documents


1 download

DESCRIPTION

MATH 115

TRANSCRIPT

  • Math 115 Lab 5 Solutions

    1. A permutation matrix is a square matrix with every entry equal to either 0 or 1, with exactly one 1in each row and exactly one 1 in each column. Show that the determinant of a permutation matrix iseither 1 or 1.Answer: There are many ways to show this. Here are three possible proofs:

    The rows of a permutation matrix are a permutation of the rows of the identity matrix. Everypermutation can be composed of row swaps, and each row swap changes the sign of the determinantby 1. Thus the overall determinant is either 1 or 1, depending on whether an even or an oddnumber of row swaps must be applied to produce the identity matrix.

    The only 11 permutation matrix is the matrix [1], which has determinant 1. For larger matrices,suppose that in the first row there is a 1 in column j. Then cofactor expansion along the firstrow gives (1)j times the determinant of the submatrix obtained by deleting row 1 and column j.Note that the resulting submatrix is a permutation matrix. Thus, by induction, the determinantof any permutation matrix is 1.

    The inverse of a permutation matrix P is PT , since each diagonal entry of PPT and PT P isthe dot product of a standard basis vector with itself, giving 1, and each off-diagonal entry isgiven by the dot product of two distinct standard basis vectors, giving 0. Therefore 1 = det(I) =det(PPT ) = det(P ) det(PT ) = det(P )2, which implies that det(P ) = 1.

    2. Let A =

    0 2 41 1 35 2 1

    . Compute det(A), adj(A), and A1.Answer: By cofactor expansion along the first row,

    det(A) = 2 det[1 35 1

    ] 4 det

    [1 15 2

    ]= 2(1 15) 4(2 5) = 32 + 12 = 44.

    The matrix of cofactors is 1 + 6 (1 15) 2 5(2 8) 0 + 20 (0 10)6 + 4 (0 4) 0 + 2

    = 7 16 36 20 1010 4 2

    .The adjoint is the transpose of the matrix of cofactors, i.e.,

    adj(A) =

    7 6 1016 20 43 10 2

    .Finally,

    A1 =1

    det(A)adj(A) =

    144

    7 6 1016 20 43 10 2

    = 7/44 3/22 5/224/11 5/11 1/113/44 5/22 1/22

    .3. Find the eigenvalues of the following matrices.

    (a)[1 00 1

    ]Answer: The characteristic equation is 0 = det(IxI) = det((1x)I) = (1x)2 det(I) = (1x)2,so the only eigenvalue is 1.

    (b)[1 10 1

    ]Answer: The characteristic equation is

    0 = det[1 x 10 1 x

    ]= (1 x)2,

    so again the only eigenvalue is 1.

  • (c)[0 11 0

    ]Answer: The characteristic equation is

    0 = det[x 11 x

    ]= x2 1 = (x 1)(x + 1),

    so the eigenvalues are 1 and 1.

    (d)[0 11 0

    ]Answer: The characteristic equation is

    0 = det[x 11 x

    ]= x2 + 1.

    This equation has no real solutions, so there are no eigenvalues. (Note that this is because we arerestricting our attention to the real numbers. In fact there are two eigenvalues, i =

    1, over

    the complex numbers, but you are not expected to find them. We will discuss complex numbersat the end of the course.)

    4. Compute the eigenvalues and their corresponding eigenvectors for the matrix

    1 2 31 0 10 2 4

    .Answer: Call the matrix A. The characteristic polynomial is

    det(A xI) = det

    1 x 2 31 x 10 2 4 x

    = (1 x) det

    (x 12 4 x

    )+ det

    (2 32 4 x

    )= (1 x)[x(4 x) 2] + [2(4 x) 6]= (1 x)(x2 4x 2) 2x + 2= (1 x)(x2 4x 2 + 2)= (1 x)(x2 4x)= x(1 x)(x 4).

    The eigenvalues are the roots of this polynomial, namely 0, 1, 4.

    The eigenvectors ~x with eigenvalue 0 satisfy A~x = ~0. Row reducing A gives1 0 10 1 20 0 0

    .We have x1 x3 = x2 + 2x3 = 0, so letting x3 = a, we have x1 = x3 = a and x2 = 2x3 = 2a. Thusthe eigenvectors with eigenvalue 0 are a

    [1 2 1

    ]T for a R with a 6= 0.The eigenvectors ~x with eigenvalue 1 satisfy (A I)~x = ~0. Row reducing A I gives1 0 5/20 1 3/2

    0 0 0

    .Thus we have x1 (5/2)x3 = x2 +(3/2)x3 = 0. Letting x3 = 2b, the eigenvectors with eigenvalue 1 areb[5 3 2

    ]T for b R with b 6= 0.Finally, the eigenvectors ~x with eigenvalue 4 satisfy (A 4I)~x = ~0. Row reducing A 4I gives1 0 10 1 0

    0 0 0

    .Thus we have x1 x3 = x2 = 0. Letting x3 = c, the eigenvectors with eigenvalue 4 are c

    [1 0 1

    ]Tfor c R with c 6= 0.

  • 5. Let A and S be n n matrices, and suppose S is invertible. Show that A and S1AS have the samecharacteristic polynomial (and hence the same eigenvalues).

    Answer: The characteristic polynomial of A is cA(x) = det(A xI). The characteristic polynomial ofS1AS is

    cS1AS(x) = det(S1AS xI)= det(S1AS xS1IS)= det(S1(A xI)S)= det(S1) det(A xI) det(S)= det(A xI)= cA(x),

    as claimed.

    6. The vectors[2 1 3

    ]T , [3 2 2]T , [1 0 1]T are eigenvectors of the matrix A = 15 11 134 3 412 9 10

    .(a) What are the eigenvalues of A?

    Answer: Matrix-vector multiplication gives A[2 1 3

    ]T = [2 1 3]T , A [3 2 2]T =[3 2 2

    ]T , and A [1 0 1]T = [2 0 2]T , so the eigenvalues are 1,1, 2.(b) Find a matrix P such that P1AP is diagonal.

    Answer: We can find such a matrix by taking its columns to be the above eigenvectors:

    P =

    2 3 11 2 03 2 1

    .Then

    P1AP = D =

    1 0 00 1 00 0 2

    .(c) Compute P1.

    Answer:

    P1 =

    2 1 21 1 18 5 7

    (d) Compute A9.

    Answer:

    A9 = (PDP1)9

    = PD9P1

    =

    2 3 11 2 03 2 1

    1 0 00 1 00 0 512

    2 1 21 1 18 5 7

    =

    2 3 5121 2 03 2 512

    2 1 21 1 18 5 7

    =

    4095 2561 35834 3 44092 2559 3580

    .