All pastes #457022 Raw Edit

Mine

public text v1 · immutable
#457022 ·published 2007-04-25 03:42 UTC
rendered paste body
Method for choosing the shift c: First compute some power of A, say A^16. Let u be
the unit vector obtained by normalizing the first column of A^16. Compute
u · Au .
Then check to see if
|Au &#8722; (u · Au)u| < (sigma) (*)
where this is our tolerance level. For purposes of this project, take  = 10&#8722;8.
If (*) is satisfied, great &#8211; we have our approximate eigenvector u. If not, shift by
c = u · Au, and replace A by (A &#8722; cI)&#8722;1. (Were this not invertible, c would be an
eigenvalue). Now repeat. Since the passage from A to (A &#8722; cI)&#8722;1 changes only the
eigenvalues, and not the eigenvectors, finding an eigenvector u of (A &#8722; cI)&#8722;1 gives us an
eigenvector of A.