Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Student Number Student Name (Printed) Page 1 of 6 QUEEN’S UNIVERSITY APSC174j Midterm Test #2 SOLUTIONS Friday May 17, 2013 INSTRUCTIONS • This test is 90 MINUTES in length and consists of 4 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 8 3 10 4 6 TOTAL 34 Student Number Student Name (Printed) Page 2 of 6 1. Consider the system of linear equations given by: x1 − x2 + 2x3 = 3, −3x1 − 3x2 = 6, −2x1 − 2x3 = −1, where we wish to solve for the triple (x1 , x2 , x3 ) of real numbers. (a) Write the augmented matrix for this system. (2 pts) (b) Transform the augmented matrix to row-echelon form using a sequence of elementary row operations (clearly indicate which operation you perform at each step). (5 pts) (c) Find the set of all solutions of the system of linear equations by applying back-substitution to the system resulting from step (b). (3 pts) (a) Solution: The augmented matrix is given by 3 1 −1 2 −3 −3 0 6 −2 0 −2 −1 (b) Solution: We perform row operations as follows. 1 −1 2 3 1 −1 R2 +3R1 →R2 −3 −3 0 −−−−−−−→ 0 −6 6 R3 +2R1 →R3 −2 0 −2 −1 0 −2 1 −1 2 1 R2 →R2 −3−−−−→ 0 −2 2 0 −2 2 1 −1 R3 −R2 →R3 −−−−−−−→ 0 −2 0 0 2 3 6 15 2 5 3 5 5 2 3 2 5 0 0 Student Number Student Name (Printed) Page 3 of 6 1. (continued) (c) Solution: This augmented matrix is equivalent to the linear equations x1 − x2 + 2x3 = 3 −2x2 + 2x3 = 5 Solving for x2 in the second equation yields x2 = x3 − 5 2 and substituting this into the first equation gives x1 = x2 − 2x3 + 3 = x3 − 5 1 − 2x3 + 3 = −x3 + 2 2 and so our solutions are 1 −x3 + 21 −1 x1 2 5 x2 = x3 − = x3 · 1 + − 5 2 x3 x3 2 1 0 Student Number Student Name (Printed) Page 4 of 6 c3 , and consider the following vectors in R c3 : 2. (8 pts) Consider the real vector space R 1 v1 = −1 2 3 v2 = −2 −2 5 v3 = −4 2 0 v4 = −1 8 c3 . Determine whether or not {v1 , v2 , v3 , v4 } is a generating set for R a Solution: We want to check whether or not it is possible to write, for arbitrary b ∈ R3 , c a 1 3 5 0 b = α1 −1 + α2 −2 + α3 −4 + α4 −1 c 2 −2 2 8 for some appropriate choice of α1 , α2 , α3 , α4 . This is equivalent to solving the equivalent system of linear equations, which we can do with the augmented matrix 1 3 5 0 a −1 −2 −4 −1 b 2 −2 2 8 c So let us row reduce this matrix. We find 1 3 5 0 a 1 +R1 →R2 −1 −2 −4 −1 b −R−2− −−−−→ 0 R3 −2R1 →R3 2 −2 2 8 c 0 1 R3 +8R2 →R3 −−−−−−−→ 0 0 a 3 5 0 1 1 −1 b + a −8 −8 8 c − 2a 3 5 0 a 1 1 −1 b+a 0 0 0 c + 6a + 8b Since the last row is equivalent to the equality 0 = c + 6a + 8b we find that this does not have any solutions unless this equation holds among the coefficients 0 a, b, c. In particular, for the vector 0 this does not hold, and so this vector is not in the span of 1 v1 , v2 , v3 , v4 i.e. they are not a generating set for R3 . Student Number Student Name (Printed) Page 5 of 6 3. Consider the vector space R4 consisting of 4-tuples (x, y, z, w) of real numbers, and consider the subspace W = {(x, y, z, w) ∈ R4 | x − y = 0, 2z + w = 0} (Note: You do not need to verify that this is a subspace). (a) Find a basis for W, and prove that it is a basis. (8pts) (b) Using (a), determine the dimension of W. (2pts) (a) Solution: Let the vector x y v= ∈W z w From the definition of W, we see that the coefficients must satisfy x=y w = −2z and so we can rewrite v as 0 1 0 x x 0 1 x x 0 v= =x· +z· = + 1 0 z 0 z −2 0 −2z 0 −2z I claim that these two vectors (which we will denote by w1 , w2 are a basis. From the computation above (as v was arbitrary) it follows that they span W, so it only remains to check that they are linearly independent. Suppose then that αw1 + βw2 = 0. This is equivalent to α 0 α 0 = β 0 −2β 0 Comparing the first and third (say) coefficients immediately yields that α = 0 = β, and so these are linearly independent, hence a basis. (b) Solution: Since the basis consists of two vectors, the dimension of W is 2. Student Number Student Name (Printed) Page 6 of 6 4. (6pts) Let A be a 2 × 3 matrix. Recall that the Null Space of A is the set of all vectors c3 such that x∈R 0 Ax = 0 c3 . Prove that the Null Space of A is a subspace of R (Hint: Remember the three conditions that you must check to show that something is a subspace!) Solution: We must verify three things. First, we will verify that 0 ∈ ker A. Suppose that a b c A= d e f then an easy calculation shows that 0 a b c 0 0 = d e f 0 0 as claimed, and so 0 ∈ ker A. Suppose now that x, y ∈ ker A. That is, Ax = 0 = Ay. Then it follows that A(x + y) = Ax + Ay = 0 + 0 = 0 where the first equality is due to the linearity of multiplying by the matrix A. Hence it follows that x + y ∈ ker A as claimed. Lastly, suppose that α ∈ R, x ∈ ker A. We want to show that αx ∈ ker A or equivalently that A(αx) = 0. We compute that A(αx) = α(Ax) = α0 = 0 where again, the first equality is due to the linearity of A. It follows that ker A is a subspace as claimed.