
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

MATH 513 Spring 2009, Homework 10, Addendum
It’s usually hard to compute eigenvalues of a matrix – primarily because it involves finding roots of polynomials, which is hard. However, there is one easy way to compute the largest and smallest real eigenvalues called the “Power method”. Here’s what it does for a square matrix A and a given tolerance > 0:
(a) Let yk = Axk− 1 (b) Let xk = yk/‖yk‖ (c) Increment k
Problem 1 Take the above verbal description and turn it into a Matlab function. Take a few random 5x5 matrices and try it out with a tolerance of 10 −^5. Compare the results of your function with the results of Matlab’s “eig” command. (Hint: they had better be close!) Problem 2 How can you modify the above algorithm to find the smallest eigenvalue? Write another Matlab function to do this and test it. (Hint: you’ll want to avoid taking inverses as usual, though you’d really want to, theoreti- cally.)