* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Here
Survey
Document related concepts
Transcript
Student N umber N ame (printed) 1 of 6 QUEEN’S UNIVERSITY APSC174 Midterm Test #1 SOLUTIONS Thursday April 4th, 2013 INSTRUCTIONS • This test is 80 MINUTES in length and consists of 3 questions. • Answer all questions, writing clearly in the space provided. If you need more room, continue to answer on the back of the previous page, providing clear directions to the marker. • SHOW ALL YOUR WORK, clearly and in order, if you wish to receive full credit. • No textbook, lecture note, calculator, computer, or other aid, is allowed. • Good luck! FOR MARKER’S USE ONLY Question Mark Available Received 1 10 2 10 3 6 TOTAL 26 Student N umber 1. N ame (printed) 2 of 6 a) State the conditions that a subset W of R2 must satisfy in order to be a subspace. Solution: The conditions that W must satisfy are (a) (0, 0) ∈ W . That is, the zero vector of R2 must be in W. (b) For every x, y ∈ W , we must have the vector x + y ∈ W. That is, W is closed under addition. (c) For every x ∈ W and for every α ∈ R, we must have that α · x ∈ W. That is, W is closed under scalar multiplication. b) Consider the real vector space (R2 , +, ·), and let W be the subset of R2 defined by: W = { (x, y) ∈ R2 : xy = 0 and x − y = 0 }; Prove whether or not W is a vector subspace of (R2 , +, ·). Solution: W is a vector subspace of R2 . Let us check each of the three conditions. (a) If (x, y) = (0, 0), then it is clear that xy = 0 · 0 = 0, and that x − y = 0 − 0 = 0. So (0, 0) ∈ W. (b) Choose (x1 , y1 ), (x2 , y2 ) ∈ W. Since these are both in W, it follows that x1 y1 = 0 x1 − y 1 = 0 x2 y2 = 0 x2 − y 2 = 0 From these it follows that x1 = y1 , and at either x1 = 0 or y1 = 0. Hence x1 = y1 = 0, and similarly for x2 = y2 = 0. Thus (x1 , y1 ) + (x2 , y2 ) = (0, 0) + (0, 0) = (0 + 0, 0 + 0) = (0, 0) ∈ W as desired. (c) Choose α ∈ R, (x, y) ∈ W. Similar to before, we must have that (x, y) = (0, 0). Thus α · (x, y) = α · (0, 0) = (α · 0, α · 0) = (0, 0) ∈ W and so this is closed under scalar multiplication It should be noted that we have ultimately shown that W = {(0, 0)}, which is always a vector subspace. Student N umber N ame (printed) 3 of 6 Student N umber N ame (printed) 2. Consider the system of linear equations ( x1 − 3x3 A= −2x1 + x2 − 3x3 4 of 6 =1 =1 a) Write this out as a vector equation x1 · v 1 + x2 · v 2 + x3 · v 3 = w c2 . with v1 , v2 , v3 , w ∈ R Solution: We want v1 to be the vector of coefficients of x1 , and so on. Thus we have 1 0 −3 1 v1 = v2 = v3 = and w = −2 1 −3 1 which gives us the equation 1 0 −3 1 x1 · + x2 · + x3 · = −2 1 −3 1 as desired. b) Is the vector w in the span of the vectors v1 , v2 , v3 ? What does this tell you about solutions to the system A? Solution: The vector w is in the span of these vectors. We can see this by solving the system of linear equations A. The first equation is equivalent to x1 = 1 + 3x3 which, substituted into the second equation, yields x2 = 1 + 3x3 + 2(1 + 3x3 ) = 3 + 9x3 If we choose x3 = 0, then the triple (x1 , x2 , x3 ) = (1, 3, 0) is a solution to this system; that is, 1 0 −3 1 1· +3· +0· = 1 −2 1 −3 and so w is in the span of v1 , v2 , v3 . This tells us that there is at least one solution to the system of linear equations A. Student N umber N ame (printed) 5 of 6 c) Are the vectors v1 , v2 , v3 linearly dependent? Solution: The vectors v1 , v2 , v3 are linearly dependent. We can see this in one of two ways. The first is to provide an explicit non-zero solution to the equation 1 0 −3 0 x1 · + x2 · + x3 · = −2 1 −3 0 For example, (x1 , x2 , x3 ) = (3, 9, 1) would work, since 1 0 −3 0 3· +9· +1· = −2 1 −3 0 which was obtained by the usual methods of back-substitution and simplification. This is, of course, not the only such solution. Another method that would work is to note that we have at least two distinct solutions to the equation 1 0 −3 1 x1 · + x2 · + x3 · = 1 −3 1 −2 In the previous problem we chose (x1 , x2 , x3 ) = (1, 3, 0). However, in the solution to that problem we could have chose other values for x3 to obtain distinct solutions. For example, choosing x3 = − 31 would yield (x1 , x2 , x3 ) = (0, 0, − 31 ). By a theorem in class, if there is more than one solution to this system of linear equations, the vectors v1 , v2 , v3 must be linearly dependent. Student N umber N ame (printed) 6 of 6 3. Let (V, +, ·) be a real vector space, and let v1 , v2 ∈ V be two elements of V. Assume {v1 , v2 } is a linearly independent subset of V. Are the following sets of elements of V linearly independent or linearly dependent? a) w1 = v1 + v2 , w2 = v2 Solution: The vectors w1 , w2 are linearly independent. Suppose that α, β are real numbers so that α · w1 + β · w2 = 0. Then we have 0 = α · w1 + β · w2 = α · (v1 + v2 ) + β · v2 = α · v1 + α · v2 + β · v2 = α · v2 + (α + β) · v2 Since v1 , v2 are linearly independent, it follows that α=0 α+β =0 but this can only be true if α = β = 0. That is, the only solution to α · w1 + β · w2 = 0 is the trivial one, and so they are linearly independent. b) w1 = v1 − v2 , w2 = v2 − v1 Solution: The vectors w1 , w2 are linearly dependent. The easiest way to see this is that w1 + w2 = (v1 − v2 ) + (v2 − v1 ) = (v1 − v1 ) + (v2 − v2 ) = 0 and so there is a non-trivial linear relation between these two vectors. One can work this out by hand as well by looking at the equation α · w1 + β · w2 = 0. This simplifies to 0 = α · w1 + β · w2 = (α − β) · v1 + (β − α) · v2 which tells us that α − β = 0 and β − α = 0. But this is true for any choice of α = β, so if we choose, e.g., α = β = 1 we get the previous linear relation.