hw5_solutions - Due: October 2, 2008 CS 257 (Luke Olson):...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Due: October 2, 2008 CS 257 (Luke Olson): Homework #5 Solutions Problem 1 Problem 1 a. If A is a non-singular square matrix, prove that A T A is symmetric and positive definite. You can assume that all values in A are real. b. Experiment with the code below. What can you hypothesize about the condition number of A T A compared to A ? Listing 1: Code for problem 1b 1 n=5; 2 3 A = rand (n,n); 4 B = A’ * A; 5 fprintf ( ’cond(A) cond(A)ˆ2 cond(AˆT * A)\n’ ) 6 fprintf ( ’%g %g %g\n’ , cond (A), cond (A)ˆ2, cond (B)) c. Suppose you’re working on an embedded platform with no pre-built numerical libraries, and you need to solve Ax = b . However, you also have free access to A T A and A T b because they were computed previously for some unrelated reason in your code. You now have a choice of writing Cholesky factorization to solve A T Ax = A T b or Gaussian Elimination with scaled partial pivoting to solve Ax = b . i. Which method uses less memory? ii. Which method is faster? iii. Which method is easier to code? iv. Which method gives you a better answer? Solution a. A T A is symmetric because ( A T A ) T = A T A TT = A T A . To prove positive definiteness, remember that a matrix is positive definite if x T Bx > 0. Let y = Ax . Then x T A T Ax = y T y = n i =1 y 2 i . y is non-zero because x is nonzero and A is non-singular. Grading Total 2 points. 1 point each for symmetry and positive definitness. b.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/10/2011 for the course CS 257 taught by Professor Olson during the Spring '08 term at University of Illinois, Urbana Champaign.

Page1 / 4

hw5_solutions - Due: October 2, 2008 CS 257 (Luke Olson):...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online