S 5.1 (P 2.24) _______________ a = [-1 7 2 4].' b = [3 0 -1 -5].' (i) ||a||^2 = a'*a = 1+49+4+16 = 70. Therefore ||a||=sqrt(70). ||b||^2 = b'*b = 9+0+1+25 = 35. Therefore ||b|| = sqrt(35) b-a = [4 -7 -3 -9].' ||b-a||^2 = 16+49+9+81 = 155 ||b-a|| = sqrt(155) (ii) cos(theta) = ( a'*b ) / ( ||a||*||b|| ) Here a'*b = -3+0-2-20 = -25, so cos(theta) = -0.5051 and theta = 2.1003 radians (or 118.8 degrees) (iii) f = q*a where q = (a'*b)/(a'*a) = -25/70 = -5/14 = -.03571 g = m*b where m = (a'*b)/(b'*b) = -25/35 = -5/7 = -0.7143 (iv) b-f = b+(5/14)*a = (1/14)*[37 35 -4 -50].' (b-f)'*a = (1/14)*(-37+245-8-200) = 0 a-g = a+(5/7)*b = (1/7)*[8 56 9 3].' (a-g)'*a = (1/7)*(24-0-9-15) = 0 S 5.2 (P 2.34) _______________ (i) Let the columns of V be v1, v2, v3 and v4. ||v1||^2 = ||V2||^2 = 4 ||v3||^2 = ||v4||^2 = 2 The remaining inner products are all zero: = = = = = = 0 Therefore V'*V = diag([4 4 2 2]) (ii) One can certainly solve V*c = x by Gaussian elimination, but it's much faster to exploit the orthogonality of V and project: V*c = x is equivalent to V'*V*c = V'*x and since V'*V is diagonal, we have: c1 = /4 = 1/2 c2 = /4 = 0 c3 = /2 = -1/2 c4 = /2 = -5/2 Thus c = [1/2 0 -1/2 -5/2].' S 5.3 _____ A'*A = [ 100 0 0 0 0 100 0 0 0 0 100 0 0 0 0 100 ] (Since all columns are circular shifts of the first column, there are only 3 distinct dot products to compute.) The columns of A are mutually orthogonal, with norm = 10. (ii) A*c = b can be solved by projection, i.e., (A'*A)*c = A'*b or 100*c = A'*b For b = [2 -1 8 -9].', we have c = (1/100)*[0 50 -100 50].' = [0 1/2 -1 1/2].' Thus b is a linear combination of the second, third and fourth columns of A. S 5.4 _____ i) V = [ v1 v2 v3 ] v1'*v2 = 3(a+bj) - 18j + 6j(a-jb) v1'*v2 = 0 for orthogonality, so Re( v1'*v2 ) = 3a + 6b = 0 -> a = -2b Im( v1'*v2 ) = 3b - 18 + 6a = 0 -> b = -2, a = 4 The same terms are obtained in v2'*v3 and v3'*v1, so these inner products are zero also. The square norm of each column then equals 65, and V'*V = diag([65 65 65]) ii) v1'*s = 65 v2'*s = -130 v3'*s = -65 Therefore s = v1 - 2*v2 - v3 (iii) The projection of y onto x equals lambda*x, where x'*(y - lambda*x) = 0 i.e., lambda = (x'*y)/||x||^2 Since x and y are given in terms of the orthogonal vectors v1, v2 and v3, inner products involving x and y can be computed directly using those coefficients (i.e., in the new coordinate system). All the coefficients involved are real, therefore the same is true for the inner products: x'*y = (1 - 3/4 - 3)*65 ||x||^2 = (1/4 + 1/4 + 9)*65 Thus lambda = (1 - 3/4 - 3)/(1/4 + 1/4 + 9) = -11/38