PDA

View Full Version : How to calculate Eigenvalues and vectors?


mmakrzem
04-25-2008, 09:35 AM
I have a symetric 3x3 matrix in C++. I need to find the eigenvalues and eigenvectors of this matrix in an optimal fashion. Can anyone point me to some pseudocode on how to do this? I can do it by hand on a piece of paper, but I'm sure there is a more optimal technique to calculate the vectors and values when using a computer.

Reedbeta
04-25-2008, 01:18 PM
This page (http://www-math.mit.edu/18.013A/HTML/chapter32/section08.html) outlines a method for finding the eigenvalues of a 3x3 matrix by numerically solving the characteristic polynomial, and suggests a few different heuristic approaches for getting eigenvectors. This Wikipedia article (http://en.wikipedia.org/wiki/Kernel_(matrix)#Numerical_computation_of_null_spac e) talks more about numerical computation of the null space of a matrix (the eigenvectors of A are bases of the null space of A - lambda*I for each eigenvalue lambda). QR decomposition is probably the easiest-to-code approach and probably works fine for a 3x3 matrix. The article also talks about singular-value decomposition (SVD), which is a more complicated but more numerically stable technique.