Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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, R. M. Mar 13 '13 at 21:13

This question was marked as an exact duplicate of an existing 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

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.