5
$\begingroup$

I have a real symmetric matrix H which is in symbolic form, I need a matrix P that can diagonalize H; also P is orthogonal and its columns are the eigenvectors of H.

How can I doing this in mathematica? Below is my sample matrix.

 H = {{λ - u, -t, -Δ, 0},
     {-t, -λ - u, 0, -Δ}, 
     {-Δ, 0, -λ + u,  t},
     {0, -Δ, t, λ + u}} // MatrixForm  
$\endgroup$
  • $\begingroup$ Try searching the documentation. $\endgroup$ – b.gates.you.know.what Mar 7 '14 at 12:39
  • 3
    $\begingroup$ This question is not trival I think. The Eigenvetors only give the eigenvetors of my matrix. However, they do not form a orthogonal matrix P. @SimonWoods $\endgroup$ – an offer can't refuse Mar 7 '14 at 13:18
  • $\begingroup$ @b.gatessucks How to do this neatly also ensure P is an orthogonal matrix? As the answer below, you can easily check that column 3 and column 4 are not orthogonal(their inner product is not zero). Though you can normalize each row to make any two rows are orthogonal, but how can you ensure any columns are orthogonal at the same time? $\endgroup$ – an offer can't refuse Mar 7 '14 at 13:41
  • $\begingroup$ @SimonWoods After doing P = Transpose[Eigenvectors[H]] as you suggested, a normalization procedure of each column in P should also be done. After that, P will be an orthogonal matrix with its columns are the eigenvectors of H. Am I right? $\endgroup$ – an offer can't refuse Mar 7 '14 at 14:29
8
$\begingroup$
H = {{λ - u, -t, -Δ, 0},
     {-t, -λ - u, 0, -Δ}, 
     {-Δ, 0, -λ + u,  t},
     {0, -Δ, t, λ + u}};
P=Transpose[Eigenvectors[H]] // Simplify;

Now you have to orthogonalize the matrix:

POrt = P.Inverse[Sqrt[Simplify[Transpose[P].P]]];
| improve this answer | |
$\endgroup$
  • $\begingroup$ Please look my question details. @bcp >Require "P is orthogonal" $\endgroup$ – an offer can't refuse Mar 7 '14 at 13:12
  • $\begingroup$ I corrected the answer... $\endgroup$ – bcp Mar 7 '14 at 13:50
  • $\begingroup$ Thanks, this should work in principle. $\endgroup$ – an offer can't refuse Mar 7 '14 at 14:15

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