12.8. EXERCISES 325

21. Give an example of two vectors inR4 orR3 x,y and a subspace V such that x ·y= 0but Px·Py ΜΈ= 0 where P denotes the projection map which sends x to its closest pointon V .

22. Suppose you are given the data, (1,2) ,(2,4) ,(3,8) ,(0,0) . Find the linear regressionline using the formulas derived above. Then graph the given data along with yourregression line.

23. Generalize the least squares procedure to the situation in which data is given andyou desire to fit it with an expression of the form y = a f (x)+ bg(x)+ c where theproblem would be to find a,b and c in order to minimize the error. Could this begeneralized to higher dimensions? How about more functions?

24. Let A∈L (X ,Y ) where X and Y are finite dimensional vector spaces with the dimen-sion of X equal to n. Define rank(A) ≡ dim(A(X)) and nullity(A) ≡ dim(ker(A)) .Show that nullity(A)+ rank(A) = dim(X) . Hint: Let {xi}r

i=1 be a basis for ker(A)and let {xi}r

i=1∪{yi}n−ri=1 be a basis for X . Then show that {Ayi}n−r

i=1 is linearly inde-pendent and spans AX .

25. Let A be an m×n matrix. Show the column rank of A equals the column rank of A∗A.Next verify column rank of A∗A is no larger than column rank of A∗. Next justify thefollowing inequality to conclude the column rank of A equals the column rank of A∗.

rank (A) = rank (A∗A)≤ rank (A∗)≤

= rank (AA∗)≤ rank (A) .

Hint: Start with an orthonormal basis,{

Ax j}r

j=1 of A(Fn) and verify{

A∗Ax j}r

j=1is a basis for A∗A(Fn) .

26. Let A be a real m×n matrix and let A=QR be the QR factorization with Q orthogonaland R upper triangular. Show that there exists a solution x to the equation

RT Rx= RT QTb

and that this solution is also a least squares solution defined above such that AT Ax=ATb.

27. Here are three vectors in R4 : (1,2,0,3)T ,(2,1,−3,2)T ,(0,0,1,2)T . Find the threedimensional volume of the parallelepiped determined by these three vectors.

28. Here are two vectors in R4 : (1,2,0,3)T ,(2,1,−3,2)T . Find the volume of the par-allelepiped determined by these two vectors.

29. Here are three vectors in R2 : (1,2)T ,(2,1)T ,(0,1)T . Find the three dimensionalvolume of the parallelepiped determined by these three vectors. Recall that from theabove theorem, this should equal 0.

30. Find the equation of the plane through the three points

(1,2,3) ,(2,−3,1) ,(1,1,7) .