Recognitions:
Gold Member
Staff Emeritus

## diagonalizing a 3x3 second derivative matrix

I've been working on this problem lately where I've been looking at the second derivatives of 2D and 3D density fields. Now, the second derivatives of the field can be represented in a matrix, which can be thought of as an N-dimensional ellipse with the principal axes aligned along some angle in which the second derivative matrix is diagonal.

Anyway, I've solved the full problem in 2D (angle and all), but in 3D, I've only been able to diagonalize the matrix. I haven't yet figured out how to determine the angle that represents. Does an easy analytic solution exist for this or will I have to resort to numerical guesstimations?

 PhysOrg.com science news on PhysOrg.com >> 'Whodunnit' of Irish potato famine solved>> The mammoth's lament: Study shows how cosmic impact sparked devastating climate change>> Curiosity Mars rover drills second rock target
 Blog Entries: 47 Recognitions: Gold Member Homework Help Science Advisor Did you determine the eigenvectors of this matrix? Knowing those, you can use the dot-product to determine the various direction cosines.

Recognitions:
Gold Member
Staff Emeritus
 Quote by robphy Did you determine the eigenvectors of this matrix? Knowing those, you can use the dot-product to determine the various direction cosines.
Well, I probably wasn't very clear. I don't need a solution for an individual matrix, but rather a more general one (for simulation purposes). I've since been pointed to a fortran library that can do the job, however, so everything is taken care of. Thanks, though.

Recognitions:
Homework Help

## diagonalizing a 3x3 second derivative matrix

the answer he gave you was for a general situation. the eigenvalues are roots of the characteristic polynomial, which has a general formula, the same for all matrices.

Recognitions:
Gold Member
Staff Emeritus
 Quote by mathwonk the answer he gave you was for a general situation. the eigenvalues are roots of the characteristic polynomial, which has a general formula, the same for all matrices.
I understand that, but it wasn't the method I was looking for, it was the result. Also, as I said, I already have a general result for the eigenvalues, it's the eigenvectors I need now. The book I have at hand only gives a general outline for determining eigenvectors on a case-by-case basis (parameterizations and such), but I was hoping I could avoid generalizing that numerically and just jump to a single formula. A friend of mine pointed me to LAPACK, a library for solving these things numerically, so it's taken care of now. My apologies if my question wasn't very clear.

 Recognitions: Homework Help Science Advisor i still do not understand how a general method does not give you a general result. do you mean you wanted someone to write down the characteristic polynomial for you? if so, it is just the determinant of the matrix [A - XId], where A is the matrix of second partials, or do you also want me to write down the determinant?

Recognitions:
Gold Member