
MATH 235: Inner Product Spaces, SOLUTIONS to Assign. 7 Questions handed in: 3,4,5,6,9,10. Contents 1 Orthogonal Basis for Inner Product Space 2 2 Inner-Product Function Space 2 3 Weighted Inner Product in R2 *** 2 3.1 SOLUTIONS ....................................... 2 4 Inner Product in 3 *** 3 S 4.1 SOLUTIONS ....................................... 3 5 Inner Products in 22 and P2 *** 4 M 5.1 SOLUTIONS ....................................... 5 6 Cauchy-Schwarz and Triangle Inequalities *** 5 6.1 SOLUTIONS ....................................... 5 7 Length in Function Space 6 8 More on Function Space 7 9 Linear Transformations and Inner Products *** 8 9.1 SOLUTIONS ....................................... 8 10 MATLAB *** 9 10.1SOLUTIONS ...................................... 12 10.1.1 MATLAB Program for Solution . ..... 12 10.1.2 Output of MATLAB Program for Solution . ...... 13 1 1 Orthogonal Basis for Inner Product Space 1 If V = P3 with the inner product <f,g >= 1 f(x)g(x)dx, apply the Gram-Schmidt algorithm to obtain an orthogonal basis from B = 1,x,x−2,x3 . { R } 2 Inner-Product Function Space Consider the vector space C[0, 1] of all continuously differentiable functions defined on the closed 1 interval [0, 1]. The inner product in C[0, 1] is defined by <f,g >= 0 f(x)g(x)dx. Find the inner products of the following pairs of functions and state whether they are orthogonal R 1. f(x) = cos(2πx) and g(x) = sin(2πx) 2. f(x)= x and g(x) = ex 3. f(x)= x and g(x) = 3x 3 Weighted Inner Product in R2 *** Show whether or not the following are valid inner products in R2. If one is a valid inner product, T then find a nonzero vector that is orthogonal to the vector y = 2 1 . 1. u, v := 7u1v1 + 1.2u2v2. h i 2. u, v := 7u1v1 1.2u2v2. h i − − 3. u, v := 7u1v1 1.2u2v2. h i − 3.1 SOLUTIONS BEGIN SOLUTION: Note that in each case, the inner product can be written as u, v = h i uT Dv, for an appropriate diagonal matrix D. We see that u, v = uT Dv = (uT Dv)T = vT Du = h i v, u . And, αu, v + w = α(uT D(v + w)) = α( u, v + u, w ). Therefore, the first three properties h i h i h i h i for an inner product all hold true. 7 0 1. For u, v := 7u1v1 + 1.2u2v2, the diagonal matrix D = . Therefore, u, u := h i 0 1.2 h i 7u2 +1.2u2 0, with equality if and only if the vector u = 0, i.e. this is a valid innerproduct. 1 2 ≥ A vector orthogonal to the given y satisfies u, y := 7u1(2) + 1.2u2 = 0, e.g. we could set 1 h i u1 = 1 and get that u = − . (To understand the geometry, we could draw the ellipse − 14 1.2 u = 1 and see which vectors are orthogonal to each other.) k k 7 0 2 2. For u, v := 7u1v1 1.2u2v2, the matrix D = − . Therefore, u, u := 7u h i − − 0 1.2 h i − 1 − − 1.2u2 < 0, if the vector u = 0, i.e. this is not a valid innerproduct. 2 6 2 7 0 2 2 3. For u, v := 7u1v1 1.2u2v2, the matrix D = . Therefore, u, u := 7u 1.2u < h i − 0 1.2 h i 1 − 2 2 − 0, if the vector u = 0, and u2 < 1.2u2 , i.e. this is not a valid innerproduct. 6 1 7 END SOLUTION. 4 Inner Product in 3 *** S Let 3 denote the vector space of 3 3 symmetric matrices. S × 1. Prove that S, T = trST is an inner product on 3. h i S 1 0 1 1 0 1 3 2. Let S1 = 0 1 0 and S2 = 0 3 0 . Apply the Gram-Schmidt process in to − S 1 0 0 1 0 0 find a matrix orthogonal to both S1 and S2. 3. Find an orthonormal basis for 3 using the above three matrices. S 1 0 1 4. Let T = 0 1 1 . Find the projection of T on the span of S1,S2 . − { } 1 1 1 − 4.1 SOLUTIONS BEGIN SOLUTION: 1. (a) That tr ST = tr TS was proved in class already. (b) tr S(T+V) = tr (ST+SV) = tr ST+tr SV, where the last equality follows straight from the definition of taking the sum of the diagonal elements. (c) tr αS= αtr S, again follows from the definition, i.e. both are equal to i(αSii). (d) S,S = trSS = trS2 = S2 0 and it is = 0 if an only if each S2 = 0, i.e. if and h i ij ij ≥ ijP only if S = 0. P 2. We first note that tr S1S2 =1+1+1 3 = 0, i.e. S1 S2. Therefore, we can apply one − ⊥ step of the process. But we need a matrix that is linearly independent to both S1,S2. By observation the matrix 0 0 0 S3 = 0 0 0 0 0 1 2d a d − works and in fact is orthogonal to both. Note that any matrix of the form a 0 b d b c does the job. Also, note we could also choose a random matrix (linearly independent with 3 1 1 0 S1,S2) and then apply one step of the process, e.g. choose R = 1 1 0 . Then we can 0 0 0 find the third matrix by subtracting the projection onto the span of the first two, i.e. R,S1 R,S2 ˆ h i h i S3 = R S1,S1 S1 S2,S2 S2 − 2h i 2− h i = R 4 S1 −12 S2 − 1 − 1 = R S1 + S2 − 2 6 1 1 0 1 0 1 1 0 1 = 1 1 0 1 0 1 0 + 1 0 3 0 − 2 6 − 0 0 0 1 0 0 1 0 0 2/3 1 1/3 − = 1 0 0 1/3 0 0 − 3. An orthonormal basis using S3 is 1 1 S1, S2,S3 2 2√3 Alternatively, using Sˆ3, we get 1 1 2√5 S1, S2, Sˆ3 (2 2√3 3 ) 4. The projection of T is 1 1 1 1 ( trTS1)S1 + ( trTS2)S2 = ( 4)S1 + ( 0)S2 = 2S1. 2 2√3 2 2√3 END SOLUTION. 5 Inner Products in 22 and P2 *** M Show which of the following are valid inner products. a a b b 1. Let A = 1 2 and B = 1 2 be real matrices. a a b b 3 4 3 4 (a) Define A, B := a1b1 + 2a2b3 + 3a3b2 + a4b4. h i (b) Define A, B := tr BTA. h i 2. Let p(x) and q(x) be polynomials in P2. (a) Define p,q := p( 1)q( 1) + p( 1 )q( 1 )+ p( 3)q( 3). h i − − 2 2 − − (b) Define p,q := p( 3)q( 3) + p( 1 )q( 1 )+ p( 1)q( 1). h i − − 2 2 − − 4 5.1 SOLUTIONS BEGIN SOLUTION: 0 1 1. (a) Note that A, B := a1b1 + 2a2b3 + 3a3b2 + a4b4 = tr AB. Let A = Then h i 0 0 0 0 A, A = tr AA = tr = 0, i.e. A = 0, but A = 0. Therefore, this is not a h i 0 0 k k 6 valid inner product. A(:, 1) (b) For any m n matrix A, define vec (A) = , i.e. vec (A) is the vector formed × ...A(:,n) T T from A using the columns of A. Note that tr B A= ij BijAij = vec (B) vec (A). We can now show that this is a valid inner product in the usual way that the standard dot P product is an inner product. 2. (a) This follows as does the Example 2 in the text on page 429. (b) Changing the order of the points does not change the verification of any of the rules for verifying this is an inner product. END SOLUTION. 6 Cauchy-Schwarz and Triangle Inequalities *** 3 0 0 1. Let D = 0 π 0 . Consider the inner product defined on R3 by: u, v = uT Dv. Let h i 0 0 2 2 4 − − u = 3 and v = 8 . Verify that both inequalities hold. 7 9 − 2. Find the projection of v on the span of u and call it w. Verify that equality holds for the Cauchy-Schwarz inequality applied to u, w. 6.1 SOLUTIONS BEGIN SOLUTION: Following are the MATLAB lines and the output for the solution. D=sym(diag([3 pi 2])); u=[-2 3 -7]’; v=[-4 8 9]’; lhs=abs(double(u’*D*v)); rhs= sqrt(double(u’*D*u))*sqrt(double(v’*D*v)) rhs = 238.4100 disp(’verify C.S. inequality, i.e. that rhs - lhs is nonnegative’) verify C.S. inequality, i.e. that rhs - lhs is nonnegative 5 rhs-lhs ans = 211.8082 lhs= (double((u+v)’*D*(u+v))); rhs= (double((u)’*D*(u))) + (double((v)’*D*(v))); disp(’verify triangle inequality, i.e. that rhs - lhs is nonnegative’) verify triangle inequality, i.e. that rhs - lhs is nonnegative rhs-lhs ans = 53.2036 disp(’find w, the projection on the span of u’) find w, the projection on the span of u w= (double(v’*D*u))/(double(u’*D*u))*u w = 0.3848 -0.5772 1.3467 lhs=abs(double(u’*D*w)); rhs= sqrt(double(u’*D*u))*sqrt(double(w’*D*w)) rhs = 26.6018 disp(’verify that rhs - lhs is now zero, i.e.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages15 Page
-
File Size-