Jump to content


- - - - -

How to calculate Eigenvalues and vectors?


  • You cannot reply to this topic
1 reply to this topic

#1 marek-knows.com

    Valued Member

  • Members
  • PipPipPip
  • 189 posts
  • LocationOntario, Canada

Posted 25 April 2008 - 04:35 PM

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.
3D OpenGL, C++ Game Development Video Tutorials @
www.marek-knows.com

#2 Reedbeta

    DevMaster Staff

  • Administrators
  • 4979 posts
  • LocationBellevue, WA

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