# Analytical expression for the eigenvectors of a 3x3 real, symmetric matrix?

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?

EDIT

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:

http://arxiv.org/abs/physics/0610206

Here is the C and Fortran code of the paper:

http://www.mpi-hd.mpg.de/personalhomes/globes/3x3/index.html • 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. Apr 2 '12 at 18:20
• 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? Apr 2 '12 at 19:26
• 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). Apr 2 '12 at 20:27
• 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 ;) Apr 2 '12 at 20:40
• 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. Apr 3 '12 at 2:13

There's a newer (2017) closed-form formulation for the eigendecomposition of 2x2 and 3x3 Hermitian matrices here:

Charles-Alban Deledalle, Loic Denis, Sonia Tabti, Florence Tupin. Closed-form expressions of the eigen decomposition of 2x2 and 3x3 Hermitian matrices. [Research Report] Université de Lyon. 2017. hal-01501221f

It requires far less computation than either the result presented in the edit to the original question, or the Wolfram Alpha solution in the other answer.