• Tidak ada hasil yang ditemukan

INTRODUCTION TO MATRICES

2.10 Exercises

68 2. INTRODUCTION TO MATRICES

the longer growing season. The other four locations differ primarily in the second principal component which reflects amount of rainfall and the dif- ference in maximum and minimum temperature. Location 2 has the highest rainfall and tends to have a large difference in maximum and minimum daily temperature. Location 6 is also the lowest in the second principal compo- nent indicating a lower rainfall and small difference between the maximum and minimum temperature. Thus, location 6 appears to be a relatively hot, dry environment with somewhat limited diurnal temperature variation.

2.10 Exercises 69 (c) B+A

(d) cB (e) A−d (f) (dB+A).

2.2. Find the rank of each of the following matrices. Which matrices are of full rank?

A =



1 1 0 0 0 1 0 1 0 0 1 0 0 1 0 1 0 0 0 1

 B=



1 1 0 0 1 0 1 0 1 0 0 1 1 0 0 0



C =



1 1 0 0

1 0 1 0

1 0 0 1

1 1 1 1



.

2.3. Use B in Exercise 2.2 to compute D = B(BB)1B. Determine whetherDis idempotent. What is the rank ofD?

2.4. Findaijelements to make the following matrix symmetric. Can you choosea33to make the matrix idempotent?

A =



1 2 a13 4

2 1 0 a24

6 0 a33 2

a41 8 2 3



.

2.5. Verify thatAandBare inverses of each other.

A= 10 5

3 2

B= 2

5 1

35 2

. 2.6. Findb41 such thataandbare orthogonal.

a=



 20

13



b=



16 b413



.

2.7. Plot the following vectors on a two-dimensional coordinate system.

v1= 1

1

v2= 4

1

v3= 1

4

.

By inspection of the plot, which pairs of vectors appear to be orthog- onal? Verify numerically that they are orthogonaland that all other

70 2. INTRODUCTION TO MATRICES

pairs in this set are not orthogonal. Explain from the geometry of the plot how you know there is a linear dependency among the three vectors.

2.8. The three vectors in Exercise 2.7 are linearly dependent. Find the linear function ofv1andv2that equalsv3. Set the problem up as a system of linear equations to be solved. Let V = (v1 v2), and let x= (x1 x2) be the vector of unknown coefficients. Then,V x=v3

is the system of equations to be solved forx.

(a) Show that the system of equations is consistent.

(b) Show that there is a unique solution.

(c) Find the solution.

2.9. Expand the set of vectors in Exercise 2.7 to include a fourth vector, v4= ( 8 5 ). Reformulate Exercise 2.8 to include the fourth vector by includingv4inVand an additional coefficient inx. Is this system of equations consistent? Is the solution unique? Find a solution. If solutions are not unique, find another solution.

2.10. Use the determinant to determine which of the following matrices has a unique inverse.

A=

1 1 4 10

B=

4 1

0 6

C=

6 3 4 2

. 2.11. Given the following matrix,

A=

3

2

2 2

, (a) find the eigenvalues and eigenvectors ofA.

(b) What do your findings tell you about the rank ofA?

2.12. Given the following eigenvalues with their corresponding eigenvectors, and knowing that the original matrix was square and symmetric, reconstruct the original matrix.

λ1 = 6 z1= 0

1

λ2 = 2 z2= 1

0

. 2.13. Find the inverse of the following matrix,

A=

5 0 0 0 10 2 0 2 3

.

2.10 Exercises 71 2.14. Let

X =











1 .2 0 1 .4 0 1 .6 0 1 .8 0 1 .2 .1 1 .4 .1 1 .6 .1 1 .8 .1









 Y =









 242240 236230 239238 231226









 .

(a) ComputeXX andXY. Verify by separate calculations that the (i, j) = (2,2) element in XX is the sum of squares of column 2 in X. Verify that the (2,3) element is the sum of products between columns 2 and 3 ofX. Identify the elements inXY in terms of sums of squares or products of the columns ofX andY.

(b) IsX of full column rank? What is the rank ofXX?

(c) Obtain (XX)1. What is the rank of (XX)1? Verify by ma- trix multiplication that (XX)1XX =I.

(d) ComputeP =X(XX)1X and verify by matrix multiplica- tion thatP is idempotent. Compute the trace tr(P). What is r(P)?

2.15. UseX as defined in Exercise 2.14.

(a) Find the singular value decomposition ofX. Explain what the singular values tell you about the rank ofX.

(b) Compute the rank-1 approximation of X; call it A1. Use the singular values to state the “goodness of fit” of this rank-1 ap- proximation.

(c) Use A1 to compute a rank-1 approximation of XX; that is, computeA1A1. Compare tr(A1A1) withλ1and tr(XX).

2.16. UseXX as computed in Exercise 2.14.

(a) Compute the eigenanalysis of XX. What is the relationship between the singular values ofX obtained in Exercise 2.15 and the eigenvalues obtained forXX?

(b) Use the results of the eigenanalysis to compute the rank-1 ap- proximation ofXX. Compare this result to the approximation ofXX obtained in Exercise 2.15.

(c) Show algebraically that they should be identical.

72 2. INTRODUCTION TO MATRICES 2.17. Verify that

A= 1 15

 3 13 8

12 7 2

12 17 7

is the inverse of

B=

1 3 2 4 5 6 8 7 9

.

2.18. Show that the equationsAx=y are consistent where A=

1 2 3 35 7

 and y=

 6 219

.

2.19. Verify that

A= 1 18

10 16 4

8 11 5

is a generalized inverse of A=

1 2 3 35 7

.

2.20. Verify that

A=







101 102 49

0 0 19

101 2 10 92







is a generalized inverse of A=

1 2 3 2 4 6 3 3 3

.

2.21. Use the generalized inverse in Exercise 2.20 to obtain a solution to the equationsAx=y, whereAis defined in Exercise 2.20 andy= ( 6 12 9 ). Verify that the solution you obtained satisfiesAx=y.

2.22. The eigenanalysis of

A= 10 3

3 8

2.10 Exercises 73

in Section 2.7 gave A1=

8.0042 5.7691 5.7691 4.1581

and A2=

1.9958 2.7691

2.7691 3.8419

. Verify the multiplication of the eigenvectors to obtain A1 andA2. Verify that A1+A2 = A, and that A1 and A2 are orthogonal to each other.

2.23. In Section 2.6, a linear transformation ofy1= ( 3 10 20 )tox1= ( 33 17 3 )and ofy2= ( 6 14 21 )tox2= ( 41 15 1 )was made using the matrix

A=

 1 1 1

1 0 1

1 2 1

.

The vectors ofAwere then standardized so thatAA=Ito produce theorthogonaltransformation ofy1andy2to

x1= ( 33/√

3 17/√

2 3/√ 6 ) and

x2= ( 41/√

3 15/√ 2 1/√

6 ),

respectively. Show that the squared distance between y1 and y2 is unchanged when the orthogonal transformation is made but not when the nonorthogonal transformation is made. That is, show that

(y1y2)(y1y2) = (x1x2)(x1x2) but that

(y1y2)(y1y2)= (x1x2)(x1x2).

2.24. (a) LetAbe anm×nmatrix andBbe ann×mmatrix. Then show that tr(AB) = tr(BA).

(b) Use (a) to show that tr(ABC) = tr(BCA), whereCis anm×m matrix.

2.25. Letabe an1 vector withaa>0. Definea=a/(aa)1/2 andA=aa. Show thatAis a symmetric idempotent matrix of rank 1.

2.26. Letaandbbe two1 vectors that are orthogonal to each other.

DefineA=aa andB=bb. Show thatAB=BA=0, a matrix of zeros.

74 2. INTRODUCTION TO MATRICES

2.27. Gram–Schmidt orthogonalization. An orthogonal basis for a space spanned by some vectors can be obtained using the Gram–Schmidt orthogonalization procedure.

(a) Consider two linearly independent vectors v1 and v2. Define z1 = v1 and z2 = v2v1c2.1, where c2.1 = (v1v2)/(v1v1).

Show thatz1andz2are orthogonal. Also, show thatz1andz2

span the same space asv1andv2.

(b) Consider three linearly independent vectorsv1,v2, andv3. De- fine z1 andz2 as in (a) andz3 =v3−c3.1z1−c3.2z2, where c3.i = (ziv3)/(zizi), i = 1, 2. Show that z1, z2, and z3 are mutually orthogonal and span the same space asv1,v2, andv3.

3

MULTIPLE REGRESSION IN