S 4.1 (P 2.7) _____________ 1st product: A = 2 -1 (3*2) 3 -2 1 5 B = -2 -3 3 (2*3) 4 0 7 A*B = -8 -6 -1 (3*3) -14 -9 -5 18 -3 38 2nd product: A = 2 0 0 -2 4 0 3 -5 1 B = 2 -2 3 0 4 -5 0 0 1 A*B = 4 -4 6 -4 20 -26 6 -26 35 Note that B = A', so the answer is symmetric. S 4.2 (P 2.7) _____________ The column vector v = [0 ; 1 ; 0] selects the second column of A: A*v = [b ; e ; h] The row vector u.' = [1 0 0] selects the first row of A*v : [1 0 0]*[b ; e ; h] = b Thus u = [1 ; 0 ; 0] . S 4.3 (P 2.10) ______________ Both P*x and Q*x are row-permuted forms of the vector x. Thus P = 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 1 Q = 1 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 and P*Q = 0 0 0 1 1 0 0 0 0 0 1 0 0 1 0 0 (row selection on Q or column selection on P; either works) S 4.4 (P 2.11) ______________ A = 1 2 3 4 5 6 7 8 9 B = 9 8 7 6 5 4 3 2 1 If C = 0 0 1 0 1 0 1 0 0 then A*P = 3 2 1 6 5 4 9 8 7 and C*A*P = 9 8 7 = B 6 5 4 3 2 1 Therefore P = Q = C S 4.5 (P 2.13) ______________ We can take, for example: A = [1 ; 2 ; -1 ; -2]*[a b c d] B = [1 ; 1/t ; 1/t^2; 1/t^3]*[1 t t^2 t^3] (other choices are also possible). Thus in each case, the 4x4 matrix is the product of a column vector (4x1) and a row vector (1x4), in that order. Using the forms for A and B above, we see that the product A*B has the form col*row*col*row = col*(row*col)*row The middle term (in parentheses) equals row*col = scalar = a+b/t+c/t^2+d/t^3 Thus A*B = (a+b/t+c/t^2+d/t^3) * [1 ; 2 ; -1 ; -2] * [1 t t^2 t^3] (The scalar coefficient can be absorbed in either of the two vectors.) S 4.6 ______ (i) By straightforward matrix multiplication, A = L*U = 1 1 0 3 2 1 -1 1 3 -1 -1 2 -1 2 6 -1 (ii) A*x = b is equivalent to L*(U*x) = b. Let U*x = y; then L*y = b. To solve L*y = b, we use forward substitution: y1 = 4 2*y1 + y2 = 1 : y2 = 1-8 = -7 3*y1 + 4*y2 + y3 = -3 : y3 = -3-12+28 = 13 -y1 - 3*y2 + y3 + y4 = 4 : y4 = 4+4-21-13 = -26 To solve U*x = y, we use backward substitution: -26*x4 = -26 : x4 = (-26)/(-26) = 1 3*x3 + 13*x4 = 13 : x3 = (13-13)/3 = 0 -x2 - x3 - 5*x4 = -7 : x2 = 7-0-5 = 2 x1 + x2 + 3*y4 = 4 : x1 = 4-2-3 = -1 Thus x = [-1 2 0 1].' S 4.7 ______ m x1 x2 x3 x4 ________________________________________ 2* 7 -7 -3 -1/2 1 5 -5 -3 -1 2 3 1 3 -1/2 1 4 -2 2 ________________________________________ 2 7 -7 -3 0 3/2* -3/2 -3/2 8/3 0 -4 8 6 -1/3 0 1/2 3/2 7/2 ________________________________________ 2 7 -7 -3 0 3/2 -3/2 -3/2 0 0 4* 2 -1/2 0 0 2 4 ________________________________________ 2 7 -7 -3 0 3/2 -3/2 -3/2 0 0 4 2 0 0 0 3 The last matrix is U. L = [ 1 0 0 0 1/2 1 0 0 1 -8/3 1 0 1/2 1/3 1/2 1 ] (ii) To solve L*y = b: m x1 x2 x3 x4 b ______________________________________________ 1* 10 -1/2 1/2 1 5 -1 1 -8/3 1 -6 -1/2 1/2 1/3 1/2 1 3 ______________________________________________ 1 10 0 1* 0 * makes next step redundant 8/3 0 -8/3 1 -16 -1/3 0 1/3 1/2 1 -2 ______________________________________________ 1 10 0 1 0 0 0 1* -16 -1/2 0 0 1/2 1 -2 ______________________________________________ 1 10 1 0 1 -16 1 6 and thus y = [10 0 -16 6].' (Note that the solution of Ly*b involved: * forward substitution (solve for y1, then y2, etc.) * multipliers which were read off directly from L * nontrivial changes in the b column only * the same changes in the b column as if we had carried out a forward elimination for A*x = b) U*x = y is the standard backward substitution: m x1 x2 x3 x4 y ________________________________________________ 2 7 -7 -3 10 3/2 -3/2 -3/2 0 4 2 -16 3 6 ________________________________________________ 3/2 1 7/2 -7/2 -3/2 5 1 1 -1 -1 0 -1/2 1 1/2 -4 1* 2 ________________________________________________ 7/2 1 7/2 -7/2 0 8 1 1 -1 0 2 1* 0 -5 1 2 ________________________________________________ -7/2 1 1 0 0 -19/2 1* 0 0 -3 1 0 -5 1 2 ________________________________________________ 1 2 1 -3 1* -5 1 2 and thus the solution is x = [2 -3 -5 1].'