This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: ECE 220, Test 2 Solutions 27 October 2005 The file test2_f05_sol.m in the class locker contains Matlab scripts for all the problems. —————————————————————— Problem 1. (10 points) If it is possible, compute the matrix product C = B T A , if A and B are defined by A =  1 2 1 1 1 3 2 1 2 , B = 2 1 1 4 2 2 , If it is not possible state why. Solution: The matrix B T is a 2 × 3 matrix; the matrix A is a 3 × 3 matrix. The inner dimensions agree (both equal to 3) and therefore the product C = B T A is welldefined. We have C = B T A = " 2 1 2 1 4 2 # ·  1 2 1 1 1 3 2 1 2 = " 1 7 5 1 8 15 # So, finally, C = 1 7 5 1 8 15 1 Problem 2. (15 points) Determine, if possible, values of a and b such that the system below has no solutions. If that is not possible, state clearly why. " 1 a 1 2 #" x 1 x 2 # = " 3 b # Solution: Start with the array: " 1 a 3 1 2 b # Subtract row 1 from row 2 and substitute for row 2. We have " 1 a 3 0 2 a b 3 # The second row of this matrix represents the equation · x 1 + (2 a ) · x 2 = b 3 . If a 6 = 2, the value x 2 = ( b 3) / (2 a ) is a solution for the variable x 2 , regardless of what the value of b is. Then, from the first row, a solution for x 1 will be x 1 = 3 a ( b 3) / (2 a ) . In this case (i.e., when a 6 = 2), then, the system would have a unique solution. So, consider next the case a = 2. In this case, the second row of this matrix represents the equation · x 1 + 0 · x 2 = b 3 . (1) If b = 3, equation 1 reads · x 1 + 0 · x 2 = 0 . Clearly, in this case, (i.e., when a = 2 and b = 3), there are infinite solutions. So, consider next the case when a = 2 and b 6 = 3. Equation 1 reads 0 = 0 · x 1 + 0 · x 2 = b 3 6 = 0 . Clearly, in this case, (i.e., when a = 2 and b 6 = 3), there are no solutions. So finally, 2 a = 2 , b 6 = 3 . 3 Problem 3. (10 points) Solve the following system of equations using Gaussian elimina tion. 1 1 2 0 1 3 1 0 1 x 1 x 2 x 3 = 5 10 1 Solution: Start with the array: 1 1 2 5 0 1 3 10 1 0 1 1 Subtract row 1 from row 3 and substitute for row 3. We have 1 1 2 5 1 3 10 1 1 4 Subtract row 2 from row 1 and substitute for row 1. We have 1 1 5 1 3 10 1 1 4 Add row 2 to row 3 and substitute for row 3. We have 1 0 1 5 0 1 3 10 0 0 2 6 Divide row 3 by 2. We have...
View
Full
Document
This note was uploaded on 08/24/2009 for the course ECE 220 taught by Professor Nilson during the Summer '08 term at N.C. State.
 Summer '08
 NILSON

Click to edit the document details