* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Fall 05 Exam 3 with Solutions
Survey
Document related concepts
Jordan normal form wikipedia , lookup
Orthogonal matrix wikipedia , lookup
Perron–Frobenius theorem wikipedia , lookup
Euclidean vector wikipedia , lookup
Cayley–Hamilton theorem wikipedia , lookup
Eigenvalues and eigenvectors wikipedia , lookup
Non-negative matrix factorization wikipedia , lookup
Vector space wikipedia , lookup
Singular-value decomposition wikipedia , lookup
Covariance and contravariance of vectors wikipedia , lookup
Matrix multiplication wikipedia , lookup
Matrix calculus wikipedia , lookup
Gaussian elimination wikipedia , lookup
Transcript
Name: Section Registered In: Math 125 – Exam 3 – Version 1 November 16, 2005 60 total points possible 1. Let S be the set of all vectors of the form (5b + 2c, b, c) where b and c are arbitrary numbers. (a) (3pts) Find vectors ~u and ~v such that S = span{~u, ~v }. Solution: ~v = (5b + 2c, b, c) = (5b, b, 0) + (2c, 0, c) = b(5, 1, 0) + c(2, 0, 1) In other words, the vectors ~v are all linear combinations of the vectors (5, 1, 0) and (2, 0, 1). Therefore, S = span{(5, 1, 0), (2, 0, 1)}. (b) (2 pts) Why does this show that S is a subspace of R3 ? Solution: Recall that every vector space can be represented as the span of a set of basis vectors. By definition, S is a vector space. It is a subspace of R3 since the vectors (5, 1, 0) and (2, 0, 1) are vectors in R3 . One could also explain how S satisfies the definition of a subspace as we did in the solution of problem 2b of the 11 AM section of Quiz 5. 2. (a) (5 pts) Find a basis for the null space of the matrix −3 6 −1 1 −7 A = 1 −2 2 3 −1 2 −4 5 8 −4 . Solution: To find the null space, we need to find the solutions to [A | ~0]. [A | ~0] in reduced row echelon form is 1 −2 0 −1 3 0 0 1 2 −2 0 0 0 0 0 0 0 . 0 The coefficients that correspond to columns without leading ones are parameters. Let x2 = r, x4 = s, and x5 = t. Using these parameters, we find x1 = 2r + s − 3t and x3 = −2s + 2t. The null space are all vectors ~v of the form 2r + s − 3t r ~v = −2s + 2t = r s t 2 1 −3 0 0 1 + s + t 0 −2 2 . 1 0 0 0 0 1 The basis for the null space is {(2, 1, 0, 0, 0), (1, 0, −2, 1, 0), (−3, 0, 2, 0, 1)}. (b) (3 pts) What is the dimension of the null space of A? Explain your answer. Solution: Since there are 3 vectors in the basis, the dimension of the null space is 3. (c) (2 pts) What is the dimension of the column space of A? Explain your answer. Solution: By theorem, we know the rank + nullity = the number of columns. We have rank + 3 = 5. Therefore the rank is 2. Since the rank of the column space is the dimension of the column space, the dimension of the column space is 2. This also could have been solved by recalling that the row rank = column rank. Since the matrix A in reduced row echelon form has row rank 2, we knew the dimension of the column space is 2. 3. Let A = −8 −1 −9 6 4 8 and ~b = (2, 1, −2). 4 0 4 (a) (6 pts) Determine if ~b is in the column space of A. Clearly explain your answer. If it is, write it as a linear combination of the column vectors. Solution: If ~b is in the column space of A, then ~b can be written as a linear combination of the vectors. That is ~b = c1 a~1 + c2 a~2 + c3 a~3 where a~i is the i-th column vector. To solve for the coefficients, we solve the augmented matrix [A | ~b]. [A | ~b] in reduced row echelon form is 1 0 0 0 1 0 0 0 1 −2.5 0 . 2 Therefore, c1 = 2.5, c2 = 0, and c3 = 2. Hence ~b is in the column space of A and can be written as ~b = 2.5a~1 + 2a~3 . (b) (4 pts) Determine if ~b is in the null space of A. Solution: Recall that if a vector ~v is in the null space of a matrix A then A~v = ~0. Here, −8 −1 −9 2 1 A · ~b = 6 4 8 1 = 0 . 4 0 4 −2 0 Therefore, ~b is not in the null space of A. Another approach would have been to find the null space of A. The null space of A is only the trivial solution (0, 0, 0). Clearly, ~b = (2, 1, −2) can not be written as a linear combination of the zero vector. 4. (2 pts each) Mark each statement True or False. Justify each answer. (a) Let A be an m × n matrix. The column space is the set of all vectors that can be written as A~x for some ~x. Solution: TRUE. The column space is the set of vectors ~b that can written ~b = A~x. That is ~b = x1 a~1 + x2 a~2 + . . . + xn a~n . (b) A null space is a vector space. Solution: TRUE. The null space is a vector space since it is the span of a set of basis vectors. (c) If S = span{u1 , u2 , . . . , un }, then {u1 , u2 , . . . , un } is a basis for S. Solution: FALSE. {u1 , u2 , . . . , un } is a basis for S if and only if all the vectors in the set are linearly independent. (d) The columns of an invertible n × n matrix form a basis for Rn . Solution: TRUE. This is the theorem on page 75 in the notes. If A is an n × n matrix, the columns of A span all of Rn if and only if A has an inverse. (e) If the null space of a 7 × 6 matrix is 5 dimensional, then the row rank of the matrix is one (1). Solution: TRUE. This is an application of the rank + nullity = the number of columns theorem. Recall that the column rank equals the row rank and, by definition, the nullity is the rank of the null space. Therefore, rank + 5 = 6. Hence, the column rank (or dimension of the column space) is 1. 5. (10 pts) A company produces stereos, CD players, and speakers at three different factories. At Factory 1, the daily 8 hour workday output is 63 stereos, 51 CD players, and 36 speakers. At Factory 2, the daily output is 31 stereos, 32 CD players, and 24 speakers. At Factory 3, the daily output is 40 stereos, 60 CD players, and 48 speakers. The company would like to close Factory 2. Is there some combination of outputs from the other two factories that will equal the output of Factory 2? If so, what is that combination? Solution: Let F~i denote the output of the i-th factory. Therefore, F~1 = (63, 51, 36), F~2 = (31, 32, 24), and F~3 = (40, 60, 48) To determine if the output of Factory 2 can be replace by the other two factories, we need to find the dependency equation for the three vectors – if the dependency equation exists. To find the dependency equation we solve the augmented matrix [F~1 F~2 F~3 | ~0]. Moving [F~1 F~2 F~3 1 0 0 | ~0] into reduced row echelon form, we get 0 0 −4/3 1 4 0 . 0 0 0 If we view this table as a dependency table, we see that F~3 = − 43 F~1 + 4F~2 . Solving for F~2 , we get the equation F~2 = 31 F~1 + 14 F~3 . We could also have found the dependency equation from the looking at the ~0 as a linear combination of the F~i ’s. Since the F~3 column does not have a leading one, we let c3 = t. Accordingly, c1 = 43 t and c2 = −4t. Therefore, ~0 = 4 tF~1 + −4tF~2 + tF~3 . 3 To find the dependency equation, we let t = 1. This yields the dependency equation ~0 = 4 F~1 − 4F~2 + F~3 . 3 Solving this dependency equation for F~2 , we again get F~2 = 13 F~1 + 14 F~3 . The conclusion is: Everyday, we can replace the output of Factory 2 by running Factory 1 and extra one-third of a workday and Factory 3 and extra one-fourth of a workday. 6. (5 pts) Find a basis for the subspace defined by 4x − 3y + 5z = 0. Solution: There are two separate methods to solving this problem. The first is as follows: Solve the equation of a plane for any one of the variable. Here, we will solve for y. 4 5 y = x+ z 3 3 To find one vector in the basis, let x = 1 and z = 0. Hence, y = 43 1 + 53 0 = 34 . One vector in the plane is v~1 = (1, 43 , 0). To find a second vector, let x = 0 and z = 1. This results in the second vector v~2 = (0, 35 , 1). Since 4x − 3y + 5z = 0 is a plane in R3 , we know that the dimension of 4x − 3y + 5z = 0 is one less than that of R3 . Specifically, the plane is 2-dimensional. Since we have already found two linearly independent vectors, we know we have found a basis for the plane. That is, {(1, 34 , 0), (0, 53 , 1)} are a basis for the plane. The second method would be to solve for one of the variables and let all the other variables be parameters. As an example, we will solve for x. 3 5 x = y − z. 4 4 Letting y = s and z = t, we can write the equation of the plane as the vector equation 3 5 3 5 s − 4t − 4 4 4 ~v = = s 1 + t 0 . s t 0 1 Therefore, the set {( 34 , 1, 0), (− 45 , 0, 1)} form a basis for the plane. 7. Consider the linear program: minimize z = 35x1 + 48x2 subject to 6x1 + 9x2 ≥ 22 −3x1 + 2x2 ≥ −5 x1 ≥ 0, x2 ≥ 0 (a) (3 pts) What is this linear program in standard form? Solution: Recall that for the generalize simplex algorithm, all that we require is that all the variables be positive and the the constraint equations’ righthand side be a positive number. For the first constraint, we need to subtract a positive slack variable in order to “get down” to the constraint 22. For the second constraint equation, we need to multiply the entire equation by −1 and then add a slack variable. This yields the following standard form. z − 35x1 − 48x2 = 0 6x1 + 9x2 − x3 = 22 3x1 − 2x2 + x4 = 5 x1 , x 2 , x 3 , x 4 ≥ 0 (b) (5 pts) Complete only Phase I (the artificial program) of the two-phase method. Solution: In Phase I, we need to add artificial variables to the constraint equations. This results in minimizing the following linear program: minimize z = y1 + y2 subject to 6x1 + 9x2 − x3 + y1 = 22 3x1 − 2x2 + x4 + y2 = 5 x1 , x 2 , x 3 , x 4 , y 1 , y 2 ≥ 0 The initial simplex table of Phase I is: 1 0 0 0 0 0 6 9 −1 0 0 3 −2 0 1 −1 −1 1 0 0 1 0 22 . 5 The first step is now to place the standard basis vectors e2 and e3 in the columns corresponding to y1 and y2 respectively. That is, pivot about the positive 1’s in the y1 and y2 columns. This yields the simplex table: 9 7 −1 1 1 0 6 9 −1 0 0 3 −2 0 1 0 0 27 22 . 5 1 0 0 1 Now we begin the minimum simplex algorithm. Choosing the x-variable column with the most positive entry, we choose the x1 -column since it starts with a 9. We determine to pivot on the “3” since the quotient 5 3 < 22 . 6 This yields the next simplex table: 1 0 0 0 13 −1 −2 0 −3 0 13 −1 −2 1 −2 1 − 23 0 1 3 0 1 3 12 12 . 5 3 Continuing the minimum simplex algorithm, we choose the x2 -column corresponding to the leading entry 13. There is only one viable candidate for pivot in this columns – the 13 in row 2. Pivoting here yields the final table in Phase I: 0 0 0 0 −1 −1 1 1 2 1 2 0 0 1 − 13 − 13 − 13 13 2 3 2 3 0 1 0 − 39 13 39 13 0 12 13 . 89 39 (c) (2 pts) Are we now able to move to Phase II of the generalized simplex method? Clearly explain your answer. Solution: Yes. The minimum simplex algorithm is done (since there are no positive entries to begin any of the dependent variable columns) and the values of y1 and y2 corresponding to the basic feasible solution are zero. (Remark: Saying that the standard basis vectors are no longer in the columns corresponding to the y-columns is also correct.) Name: Section Registered In: Math 125 – Exam 3 – Version 2 November 16, 2005 60 total points possible 1. Let v~1 = (1, 0, −1), v~2 = (2, 1, 3), v~3 = (4, 2, 6), and ~b = (3, 1, 2). (a) (1 pt) Is ~b in {v~1 , v~2 , v~3 }? How many vectors are in {v~1 , v~2 , v~3 }? Solution: ~b is not in the set. There are only three vectors in the set. Namely, v~1 , v~2 , and v~3 . (b) (1 pt) How many vectors are in the span of {v~1 , v~2 , v~3 }? What form do these vectors take? Solution: The vectors in the span of the set {v~1 , v~2 , v~3 } are any vector ~v that can be represented as a linear combination of v~1 , v~2 , and v~3 . That is ~v has the form ~v = c1 v~1 + c2 v~2 + c3 v~3 for any real numbers c1 , c2 , and c3 . Since the coefficients for the linear combination are arbitrary, we see there are an infinite number of vectors in the span. (c) (3 pts) Is ~b in the subspace spanned by {v~1 , v~2 , v~3 }? Explain your answer. Solution: To determine if ~b is in the span of the set, we need to determine if there exists specific coefficients c1 , c2 , and c3 such that ~b = c1 v~1 + c2 v~2 + c3 v~3 . To do this, we solve the augmented system [v~1 v~2 v~3 | ~b]. Moving 1 0 0 [v~1 v~2 v~3 | ~b] into reduced row echelon form, we get 0 0 1 1 2 1 . 0 0 0 Since this system is consistent – the rank of the coefficient matrix equals the rank of the augmented matrix – the vector ~b lies in the span. (Although the question didn’t ask for it, viewing the reduced row echelon form matrix as a dependency table, we see that ~b = v~1 + v~2 .) 2. Consider the matrix A = 1 −3 −1 2 −4 −2 . 1 −6 −3 2 −6 −1 6 −1 3 (a) (2 pts) Give a definition of the column space of a matrix. Solution: The column space is the span of the column vectors a~1 , a~2 , a~3 , a~4 , and a~5 . (Similarly, all linear combinations of a~1 , a~2 , a~3 , a~4 , and a~5 .) (b) (5 pts) Use a dependency table to select a basis for the column space of A and write any extraneous columns as a linear combination of the basis. Solution: First, we create the initial dependency table using matrix A: e~1 e~2 e~3 a~1 a~2 a~3 a~4 a~5 1 −3 −1 6 −1 2 −6 2 −4 −1 3 1 −6 −2 . −3 Moving the matrix into reduced row echelon form, we get: a~1 a~3 a~5 a~ 1 1 0 0 a~2 a~3 a~4 a~5 −3 0 2 0 0 1 −4 0 0 0 0 . 1 We see that the set {a~1 , a~3 , a~5 } form a basis for column space. Reading down the columns of vectors not in the basis, we see that a~2 and a~4 can be written as a~2 = −3a~1 and a~4 = 2a~1 + −4a~3 . (c) (2 pts) What is the dimension of the column space? Explain your answer. Solution: Since there are three vectors in the basis of the column space of A, we know that the dimension is three. This also could have been solved be recalling that the row rank = column rank. Since the matrix A in reduced row echelon form has row rank 3, we know the dimension of the column space is 3. (d) (1 pts) What is the dimension of the null space? Explain your answer. Solution: Recall that the definition of nullity is the dimension of the null space. By theorem, we know the rank + nullity = the number of columns. We have 3 + nullity = 5. Therefore the nullity is 2. 3. (2 pts each) Let A denote an m × n matrix. Mark each statement True or False. Justify each answer. (a) The null space of A is the solution set of the equation A~x = ~0. Solution: TRUE. This is exactly how we defined the null space on page 68 of the notes. (b) The column space is the set of all solutions to A~x = ~b. Solution: FALSE. The columns space is not the solution vector ~x. The column space is the set of vectors ~b that can written ~b = A~x. That is ~b = x1 a~1 + x2 a~2 + . . . + xn a~n . (c) If the null space of a 7 × 6 matrix is 5 dimensional, then the dimension of the column space is 2. Solution: FALSE. This is an application of the rank + nullity = the number of columns theorem. Recall that the column rank equals the row rank and, by definition, the nullity is the rank of the null space. Therefore, rank + 5 = 6. Hence, the column rank (or dimension of the column space) is 1. Not 2. (d) A~x = ~b is consistent if and only if ~b is in the column space of A. ~ is exactly method used to determine Solution: TRUE. Using the augmented matrix [A | B] ~ is equivalent to the matrix if ~b is in the column space of A. The augmented matrix [A | B] equation A~x = ~b. (e) If S = span{u1 , u2 , . . . , un }, then {u1 , u2 , . . . , un } is a basis for S. Solution: FALSE. {u1 , u2 , . . . , un } is a basis for S if and only if all the vectors in the set are linearly independent. 4. (5 pts) Describe the span of the vectors a~1 = (1, 0, 1), a~2 = (1, 1, 3), a~3 = (2, 3, 8) in rectangular coordinates x, y and z. Solution: For any vector ~v = (x, y, z) to be in the span of a~1 , a~2 , and a~3 , we augmented matrix 1 1 2 0 1 3 1 3 8 x y z needs to be consistent when put into row echelon form. Through the row operations R30 = R3 − R1 and R300 = R30 − 2R2 , we get the matrix 1 1 2 x 0 1 3 y 0 0 0 z − x − 2y . For this system to be consistent, we require −x − 2y + z = 0. This is the equation of the plane in rectangular coordinates. 5. (5 pts) A company make two different metal alloys by melting down and mixing metals from two different recycling sources. Alloy 1 is 76% aluminum, 16% tin, and 8% nickel. Alloy 2 is is 70% aluminum, 20% tin, and 10% nickel. The first source contains 80% aluminum, 15% tin, and 5% nickel. The second source is is 60% aluminum, 20% tin, and 20% nickel. Using linear combinations of vectors, determine if it is possible to make either of the alloys from the available sources. If so, tell how. Solution: Interpreting the metal composition from the sources and the desired alloys as vectors, we can write the above information in the following form: S~1 = (80, 15, 5), S~2 = (60, 20, 20), A~1 = (76, 16, 8), and A~2 = (70, 20, 10). To determine if the alloys can be made from the sources, we look at the matrix [S~1 S~2 | A~1 A~2 ] Putting this matrix into reduced row echelon form, we get .8 0 1 0 0 1 .2 0 . 0 1 0 0 Note that only the Alloy 1 vector is consistent. Therefore, from these two sources, we can only make Alloy 1. The conclusion: To make Alloy 1, use a combination of metal that consists of 80% of the metal being from Source 1 and 20% from Source 2. 6. You are solving the linear program: minimize z = −x1 + x2 + 3x3 − 7x4 subject to 3x1 − x2 + 2x3 + 2x4 = 10 x1 + x2 − 2x3 + 2x4 = −2 x1 ≥ 0, x2 ≥ 0, x3 ≥ 0, x4 ≥ 0 (a) (3 pts) What is this linear program in standard form? Solution: Recall that for the generalize simplex algorithm, all that we require is that all the variables be positive and the the constraint equations’ righthand side be a positive number. For the first constraint, we don’t need to do anything since it is an =’s equation and not an inequality. For the second constraint equation, we again do not need to use slack variables but, we need to multiply the entire equation by −1 to get the positive righthand side. This yields the following standard form. z + x1 − x2 − 3x3 + 7x4 = 0 3x1 − x2 + 2x3 + 2x4 = 10 −x1 − x2 + 2x3 − 2x4 = 2 x1 , x 2 , x 3 , x 4 ≥ 0 (b) (7 pts) Assume that you found the last simplex table in Phase I to be: 0 0 0 0 −1 −1 0 1 0 0 −1/2 1 −1/2 1/8 −3/8 1/2 . 0 1 0 0 1 1/4 1/4 3 Complete the generalized simplex algorithm for this system. Solution: First we delete the artificial variable columns. Then we replace the top row with the coefficients of the original objective function in standard form: z +x1 −x2 −3x3 +7x4 = 0. This yields the following simplex 1 0 0 table: 1 −1 −3 7 0 −1/2 1 −1/2 1 0 1 0 0 1/2 . 3 Now we need to use row operations to reinsert the standard basis vectors e~2 and e~3 back into the columns were they were located in the last simplex table from Phase I – the x3 -column and x1 -column respectively. This yields the simplex table 0 −5/2 0 9/2 1 0 0 −1/2 1 −1/2 0 1 0 0 1 −3/2 1/2 . 3 Now we being the minimum simplex algorithm. The only variable column starting with a positive number is the column corresponding to the x4 variable. There is only one positive choice for pivoting in this column. So, we pivot 1 −9/2 −5/2 0 1/2 −1/2 1 0 0 on the 1. This yields the simplex table 0 0 −15 1 0 2 . 0 1 3 Since there are no more x-variable columns starting with a negative number, we are done with the minimum simplex algorithm. This results in the solution: the minimum z value is −15 attained at the basic feasible solution x1 = 0, x2 = 0, x3 = 2, and x4 = 3. 7. (5 pts) Determine if the vectors v~1 = (3, 0, −6), v~2 = (−4, 1, 7), v~3 = (−2, 2, 2) form a basis for R3 . Clearly explain your answer. Solution Recall the theorem on page 75 in your notes: If A is a n × n matrix, the columns of A span all of Rn if and only if matrix A has an inverse. Consider the matrix formed by A = [v~1 v~2 v~3 ]. We know from our previous work with square matrices that a matrix has an inverse if and only if the determinant of that matrix is non-zero. det 3 −4 −2 0 1 −6 7 2 = 0. 2 Therefore, A does not have and inverse and the column vectors are not linearly independent. Hence, v~1 , v~2 , and v~3 do not form a basis for R3 . An alternative way to approach this problem would be to find the dimension of the subspace spanned by v~1 , v~2 , and v~3 . One will find there are only two basis vector. Hence, the dimension of the spanning set is 2. Since R3 is three dimensional, it is impossible for v~1 , v~2 , and v~3 to span all of R3 . 8. (a) (3 pts) Define what it means for a set of vectors to be linearly dependent. Solution: A set of vectors are linearly dependent if any one vector in the set can can be written as a linear combination of any of the other vectors in the set. (b) (7 pts) Show that the vectors (−3, 4, −2, 1), (2, 3, 5, −4), and (−13, 6, −16, 11) are dependent and find the dependency equation. Solution: To find the dependency equation, we write the above set of vectors as a columns of a matrix A and we solve the augmented system [A | ~0]. −3 2 −13 4 3 6 [A | ~0] = −2 5 −16 1 −4 11 0 0 . 0 0 Moving this augmented matrix into reduced row echelon form yields 0 1 0 3 0 1 −2 0 . 0 0 0 0 0 0 0 0 Since the third column does not contain a leading 1, we recognize that c3 is a parameter in the family of solutions to this system. Setting c3 = t, we find that c1 = −3t and c2 = 2t. Therefore, ~0 = −3ta~1 + 2ta~2 + ta~3 where a~i is the i-th column vector of the matrix A. To find the dependency equation, we let t = 1. This yields the dependency equation ~0 = −3a~1 + 2a~2 + a~3 . It is customary (although, not necessary) to solve for one of the vectors in terms of the others. Here, the easiest to solve for is a~3 . a~3 = 3a~1 − 2a~2 .