* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Sample Final Exam
Gröbner basis wikipedia , lookup
Non-negative matrix factorization wikipedia , lookup
System of polynomial equations wikipedia , lookup
Vector space wikipedia , lookup
Perron–Frobenius theorem wikipedia , lookup
Matrix multiplication wikipedia , lookup
Tensor operator wikipedia , lookup
Euclidean vector wikipedia , lookup
Jordan normal form wikipedia , lookup
Geometric algebra wikipedia , lookup
Cayley–Hamilton theorem wikipedia , lookup
Orthogonal matrix wikipedia , lookup
System of linear equations wikipedia , lookup
Singular-value decomposition wikipedia , lookup
Eigenvalues and eigenvectors wikipedia , lookup
Matrix calculus wikipedia , lookup
Bra–ket notation wikipedia , lookup
Covariance and contravariance of vectors wikipedia , lookup
Four-vector wikipedia , lookup
Linear algebra wikipedia , lookup
Math 304 Practice Final Section 503, Spring 2006 1. Consider the following linear transformation from P3 to P4 : Z x p(t) dt L(p(x)) = 0 (a) Find a basis for the kernel of L. (b) Find a basis for the range of L. Answer: First, we will find the matrix representing L with respect to the basis [1, x, x2 ]. Z x 1 dt = [t]x0 = x x Z0 x 1 1 L(x) = t dt = t2 = x2 2 2 0 0 x Z x 1 1 t2 dt = t3 = x3 L(x2 ) = 3 0 3 0 L(1) = Thus, the matrix representing L with respect to the basis [1, x, x2 ] is 0 0 0 1 0 0 A= 0 1 0 2 0 0 13 0 (a) The nullspace of A is 0 ; thus, the kernel of L is the zero 0 polynomial p(x) = 0. 1 0 0 1 0 (b) The columnspace of A is the span of 0 , 1 0 0 2 3 Thus, the range of L is Span(x, x , x ). 0 , and 0 . 0 1 2. For each of the following, determine whether the functions f (x), g(x) and h(x) are linearly dependent or linearly independent in C[−π, π]. Explain your answers. (a) f (x) = sin x g(x) = cos x h(x) = sin 2x (b) f (x) = ex + e−x g(x) = ex − e−x h(x) = ex Answer: (a) Suppose that there exists c1 , c2 , c3 such that c1 sin x + c2 cos x + c3 sin 2x = 0 If x = 0, we get the equation c2 = 0 If x = π , we get the equation 2 c1 = 0 If x = π , we get the equation 4 c c √1 + √2 + c3 = 0 2 2 Since, c1 = c2 = 0 from above, this equation gives us c3 = 0. Thus, c1 = c2 = c3 = 0, so the functions are linearly independent. 2 (b) Note that f (x) + g(x) = (ex + e−x ) + (ex − e−x ) = 2ex = 2h(x). Thus, f (x) + g(x) − 2h(x) = 0, so the functions are not linearly dependent. 3. Consider the following subspace of P3 : n o S = p(x) ∈ P3 p(2) − p(1) = 0 Find a basis for this subspace. Answer: Suppose that p(x) = ax2 + bx + c is a polynomial in S. Then, p(2) = 4a + 2b + c and p(1) = a + b + c, so that p(2) − p(1) = 3a + b. Thus, 3a + b = 0, so b = −3a. Thus, we can write p(x) as p(x) = ax2 − 3ax + c = a(x2 − 3x) + c Thus, every polynomial in S is in the span of the polynomials x2 − 3x and 1. Since these polynomials are linearly independent, they form a basis for S. Thus, a basis for S is {x2 − 3x, 1}. 4. Suppose that E = [u1 , u2 ] is a basis for R2 . Then, F = [u1 +u2 , u1 −u2 ] is also a basis for R2 . Find the transition matrix from F to E. Answer: The transition matrix from F to E is 1 1 1 −1 5. Suppose that A is a 3 × 3 matrix with eigenvalues 1, 0, −1. What are the eigenvalues of the matrix A − 42I, where I is the 3 × 3 identity matrix? Answer: Let B = A − 42I. We want to find λ such that B − λI is singular. Since the eigenvalues of A are 1, 0, −1, we know that A − I, A, and A + I are singular. Thus, B + 42I = A − 42I + 42I = A is singular. Similarly, B + 43I = A − 42I + 43I = A + I is singular. And, B + 41I = A − 42I + 41I = A − I is singular. 3 Thus, the eigenvalues of B are −42, −43, −41. 6. Consider the following matrix: A= 2 −2 0 3 Compute eA . Answer: First, we compute the eigenvalues and eigenvectors of A. Since A is upper triangular, the entries along the diagonal are the eigenvalues. Thus, A has eigenvalues λ1 = 2 and λ2 = 3. For λ1 = 2: nullspace(A − 2I) = nullspace 0 −2 0 1 = Span Thus, the eigenvector corresponding to λ1 = 2 is v1 = 1 0 1 0 . For λ2 = 3: 2 nullspace(A − 3I) = nullspace = Span −1 2 Thus, the eigenvector corresponding to λ2 = 3 is v2 = . −1 −1 −2 0 0 Since A has 2 distinct eigenvalues, A is diagonalizable. We can factor A as A = XDX −1 where X= 1 2 0 −1 2 0 0 3 1 2 0 −1 D= X −1 = 4 This allows us to compute eA , since eA = XeD X −1 : A e 1 2 0 −1 e2 0 = = e2 0 0 e3 2e2 − 2e3 e3 1 2 0 −1 7. Solve the differential equation y 00 = 4y + 3y 0 with initial conditions y(0) = 3 and y 0 (0) = 2. Answer: By setting y1 = y and y2 = y 0 , we can turn this second order differential equation in a system of first order differential equations: y10 y20 = 0 1 4 3 y1 y2 The eigenvalues for this matrix areλ1 = 4 and λ2 = −1and the 1 1 corresponding eigenvectors are v1 = and v2 = . 4 −1 Thus, the general solution to the system is y1 = c1 e4t + c2 e−t y2 = 4c1 e4t − c2 e−t The initial conditions give us the equations c1 +c2 = 3 and 4c1 −c2 = 2. Solving for c1 and c2 , we get c1 = 1 and c2 = 2. Thus, the solution to the original second order differential equation with the given initial conditions is y(t) = e4t + 2e−t 5 8. (a) Find the distance from the point (1, 1, 1) to the plane 2x + 2y + z = 0. (b) Find the distance from the point (1, 2) to the line 4x − 3y = 0. Answer: (a) The vector N = (2, 2, 1)T is perpendicular to the plane, and the point (0, 0, 0) is on the plane. Consider the point (1, 1, 1); call it P. And consider the point (0, 0, 0); call it Q (this is the point on the plane). Consider the −→ −→ vector QP . If we project QP onto N, we get a vector whose distance is the distance from the plane to P . 1 −→ 1 QP = 1 −→ The scalar projection of QP onto N is −→ 5 QP · N = α= kNk 3 5 . 3 (b) To find the point on the line 4x − 3y= 0 that is closest to the 1 point (1, 2), we project the vector onto the line 4x−3y = 0. 2 3 A vector in the direction of the line 4x − 3y = 0 is . The 4 1 3 projection of v = onto w = is 2 4 vT w 11 3 33/25 1.32 p= T w= = = 44/25 1.76 w w 25 4 Thus, the distance between the point and the plane is Thus, the point (1.32, 1.76) is the point on the line 4x − 3y = 0 that is closest to the point (1, 2). 6 1 9. Suppose that S is the subspace of R3 spanned by the vectors 2 1 1 and −1 . Find a basis for S ⊥ . 2 1 ⊥ 2 and Answer: S is the set of all vectors perpendicular to 1 1 y1 −1 . Thus, S ⊥ is the set of all vectors y2 such that y1 + 2y2 + y3 = 0 y3 2 ⊥ and y1 −y2 +2y3 = 0. Thus, S is the nullspace of the following matrix: 1 2 1 1 −1 2 We can row reduce this matrix: 1 2 1 1 −1 2 −→ 1 2 1 0 −3 1 −→ 3 0 5 0 −3 1 Thus, nullspace 1 2 1 1 −1 2 −5 Thus, a basis for S ⊥ is 1 . 3 7 −5 = Span 1 3 10. Given the following table of data points x −1 1 2 y 1 3 3 find the best least squares fit by a linear function f (x) = c1 + c2 x. Answer: We would like to find a linear function of the form y = ax + b that approximates the data set. Plugging in the values of the data set into the linear function, we get 1 = −a + b 3= a+b 3 = 2a + b This system of equations has no solutions. We want to −1 1 A= 2 find the least squares solution to the system Ax = b with 1 1 1 3 . and b = 1 3 The least squares solutions are the solutions to AT Ax̂ = AT b. First, we compute AT A and AT b: T A A= 6 2 2 3 T A b= 8 7 Now, we can solve AT Ax̂ = AT b: Thus, x̂ = 5/7 13/7 6 2 8 2 3 7 → 7 0 5 0 7 13 . 13 5 Thus, the best least squares linear fit to the data is y = x + . 7 7 8 11. Consider the following function: f (x) = 1 0≤x≤π 0 −π ≤ x < 0 Find the best least squares approximation to f (x) on [−π, π] by a trigonometric polynomial of degree less than or equal to 2. Answer: We compute the coefficients of the trigonometric polynomial that approximates f (x): a0 = 1 f (x), √ 2 Z 1 π f (x) √ dx = π −π 2 Z 1 1 π 1 √ dx = √ = π 0 2 2 1 an = hf (x), cos(nx)i = π 1 = π 1 = π Thus, a1 = 0 and a2 = 0. 9 Z π f (x) cos(nx) dx Z−π π cos(nx) dx π 1 sin(nx) = 0 n 0 0 Z 1 π f (x) sin(nx) dx π −π Z 1 π sin(nx) dx π 0 π 1 1 − cos(nx) π n 0 1 1 1 − cos(nπ) + cos(0) π n n 2 n odd πn 0 n even bn = hf (x), sin(nx)i = = = = = 2 and b2 = 0. π Thus, the best least squares approximation to f (x) on [−π, π] by a trigonometric polynomial of degree less than or equal to 2 is Thus, b1 = 1 f (x) ≈ √ 2 1 √ 2 + 1 2 2 sin x = + sin x π 2 π 12. The set S = {cos x, sin x, cos 2x, sin 2x} is an orthonormal set in C[−π, π] with inner product hf, gi = Determine the value of each of the following. (a) hcos x, 2 cos x − 3 sin 2xi (b) h2 sin x − 3 cos 2x, 3 cos x + 3 sin x + 4 cos 2xi (c) k cos x + 3 sin x − 2 sin 2x + cos 2xk 10 Rπ −π f (x)g(x) dx. Answer: Since S is an orthonormal set in the inner product space, we can compute the inner products by finding the coordinates for each function with respect to the basis S, and then using the normal dot product. 1 2 0 0 (a) hcos x, 2 cos x − 3 sin 2xi = 0 · 0 =2 0 −3 0 3 2 3 (b) h2 sin x − 3 cos 2x, 3 cos x + 3 sin x + 4 cos 2xi = −3 · 4 0 0 = 6 − 12 = −6 (c) Since S is an orthonormal set, we can compute the norm by finding the coordinates for the function with respect to the basis S, and then using the normal norm. k cos x + 3 sin x − 2 sin 2x + cos 2xk = √ 1+9+4+1= √ 15 −2 18 2 13. Given the basis 2 , 1 , 0 for R3 , use the Gram 1 2 0 Schmidt process to obtain an orthonormal basis. Answer: We start by computing the norm of the first vector: 2 √ 2 = 4 + 4 + 1 = 3 1 Thus, the first vector in the orthonormal basis is: 11 2 3 2 u1 = 3 1 3 −2 We note that the vector 1 is orthogonal to u1 , so all we need to 2 do is make the second vector have unit length. We compute its norm: −2 √ 1 = 4 + 1 + 4 = 3 2 Thus, the second vector in the orthonormal basis is: 2 −3 1 u2 = 3 2 3 The third vector is not orthogonal to either u1 or u2 . Thus, we need to use the third vector to find a vector orthogonal to u1 and u2 . We start by computing the projection of the third vector onto the plane spanned by u1 and u2 : 12 2 2 3 −3 + * 18 * 18 + 2 1 0 , 0 , = 3 u1 + 3 u2 0 0 1 2 3 3 8 8 8 −4 = + 4 −8 16 = 4 −4 p2 18 Next, we compute 0 − p2 : 0 18 16 2 0 − 4 = −4 0 −4 4 2 The resulting vector, −4 is orthogonal to u1 and u2 . To make 4 an orthonormal basis, we need to change this vector into unit length. We compute its norm: 2 √ √ −4 = 4 + 16 + 16 = 36 = 6 4 Thus, 13 u3 = 1 3 2 − 3 2 3 The orthonormal basis is 2 1 2 − 3 3 3 2 , 1 , −2 3 3 3 1 2 2 3 3 3 14. The plane x1 + 2x2 + x3 = 0 is a subspace of R3 . Find an orthonormal basis for this subspace. Answer: We start by finding a basis for the subspace. Any two linearly independent vectors which lie on the plane will form a basis. One way to find a basis is to solve the equation x1 + 2x2 + x3 = 0: x1 = −2x2 − x3 Thus, for any α and β the following is a solution: x1 −2 −1 x2 = α 1 + β 0 x3 0 1 −2 −1 Thus, the vectors form x1 = 1 and x2 = 0 form a basis 0 1 for the subspace. 14 To find an orthonormal basis, we use the Gram-Schmidt algorithm on this basis: − √25 x1 x1 = u1 = =√ kx1 k 4+1 √1 5 0 The projection of x2 onto u1 is − √25 2 p1 = hx2 , u1 i u1 = √ 5 √1 5 − 54 = 2 5 0 0 Then, x2 − p1 is orthogonal to u1 . x2 − p1 = −1 − 45 0 − 1 − 15 2 = − 5 0 1 2 5 We compute the magnitude of x2 − p1 : r kx2 − p1 k = 1 4 + +1= 25 25 √ 30 5 Thus, − √130 x2 − p1 5 2 u2 = = √ − 5 = − √230 kx2 − p1 k 30 √5 1 30 15 − 51 Thus, an orthonormal basis for the subspace is − √25 √1 5 0 √1 − 30 , − √230 √5 30 Note: There are infinitely many possible orthonormal bases for the plane. To check that the answer you have is a correct answer, just check that the two vectors are both in the plane (by checking that they satisfy the equation for the plane x1 + 2x2 + x3 = 0), that each vector has unit length, and that the dot product of the two vectors is 0. 15. Consider the linear transformation L(x) = the projection of x onto the vector 1 2 (a) Find the matrix A representing L with respect to the standard basis. 1 2 (b) Find the matrix B representing L with respect to the basis , . 2 −1 (c) Find the matrix S such that B = S −1 AS. Answer: (a) We start by applying L to each of the standard basis vectors: 1 · 0 1 L = 0 1 · 2 0 · 1 0 L = 1 1 · 2 16 1 2 1 2 1 2 1 2 1 2 1 2 = = 1 5 2 5 1 2 1 2 = = 1 5 2 5 2 5 4 5 These vectors become the columns of A. Thus, the matrix representing L with respect to the standard basis is A= 1 5 2 5 2 5 4 5 (b) We apply L to each of the basis vectors: 1 1 · 2 2 5 1 1 1 1 L = = = 2 2 2 5 2 1 1 · 2 2 2 1 · −1 2 2 1 0 1 L = =0 = −1 2 2 0 1 1 · 2 2 Now, we change each of these vectors into the basis E = 1 2 0 0 1 0 0 0 = E = E 1 2 , These vectors become the columns of B. Thus, the matrix representing L with respect to the basis E is B= 1 0 0 0 (c) The matrix S such that B = S −1 AS is the transition matrix from the basis E to the standard basis. Thus, S= 17 1 2 2 −1 2 −1 : 16. Let u1 , u2 , and u3 form an orthonormal basis for R3 , and let u be a 2 1 unit vector in R3 . If uT u1 = and uT u2 = , determine the value of 3 3 |uT u3 |. a b be u in the basis [u1 , u2 , u3 ]. Since this basis is Answer: Let c 1 2 1 orthonormal, and since uT u1 = and uT u2 = , we know that a = 3 3 3 √ 2 2 2 2 and b = . Since u is a unit vector, we know that a + b + c = 1. 3 Thus, r 1 4 + + c2 = 1 9 9 4 2 Solving, we get c2 = . Thus, |uT u3 | = |c| = . 9 3 18