I am writing an algorithm that process 3D images based on the local moment of inertia.

I have a 3x3 real symmetric matrix, from which I need to find the eigenvalues. I have found a variety of generic algorithm for the diagonalization of matrices out there, but I could not get to know if there exists an analytical expression for the 3 eigenvctors of such a matrix.

Would someone proficient in maths know that?


For the record here is what I have found on the question myself. As Matthias Odisio said, you can't get down to a simple analytical expression as soon as you have a 3x3 matrix.

I have found however a dedicated paper for the special case a 3x3 hermitian matrices, where various numerical specialized approaches are compared:


Here is the C and Fortran code of the paper:



Wolfram|Alpha has made such things easy:

enter image description here

| improve this answer | |
  • $\begingroup$ Nice. I wasn't aware that you could do things like that in the free online tool. I'll have to check it out to see how much of Mathematica it gives you. $\endgroup$ – Jason R Apr 2 '12 at 18:20
  • $\begingroup$ Ouch! I guess this is why people turn to numerical resolution. This is barely readable. On top of that I see imaginary numbers there. I guess I should have added that a,b c, d, e, and f were real. Can you do that in Mathematica? $\endgroup$ – Jean-Yves Apr 2 '12 at 19:26
  • $\begingroup$ Mathematica has a comprehensive way to define "fundamental operators" (Sqrt, Power, Log, etc.) for complex numbers (branch cut issues, etc.). Rest assured that whatever real values you replace the symbols 'a', ..., 'f' with, the eigenvectors will be real (ie. their imaginary parts will be less than, say, 10^-12). $\endgroup$ – Matthias Odisio Apr 2 '12 at 20:27
  • $\begingroup$ I have found out that you can build in such assumptions using syntax like "a [Element] Reals". But from now on, I need a Mathematica license, which I don't have ;) $\endgroup$ – Jean-Yves Apr 2 '12 at 20:40
  • 2
    $\begingroup$ It is necessary to express the quantities using complex numbers, even if the entries a, ..., f are real numbers. A colleague pointed me to en.wikipedia.org/wiki/Casus_irreducibilis which explains the problem. $\endgroup$ – Matthias Odisio Apr 3 '12 at 2:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.