MATH 55 - APPLIED MATRIX THEORY FINAL TEST: SAMPLE with SOLUTIONS (25 points NAME: PROBLEM (3 points A web of 5 pages is described by a directed graph whose matrix is given by A Do the following ( points each:. Draw the web and its baclins. Solution: This is easy to do: just remember how a matrix describes a directed graph. For instance, since the element A(, 3 equals, then there is an arrow (baclin going from page to page 3. Since A(4,, then there is no baclin going from page 4 to page, and so on. 2. Find the importance score matrix B for the web. Solution: Once the web is understood, the importance scores x,..., x 5 verify the following x 3 x 3 + 2 x 5 x 2 2 x + 3 x 3 + 2 x 5 x 3 2 x In matrix notation, we obtain x x 2 x 3 x 4 x 5 x 4 x 2 + 3 x 3 x 5 x 4 /3 /2 /2 /3 /2 /2 /3 x x 2 x 3 x 4 x 5
Hence, B /3 /2 /2 /3 /2 /2 /3 Notice that all the columns of B add up to (that is, B is column stochastic. This is a quic way to chec that B is not incorrect. 3. Let M.85 B +.5 /5 ones(5 and suppose that MATLAB gives >> [P D eig(m P.352.563.3426i.563 +.3426i.6764.499.263.2443i.263 +.2443i.8.2673.23.24 +.983i.24.983i.5964.88.5488.438 +.4886i.438.4886i.295.538.6643.6643.3695.5345 D..84 +.6252i.84.6252i.482 Find the importance score vector x [x, x 2, x 3, x 4, x 5. Solution: The importance score vector must verify x Mx and x +x 2 +x 3 +x 4 +x 5. In particular, the equation x Mx says that x must be an eigenvector of M with eigenvalue λ. In the matrix D the eigenvalue λ is in the first column, so that one associated eigenvector will be the first column of P. That is, the vector v [.352,.499,.23,.5488,.538. Clearly, the sum of the components of this eigenvector v is not equal to. To create an eigenvector whose components add up to, we divide the vector v by the sum of its components. That is, x [.352,.499,.23,.5488,.538.352.499.23.5488.538 [.352,.499,.23,.5488,.538 2.49 [.635,.233,.995,.2562,.2478 Hence the score importance vector is x [.635,.233,.995,.2562,.2478. 2
PROBLEM 2 (25 points Determine whether the following matrices are linearly independent M [ 2 (This is problem 2, section 7.2 [, M 2 [ 5 3, M 3 3 5 [ 2, M 4 3 Solution: By definition, M, M 2, M 3, M 4 are linearly independent if whenever there are real numbers x, x 2, x 3, and x 4 such that x M + x 2 M 2 + x 3 M 3 + x 4 M 4, then necessarily x x 2 x 3 x 4. The equation x M + x 2 M 2 + x 3 M 3 + x 4 M 4 means ( x M + x 2 M 2 + x 3 M 3 + x 4 M 4. That is, x [ 2 + x 2 [ + x 3 [ 5 3 3 5 + x 4 [ 2 3 ( Thus, componentwise this implies That is, we end up with the system If we denote A x + x 2 + 5x 3 + 2x 4 x 2 + 3x 3 + x 4 x 2 3x 3 x 4 2x + x 2 + 5x 3 + 3x 4 5 2 3 3 2 5 3 5 2 3 3 2 5 3 x x 2 x 3 x 4, then x is a solution to the system Ax. Linearly independence of M, M 2, M 3, and M 4 means that there is exactly one solution to Ax, that is, the zero solution. Let s see if that s the case. By computing the reduced row echelon form of the augmented matrix [A b, where b [,,,, (which is very simple to do by hand, we get that there is one free variable. Therefore, there are infinitely many solutions. This is telling us that M, M 2, M 3, and M 4 are linearly dependent since there are infinitely many non-zero numbers x, x 2, x 3, and x 4 such that x M + x 2 M 2 + x 3 M 3 + x 4 M 4. 3
PROBLEM 3 (3 points Determine whether the following sets are vector spaces ( points each. U {a + b t such that a, b R} (This is problem 28, section 7. Solution: By definition. U is a vector space if whenever the sum of two objects in U is also an object in U, and whenever an object is U is multiplied by a real number the result is also an object in U. To chec the first condition let s tae two objects u and v in U. By the definition of U u and v must be of the form u + l t, v r + s t where, l, r and s are some fixed real numbers (here t is the variable. Now, the sum u + v is u + v ( + r + (l + s t, which is also of the form real number + real number t. Hence, u + v is also an object of U. Now tae a real number λ and an object u U. Then, u must be of the form u m + y t for some real numbers m and y. Therefore, the product λu is given by λu λ(m + y t λm + λy t, which is also of the form real number + real number t. Hence, λu is also an object of U. Therefore, U is a vector space. {[ } a b 2. V such that a + d (This is problem 2, section 7. c d Solution: By definition, the objects of V are those 2 2 matrices whose diagonal elements add up to. Given two objects u and v in V, they must be of the form [ [ e f i j u, v g h l for some real numbers e, f, g, h, i, j, and l such that e + h and i + l. The sum u + v is then [ e + i f + j u + v g + h + l We only need to chec whether the diagonal elements of u + v add up to. The diagonal elements of u + v are e + i and h + l. Hence That, is u + v is also an object in V. (e + i + (h + l e + h + i + l +. Now, tae a real number λ and an object u V. Therefore, since u must be of the form [ p q u r s for some real numbers p, q, r, and s with p + s. The product λu is given by [ λp λq λu λr λs 4
It remains to chec whether the diagonal elements of λu add up to zero. We have λp + λs λ(p + s λ. Hence, λu is also an object of V, for every real number λ and every object u in V. Thus, V is a vector space. 3. The set S consisting of all 2 2 symmetric matrices. (This is problem 23, section 7. Solution: Given any two objects u and v of S, they must be of the form [ [ p q a b u, v q s b c for some real numbers p, q, s, a, b, and c. Notice that u and v are symmetric, that is, u u T and v v T (they equal their transposes. Now, u + v is given by [ p + a q + b u + v q + b s + c Notice that u + v is also symmetric. Therefore, u + v is also an object in S. Now tae a real number λ and an object u S. u must be of the form [ r t u t s for some real numbers r, s, and t. Hence, the product λu is given by [ λr λt λu, λt λs which is also a symmetric matrix. Hence, λu is also an object in S. Therefore, S is a vector space. 5
PROBLEM 4 (25 points The system of difference equations { x x 2y y 2x + y where, 2, 3,... defines a discrete dynamical system. Find a formula for u [x, y for every natural number using that x y and that MATLAB gives >> [P Deig([ -2; -2 (This is problem 2, section 6.3 [ / 2 / 2 P / 2 / 2 [ D 3 Solution: Set u [x, y. Clearly, the system above is equivalent to u Au, where the matrix A is given by A [ 2 2 Iterating the equation u Au we get that u A u (where u [x, y [,. On the other hand, by using the MATLAB information we see that A is diagonalizable (here we use the quic chec that its eigenvalues are all different. In particular, we have which gives [ A P D P P 3 A P D P, [ P ( P 3 P. [ a b Now remember that the inverse of any 2 2 matrix is given by the matrix c d ad bc [ d b c a Using this little tric, we easily compute the inverse of P. P ( / 2 (/ 2 ( / 2 ( / 2 [ / 2 / 2 / 2 / 2 [ / 2 / 2 / 2 / 2 as which gives that P P (that is, in this particular case P turned out to be an orthogonal matrix. All this gives [ A ( P 3 P. 6,
Hence, [ u A ( u P 3 Now, we compute the product [ / 2 / 2 / 2 / 2 [ / 2 / 2 P u / 2 / 2 [ ( 3 [ ( 3 [ ( / 2 / 2 / 2 / 2 [ / 2 / 2 [ [ / 2 / 2 / 2 / ( 2 3 / 2 + / 2 [ [ [ / 2 / 2 / 2 / ( 2/ 2 2 3 [ [ / 2 / 2 / 2 / ( ( 2/ 2 2 [ ( / 2( ( 2/ 2 ( / 2( ( 2/ 2 [ ( ( [ / 2 / 2 / 2 / 2 [ ( Hence, the general formula for u is u (. That is y ( and x (. In particular, we have that x y, x 2 y 2, x 3 y 3, and so on. ( 7
[ PROBLEM 5 (2 points Determine whether the matrix P 2 matrix for A [ 4 2 is a diagonalizing. (This is problem 8 in the Review for Chapter 6, page 323 Solution: By definition, P is a diagonalizing matrix for A if the we have P A P D where D is a diagonal matrix. Hence, we only need to compute the product P A P and chec whether or not it is a diagonal matrix. [ a b To find P we use that the inverse of any 2 2 matrix is given by the matrix c d ad bc In our case, the matrix in question is P P [ d b c a [ 2 [ 2 2.. Hence, its inverse is given by [ 2 Now, we compute [ P A P 2 [ 2 [ 2 3 [ 4 2 [ 2 3 4 3 [ 2 Hence, P A P is a diagonal matrix and therefore P is indeed a diagonalizing matrix for A. 8
PROBLEM 6 (2 points Suppose that the characteristic polynomial of a 3 3 matrix B is Answer the following (5 points each:. What are the eigenvalues of B? p(λ (λ (λ + (λ 4. Solution: By definition, the eigenvalues of B are the roots of its characteristic polynomial. That is, the eigenvalue of B are the solutions to Clearly, the eigenvalues are,, and 4. 2. Is B diagonalizable? p(λ (λ (λ + (λ 4 Solution: Yes, it is. The eigenvalues are all distinct (they do not repeat. This is a sufficient (although not necessary condition for diagonalization. 3. What is det(b? Solution: Since B is diagonalizable, we now that B P D P for some invertible matrix P and some diagonal matrix D whose diagonal elements are the eigenvalues of A. Therefore we have det(b det(p D P det(p det(d det(p det(p det(d det(p Thus, det(b 4. 4. Is B invertible? det(d ( 4 4. Solution: Yes, since det(b 4 it follows that B is invertible. 9
PROBLEM 7 (25 points Let u [ 3, 2, 4, v [ 2,, and w [, 5,. Compute u (v w. (This is problem 56, section 5.2 Solution: Let s recall the definitions of the dot and cross products (which is a number and [x, x 2, x 3 [y, y 2, y 3 x y + x 2 y 2 + x 3 y 3, [x, x 2, x 3 [y, y 2, y 3 [x 2 y 3 x 3 y 2, x 3 y x y 3, x y 2 x 2 y (which is a vector. We then have v w [ 2,, [, 5, [4, 2, and u (v w [ 3, 2, 4 [4, 2, 2 4 4 56. PROBLEM 8 (25 points Find the shortest distance from the point P ( 2, 3, to the subspace U span{u, u 2 } where u [2,, and u 2 [7, 4, 2. (This is problem 7, section 4.3 Solution: Let v [ 2, 3,. Since u and u 2 are orthogonal (their dot product is zero the projection of v onto the subspace U is given by v v u u 2 u + v u 2 u 2 2 u 2 Recall that the norm of a vector x [x, x 2, x 3 is given by x x 2 + x2 2 + x2 3. Computing and plugging in the dot products and the norms in the formula for v we obtain v 7 5 u + 6 25 u 2 7 5 [2,, + 6 25 [7, 4, 2. Finally, the distance from P to the subspace U is given by v v 3 395.7924.
PROBLEM 9 (3 points Let T : R 3 R 2 be the linear operator given by T (x, x 2, x 3 (2x 3x 2 + x 3, x + x 3. Determine the following ( points each (This is problem 7, section 3.4:. The matrix that represents T. Solution: The canonical basis for R 3 is B {[,,, [,,, [,, } Hence, the matrix A that represents T is given by A [T (,,, T (,,, T (,, We now use the definition of T to compute ( 2 3 + T (,, + and Hence, 2. What is ran(t? Is T onto? ( 2 3 + T (,, + ( 2 3 + T (,, + A ( 2 3,,,. Solution: ran(t equals col(a. Hence, since a basis for col(a is {( ( } 2 3, (the third column is a linear combination of the first two. We obtain that {( ( } 2 3 col(a span, In particular, ran(a 2, which coincides with the dimension of the target space R 2. Therefore, T is onto. 3. What is er(t? Is T one-to-one? Solution: Since er(t null(a and, by definition, null(a consists of those vectors x such that Ax, we obtain that er(t is the subspace formed by the solutions to Ax. This leads to the system ( 2 3 x x 2 x 3 (.
Computing the reduced row echelon form of the augmented matrix ( [A [, 2 3, which can be easily done by hand, we obtain that there is one free variable and that er(t turns out to be er(t span ( [3, 3. By definition, T is one-to-one only when er(t consists of just the zero vector. In our case er(t consists of infinitely many vectors (all the multiples of [3, 3. Hence, T is not one-to-one. PROBLEM (2 points Find the value of such that the angle between the vectors [2, 3, and [ 2, 5, equals π/2. (This is problem 7, section 4. Solution: The vectors forming an angle of π/2 means that they are orthogonal to each other. That is, their dot product has to be zero. Hence, we need to find the value of such that Clearly the answer is 9. [2, 3, [ 2, 5, 4 5. 2