Question: 5. [QR-algorithm, 10pts] Let A be a symmetric, tridiagonal matrix. You learned that the matrices Ak defined by the QR-algorithm converge to a diagonal matrix
5. [QR-algorithm, 10pts] Let A be a symmetric, tridiagonal matrix. You learned that the matrices Ak defined by the QR-algorithm converge to a diagonal matrix that is similar to (and thus has the same eigenvalues as) A. The convergence speed depends on the absolute value of the ratio of consecutive eigenvalues. Let r (0,1) and (a) Calculate the eigenvalues of A as a function of r (by hand) (b) Implement the QR-algorithm using MATLAB's (or Python's) implementation of the QR-factorization, qr(). Your code should run for a quadratic matrix of any size. (c) Now define a tolerance, e.g., T 10-10. Introduce a stopping criterion in your code, causing it to stop when the maximal difference between the true eigenvalues of A and the diagonal entries of Ak is smaller than ?.2 (d) Use your code with the matrix given for at least five values of r E (0,1) and make a plot with r versus the number of iterations needed to achieve the given tolerance. Explain your findings by examining the ratio between the eigenvalues of A using (a). Please also hand in your code. 2You might want to sort the true and numerically computed eigenvalues before comparing them using sort
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
