HW5_Solution - EEL3105 Homework 5 Solutions 1 3 1 2 4 6 A 2...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: EEL3105 Homework 5 Solutions 1 3 1 2 4 6 A 2 6 2 B 1 3 5 1 3 1 3 5 8 1. (i) 2 8 13 AB 4 16 26 2 8 13 4 12 4 BA 2 6 2 5 15 5 2 4 17 AB BA 2 10 28 7 23 8 trace( AB) 5 trace( BA) 5 trace( AB BA) 0 (ii) a11 a 21 A . . an1 .. .. a1n b11 b12 .. .. b1n b .. .. a2 n 21 b22 .. .. b2 n .. . B . . . . . .. . . . . . . bn1 bn 2 . . bnn . . ann a12 a22 . . an 2 n a1 j b j1 j 1 . . AB . .. .. n a2 j b j 2 j 1 . . .. n b1 j a j1 j 1 . .. .. .. . .. . BA . .. . n .. . . anj b jn j 1 .. .. .. .. n b j 1 2j . . .. .. .. .. .. . .. . n . . bnj a jn j 1 .. .. a j2 .. n n a1 j b j1 b1 j a j1 j 1 j 1 . . AB BA . .. .. .. .. .. . .. . n n . . anj b jn bnj a jn j 1 j 1 .. n n a j 1 .. .. 2 j b j 2 b2 j a j 2 j 1 . . .. .. n n n n n n j 1 j 1 j 1 j 1 j 1 j 1 trace( AB BA) a1 j b j1 b1 j a j1 a2 j b j 2 b2 j a j 2 ......... anj b jn bnj a jn 0 a11 a12 .. .. a1n b11 b12 .. .. b1m a b b 21 a22 .. .. a2 n 21 22 .. .. b2 m (iii) A . . .. . (A, mxn matrix) B . . .. . (B, nxm matrix) . .. . . .. . . . am1 am 2 . . amn bn1 bn1 . . bnm n a1 j b j1 j 1 . . AB . .. .. n a j 1 2j . . .. m b1 j a j1 j 1 . .. .. .. . .. . BA . .. . n .. . . amj b jm j 1 .. .. bj2 .. .. m b j 1 .. .. .. .. . .. . m . . bnj a jn j 1 .. .. 2j a j2 . . .. .. Note that AB is mxm and BA is nxn. n n n m n j 1 j 1 j 1 i 1 j 1 trace( AB) a1 j b j1 a2 j b j 2 ......... anj b jn aij b ji m m m j 1 j 1 n j 1 m trace( BA) b1 j a j1 b2 j a j 2 bnj a jn bij a ji i 1 j 1 Now note that the two double sums are exactly the same and therefore trace(AB)=trace(BA). To connect these calculations with scalar product, note that j,j element of AB is the scalar product of j‐th row of A and j‐th column of B viewed as n‐dimensional vectors. This trace(AB ) is the sum of scalar product of j‐th row of A and j‐th column of B for all possible j. Similarly, we can say that trace(BA) is the sum of scalar products of j‐th row of B with j‐th column of A. What is interesting that these sums are equal! A related idea is to consider the stack rows of A next to one another into a long row vector of 1xmn and similarly stack columns of B below one another into a long column vector of size mnx1. Then trace of AB is simply the scalar product these two vectors viewed as vectors in mn dimensional space. Now, we can reverse this procedure and stack rows of B next to each other and create a long 1xmn row vector and stack columns of A below each other to create a mnx1 column vector. Then trace(BA) is the scalar product of these two vectors viewed as vectors in mn dimensions. 2. Determinants can be calculated using the formula for determinants. det(A)=0, det(B)=2, det(AB)=0, det(BA)=0 As expected, det(AB)=det(BA)=det(A)det(B)=0. The only matrix that is invertible is B. For computing inverse, let us remind ourselves of the inverse of a general 3x3 matrix: a1 A a4 a7 a2 a5 a8 a3 a6 . a9 Inverse of this matrix exists if and only if det(A) is not zero. In this case, the inverse is A1 1 inverse( A) A4 det( A) A7 A2 A5 A8 T A3 A1 1 A A6 2 det( A) A3 A9 A4 A5 A6 where, T stands for transpose and, Ai’s are the cofactors: A1 (a5 a9 a6 a8 ), A2 (a6 a7 a4 a9 ), A3 (a4 a8 a5 a7 ), A4 (a3 a8 a2 a9 ), A5 (a1a9 a3 a7 ), A6 (a2 a7 a1a8 ), A7 (a2 a6 a3 a5 ), A8 (a3 a4 a6 a1 ), A9 (a1a5 a2 a7 ), A7 A8 A9 For matrix B,det(B) 0 so an inverse matrix for B exist. Using the above general formula of the inverse of a matrix B is .5 1 1 B 3.5 1 2 2 1 1 1 Let’s verify this answer using MATLAB. Below is the output from MATLAB command window: ===========================MATLAB Command Window========================== >> A=[1 3 ‐1; 2 6 ‐2; ‐1 ‐3 1]; >> B=[2 4 6; 1 3 5; 3 5 8]; >> det(A) ans = 0 >> det(B) ans = 2 >> det(A*B) ans = 0 >> det(B*A) ans = 0 >> inv(B) ans = ‐0.5000 ‐1.0000 1.0000 3.5000 ‐1.0000 ‐2.0000 ‐2.0000 1.0000 1.0000 =============================================================================== 3. Eigenvalues of A ,B, AB , BA through Matlab are as below (where subscripted lambda represent the eigenvalue) =====================MATLAB Command Window Output======================== >> eig(A) ans = 8.0000 ‐0.0000 0.0000 >> eig(B) ans = 13.0881 ‐0.0440 + 0.3884i ‐0.0440 ‐ 0.3884i >> eig(A*B) ans = 0 5.0000 0 >> eig(B*A) ans = 5.0000 0.0000 ‐0.0000 >> eig(inv(B)) ans = ‐0.2882 + 2.5418i ‐0.2882 ‐ 2.5418i 0.0764 >> det(inv(B)) ans = 0.5000 We can now verify that trace and determinant are sum and products of eigenvalues respectively. trace( A) 8 8 0 0 det( A) 0 8*0*0 trace( B ) 1313.0881+-0.0440 + 0.3884i+-0.0440 - 0.3884i det( B ) 213.0881*(-0.0440 + 0.3884i)*(-0.0440 - 0.3884i) trace( AB ) 5 5 0 0 det( AB) 0 5*0*0 trace( BA) 5 5 0 0 trace( AB ) det( BA) 0 5*0*0 det( B 1 ) 0.5 1/ det( B ) eig ( B 1 ) : 0.0764 1/13.0881 -0.2882 + 2.5418i 1/ (-0.0440 - 0.3884i) -0.2882 - 2.5418i=1/(-0.0440 + 0.3884i) Note that eigenvalues of the inverse of B are reciprocals of eigenvalues of B. This is a general property of eigenvalues of inverse of a matrix and the original matrix, i. e., if is an eigenvalue of an invertible matrix M, then 1/ is an eigenvalue of M‐1. Can you try to prove this fact? Note that the determinant of inverse of B is the reciprocal of the determinant of B. Can you try to prove this for a general invertible matrix? Hint: use A(A‐1) = I. 4. a c A c b i. For A to be invertible applying the condition for a matrix to be invertible: det( A) 0 , ab c 2 0 ii. For finding the eigenvalues we can use the characteristic polynomial equation det( I A) 0 , and find its roots: det( I A) 0 ( a )( b) c 2 0, 2 (a b) ab c 2 0 1 (a b) ((a b) 2 4c 2 ) (a b) ((a b) 2 4c 2 ) , 2 2 2 Note that eigenvalue are real regardless of values of a, b, c. This makes sense since A is a symmetric matrix. As I taught in class, a symmetric matrix is guaranteed to have real eigenvalues. And we see that this is true. In general, a quadratic equation may have complex roots. But here, by the very nature of the specific quadratic equation arising from the characteristic polynomial of a symmetric matrix, this cannot happen! iii. Condition of invertibility det( A) 0 ab c 2 0 Note that the determinant is the product of eigenvalues of A. Let us see if we get the same condition for invertibility. 1 12 (a b) 2 (a b) 2 4c 2 ab c 2 det( A) 0 4 ...
View Full Document

This note was uploaded on 12/27/2011 for the course EEL 3105 taught by Professor Boykins during the Fall '10 term at University of Florida.

Ask a homework question - tutors are online