Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

This question already has an answer here:

This is the code I have in my mathematica notebook. I want to find the eigenvalues of the matrix I created called Hmatrix as defined below. However when I type Eigenvalues[Hmatrix] I get the Hmatrix back with an extra set of brackets preceded by "Eigenvalues" again. Essentially, I am not getting the eigenvalues of this matrix and I wish to know what sort of syntax I have to use to find the eigenvalues of my Hmatrix.

ϵs = -13.6;
ϵso = -29.1;
ϵp = -14.1;
ssσ = -7.20;
spσ = 9.46;

θ = (π - β/2);

Hmatrix := 
 MatrixForm[{{ϵs, 0, ssσ, 
    Cos[θ]*spσ, -Sin[θ]*spσ, 
0}, {0, ϵs, 
ssσ, -Cos[θ]*spσ, -Sin[θ]*spσ, 
0}, {ssσ, ssσ, ϵso, 0, 0, 
0}, {Cos[θ]*spσ, Cos[θ]*spσ, 
0, ϵp, 0, 
0}, {-Sin[θ]*spσ, -Sin[θ]*spσ, 0, 
0, ϵp, 0}, {0, 0, 0, 0, 0, ϵp}}]
share|improve this question

marked as duplicate by whuber, Sjoerd C. de Vries, rm -rf Mar 13 '13 at 21:13

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Hmatrix is not an array of numbers: it is a MatrixForm object. Get rid of MatrixForm and try it. –  whuber Mar 13 '13 at 21:09

1 Answer 1

The problem is the MatrixForm in your code. This is only to be used for display purposes and should be avoided if one wants to do any calculations with the matrix.

share|improve this answer
    
So I should get rid of MatrixForm and use what's left instead to define my matrix? –  user17338 Mar 13 '13 at 21:12
    
@user17338 exactly –  Sjoerd C. de Vries Mar 13 '13 at 21:45

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