{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

A5_soln

# A5_soln - Math 235 Assignment 5 Solutions 1 Use the...

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

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Math 235 Assignment 5 Solutions 1. Use the Gram-Schmidt procedure to produce an orthonormal set from the given set in R4 under the standard inner product. a) {(1, 0, 0, 1), (1, 1, 0, 2), (0, −1, 1, 1)} Solution: Denote the given basis by z1 = (1, 0, 0, 1), z2 = (1, 1, 0, 2), z3 = (0, −1, 1, 1). Let w1 = z1 . Then, we get w2 = perpw1 (z2 ) = z2 − projw1 (z2 ) = z2 − z2 · w1 w1 w1 2 3 1 = (1, 1, 0, 2) − (1, 0, 0, 1) = − (1, −2, 0, −1) 2 2 To simplify calculations we use w2 = (1, −2, 0, −1) instead. Then, we get w3 = z3 − (z3 · w2 ) z3 · w1 w− w2 21 w1 w2 2 1 1 1 = (0, −1, 1, 1) − (1, 0, 0, 1) − (1, −2, 0, −1) = − (2, 2, −3, −2) 2 6 3 Thus, the set {w1 , w2, w3 } is an orthogonal basis for span{z1 , z2 , z3 }. To obtain an orthonormal basis, we normalize each vector to get 1 1 1 √ (1, 0, 0, 1), √ (1, −2, 0, −1), √ (2, 2, −3, −2) . 2 6 21 b) {(1, −3, −1, 1), (1, 1, 1, 1), (2, 0, 1, 2), (2, 0, 1, 1)} Solution: Denote the given basis by z1 = (1, −3, −1, 1), z2 = (1, 1, 1, 1), z3 = (2, 0, 1, 2), z4 = (2, 0, 1, 1). Let w1 = z1 . Then, we get w2 = perpw1 (z2 ) = z2 − projw1 (z2 ) = z2 − = (1, 1, 1, 1) + z2 · w1 w1 w1 2 2 1 (1, −3, −1, 1) = (7, 3, 5, 7) 12 6 To simplify calculations we use w2 = (7, 3, 5, 7) instead. Then, we get w3 = z3 − (z3 · w2 ) z3 · w1 w− w2 21 w1 w2 2 33 3 (7, 3, 5, 7) = (0, 0, 0, 0) = (2, 0, 1, 2) − (1, −3, −1, 1) − 12 132 2 Thus, z3 was linearly dependent on the ﬁrst two vectors and so we ignore it. z4 · w1 (z4 · w2 ) w3 = z4 − w1 − w2 w1 2 w2 2 2 26 1 = (2, 0, 1, 1) − (1, −3, −1, 1) − (7, 3, 5, 7) = (5, −1, 2, −6) 12 132 11 Thus, the set {w1 , w2, w3 } is an orthogonal basis for span{z1 , z2 , z3 }. To obtain an orthonormal basis, we normalize each vector to get 1 1 1 √ (1, −3, −1, 1), √ (7, 3, 5, 7), √ (5, −1, 2, −6) . 12 132 66 2. On M (2, 2) deﬁne the inner product < A, B >= tr(AT B ). Use the Gram-Schmidt procedure to produce an orthogonal set from the set S= Solution: Let w1 = 11 . Then, 01 < 11 0 −1 , > 11 01 011 11 0 −1 0 −1 = − = 2 01 11 01 11 3 11 01 11 0 −1 30 , , 01 11 11 . w2 = 0 −1 − 11 So, we pick w2 = 0 −1 . 11 < 30 0 −1 30 11 < , > , > 11 11 11 01 11 0 −1 − 2 2 01 11 11 0 −1 01 11 w3 = 30 − 11 = Thus {w1 , w2 , w3 } is an orthogonal set. 411 2 0 −1 1 5 −2 30 − − = 11 301 31 1 3 1 −3 3 3. Find a and b to obtain the best ﬁtting equation of the form y = a + bt for the given data. a) t −2 −1 0 1 2 y3 5 7 9 10 Solution: Let X T = 1 1 111 and y T = (3, 5, 7, 9, 10). Then we get −2 −1 0 1 2 a = (X T X )−1 X T y 50 0 10 −1 = = Thus a = 6.8 and b = 1.8. b) 120 10 0 1 34 6.8 = 18 1.8 3 5 1 1 111 7 −2 −1 0 1 2 9 10 t12345 y34557 11111 and y T = (3, 4, 5, 5, 7). Then we get 12345 3 4 −1 5 15 1 1 1 1 1 5 = 1 11 −3 24 = 2.1 a = (X T X )−1 X T y = 15 35 1 2 3 4 5 10 −3 1 81 .9 5 7 Solution: Let X T = Thus a = 2.1 and b = −.9. 4 4. Verify that the following systems are inconsistent, then determine for each system the x that minimizes Ax − b . a) x1 + 2x2 = 5 2x1 − 3x2 = 6 x1 − 12x2 = −4 Solution: Writing the augmented matrix and row-reducing gives 12 5 100 2 −3 6 ∼ 0 1 0 , 1 −12 −4 001 so it is inconsistent. The x that minimizes Ax − b must satisfy AT Ax = AT b. Solve for x in this system gives −1 5 1 157 16 13 6 −16 383/98 12 1 T −1 T 6= x = (A A) A b = = 16 6 40 −16 157 32/49 2 −3 −12 686 −4 Thus x = (383/98, 32/49) minimizes Ax − b . b) x1 + x2 = 7 x1 − x2 = 4 x1 + 3x2 = 14 Solution: Writing the augmented matrix and row-reducing gives 117 100 1 −1 4 ∼ 0 1 0 , 1 3 14 001 so it is inconsistent. The x that minimizes Ax − b must satisfy AT Ax = AT b. Solve for x in this system gives −1 7 1 11 −3 25 33 1 1 1 3 5/6 T −1 T 4= x = (A A) A b = = 3 11 1 −1 3 −3 3 45 5/2 24 14 Thus x = (35/6, 5/2) minimizes Ax − b . 5 5. Prove that if S is a k -dimensional subspace of Rn , then S ⊥ is an (n − k ) dimensional subspace of Rn . · · · vk · x = 0. v1 v2 Since {v1 , . . . , vk } is linearly independent, the matrix . has rank k and hence the solution . . vk ⊥ Solution: Let {v1 , . . . , vk } be a basis for S . Then S ⊥ is the solution space of the system v1 · x = 0, v2 · x = 0, space S has dimension n − k . 6. Prove that perpS = projS ⊥ for any subspace S of Rn . Solution: Let {v1 , . . . , vk } be an orthonormal basis for S and let {vk+1 , . . . , vn } be an orthonormal basis for S ⊥ . Then, {v1 , . . . , vk , vk+1, . . . , vn } is an orthonormal basis for Rn and so any x ∈ Rn can be written as Then x =< x, v1 > v1 + · · · + < x, vk > vk + < x, vk+1 > vk+1 + · · · + < x, vn > vn . perpS x = x − projS (x) = x − < x, v1 > v1 + · · · + < x, vk > vk =< x, vk+1 > vk+1 + · · · + < x, vn > vn = projS ⊥ (x) 7. Let A be an m × n real matrix. Prove that the nullspace of AT is the orthogonal complement of the column space of A. T v1 T . . Solution: Let A = v1 · · · vn , so A = . . T vn T v1 x ⊥ T . If x ∈ col(A) , then vi · x = 0. But then A x = . = 0 hence x ∈ nul(AT ). . T vn x On the other hand, let x ∈ nul(AT ), then AT x = 0 so vi · x = 0 for all i. Now, pick any b ∈ col(A). Then b = c1 v1 + · · · + cn vn . But then hence x ∈ col(A) . ⊥ b · x = (c1 v1 + · · · + cn vn ) · x = 0, 6 MATLAB −0.4566 −0.3307 −0.3156 −0.1205 0.8719 −0.3796 1) a) N = 0.4994 0.0819 0.5149 0.4493 −0.3338 −0.6441 form the orthonormal basis. −0.6679 0.3693 −0.2477 −0.1406 . The columns of the matrix −0.6838 −0.1058 −0.1183 −0.5078 b) We verify that N T N = I using the command N ′ ∗ N 0 10 20 30 2) b) The design matrix is X = 40 50 60 70 80 d) 0 100 400 900 1600 2500 3600 4900 6400 0 1000 8000 27000 64000 125000 216000 343000 512000 c) The least squares solution is beta = (1.6288, −0.0366). ...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online