Friday, October 10, 2008

Eigenvector


Some day this summer someone asked something about eigenvectors. Since I was pretty bored and I hadn't used MatLab for a while AND I was close to my computer I did this program. The code is here.

I take a matrix A=[2 -1; -1  0.3] and a vector b=[-0.5;-0.1], which corresponds to one of the stars. Then the vector Ab is another star and so on (the next point is (A^2)b ). Clearly, there is one direction that A follows, that's the direction of the eigenvector with the largest eigenvalue in absolute value. The more times you do the multiplication by A the more accurate is the direction of the eigenvector. 

Algún día en el verano alguien me preguntó algo sobre eigenvectores. Como estaba aburrido y no había usado MatLab desde hacía tiempo y mi computadora estaba cerca, hice este programa. El código está aquí.

Tomo una matriz A=[2 -1; -1  0.3] y un vector b=[-0.5;-0.1], que corresponde a uno de las estrellas. Entonces el vector Ab es otra estrella y así sucesivamente (el siguiente punto es (A^2)b ). Claramente hay una dirección que A sigue, es la dirección del eigenvector con el eigenvalor más grande en valor absoluto. Entre más veces se hace la multiplicación por A se vuelve más exacta la dirección del eigenvector. 

No comments: