Math 6800: Linear Systems & Eigenvalues with Cholesky & QR - Prof. Donald W. Schwendeman, Assignments of Linear Algebra

Problem set 6 for math 6800, where students are required to write matlab functions for cholesky decomposition and solving linear systems, as well as finding eigenvalues using the qr algorithm. Instructions for each problem and expected outcomes.

Typology: Assignments

2011/2012

Uploaded on 02/17/2012

koofers-user-4uz
koofers-user-4uz 🇺🇸

10 documents

1 / 12

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Math 6800
D. Schwendeman Problem Set 6
Due:
Monday, 11/8/10
1. Text exercise 23.2, p.177.
2. Consider the linear system Ax =b, where Ais a symmetric, positive definite matrix.
(a) Write a matlab function, R=myCholesky(A) say, following algorithm 23.1 in the text.
Test your function using A=Z’*Z, where Z=triu(rand(12,12)). Compute the following
quantities: norm(R’*R-A)/norm(A) and norm(R-Z)/norm(Z). Comment on the results.
(b) Write a second matlab function, x=mySolve(R,b), that solves the linear system given
the Cholesky factorization of A. Test your function using b=Ay, where Ais the matrix
constructed above and y=ones(12,1). Compute norm(x-y)/norm(y) and comment on the
results.
3. Text exercise 24.1, p.188.
4. Text exercise 25.1, p.194.
5. Consider the following matlab experiments:
(a) Let Abe a 7 ×7 matrix generated using rand(7,7), and find its eigenvalues using
matlab’s eig function. Now consider the basic steps of the QR algorithm: (i) compute the
QR-factorization of A, (ii) set A=RQ. Apply these two steps iteratively until Areduces
to an “eigenvalue revealing form.” (You may use matlab’s qr function to determine the
Q,Rfactors in step (i) of the iteration.) Determine the eigenvalues from this form (without
using matlab’s eig function) and compare them to the ones found originally.
(b) Let Bbe a 7 ×7 matrix generated using the following commands B=diag(rand(7,1));
[Q2,R2]=qr(rand(7,7)); B=Q2’*B*Q2. Repeat the iteration described in part (a) for the
matrix Bin order to determine its eigenvalues.
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Math 6800: Linear Systems & Eigenvalues with Cholesky & QR - Prof. Donald W. Schwendeman and more Assignments Linear Algebra in PDF only on Docsity!

Math 6800

D. Schwendeman Problem Set 6

Due: Monday, 11/8/

  1. Text exercise 23.2, p.177.
  2. Consider the linear system Ax = b, where A is a symmetric, positive definite matrix.

(a) Write a matlab function, R=myCholesky(A) say, following algorithm 23.1 in the text. Test your function using A=Z’Z, where Z=triu(rand(12,12)). Compute the following quantities: norm(R’R-A)/norm(A) and norm(R-Z)/norm(Z). Comment on the results.

(b) Write a second matlab function, x=mySolve(R,b), that solves the linear system given the Cholesky factorization of A. Test your function using b=Ay, where A is the matrix constructed above and y=ones(12,1). Compute norm(x-y)/norm(y) and comment on the results.

  1. Text exercise 24.1, p.188.
  2. Text exercise 25.1, p.194.
  3. Consider the following matlab experiments:

(a) Let A be a 7 × 7 matrix generated using rand(7,7), and find its eigenvalues using matlab’s eig function. Now consider the basic steps of the QR algorithm: (i) compute the QR-factorization of A, (ii) set A = RQ. Apply these two steps iteratively until A reduces to an “eigenvalue revealing form.” (You may use matlab’s qr function to determine the Q,R factors in step (i) of the iteration.) Determine the eigenvalues from this form (without using matlab’s eig function) and compare them to the ones found originally.

(b) Let B be a 7 × 7 matrix generated using the following commands B=diag(rand(7,1)); [Q2,R2]=qr(rand(7,7)); B=Q2’BQ2. Repeat the iteration described in part (a) for the matrix B in order to determine its eigenvalues.