ST758 -- Fall 2011 Homework #1 -- due Thursday, 01 September 2011 ** Revised 22 August 2011 ** R Exercises: 1) Let u = ( 1, 2, 3, 3, 2, 1)'. a) Compute U = I - (2/d) u u' where d = u'u. (This type of matrix is known as an 'elementary reflector' or a 'Householder transformation.') Let C = UU, the matrix product of U and itself. b) Find the largest and smallest off-diagonal elements of C. c) Find the largest and smallest diagonal elements of C. d) Compute Uu. (matrix times vector) e) Compute the scalar max_i sum_j abs(U(i,j)) f) Print the second row of U. g) Print the elements of the third column below the diagonal. h) Let A be the first three columns of U. Compute P = AA'. i) Show that P is idempotent by recomputing (e) with PP-P. j) Let B be the last three columns of U. Compute Q = BB'. k) Show that Q is idempotent by recomputing (e) with QQ-Q. l) Compute P+Q. 2) Read in the matrix in the file 'hoium.dat' on the verification rate of NWS warnings. The columns are county, number of warnings, number verified, fraction verified, population density, county area, and per capita income. Compute the correlation between number of warnings and the area, and the correlation between fraction verified and per capita income. 3) Let the n*n matrix A have elements A(i,j)=r^|i-j|; use r = 0.90. a) Compute and print A for n=7. b) Compute and print the Cholesky factorization for A for n=7. c) Compute the Cholesky factorization for n=20. Does it fail? If not, find the determinant.