Partial preview of the text
Download Least Square Approximation-Linear Algebra-Handout and more Exercises Linear Algebra in PDF only on Docsity!
338 CHAPTER6 — Inner Product Spaces |EXERCISE SET 6.3 Least Square Approximations In Exercises 1~4 find the least squares linear approximations, x, to the given functions over the stated intervals. “HL. f(x) = x7 over [0, 277] 12. Show that the vectors 1, cos x, sin x, ... , OS mx are mute ally orthogonal in the space C[7, 7] "2, f(x) = e over [0, 1] Coding Theory “13, List all the vectors in the Hamming code C;, 3. f(x) = Vexover [0,1] z 14, List all the vectors of V> that lie inthe sphere having radius. 4, f(x) = cos xover (0, 7] ieee “(@) (0,0, 1,0,1,1,0) *(b) (1, 1,0, 1,0, 0, 1) (© (1.1,1,1,1,1.1) (@) (0,0,0, 0,0, 0,0) The following messages are received using the Hay code. Find the correct message in each case. 0,0) (b) (0,1, 1, 1,0, 0,1) g(x) =a+ *L. f(x) = x7 over the interval [—1, 1] In Exercises 5-8 find the least-squares quadratic approxima- tions, g(x) = a + bx + cx°, to the given functions over the stated intervals. 5. f(x) = et over a “@) [-1.1] [0.1] +0, 1,1,0) (4) (1, 0,1, 1,0, 1,0) “6. f(x) = Ve over[0, 1] 16. Consider the vector space V>; and the Golay code subspace 7. f(x) = © over (0,1) Cy, \2. Prove that there are “(a) 2 vectors inV>y. (b) 4096 vectors in Cos, 12- “(©) 2048 vectors in each sphere of radius 3 about a vector in Cy, (given that each element of Vis in one sphere), How many vectors of distance 1, 2, and 3 are in each © sphere of radius 3? *8. f(x) = sin x over [0, 7] In Exercises 9-11 find the fourth-order Fourier approximations to the given functions over the stated intervals. “9, f(x) = x over [0,27] 10. f(x) = 1 + xover[-z, 7] ‘This section is possibly the most attractive in the book! It illustrates mathematics Theoretical results developed earlier come together in a very elegant, powerful way to arrive at an important computational tool. We derive the method of finding a polynomial that best fits given data points; a method that is extremely important to the natural sciences, social ” sciences and engineering. We have seen that a system Ax = y of n equations in n variables, where A has the unique solution x = A”'y. However, if Ax = y is a system of n equa variables where n > m, the system does not in general have a solution and is said to be overdetermined. A is not a square matrix for such a system and A~! does not exist. We shall introduce a matrix called the pseudoinverse of A, denoted pinv(A), that leat least squares solution x = pinv(A)y for an overdetermined system. This is not a true solution, but is in some sense the closest we can get to a true solution for the system. We shall see an application of overdetermined systems in finding curves that “best” fit data. TSANG Let A be a matrix. The matrix (A'A)- We have seen that not every matrix has an inverse. Sim pseudoinverse. The matrix A has a pseudoinverse if (A'A) is called the pseudoinverse of A and is denoted pinv( A). 5 [EWES] Find the pseudoinverse of A = | —1 2 SOLUTION We compute the pseudoinverse of A in stages. ly, not every matrix has a” 64 Least Squares Curves 1 2 a 4. oft at 2 aanfS all (aay = patla's) = pinv(A) = (A'A)“1A' = a = “ae a ‘| We now use the concept of pseudoinverse to further our understanding of systems of linear equations. Let Ax = y be a system of n linear equations in m variables with n > m, where A is of rank m. Multiply each side of this matrix equation by 4’, to get A‘Ax = Aly The matrix A’A can be shown to be invertible for such a system, Multiply each side of this ‘equation by (A'A)~' to get ((4'a)'A'ly = pinv(A)y This value of x is called the least squares solution to the system of equations. Ax=y x= pinv(A)y - system least squares solution Let Ax = y be a system ofn linear equations in m variables with n > m, where A is ofrank m. This system has a least squares solution. Ifthe system has a unique solution the least squares solution is that unique solution. If the system is overdetermined the least squares solution is the closest we can get to a true solution. The system cannot have many solutions. Find the least squares solution of the following overdetermined system of equations. Sketch the solution. x+ y=6 Sore