User Tools

Site Tools


IAM 961 HW5

Problem 1: Implement Rayleigh quotient iteration and demonstrate its convergence, as follows. Develop your code with a small matrix (maybe 5 x 5) and do the final demonstration with a larger matrix (maybe 100 x 100).

1. Construct a random symmetric M x M matrix A with random but known eigenvalues and eigenvectors. Hint: construct A from a random orthogonal matrix V and a known random diagonal matrix D. (4 lines of code).

2. Select a eigenvalue of A and the corresponding eigenvector (an element of D and a column of V). Verify that these are in fact an eigenvalue, eigenvector pair. (3 lines of code).

3. To get an initial guess for the Rayleigh quotient iteration, perturb the eigenvector by 10% or so and evaluate the Rayleigh quotient using the perturbed eigenvector. (5 lines of code).

4. Now do the Rayleigh quotient iteration, stopping when $\|Av-\lambda v\| < 10^{-14}$. Plot the errors in the eigenvalue and eigenvector as a function of the iteration number. The Rayleigh quotient iteration code takes about 3 lines of code, the plotting more. Don't forget to label your axes!

Answer these questions:

Are you amazed, or what?

Can you confirm that the errors scale as stated on page 208 of Trefethen and Bau?

gibson/teaching/fall-2014/iam961/iam-961-hw5.txt · Last modified: 2014/12/05 13:05 by gibson