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.
How to calculate Eigenvalues and vectors?
Started by marek-knows.com, Apr 25 2008 04:35 PM
1 reply to this topic
#1
Posted 25 April 2008 - 04:35 PM
3D OpenGL, C++ Game Development Video Tutorials @
www.marek-knows.com
www.marek-knows.com
#2
Posted 25 April 2008 - 08:18 PM
This page 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 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.
reedbeta.com - developer blog, OpenGL demos, and other projects
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












